diff --git a/koboldsim/stats.go b/koboldsim/stats.go index 2ed99b3..e07da05 100644 --- a/koboldsim/stats.go +++ b/koboldsim/stats.go @@ -1,6 +1,8 @@ package koboldsim import ( + "math" + "git.chromaticdragon.app/kistaro/CardSimEngine/cardsim" ) @@ -65,13 +67,17 @@ func (k *KoboldMine) StatTaxRate() float64 { } func (k *KoboldMine) Kobolds() int64 { - return int64(k.BasePopulation * k.FoodSupply) + return int64(k.BasePopulation * k.FoodSupply * (1 - 0.5*(k.StatObesity()/100))) } func (k *KoboldMine) DisplayedFoodSupply() float64 { return (k.FoodSupply - 1) * 100 } +func (k *KoboldMine) StatObesity() float64 { + return 100 / (1 + math.Exp(-0.05*(k.DisplayedFoodSupply()-37))) +} + func (k *KoboldMine) Stats() []cardsim.Stat { stats := cardsim.ExtractStats(k) funcs := []cardsim.Stat{