Foreign Relations, Forestry, and a New Issue
I guess this project will continue growing for now.
This commit is contained in:
@@ -18,6 +18,7 @@ type KoboldMine struct {
|
||||
ManufacturingIncome float64 `cardsim:"stat" cardsim_name:"Manufacturing Productivity"`
|
||||
PlanarIncome float64 `cardsim:"stat" cardsim_name:"Planar Productivity"`
|
||||
PublishingIncome float64 `cardsim:"stat" cardsim_name:"Publishing Productivity"`
|
||||
ForestryIncome float64 `cardsim:"stat" cardsim_name:"Forestry Productivity"`
|
||||
FinanceIncome float64 `cardsim:"stat" cardsim_name:"Finance Productivity"`
|
||||
GadgetryIncome float64 `cardsim:"stat" cardsim_name:"Gadgetry Productivity"`
|
||||
FishingIncome float64 `cardsim:"stat" cardsim_name:"Fishing Productivity"`
|
||||
@@ -38,7 +39,10 @@ type KoboldMine struct {
|
||||
ParksExpense float64 `cardsim:"stat" cardsim_name:"Parks and Aesthetics Investment"`
|
||||
FaithExpense float64 `cardsim:"stat" cardsim_name:"Faith Investment"`
|
||||
|
||||
FoodSupply float64 `cardsim:"stathidden"`
|
||||
FoodSupply float64 `cardsim:"stathidden"`
|
||||
ForeignRelations float64 `cardsim:"stathidden"`
|
||||
HiddenRelPenalty float64 `cardsim:"stathidden"`
|
||||
Secrecy float64 `cardsim:"stathidden"`
|
||||
|
||||
// AnotherExpense float64 `cardsim:"hiddenround5"`
|
||||
// A different way of adding stats that is slightly more empowering.
|
||||
@@ -67,7 +71,7 @@ func (k *KoboldMine) StatTaxRate() float64 {
|
||||
}
|
||||
|
||||
func (k *KoboldMine) Kobolds() int64 {
|
||||
return int64(k.BasePopulation * k.FoodSupply * (1 - 0.5*(k.StatObesity()/100)))
|
||||
return int64(k.BasePopulation * k.FoodSupply * (1 - 0.5*(k.StatObesity()/100)) * (1 + k.TrueForeignRelations()))
|
||||
}
|
||||
|
||||
func (k *KoboldMine) DisplayedFoodSupply() float64 {
|
||||
@@ -75,7 +79,19 @@ func (k *KoboldMine) DisplayedFoodSupply() float64 {
|
||||
}
|
||||
|
||||
func (k *KoboldMine) StatObesity() float64 {
|
||||
return 100 / (1 + math.Exp(-0.05*(k.DisplayedFoodSupply()-37)))
|
||||
return 100 / (2.3 + math.Exp(-0.04*(k.DisplayedFoodSupply()-37)))
|
||||
}
|
||||
|
||||
func (k *KoboldMine) TrueForeignRelations() float64 {
|
||||
return (1 - math.Max(math.Min(k.Secrecy, 1), 0)) * (math.Max(math.Min(k.ForeignRelations, 1), -1) - k.HiddenRelPenalty)
|
||||
}
|
||||
|
||||
func (k *KoboldMine) DisplayedForeignRelations() float64 {
|
||||
return math.Max(math.Min((k.ForeignRelations*100), 100), -100)
|
||||
}
|
||||
|
||||
func (k *KoboldMine) DisplayedSecrecy() float64 {
|
||||
return k.Secrecy * 100
|
||||
}
|
||||
|
||||
func (k *KoboldMine) Stats() []cardsim.Stat {
|
||||
@@ -113,6 +129,10 @@ func (k *KoboldMine) Stats() []cardsim.Stat {
|
||||
"Book Publishing Income",
|
||||
k.ProductivityFunc(&k.PublishingIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Forestry Income",
|
||||
k.ProductivityFunc(&k.ForestryIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Finance Income",
|
||||
k.ProductivityFunc(&k.FinanceIncome),
|
||||
@@ -193,6 +213,14 @@ func (k *KoboldMine) Stats() []cardsim.Stat {
|
||||
"Total Government Expense",
|
||||
k.TotalGovExpense,
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Foreign Relations",
|
||||
k.DisplayedForeignRelations,
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Secrecy",
|
||||
k.DisplayedSecrecy,
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Food Supply",
|
||||
k.DisplayedFoodSupply,
|
||||
@@ -209,7 +237,7 @@ func (k *KoboldMine) Stats() []cardsim.Stat {
|
||||
|
||||
func NewKoboldMine() *KoboldMine {
|
||||
return &KoboldMine{
|
||||
BasePopulation: 1000,
|
||||
BasePopulation: 1030,
|
||||
MiningIncome: 0.15,
|
||||
ScavengingIncome: 0.1,
|
||||
AlchemyIncome: 0.01,
|
||||
@@ -218,6 +246,7 @@ func NewKoboldMine() *KoboldMine {
|
||||
ManufacturingIncome: 0.10,
|
||||
PlanarIncome: 0.00,
|
||||
PublishingIncome: 0.02,
|
||||
ForestryIncome: 0.0,
|
||||
FinanceIncome: 0.02,
|
||||
GadgetryIncome: 0.03,
|
||||
FishingIncome: 0.0,
|
||||
@@ -237,5 +266,8 @@ func NewKoboldMine() *KoboldMine {
|
||||
ParksExpense: 0.0,
|
||||
FaithExpense: 0.03,
|
||||
FoodSupply: 0.20,
|
||||
ForeignRelations: -0.40,
|
||||
HiddenRelPenalty: -0.01,
|
||||
Secrecy: .95,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user