Oops, forgot to shuffle the card back in.

This commit is contained in:
2023-04-03 01:36:47 -07:00
parent fb5aaeccfc
commit 5728dd95f0
2 changed files with 10 additions and 3 deletions

View File

@ -37,7 +37,7 @@ type SwitchingCard struct {
Name cardsim.Message
Desc cardsim.Message
IsUrgent bool
After func(*SwitchingCard, *Player, CardOption) error
After func(Card, *Player, CardOption) error
Policies []Policy
lastPolicy Policy
}
@ -221,3 +221,9 @@ func (v *VerbosePolicy) Is(p Policy) bool {
}
return false
}
// ShuffleIntoBottomHalf is a common "what to do with the card after?" behavior.
func ShuffleIntoBottomHalf(c Card, p *Player, _ CardOption) error {
p.Deck.InsertRandomBottom(0.5, c)
return nil
}