diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-09-04 19:53:52 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-09-04 19:53:52 +0200 |
| commit | 045a2ebbc5cac9ba5bdb707c78fb613454575064 (patch) | |
| tree | edfd1a1c68386cc338962fbc9c14f2339bcd854a /go/game/cardImplementations.go | |
| parent | 7ba6e029ce6e90123d867d9ce74ab49420f3f3b9 (diff) | |
| download | muhqs-game-045a2ebbc5cac9ba5bdb707c78fb613454575064.tar.gz muhqs-game-045a2ebbc5cac9ba5bdb707c78fb613454575064.zip | |
implement recycle!
Diffstat (limited to 'go/game/cardImplementations.go')
| -rw-r--r-- | go/game/cardImplementations.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/go/game/cardImplementations.go b/go/game/cardImplementations.go index 478e1681..926a3cad 100644 --- a/go/game/cardImplementations.go +++ b/go/game/cardImplementations.go @@ -794,6 +794,20 @@ func (*patricianImpl) freeActions(p Permanent) []*FreeAction { return []*FreeAction{m, a, ar, d, r} } +type recycleImpl struct{ cardImplementationBase } + +func (*recycleImpl) playTargets() TargetDesc { + return TargetDesc{"cards from your discard pile", "0-2"} +} + +func (*recycleImpl) onPlay(a *PlayAction) { + p := a.Controller() + cards := a.Target().Selection() + for _, card := range cards { + p.DiscardPile.MoveCard(card.(*Card), p.Hand) + } +} + func init() { cardImplementations = map[string]cardImplementation{ "base/advisor": &advisorImpl{}, @@ -845,5 +859,6 @@ func init() { "exp1/illusion": &illusionImpl{}, "exp1/illusionist": &illusionistImpl{}, "exp1/patrician": &patricianImpl{}, + "exp1/recycle!": &recycleImpl{}, } } |
