summaryrefslogtreecommitdiff
path: root/src/card/effect.rs
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2024-02-09 16:26:51 -0800
committerChristian Cunningham <cc@localhost>2024-02-09 16:26:51 -0800
commit40441f9a7a38fe95396e7a6dc7fb08397529b55d (patch)
treed9c95fe379552e806529f897e58d3231c2972bfd /src/card/effect.rs
parent5566537157361003277f043b8e3ea9a387ebb206 (diff)
Added Card To List of CardsHEADmaster
Diffstat (limited to 'src/card/effect.rs')
-rw-r--r--src/card/effect.rs23
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 {