summaryrefslogtreecommitdiff
path: root/src/card/effect.rs
diff options
context:
space:
mode:
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 {