Issue #2 Option Validity Check
I also fixed the write to-do and changed an improbable mention of Education into a more likely mention of Finance.
This commit is contained in:
parent
f7bed6c4b9
commit
d2f89f5bd4
@ -116,8 +116,8 @@ var cards = []Card{
|
|||||||
CanDo: YesWeCan,
|
CanDo: YesWeCan,
|
||||||
},
|
},
|
||||||
&BasicPolicy{
|
&BasicPolicy{
|
||||||
UnenactedDesc: cardsim.MsgStr(`Your Minister of Education pulls you aside. "This is a good opportunity to head-hunt. Bureaucrats from many nations will be attending. There's got to be some who'll work for less than the ones we've got. There are some terribly threatened or impoverished communities among kobolds.`),
|
UnenactedDesc: cardsim.MsgStr(`Your Minister of Finance pulls you aside. "This is a good opportunity to head-hunt. Bureaucrats from many nations will be attending. There's got to be some who'll work for less than the ones we've got. There are some terribly threatened or impoverished communities among kobolds.`),
|
||||||
EnactedDesc: cardsim.MsgStr("Your nation's policy is clear: the festival of bureaucracy is a chance to trade workers with other kobold nations in your attempts to build a more efficient government."),
|
EnactedDesc: cardsim.MsgStr("[current policy] Your nation's policy is clear: the festival of bureaucracy is a chance to trade workers with other kobold nations in your attempts to build a more efficient government."),
|
||||||
Do: func(p *Player) (cardsim.Message, error) {
|
Do: func(p *Player) (cardsim.Message, error) {
|
||||||
p.Stats.Kobolds.Value += 20
|
p.Stats.Kobolds.Value += 20
|
||||||
p.Stats.GovBureaucracyExpense.Value -= 0.01
|
p.Stats.GovBureaucracyExpense.Value -= 0.01
|
||||||
@ -128,12 +128,18 @@ var cards = []Card{
|
|||||||
p.Stats.GovBureaucracyExpense.Value += 0.01
|
p.Stats.GovBureaucracyExpense.Value += 0.01
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
CanDo: YesWeCan,
|
CanDo: func(p *Player) bool { return p.Stats.GovBureaucracyExpense.Value >= 0.02 },
|
||||||
// TODO(rakeela): This option should only be available if the fourth option isn't the status quo and bureaucratic expense is at least 0.02.
|
// CanDo: func(p *Player) bool {
|
||||||
|
// if p.Stats.GovBureaucracyExpense.Value >= 0.02 {
|
||||||
|
// return true
|
||||||
|
// }
|
||||||
|
// return false
|
||||||
|
// },
|
||||||
|
// Original implementation preserved in the hopes that I'll learn this stuff. This is equivalent to the shorter code above. I'll probably remove this comment eventually. Sincerely, Rakeela.
|
||||||
},
|
},
|
||||||
&BasicPolicy{
|
&BasicPolicy{
|
||||||
UnenactedDesc: cardsim.MsgStr(`Your Minister of Education greets you exuberantly. "We've trimmed the wages of the bureaucracy beautifully, but maybe we can scout some outright volunteers. Some nations 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 nations are absolute disasters, after all.`),
|
||||||
EnactedDesc: cardsim.MsgStr(`It's hard to find volunteer workers at the festival, but your nation is doing its best to equip the bureaucracy with exactly that.`),
|
EnactedDesc: cardsim.MsgStr(`[current policy] It's hard to find volunteer workers at the festival, but your nation is doing its best.`),
|
||||||
Do: func(p *Player) (cardsim.Message, error) {
|
Do: func(p *Player) (cardsim.Message, error) {
|
||||||
p.Stats.Kobolds.Value += 10
|
p.Stats.Kobolds.Value += 10
|
||||||
p.Stats.GovBureaucracyExpense.Value -= 0.02
|
p.Stats.GovBureaucracyExpense.Value -= 0.02
|
||||||
@ -144,8 +150,7 @@ var cards = []Card{
|
|||||||
p.Stats.GovBureaucracyExpense.Value += 0.02
|
p.Stats.GovBureaucracyExpense.Value += 0.02
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
CanDo: YesWeCan,
|
CanDo: func(p *Player) bool { return p.Stats.GovBureaucracyExpense.Value < 0.02 },
|
||||||
// TODO(rakeela): This option should only be available if the fourth option isn't the status quo and bureaucratic expense is less than 0.02.
|
|
||||||
},
|
},
|
||||||
&BasicPolicy{
|
&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 some bureaucrats."`),
|
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."`),
|
||||||
@ -178,8 +183,8 @@ var cards = []Card{
|
|||||||
},
|
},
|
||||||
Variants: []Policy{
|
Variants: []Policy{
|
||||||
nil,
|
nil,
|
||||||
&DisabledPolicy{cardsim.MsgStr("TODO(rakeela): write")},
|
&DisabledPolicy{cardsim.MsgStr("Neglecting the event would be less popular and more inefficient than our current policy.")},
|
||||||
&DisabledPolicy{cardsim.MsgStr("TODO(rakeela): write")},
|
&DisabledPolicy{cardsim.MsgStr("Neglecting the event would be less popular and more inefficient than our current policy.")},
|
||||||
&FuncPolicy{
|
&FuncPolicy{
|
||||||
OptionTextFunc: func(p *Player) (cardsim.Message, error) {
|
OptionTextFunc: func(p *Player) (cardsim.Message, error) {
|
||||||
if p.Stats.GovBureaucracyExpense.Value >= -0.03 {
|
if p.Stats.GovBureaucracyExpense.Value >= -0.03 {
|
||||||
|
Loading…
Reference in New Issue
Block a user