aboutsummaryrefslogtreecommitdiff
path: root/go/game/cardImplementations.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-09-05 18:28:47 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-09-05 18:28:47 +0200
commit034e176110cc0a27cd20bdfe8522fd0dc73d2346 (patch)
treee0198741c94fb3af7777056c031e74100f4f9bb5 /go/game/cardImplementations.go
parent611c8cd048ca216c16da6744ce2052d9dc000c83 (diff)
downloadmuhqs-game-034e176110cc0a27cd20bdfe8522fd0dc73d2346.tar.gz
muhqs-game-034e176110cc0a27cd20bdfe8522fd0dc73d2346.zip
implement more prompts and exp1/backup!
Diffstat (limited to 'go/game/cardImplementations.go')
-rw-r--r--go/game/cardImplementations.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/go/game/cardImplementations.go b/go/game/cardImplementations.go
index ea07ccf4..f7f765d5 100644
--- a/go/game/cardImplementations.go
+++ b/go/game/cardImplementations.go
@@ -728,6 +728,26 @@ func (*unholyCannonballImpl) onPlay(a *PlayAction) {
}
}
+// ====== Exp1 Set ======
+
+type backupImpl struct{ cardImplementationBase }
+
+func (*backupImpl) onPlay(a *PlayAction) {
+ p := a.Controller()
+ units := p.PromptAlliedUnitSelection(0, 1)
+ if len(units) == 0 {
+ return
+ }
+ constraint := conjunction(
+ rangeTargetConstraint(units[0].Tile(), 1),
+ availableTileConstraint(a, NewCard("base/recruit")),
+ )
+ tiles := p.PromptTilesSelection(constraint, 0, 2)
+ for _, tile := range tiles {
+ p.gameState.addNewUnit(NewCard("base/recruit"), tile.Position, p)
+ }
+}
+
type illusionistImpl struct{ cardImplementationBase }
func (*illusionistImpl) fullActions(u *Unit) []*FullAction {
@@ -879,6 +899,7 @@ func init() {
"kraken/tides_change!": &tidesChangeImpl{},
"kraken/unholy_cannonball": &unholyCannonballImpl{},
+ "exp1/backup!": &backupImpl{},
"exp1/illusion": &illusionImpl{},
"exp1/illusionist": &illusionistImpl{},
"exp1/patrician": &patricianImpl{},