feat: bomb planets

This commit is contained in:
Ilia Denisov
2026-01-19 23:08:57 +02:00
parent bd9db26ef4
commit 40b2cb27f6
13 changed files with 440 additions and 22 deletions
+1 -5
View File
@@ -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)
}