diff options
| author | Christian Cunningham <cc@localhost> | 2024-02-09 16:26:51 -0800 |
|---|---|---|
| committer | Christian Cunningham <cc@localhost> | 2024-02-09 16:26:51 -0800 |
| commit | 40441f9a7a38fe95396e7a6dc7fb08397529b55d (patch) | |
| tree | d9c95fe379552e806529f897e58d3231c2972bfd /src/card/effect.rs | |
| parent | 5566537157361003277f043b8e3ea9a387ebb206 (diff) | |
Diffstat (limited to 'src/card/effect.rs')
| -rw-r--r-- | src/card/effect.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/card/effect.rs b/src/card/effect.rs index 65e54c7..24d0a0a 100644 --- a/src/card/effect.rs +++ b/src/card/effect.rs @@ -2,13 +2,14 @@ #[derive(Copy,Clone)] pub struct CardEffect { pub name: &'static str, - pub when: CardEffectStates, // TODO: Change this - pub fun: &'static dyn Fn(), + pub description: &'static str, + pub when: CardEffectStates, + pub handle: &'static dyn Fn(), } impl core::fmt::Debug for CardEffect { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(f, "{}", self.name) + write!(f, "*{}* {}", self.name, self.description) } } @@ -16,14 +17,14 @@ impl core::fmt::Debug for CardEffect { #[allow(non_snake_case)] #[derive(Copy, Clone)] pub struct CardEffectStates { - DRAW: bool, - BEFORE_PLACE: bool, - DURING_PLACE: bool, - AFTER_PLACE: bool, - BEFORE_ATTACK: bool, - DURING_ATTACK: bool, - AFTER_ATTACK: bool, - END_TURN: bool, + pub DRAW: bool, + pub BEFORE_PLACE: bool, + pub DURING_PLACE: bool, + pub AFTER_PLACE: bool, + pub BEFORE_ATTACK: bool, + pub DURING_ATTACK: bool, + pub AFTER_ATTACK: bool, + pub END_TURN: bool, } impl Default for CardEffectStates { |
