Various bug fixes and improvements.
This commit is contained in:
@@ -2,7 +2,6 @@ package game
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"slices"
|
||||
)
|
||||
|
||||
// BattleUnit is a pet in play with its attached foods applied. Power
|
||||
@@ -1165,19 +1164,20 @@ func (g *Game) runBattle() *BattleResult {
|
||||
Text: fmt.Sprintf("%s eats an apple (now +%d).", q.unit.Card.Name, q.unit.Bonus)})
|
||||
}
|
||||
case ActionShuffleApples:
|
||||
// Komodo: only if it's the side's first pet, shuffle apples into
|
||||
// random deck positions (deterministic via the battle draw tape).
|
||||
// Komodo: only if it's the side's first pet, add apples to the
|
||||
// remaining deck and shuffle the whole thing so the apples and the
|
||||
// existing pets intermix (not just apples dropped in).
|
||||
if q.effect.Condition == ConditionFirstPet && sides[q.seat].petsPlayed != 1 {
|
||||
continue
|
||||
}
|
||||
s := sides[q.seat]
|
||||
for range q.effect.count() {
|
||||
pos := g.battleDraw(len(s.stack) + 1)
|
||||
apple := g.newApple()
|
||||
s.stack = slices.Insert(s.stack, pos, apple)
|
||||
s.stack = append(s.stack, apple)
|
||||
emit(BattleEvent{Type: "summon", Seat: q.seat, Card: &apple,
|
||||
Text: fmt.Sprintf("%s shuffles an apple into %s's deck.", q.unit.Card.Name, pname(q.seat))})
|
||||
}
|
||||
g.battleShuffle(s.stack)
|
||||
case ActionSpendRocks:
|
||||
// Nurse Shark: spend as many Trumpets as available (up to Count) to
|
||||
// throw two rocks each.
|
||||
|
||||
Reference in New Issue
Block a user