Economic Stats Expansion
I also got rid of the "Sector" and "Gov" parts of the tokens, they were just pointless elongation.
This commit is contained in:
@@ -8,11 +8,32 @@ import (
|
||||
type KoboldMine struct {
|
||||
Kobolds cardsim.Stored[int64]
|
||||
|
||||
SectorMiningIncome cardsim.Stored[float64]
|
||||
SectorScavengingIncome cardsim.Stored[float64]
|
||||
MiningIncome cardsim.Stored[float64]
|
||||
ScavengingIncome cardsim.Stored[float64]
|
||||
AlchemyIncome cardsim.Stored[float64]
|
||||
HospitalityIncome cardsim.Stored[float64]
|
||||
AgricultureIncome cardsim.Stored[float64]
|
||||
ManufacturingIncome cardsim.Stored[float64]
|
||||
PlanarIncome cardsim.Stored[float64]
|
||||
PublishingIncome cardsim.Stored[float64]
|
||||
FinanceIncome cardsim.Stored[float64]
|
||||
GadgetryIncome cardsim.Stored[float64]
|
||||
FishingIncome cardsim.Stored[float64]
|
||||
ConstructionIncome cardsim.Stored[float64]
|
||||
|
||||
GovBureaucracyExpense cardsim.Stored[float64]
|
||||
GovWarExpense cardsim.Stored[float64]
|
||||
BureaucracyExpense cardsim.Stored[float64]
|
||||
WarExpense cardsim.Stored[float64]
|
||||
QoLExpense cardsim.Stored[float64]
|
||||
LogisticsExpense cardsim.Stored[float64]
|
||||
DragonSubsExpense cardsim.Stored[float64]
|
||||
ResearchSubsExpense cardsim.Stored[float64]
|
||||
EducationExpense cardsim.Stored[float64]
|
||||
HealthcareExpense cardsim.Stored[float64]
|
||||
ForeignRelExpense cardsim.Stored[float64]
|
||||
PoliceExpense cardsim.Stored[float64]
|
||||
EconPlanExpense cardsim.Stored[float64]
|
||||
ParksExpense cardsim.Stored[float64]
|
||||
FaithExpense cardsim.Stored[float64]
|
||||
}
|
||||
|
||||
func (k *KoboldMine) ProductivityFunc(s *cardsim.Stored[float64]) func() float64 {
|
||||
@@ -22,31 +43,115 @@ func (k *KoboldMine) ProductivityFunc(s *cardsim.Stored[float64]) func() float64
|
||||
}
|
||||
|
||||
func (k *KoboldMine) TotalSectorIncome() float64 {
|
||||
return float64(k.Kobolds.Value) * (k.SectorMiningIncome.Value + k.SectorScavengingIncome.Value)
|
||||
return float64(k.Kobolds.Value) * (k.MiningIncome.Value + k.ScavengingIncome.Value + k.AlchemyIncome.Value + k.HospitalityIncome.Value + k.AgricultureIncome.Value + k.ManufacturingIncome.Value + k.PlanarIncome.Value + k.PublishingIncome.Value + k.FinanceIncome.Value + k.GadgetryIncome.Value + k.FishingIncome.Value + k.ConstructionIncome.Value)
|
||||
}
|
||||
|
||||
func (k *KoboldMine) TotalGovExpense() float64 {
|
||||
return float64(k.Kobolds.Value) * (k.GovBureaucracyExpense.Value + k.GovWarExpense.Value)
|
||||
return float64(k.Kobolds.Value) * (k.BureaucracyExpense.Value + k.WarExpense.Value + k.QoLExpense.Value + k.LogisticsExpense.Value + k.DragonSubsExpense.Value + k.ResearchSubsExpense.Value + k.EducationExpense.Value + k.HealthcareExpense.Value + k.ForeignRelExpense.Value + k.PoliceExpense.Value + k.EconPlanExpense.Value + k.ParksExpense.Value + k.FaithExpense.Value)
|
||||
}
|
||||
|
||||
func (k *KoboldMine) Stats() []cardsim.Stat {
|
||||
stats := cardsim.ExtractStats(k)
|
||||
funcs := []cardsim.Stat{
|
||||
cardsim.StatFunc(
|
||||
"Total Sector Mining Income",
|
||||
k.ProductivityFunc(&k.SectorMiningIncome),
|
||||
"Mining Income",
|
||||
k.ProductivityFunc(&k.MiningIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Total Sector Scavenging Income",
|
||||
k.ProductivityFunc(&k.SectorScavengingIncome),
|
||||
"Scavenging Income",
|
||||
k.ProductivityFunc(&k.ScavengingIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Total Government Bureaucracy Expense",
|
||||
k.ProductivityFunc(&k.GovBureaucracyExpense),
|
||||
"Alchemy Income",
|
||||
k.ProductivityFunc(&k.AlchemyIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Total Government War Expense",
|
||||
k.ProductivityFunc(&k.GovWarExpense),
|
||||
"Hospitality Income",
|
||||
k.ProductivityFunc(&k.HospitalityIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Agriculture Income",
|
||||
k.ProductivityFunc(&k.AgricultureIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Manufacturing Income",
|
||||
k.ProductivityFunc(&k.ManufacturingIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Planar Harvesting Income",
|
||||
k.ProductivityFunc(&k.PlanarIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Book Publishing Income",
|
||||
k.ProductivityFunc(&k.PublishingIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Finance Income",
|
||||
k.ProductivityFunc(&k.FinanceIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Gadgetry Income",
|
||||
k.ProductivityFunc(&k.GadgetryIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Fishing Income",
|
||||
k.ProductivityFunc(&k.FishingIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Construction Income",
|
||||
k.ProductivityFunc(&k.ConstructionIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Bureaucracy Expense",
|
||||
k.ProductivityFunc(&k.BureaucracyExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"War Expense",
|
||||
k.ProductivityFunc(&k.WarExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"QoL Expense",
|
||||
k.ProductivityFunc(&k.QoLExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Logistics Expense",
|
||||
k.ProductivityFunc(&k.LogisticsExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Dragon Subsidies",
|
||||
k.ProductivityFunc(&k.DragonSubsExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Research Subsidies",
|
||||
k.ProductivityFunc(&k.ResearchSubsExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Education Expense",
|
||||
k.ProductivityFunc(&k.EducationExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Healthcare Expense",
|
||||
k.ProductivityFunc(&k.HealthcareExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Foreign Relations Expense",
|
||||
k.ProductivityFunc(&k.ForeignRelExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Law Enforcement Expense",
|
||||
k.ProductivityFunc(&k.PoliceExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Economic Planning Expense",
|
||||
k.ProductivityFunc(&k.EconPlanExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Parks and Aesthetics Expense",
|
||||
k.ProductivityFunc(&k.ParksExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Faith Expense",
|
||||
k.ProductivityFunc(&k.FaithExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Total Sector Income",
|
||||
@@ -58,7 +163,7 @@ func (k *KoboldMine) Stats() []cardsim.Stat {
|
||||
),
|
||||
}
|
||||
stats = append(stats, funcs...)
|
||||
cardsim.SortStats(stats)
|
||||
// cardsim.SortStats(stats)
|
||||
return stats
|
||||
}
|
||||
|
||||
@@ -68,21 +173,105 @@ func NewKoboldMine() *KoboldMine {
|
||||
Name: "Kobolds",
|
||||
Value: 1000,
|
||||
},
|
||||
SectorMiningIncome: cardsim.Stored[float64]{
|
||||
Name: "Sector Mining Income",
|
||||
MiningIncome: cardsim.Stored[float64]{
|
||||
Name: "Mining Productivity",
|
||||
Value: 0.15,
|
||||
},
|
||||
SectorScavengingIncome: cardsim.Stored[float64]{
|
||||
Name: "Sector Scavenging Income",
|
||||
ScavengingIncome: cardsim.Stored[float64]{
|
||||
Name: "Scavenging Productivity",
|
||||
Value: 0.1,
|
||||
},
|
||||
GovBureaucracyExpense: cardsim.Stored[float64]{
|
||||
Name: "Government Bureaucracy Expense",
|
||||
AlchemyIncome: cardsim.Stored[float64]{
|
||||
Name: "Alchemy Productivity",
|
||||
Value: 0.01,
|
||||
},
|
||||
HospitalityIncome: cardsim.Stored[float64]{
|
||||
Name: "Hospitality Productivity",
|
||||
Value: 0.0,
|
||||
},
|
||||
AgricultureIncome: cardsim.Stored[float64]{
|
||||
Name: "Agricultural Productivity",
|
||||
Value: 0.0,
|
||||
},
|
||||
ManufacturingIncome: cardsim.Stored[float64]{
|
||||
Name: "Manufacturing Productivity",
|
||||
Value: 0.10,
|
||||
},
|
||||
PlanarIncome: cardsim.Stored[float64]{
|
||||
Name: "Planar Harvesting Productivity",
|
||||
Value: 0.00,
|
||||
},
|
||||
PublishingIncome: cardsim.Stored[float64]{
|
||||
Name: "Book Publishing Productivity",
|
||||
Value: 0.02,
|
||||
},
|
||||
FinanceIncome: cardsim.Stored[float64]{
|
||||
Name: "Finance Productivity",
|
||||
Value: 0.02,
|
||||
},
|
||||
GadgetryIncome: cardsim.Stored[float64]{
|
||||
Name: "Gadgetry Productivity",
|
||||
Value: 0.03,
|
||||
},
|
||||
FishingIncome: cardsim.Stored[float64]{
|
||||
Name: "Fishing Productivity",
|
||||
Value: 0.0,
|
||||
},
|
||||
ConstructionIncome: cardsim.Stored[float64]{
|
||||
Name: "Construction Productivity",
|
||||
Value: 0.05,
|
||||
},
|
||||
GovWarExpense: cardsim.Stored[float64]{
|
||||
Name: "Government War Expense",
|
||||
BureaucracyExpense: cardsim.Stored[float64]{
|
||||
Name: "Bureaucracy Investment",
|
||||
Value: 0.05,
|
||||
},
|
||||
WarExpense: cardsim.Stored[float64]{
|
||||
Name: "War Investment",
|
||||
Value: 0.1,
|
||||
},
|
||||
QoLExpense: cardsim.Stored[float64]{
|
||||
Name: "QoL Investment",
|
||||
Value: 0.01,
|
||||
},
|
||||
LogisticsExpense: cardsim.Stored[float64]{
|
||||
Name: "Logistics Investment",
|
||||
Value: 0.02,
|
||||
},
|
||||
DragonSubsExpense: cardsim.Stored[float64]{
|
||||
Name: "Dragon Subsidies Investment",
|
||||
Value: 0.0,
|
||||
},
|
||||
ResearchSubsExpense: cardsim.Stored[float64]{
|
||||
Name: "Research Subsidies Investment",
|
||||
Value: 0.0,
|
||||
},
|
||||
EducationExpense: cardsim.Stored[float64]{
|
||||
Name: "Education Investment",
|
||||
Value: 0.01,
|
||||
},
|
||||
HealthcareExpense: cardsim.Stored[float64]{
|
||||
Name: "Healthcare Investment",
|
||||
Value: 0.01,
|
||||
},
|
||||
ForeignRelExpense: cardsim.Stored[float64]{
|
||||
Name: "Foreign Relations Investment",
|
||||
Value: 0.0,
|
||||
},
|
||||
PoliceExpense: cardsim.Stored[float64]{
|
||||
Name: "Law Enforcement Investment",
|
||||
Value: 0.03,
|
||||
},
|
||||
EconPlanExpense: cardsim.Stored[float64]{
|
||||
Name: "Economic Planning Investment",
|
||||
Value: 0.02,
|
||||
},
|
||||
ParksExpense: cardsim.Stored[float64]{
|
||||
Name: "Parks and Aesthetics Investment",
|
||||
Value: 0.0,
|
||||
},
|
||||
FaithExpense: cardsim.Stored[float64]{
|
||||
Name: "Faith Investment",
|
||||
Value: 0.03,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user