feat: bomb planets
This commit is contained in:
@@ -74,8 +74,9 @@ func (c *Cache) UpgradeGroup(ri int, groupIndex uint, techInput string, limitShi
|
||||
|
||||
productionCapacity := c.PlanetProductionCapacity(pl.Number)
|
||||
if c.ShipGroup(sgi).State() == game.StateUpgrade {
|
||||
// to calculate actual capacity we must substract upgrade cost of selected group, if is upgrade state
|
||||
productionCapacity -= c.ShipGroup(sgi).StateUpgrade.Cost()
|
||||
// to calculate actual capacity we must "compensate" upgrade cost of selected group, if it is in upgrade state
|
||||
// TODO: this is not tested
|
||||
productionCapacity += c.ShipGroup(sgi).StateUpgrade.Cost()
|
||||
}
|
||||
uc := game.GroupUpgradeCost(*(c.ShipGroup(sgi)), *st, targetLevel[game.TechDrive], targetLevel[game.TechWeapons], targetLevel[game.TechShields], targetLevel[game.TechCargo])
|
||||
costForShip := uc.UpgradeCost(1)
|
||||
|
||||
Reference in New Issue
Block a user