summaryrefslogtreecommitdiff
path: root/engine/card/predicate/predicate.go
blob: 5770c3d6b014334eaef6fc4e5e255b92b328eb7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)
	}
}