From 219ff33d66ea1b66fefe84ab5a45b4406bddfbc8 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 29 Sep 2024 10:32:57 -0700 Subject: [PATCH] Rewrite Warborn military creche option --- koboldsim/cards.go | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/koboldsim/cards.go b/koboldsim/cards.go index d59ca72..074be61 100644 --- a/koboldsim/cards.go +++ b/koboldsim/cards.go @@ -10,34 +10,22 @@ var cards = []Card{ 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{ + &TablePolicy{ 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."`), EnactedDesc: cardsim.MsgStr("[current policy] Your war chief is presently monitoring the situation, building up your military, and securing your creches."), - Do: func(p *Player) (cardsim.Message, error) { - p.Stats.BasePopulation += 100 - p.Stats.Scavenging += 1 - p.Stats.Militarism += 2 - p.Stats.FoodSupply += 1 - p.Stats.ForeignRelations -= 2 - p.Stats.Rebellion -= 3 - p.Stats.Madness += 1 - p.Stats.Cruelty += 1 - p.Stats.Authoritarianism += 4 - return cardsim.MsgStr("Kobolds are known to be born warriors."), nil + EffectsTable: map[FieldLabel]float64{ + BasePopulation: 100, + Scavenging: 1, + Militarism: 2, + FoodSupply: 1, + ForeignRelations: -2, + Rebellion: -3, + Madness: 1, + Cruelty: 1, + Authoritarianism: 4, }, - Undo: func(p *Player) error { - p.Stats.BasePopulation -= 100 - p.Stats.Scavenging -= 1 - p.Stats.Militarism -= 2 - p.Stats.FoodSupply -= 1 - p.Stats.ForeignRelations += 2 - p.Stats.Rebellion += 3 - p.Stats.Madness -= 1 - p.Stats.Cruelty -= 1 - p.Stats.Authoritarianism -= 4 - return nil - }, - CanDo: YesWeCan, + EnactionDesc: cardsim.MsgStr("Kobolds are known to be born warriors."), + CanDo: YesWeAlsoCan, }, &BasicPolicy{ UnenactedDesc: cardsim.MsgStr(`Your head miner considers the matter worriedly. "Creches under military control? No. That would invite chaos. We need to dig deeper; we can have a peaceful, orderly society if we just get far enough away from surfacers."`),