Change "Productivity" to "Income" and "Expense
Also fixes a typo and an incorrectly assigned variable.
This commit is contained in:
@@ -8,11 +8,11 @@ import (
|
||||
type KoboldMine struct {
|
||||
Kobolds cardsim.Stored[int64]
|
||||
|
||||
SectorMiningProductivity cardsim.Stored[float64]
|
||||
SectorScavengingProductivity cardsim.Stored[float64]
|
||||
SectorMiningIncome cardsim.Stored[float64]
|
||||
SectorScavengingIncome cardsim.Stored[float64]
|
||||
|
||||
GovBureaucracyProductivity cardsim.Stored[float64]
|
||||
GovWarProductivity cardsim.Stored[float64]
|
||||
GovBureaucracyExpense cardsim.Stored[float64]
|
||||
GovWarExpense cardsim.Stored[float64]
|
||||
}
|
||||
|
||||
func (k *KoboldMine) ProductivityFunc(s *cardsim.Stored[float64]) func() float64 {
|
||||
@@ -22,38 +22,38 @@ func (k *KoboldMine) ProductivityFunc(s *cardsim.Stored[float64]) func() float64
|
||||
}
|
||||
|
||||
func (k *KoboldMine) TotalSectorProductivity() float64 {
|
||||
return float64(k.Kobolds.Value) * (k.SectorMiningProductivity.Value + k.SectorScavengingProductivity.Value)
|
||||
return float64(k.Kobolds.Value) * (k.SectorMiningIncome.Value + k.SectorScavengingIncome.Value)
|
||||
}
|
||||
|
||||
func (k *KoboldMine) TotalGovProductivity() float64 {
|
||||
return float64(k.Kobolds.Value) * (k.GovBureaucracyProductivity.Value + k.GovWarProductivity.Value)
|
||||
return float64(k.Kobolds.Value) * (k.GovBureaucracyExpense.Value + k.GovWarExpense.Value)
|
||||
}
|
||||
|
||||
func (k *KoboldMine) Stats() []cardsim.Stat {
|
||||
stats := cardsim.ExtractStats(k)
|
||||
funcs := []cardsim.Stat{
|
||||
cardsim.StatFunc(
|
||||
"Total Sector Mining Productivity",
|
||||
k.ProductivityFunc(&k.SectorMiningProductivity),
|
||||
"Total Sector Mining Income",
|
||||
k.ProductivityFunc(&k.SectorMiningIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Total Sector Scavenging Productivity",
|
||||
k.ProductivityFunc(&k.SectorScavengingProductivity),
|
||||
"Total Sector Scavenging Income",
|
||||
k.ProductivityFunc(&k.SectorScavengingIncome),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Total Government Bureaucracy Productivity",
|
||||
k.ProductivityFunc(&k.GovBureaucracyProductivity),
|
||||
"Total Government Bureaucracy Expense",
|
||||
k.ProductivityFunc(&k.GovBureaucracyExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Total Government War Productivity",
|
||||
k.ProductivityFunc(&k.GovBureaucracyProductivity),
|
||||
"Total Government War Expense",
|
||||
k.ProductivityFunc(&k.GovWarExpense),
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Total Sector Productivity",
|
||||
"Total Sector Income",
|
||||
k.TotalSectorProductivity,
|
||||
),
|
||||
cardsim.StatFunc(
|
||||
"Total Government Productivity",
|
||||
"Total Government Expense",
|
||||
k.TotalGovProductivity,
|
||||
),
|
||||
}
|
||||
@@ -68,20 +68,20 @@ func NewKoboldMine() *KoboldMine {
|
||||
Name: "Kobolds",
|
||||
Value: 1000,
|
||||
},
|
||||
SectorMiningProductivity: cardsim.Stored[float64]{
|
||||
Name: "Sector Mining Productivity",
|
||||
SectorMiningIncome: cardsim.Stored[float64]{
|
||||
Name: "Sector Mining Income",
|
||||
Value: 0.15,
|
||||
},
|
||||
SectorScavengingProductivity: cardsim.Stored[float64]{
|
||||
Name: "Sector Scavening Productivity",
|
||||
SectorScavengingIncome: cardsim.Stored[float64]{
|
||||
Name: "Sector Scavening Income",
|
||||
Value: 0.1,
|
||||
},
|
||||
GovBureaucracyProductivity: cardsim.Stored[float64]{
|
||||
Name: "Government Bureaucracy Productivity",
|
||||
GovBureaucracyExpense: cardsim.Stored[float64]{
|
||||
Name: "Government Bureaucracy Expense",
|
||||
Value: 0.05,
|
||||
},
|
||||
GovWarProductivity: cardsim.Stored[float64]{
|
||||
Name: "Government War Productivity",
|
||||
GovWarExpense: cardsim.Stored[float64]{
|
||||
Name: "Government War Expense",
|
||||
Value: 0.1,
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user