feat: bomb planets
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"math"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/internal/number"
|
||||
)
|
||||
|
||||
type CargoType string
|
||||
@@ -227,13 +226,10 @@ func (sg ShipGroup) UpgradeCargoCost(st *ShipType, cargo float64) float64 {
|
||||
}
|
||||
|
||||
// Мощность бомбардировки
|
||||
// TODO: maybe rounding must be done only for display?
|
||||
func (sg ShipGroup) BombingPower(st *ShipType) float64 {
|
||||
// return math.Sqrt(sg.Type.Weapons * sg.Weapons)
|
||||
result := (math.Sqrt(st.Weapons*sg.TechLevel(TechWeapons))/10. + 1.) *
|
||||
return (math.Sqrt(st.Weapons*sg.TechLevel(TechWeapons))/10. + 1.) *
|
||||
st.Weapons *
|
||||
sg.TechLevel(TechWeapons) *
|
||||
float64(st.Armament) *
|
||||
float64(sg.Number)
|
||||
return number.Fixed3(result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user