diff --git a/koboldsim/cards.go b/koboldsim/cards.go index 0ad249a..8fd438d 100644 --- a/koboldsim/cards.go +++ b/koboldsim/cards.go @@ -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."`), diff --git a/koboldsim/cardtypes.go b/koboldsim/cardtypes.go index 9f4948f..d81a412 100644 --- a/koboldsim/cardtypes.go +++ b/koboldsim/cardtypes.go @@ -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 +}