Oops, forgot to shuffle the card back in.

This commit is contained in:
Kistaro Windrider 2023-04-03 01:36:47 -07:00
parent fb5aaeccfc
commit 5728dd95f0
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8
2 changed files with 10 additions and 3 deletions

View File

@ -4,8 +4,9 @@ import "git.chromaticdragon.app/kistaro/CardSimEngine/cardsim"
var cards = []Card{
&SwitchingCard{
Name: cardsim.MsgStr("Warborn"),
Desc: cardsim.MsgStr(" A surge of anti-kobold sentiment has been reported by your spies on the surface and your military is concerned that anti-kobold vigilantes will attack the tunnels in the near-future. They want to build up now while doing so is safe."),
Name: cardsim.MsgStr("Warborn"),
Desc: cardsim.MsgStr(" A surge of anti-kobold sentiment has been reported by your spies on the surface and your military is concerned that anti-kobold vigilantes will attack the tunnels in the near-future. They want to build up now while doing so is safe."),
After: ShuffleIntoBottomHalf,
Policies: []Policy{
&BasicPolicy{
UnenactedDesc: cardsim.MsgStr(`Your war chief paces irritably. "We have terrible threats facing us. It's imperative that we build up our numbers in both the military and the domestic sense. I want creches under military control and a good hunting crew to supply them with food."`),

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
}