summaryrefslogtreecommitdiff
path: root/engine/card/predicate
diff options
context:
space:
mode:
Diffstat (limited to 'engine/card/predicate')
-rw-r--r--engine/card/predicate/predicate.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/engine/card/predicate/predicate.go b/engine/card/predicate/predicate.go
new file mode 100644
index 0000000..5770c3d
--- /dev/null
+++ b/engine/card/predicate/predicate.go
@@ -0,0 +1,18 @@
+package predicate
+
+import (
+ "sakura/engine"
+ "sakura/engine/card"
+)
+
+func Reaction(c engine.IsCard) bool {
+ _, ok := c.(card.IsReaction)
+ return ok
+}
+
+func ReactionApplicable(c engine.IsCard) bool {
+ r, isReaction := c.(card.IsReaction)
+ if isReaction {
+ return r.Applicable(c)
+ }
+}