logic_constructor 0.1.0

Move combat and ability logic out of code and into HOCON config — designers tweak damage, healing, and targeting in a text file; the engine parses it into typed actions and runs them against your entities.
Documentation
1
2
3
4
5
6
7
8
use crate::lc_entity::LcEntity;
use crate::lc_entity_type::LcEntityType;

/// A generic action which source performs onto a target.
pub trait LcAction<T: LcEntityType> {
    fn apply(&self, source: &LcEntity<T>, target: &LcEntity<T>);
    fn clone_box(&self) -> Box<dyn LcAction<T>>;
}