summaryrefslogtreecommitdiff
path: root/src/card/effect.rs
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2024-02-09 16:13:01 -0800
committerChristian Cunningham <cc@localhost>2024-02-09 16:13:01 -0800
commit5566537157361003277f043b8e3ea9a387ebb206 (patch)
tree6143b6e799df557de3c3e2a78f51fc02a734a9cc /src/card/effect.rs
parent5f3e5f473c6d7a45297c4d301eb2a2d61078586b (diff)
More Verbose Card Activatables
Diffstat (limited to 'src/card/effect.rs')
-rw-r--r--src/card/effect.rs30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/card/effect.rs b/src/card/effect.rs
index a5f909e..65e54c7 100644
--- a/src/card/effect.rs
+++ b/src/card/effect.rs
@@ -2,7 +2,7 @@
#[derive(Copy,Clone)]
pub struct CardEffect {
pub name: &'static str,
- pub when: usize, // TODO: Change this
+ pub when: CardEffectStates, // TODO: Change this
pub fun: &'static dyn Fn(),
}
@@ -12,3 +12,31 @@ impl core::fmt::Debug for CardEffect {
}
}
+#[allow(dead_code)]
+#[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,
+}
+
+impl Default for CardEffectStates {
+ fn default() -> Self {
+ Self {
+ DRAW: false,
+ BEFORE_PLACE: false,
+ DURING_PLACE: false,
+ AFTER_PLACE: false,
+ BEFORE_ATTACK: false,
+ DURING_ATTACK: false,
+ AFTER_ATTACK: false,
+ END_TURN: false,
+ }
+ }
+}