aboutsummaryrefslogtreecommitdiff
path: root/go/game/cardImplementations.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-09-05 17:21:39 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-09-05 17:21:39 +0200
commit18dfde76df708631089d39f63394f3a8c1dc9df7 (patch)
treecdc4f061a09ecab7aca7567626a13373e28dd667 /go/game/cardImplementations.go
parentc9dc8b00a9ed5067ee9f311c14b199b2f9bd93db (diff)
downloadmuhqs-game-18dfde76df708631089d39f63394f3a8c1dc9df7.tar.gz
muhqs-game-18dfde76df708631089d39f63394f3a8c1dc9df7.zip
implement discard event and reformer
Diffstat (limited to 'go/game/cardImplementations.go')
-rw-r--r--go/game/cardImplementations.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/go/game/cardImplementations.go b/go/game/cardImplementations.go
index 1f7af599..ea07ccf4 100644
--- a/go/game/cardImplementations.go
+++ b/go/game/cardImplementations.go
@@ -816,6 +816,21 @@ func (*recycleImpl) onPlay(a *PlayAction) {
}
}
+type reformerImpl struct{ cardImplementationBase }
+
+func (*reformerImpl) fullActions(u *Unit) []*FullAction {
+ fa := newFullAction(u, func(Action) ActionResolveFunc {
+ return func(s *LocalState) {
+ s.addTrigger(newOwnDiscardTrigger(u, false, true, func(s *LocalState, e Event) ActionResolveFunc {
+ return func(*LocalState) {
+ u.Controller().DrawN(len(e.affected))
+ }
+ }, "reformer draw"))
+ }
+ }, "draw for discard")
+ return []*FullAction{fa}
+}
+
func init() {
cardImplementations = map[string]cardImplementation{
"base/advisor": &advisorImpl{},
@@ -869,5 +884,6 @@ func init() {
"exp1/patrician": &patricianImpl{},
"exp1/power_to_the_people!": &powerToThePeopleImpl{},
"exp1/recycle!": &recycleImpl{},
+ "exp1/reformer": &reformerImpl{},
}
}