Compare commits

..

No commits in common. "39e4c94b6fd75c4f47c49847780abdcb0160e83a" and "b2099586fc7cd7d6f0c641ad4a362b0febd1fa2b" have entirely different histories.

2 changed files with 191 additions and 156 deletions

View File

@ -121,38 +121,50 @@ var cards = []Card{
&TablePolicy{ &TablePolicy{
UnenactedDesc: cardsim.MsgStr(`Your Minister of Finance greets you exuberantly. "We've trimmed the wages of the bureaucracy beautifully, but maybe we can scout some outright volunteers. Some tribes are absolute disasters, after all.`), UnenactedDesc: cardsim.MsgStr(`Your Minister of Finance greets you exuberantly. "We've trimmed the wages of the bureaucracy beautifully, but maybe we can scout some outright volunteers. Some tribes are absolute disasters, after all.`),
EnactedDesc: cardsim.MsgStr(`[current policy] It's hard to find volunteer workers at the festival, but your tribe is doing its best.`), EnactedDesc: cardsim.MsgStr(`[current policy] It's hard to find volunteer workers at the festival, but your tribe is doing its best.`),
EffectsTable: map[FieldLabel]float64{ Do: func(p *Player) (cardsim.Message, error) {
BasePopulation: 10, p.Stats.BasePopulation += 10
Bureaucracy: -2, p.Stats.Bureaucracy -= 2
Rebellion: 1, p.Stats.Rebellion += 1
Gullibility: 2, return cardsim.MsgStr("The local bureaucracy is staffed by volunteer labor."), nil
Authoritarianism: -1, },
Undo: func(p *Player) error {
p.Stats.BasePopulation -= 10
p.Stats.Bureaucracy += 2
p.Stats.Rebellion -= 1
return nil
}, },
EnactionDesc: cardsim.MsgStr("The local bureaucracy is staffed by volunteer labor."),
CanDo: func(t *TablePolicy, p *Player) bool { CanDo: func(t *TablePolicy, p *Player) bool {
return p.Stats.Bureaucracy < 2 && t.LastEnactedIdx != 3 return p.Stats.Bureaucracy < 2 && t.LastEnactedIdx != 3
}, },
}, },
&TablePolicy{ &BasicPolicy{
UnenactedDesc: cardsim.MsgStr(`One of your non-bureaucrat friends has been in a foul temper. "This festival is everything that's wrong with our society. Life isn't about filling out forms. We ought to snub this festival and outright fire a bunch of paper-pushers."`), UnenactedDesc: cardsim.MsgStr(`One of your non-bureaucrat friends has been in a foul temper. "This festival is everything that's wrong with our society. Life isn't about filling out forms. We ought to snub this festival and outright fire some bureaucrats."`),
EnactedDesc: cardsim.MsgStr("Your tribe currently bans the Pan-Tribal Festival of Bureaucracy. There will be no local celebration without a policy change."), EnactedDesc: cardsim.MsgStr("Your tribe currently bans the Pan-Tribal Festival of Bureaucracy. There will be no local celebration without a policy change."),
EffectsTable: map[FieldLabel]float64{ Do: func(p *Player) (cardsim.Message, error) {
BasePopulation: 80, p.Stats.BasePopulation -= 80
Bureaucracy: 4, p.Stats.Bureaucracy -= 4
Gullibility: 4, return cardsim.MsgStr("A wave of bureaucrats just emigrated along with kobolds incensed by the tribe's lack of respect for administration."), nil
}, },
EnactionDesc: cardsim.MsgStr("A wave of bureaucrats just emigrated along with kobolds incensed by the tribe's lack of respect for administration."), Undo: func(p *Player) error {
CanDo: YesWeAlsoCan, p.Stats.BasePopulation += 80
p.Stats.Bureaucracy += 4
return nil
},
CanDo: YesWeCan,
}, },
&VerbosePolicy{ &VerbosePolicy{
Default: &TablePolicy{ Default: &BasicPolicy{
UnenactedDesc: cardsim.MsgStr("Some kobolds will attend the festival on their own, and we may face desertions for our lack of interest."), UnenactedDesc: cardsim.MsgStr("Some kobolds will attend the festival on their own, and we may face desertions for our lack of interest."),
EnactedDesc: cardsim.MsgStr("Some kobolds will attend the festival on their own. No change is expected."), EnactedDesc: cardsim.MsgStr("Some kobolds will attend the festival on their own. No change is expected."),
EffectsTable: map[FieldLabel]float64{ Do: func(p *Player) (cardsim.Message, error) {
BasePopulation: -20, p.Stats.BasePopulation -= 20
return cardsim.MsgStr("A festival of bureaucracy lured away a few kobolds to other tribes."), nil
}, },
EnactionDesc: cardsim.MsgStr("A festival of bureaucracy lured away a few kobolds to other tribes."), Undo: func(p *Player) error {
CanDo: YesWeAlsoCan, p.Stats.BasePopulation += 20
return nil
},
CanDo: YesWeCan,
}, },
Variants: []Policy{ Variants: []Policy{
nil, nil,
@ -182,81 +194,137 @@ var cards = []Card{
Desc: cardsim.MsgStr("An inevitable concern of kobold tribes is the matter of trade. Trade with other kobolds is straightforward, but overland caravans are unsafe. Trade with surfacers is vital... but achieving it is difficult owing to anti-kobold sentiment."), Desc: cardsim.MsgStr("An inevitable concern of kobold tribes is the matter of trade. Trade with other kobolds is straightforward, but overland caravans are unsafe. Trade with surfacers is vital... but achieving it is difficult owing to anti-kobold sentiment."),
After: ShuffleIntoBottomHalf, After: ShuffleIntoBottomHalf,
Policies: []Policy{ Policies: []Policy{
&TablePolicy{ &BasicPolicy{
UnenactedDesc: cardsim.MsgStr(`Speaking for the conservative opinion, one prospective merchant says, "We need illusions. Our priority needs to be studying or trading to acquire or create spells or artifacts of disguising. The high start-up costs will be balanced by subsequent free movement in a surface society that detests us."`), UnenactedDesc: cardsim.MsgStr(`Speaking for the conservative opinion, one prospective merchant says, "We need illusions. Our priority needs to be studying or trading to acquire or create spells or artifacts of disguising. The high start-up costs will be balanced by subsequent free movement in a surface society that detests us."`),
EnactedDesc: cardsim.MsgStr("[current policy] Your merchants rely on magical disguises to avoid being identified as kobolds while doing business on the surface."), EnactedDesc: cardsim.MsgStr("[current policy] Your merchants rely on magical disguises to avoid being identified as kobolds while doing business on the surface."),
EffectsTable: map[FieldLabel]float64{ Do: func(p *Player) (cardsim.Message, error) {
Manufacturing: 3, p.Stats.Manufacturing += 3
Logistics: 4, p.Stats.Logistics += 4
Mining: 1, p.Stats.Mining += 1
Alchemy: 1, p.Stats.Alchemy += 1
Gadgetry: 1, p.Stats.Gadgetry += 1
Scavenging: 1, p.Stats.Scavenging += 1
FoodSupply: 1, p.Stats.FoodSupply += 1
Secrecy: 5, p.Stats.Secrecy += 5
Rebellion: 1, p.Stats.Rebellion += 1
Greed: 1, p.Stats.Greed += 1
Gullibility: 1, p.Stats.Gullibility += 1
return cardsim.MsgStr("Nobody ever meets a kobold merchant."), nil
}, },
EnactionDesc: cardsim.MsgStr("Nobody ever meets a kobold merchant."), Undo: func(p *Player) error {
CanDo: YesWeAlsoCan, p.Stats.Manufacturing -= 3
p.Stats.Logistics -= 4
p.Stats.Mining -= 1
p.Stats.Alchemy -= 1
p.Stats.Gadgetry -= 1
p.Stats.Scavenging -= 1
p.Stats.FoodSupply -= 1
p.Stats.Secrecy -= 5
p.Stats.Rebellion -= 1
p.Stats.Greed -= 1
p.Stats.Gullibility -= 1
return nil
},
CanDo: YesWeCan,
}, },
&TablePolicy{ &BasicPolicy{
UnenactedDesc: cardsim.MsgStr(`Brave but potentially headstrong, another prospective merchant has attended the meeting with the following plea. "We must take head-on the risk of improving the status of kobolds! Only by bravely attending the surface markets can we hope to achieve a true and lasting peace!"`), UnenactedDesc: cardsim.MsgStr(`Brave but potentially headstrong, another prospective merchant has attended the meeting with the following plea. "We must take head-on the risk of improving the status of kobolds! Only by bravely attending the surface markets can we hope to achieve a true and lasting peace!"`),
EnactedDesc: cardsim.MsgStr(`[current policy] Your merchants represent the tribe's peaceful ideals by visiting the surface openly despite occasional casaulties.`), EnactedDesc: cardsim.MsgStr(`[current policy] Your merchants represent the tribe's peaceful ideals by visiting the surface openly despite occasional casaulties.`),
EffectsTable: map[FieldLabel]float64{ Do: func(p *Player) (cardsim.Message, error) {
BasePopulation: -15, p.Stats.BasePopulation -= 15
Manufacturing: 3, p.Stats.Manufacturing += 3
Logistics: 4, p.Stats.Logistics += 4
Mining: 2, p.Stats.Mining += 1
Alchemy: 1, p.Stats.Alchemy += 2
Gadgetry: 2, p.Stats.Gadgetry += 2
Hospitality: 1, p.Stats.Hospitality += 1
Publishing: 1, p.Stats.Publishing += 1
ForeignRelExpense: 1, p.Stats.ForeignRelExpense += 1
Militarism: -1, p.Stats.Militarism -= 1
Scavenging: -1, p.Stats.Scavenging -= 1
Secrecy: -10, p.Stats.Secrecy -= 10
ForeignRelations: 5, p.Stats.ForeignRelations += 5
FoodSupply: 3, p.Stats.FoodSupply += 3
Greed: 1, p.Stats.Greed += 1
Madness: -1, p.Stats.Madness -= 1
Cruelty: -1, p.Stats.Cruelty -= 1
return cardsim.MsgStr("The tribe formally plans for attrition among its merchants."), nil
}, },
EnactionDesc: cardsim.MsgStr("The tribe formally plans for attrition among its merchants."), Undo: func(p *Player) error {
CanDo: YesWeAlsoCan, p.Stats.BasePopulation += 15
p.Stats.Manufacturing -= 3
p.Stats.Logistics -= 4
p.Stats.Mining -= 1
p.Stats.Alchemy -= 2
p.Stats.Gadgetry -= 2
p.Stats.Hospitality -= 1
p.Stats.Publishing -= 1
p.Stats.ForeignRelExpense -= 1
p.Stats.Militarism += 1
p.Stats.Scavenging += 1
p.Stats.Secrecy += 10
p.Stats.ForeignRelations -= 5
p.Stats.FoodSupply -= 3
p.Stats.Greed -= 1
p.Stats.Madness -= 1
p.Stats.Cruelty -= 1
return nil
},
CanDo: YesWeCan,
}, },
&TablePolicy{ &BasicPolicy{
UnenactedDesc: cardsim.MsgStr(`A shady scavenger has offered to change careers and become a merchant. Their proposal is, "Surfacers aren't all monolithic. If we talk to the ones who are more greedy than prejudiced, we don't need magic or idealism. We can get in contact with lots of people who'll buy lots of things from us, even things that might not have a market if we worked with 'good' merchants."`), UnenactedDesc: cardsim.MsgStr(`A shady scavenger has offered to change careers and become a merchant. Their proposal is, "Surfacers aren't all monolithic. If we talk to the ones who are more greedy than prejudiced, we don't need magic or idealism. We can get in contact with lots of people who'll buy lots of things from us, even things that might not have a market if we worked with 'good' merchants."`),
EnactedDesc: cardsim.MsgStr("[current policy] Your merchants work with the underworld of the surface, forging connections with the people who are ironically less likely to murder them."), EnactedDesc: cardsim.MsgStr("[current policy] Your merchants work with the underworld of the surface, forging connections with the people who are ironically less likely to murder them."),
EffectsTable: map[FieldLabel]float64{ Do: func(p *Player) (cardsim.Message, error) {
BasePopulation: -5, p.Stats.BasePopulation -= 5
Logistics: 1, p.Stats.Logistics += 1
Scavenging: 3, p.Stats.Scavenging += 3
Alchemy: 2, p.Stats.Alchemy += 2
Gadgetry: 2, p.Stats.Gadgetry += 2
Mining: -1, p.Stats.Mining -= 1
Manufacturing: -1, p.Stats.Manufacturing -= 1
HiddenRelPenalty: 2, //High is bad on this hidden stat. p.Stats.HiddenRelPenalty += 2 // High is bad on this hidden stat.
Greed: 3, p.Stats.Greed += 3
Gullibility: -2, p.Stats.Gullibility -= 2
return cardsim.MsgStr("Kobold merchants are instantly suspected of black market connections."), nil
}, },
EnactionDesc: cardsim.MsgStr("Kobold merchants are instantly suspected of black market connections."), Undo: func(p *Player) error {
CanDo: YesWeAlsoCan, p.Stats.BasePopulation += 5
p.Stats.Logistics -= 1
p.Stats.Scavenging -= 3
p.Stats.Alchemy -= 2
p.Stats.Gadgetry -= 3
p.Stats.Mining += 1
p.Stats.Manufacturing += 1
p.Stats.HiddenRelPenalty -= 2
p.Stats.Greed -= 3
p.Stats.Gullibility += 2
return nil
},
CanDo: YesWeCan,
}, },
&TablePolicy{ &BasicPolicy{
UnenactedDesc: cardsim.MsgStr(`A mining forebold registered for the right to attend this meeting to say, "Surfacers can't be trusted and we shouldn't be supporting them with trade. We need underground roads to ease trade with other kobolds. It's a massive investment, but think of the reward: a world of underground civilizations supporting each other."`), UnenactedDesc: cardsim.MsgStr(`A mining forebold registered for the right to attend this meeting, and says, "Surfacers can't be trusted and we shouldn't be supporting them with trade. We need underground roads to ease trade with other kobolds. It's a massive investment, but think of the reward: a world of underground civilizations supporting each other."`),
EnactedDesc: cardsim.MsgStr(`[currentpolicy] Your merchants have been directed to focus on trade with other kobolds, and your miners are perpetually tunnelling towards other kobold tribes in pursuit of the dream of a world of underground roads.`), EnactedDesc: cardsim.MsgStr(`[currentpolicy] Your merchants have been directed to focus on trade with other kobolds, and your miners are perpetually tunnelling towards other kobold tribes in pursuit of the dream of a world of underground roads.`),
EffectsTable: map[FieldLabel]float64{ Do: func(p *Player) (cardsim.Message, error) {
Mining: 5, p.Stats.Mining += 5
Construction: 2, p.Stats.Construction += 2
Logistics: 3, p.Stats.Logistics += 4
FoodSupply: -1, p.Stats.FoodSupply -= 1
Secrecy: 15, p.Stats.Secrecy += 15
Gullibility: -2, p.Stats.Gullibility -= 2
return cardsim.MsgStr("The vast network of caverns under the surface of the world is not a natural phenomenon."), nil
}, },
EnactionDesc: cardsim.MsgStr("The vast network of caverns under the surface of the world is not a natural phenomenon."), Undo: func(p *Player) error {
CanDo: YesWeAlsoCan, p.Stats.Mining -= 5
p.Stats.Construction -= 2
p.Stats.Logistics -= 4
p.Stats.FoodSupply += 1
p.Stats.Secrecy -= 15
p.Stats.Gullibility += 2
return nil
},
CanDo: YesWeCan,
}, },
&VerbosePolicy{ &VerbosePolicy{
Default: &BasicPolicy{ Default: &BasicPolicy{
@ -275,7 +343,7 @@ var cards = []Card{
UnenactedDesc: cardsim.MsgStr("Rejecting the illusion-based merchantry will cost us a great deal in trade and surface food, but we can certainly do it."), UnenactedDesc: cardsim.MsgStr("Rejecting the illusion-based merchantry will cost us a great deal in trade and surface food, but we can certainly do it."),
}, },
&BasicPolicy{ &BasicPolicy{
UnenactedDesc: cardsim.MsgStr("Rejecting our idealistic approach to surface trade will save a few lives directly, but consider how much we need the food we buy!"), UnenactedDesc: cardsim.MsgStr("Rejecting our idealistic approach to surface trade will save a few lives directly, but consider how much we need the food we might buy!"),
}, },
&BasicPolicy{ &BasicPolicy{
UnenactedDesc: cardsim.MsgStr("The surfacers' governments would certainly prefer us to abandon our underworld connections in their cities. Do we care about that? We'd be giving up some excellent profits."), UnenactedDesc: cardsim.MsgStr("The surfacers' governments would certainly prefer us to abandon our underworld connections in their cities. Do we care about that? We'd be giving up some excellent profits."),
@ -292,21 +360,32 @@ var cards = []Card{
Desc: cardsim.MsgStr("Nobody would ever say a kobold smells bad, but the constant burrowing, manufacturing, and metallurgy that is common to kobold life is still a recipe for tense muscles and filthy scales. A slate of proposals have come through to address this issue."), Desc: cardsim.MsgStr("Nobody would ever say a kobold smells bad, but the constant burrowing, manufacturing, and metallurgy that is common to kobold life is still a recipe for tense muscles and filthy scales. A slate of proposals have come through to address this issue."),
After: ShuffleIntoBottomHalf, After: ShuffleIntoBottomHalf,
Policies: []Policy{ Policies: []Policy{
&TablePolicy{ &BasicPolicy{
UnenactedDesc: cardsim.MsgStr(`A calm and cheerful scribe says, "We should have public baths! We have more problems with flooding than drought in the deep underground, so we've got plenty of water. We just need to channel it. We could create a hub of social life while improving the health of everybody!"`), UnenactedDesc: cardsim.MsgStr(`A calm and cheerful scribe says, "We should have public baths! We have more problems with flooding than drought in the deep underground, so we've got plenty of water. We just need to channel it. We could create a hub of social life while improving the health of everybody!"`),
EnactedDesc: cardsim.MsgStr("[current policy] Public bathing is a staple social policy in the mines and warrens of your tribe."), EnactedDesc: cardsim.MsgStr("[current policy] Public bathing is a staple social policy in the mines and warrens of your tribe."),
EffectsTable: map[FieldLabel]float64{ Do: func(p *Player) (cardsim.Message, error) {
Construction: 2, p.Stats.Construction += 2
Welfare: 1, p.Stats.Welfare += 1
Healthcare: 1, p.Stats.Healthcare += 1
ParksExpense: 4, p.Stats.ParksExpense += 4
Hospitality: 1, p.Stats.Hospitality += 1
Madness: -1, p.Stats.Madness -= 1
Cruelty: -1, p.Stats.Cruelty -= 1
Greed: -1, p.Stats.Greed -= 1
return cardsim.MsgStr("The company of others makes cold water tolerable."), nil
}, },
EnactionDesc: cardsim.MsgStr("The company of others makes cold water tolerable."), Undo: func(p *Player) error {
CanDo: YesWeAlsoCan, p.Stats.Construction -= 2
p.Stats.Welfare -= 1
p.Stats.Healthcare -= 1
p.Stats.ParksExpense -= 4
p.Stats.Hospitality -= 1
p.Stats.Madness += 1
p.Stats.Cruelty += 1
p.Stats.Greed += 1
return nil
},
CanDo: YesWeCan,
}, },
&BasicPolicy{ &BasicPolicy{
UnenactedDesc: cardsim.MsgStr(`Your Minister of Finance is scandalized. "A free service? And such an expensive one to construct? No, no, no. The baths must pull their weight in the budget if they're ot be made at all. We must set an entry fee."`), UnenactedDesc: cardsim.MsgStr(`Your Minister of Finance is scandalized. "A free service? And such an expensive one to construct? No, no, no. The baths must pull their weight in the budget if they're ot be made at all. We must set an entry fee."`),

View File

@ -170,40 +170,26 @@ func NewKoboldMine() *KoboldMine {
type FieldLabel string type FieldLabel string
const ( const (
Alchemy FieldLabel = "Alchemy" Authoritarianism FieldLabel = "Authoritarianism"
Authoritarianism FieldLabel = "Authoritarianism" BasePopulation FieldLabel = "BasePopulation"
BasePopulation FieldLabel = "BasePopulation" Bureaucracy FieldLabel = "Bureaucracy"
Bureaucracy FieldLabel = "Bureaucracy" Construction FieldLabel = "Construction"
Construction FieldLabel = "Construction" Cruelty FieldLabel = "Cruelty"
Cruelty FieldLabel = "Cruelty" Education FieldLabel = "Education"
Education FieldLabel = "Education" FoodSupply FieldLabel = "FoodSupply"
FoodSupply FieldLabel = "FoodSupply" ForeignRelations FieldLabel = "ForeignRelations"
ForeignRelations FieldLabel = "ForeignRelations" Gullibility FieldLabel = "Gullibility"
ForeignRelExpense FieldLabel = "ForeignRelExpense" Madness FieldLabel = "Madness"
Gadgetry FieldLabel = "Gadgetry" Manufacturing FieldLabel = "Manufacturing"
Greed FieldLabel = "Greed" Mining FieldLabel = "Mining"
Gullibility FieldLabel = "Gullibility" Militarism FieldLabel = "Militarism"
Healthcare FieldLabel = "Healthcare" Rebellion FieldLabel = "Rebellion"
HiddenRelPenalty FieldLabel = "HiddenRelPenalty" Scavenging FieldLabel = "Scavenging"
Hospitality FieldLabel = "Hospitality" Secrecy FieldLabel = "Secrecy"
Logistics FieldLabel = "Logistics"
Madness FieldLabel = "Madness"
Manufacturing FieldLabel = "Manufacturing"
Militarism FieldLabel = "Militarism"
Mining FieldLabel = "Mining"
ParksExpense FieldLabel = "ParksExpense"
Publishing FieldLabel = "Publishing"
Rebellion FieldLabel = "Rebellion"
Scavenging FieldLabel = "Scavenging"
Secrecy FieldLabel = "Secrecy"
Welfare FieldLabel = "Welfare"
) )
func (k *KoboldMine) Add(which FieldLabel, amount float64) error { func (k *KoboldMine) Add(which FieldLabel, amount float64) error {
switch which { switch which {
case Alchemy:
k.Alchemy += amount
return nil
case Authoritarianism: case Authoritarianism:
k.Authoritarianism += amount k.Authoritarianism += amount
return nil return nil
@ -228,47 +214,20 @@ func (k *KoboldMine) Add(which FieldLabel, amount float64) error {
case ForeignRelations: case ForeignRelations:
k.ForeignRelations += amount k.ForeignRelations += amount
return nil return nil
case ForeignRelExpense:
k.ForeignRelExpense += amount
return nil
case Gadgetry:
k.Gadgetry += amount
return nil
case Greed:
k.Greed += amount
return nil
case Gullibility: case Gullibility:
k.Gullibility += amount k.Gullibility += amount
return nil return nil
case Healthcare:
k.Healthcare += amount
return nil
case HiddenRelPenalty:
k.HiddenRelPenalty += amount
return nil
case Hospitality:
k.Hospitality += amount
return nil
case Logistics:
k.Logistics += amount
return nil
case Madness: case Madness:
k.Madness += amount k.Madness += amount
return nil return nil
case Manufacturing: case Manufacturing:
k.Manufacturing += amount k.Manufacturing += amount
return nil return nil
case Militarism:
k.Militarism += amount
return nil
case Mining: case Mining:
k.Mining += amount k.Mining += amount
return nil return nil
case ParksExpense: case Militarism:
k.ParksExpense += amount k.Militarism += amount
return nil
case Publishing:
k.Publishing += amount
return nil return nil
case Rebellion: case Rebellion:
k.Rebellion += amount k.Rebellion += amount
@ -279,9 +238,6 @@ func (k *KoboldMine) Add(which FieldLabel, amount float64) error {
case Secrecy: case Secrecy:
k.Secrecy += amount k.Secrecy += amount
return nil return nil
case Welfare:
k.Welfare += amount
return nil
} }
return fmt.Errorf("cannot add %f to %q: %w", amount, which, ErrNoFieldLabel) return fmt.Errorf("cannot add %f to %q: %w", amount, which, ErrNoFieldLabel)
} }