test: battle multiple non-crossing enemies

This commit is contained in:
IliaDenisov
2026-02-06 17:21:42 +03:00
parent ef10842dac
commit 449c3273bf
9 changed files with 129 additions and 41 deletions
+2 -9
View File
@@ -23,20 +23,13 @@ func TransformBattle(c *Cache, b *Battle) *report.BattleReport {
sg := c.ShipGroup(groupId)
itemNumber := len(r.Ships)
bg := &report.BattleReportGroup{
// OwnerID: sg.OwnerID,
// ClassArmament: shipClass.Armament,
// ClassMass: report.F(shipClass.EmptyMass()),
Race: c.g.Race[c.RaceIndex(sg.OwnerID)].Name,
InBattle: inBattle,
Number: b.initialNumbers[groupId],
Number: b.InitialNumbers[groupId],
NumberLeft: sg.Number,
ClassName: shipClass.Name,
LoadType: sg.CargoString(),
LoadQuantity: report.F(sg.Load.F()),
// DriveTech: report.F(sg.TechLevel(game.TechDrive).F()),
// WeaponsTech: report.F(sg.TechLevel(game.TechWeapons).F()),
// ShieldsTech: report.F(sg.TechLevel(game.TechShields).F()),
// CargoTech: report.F(sg.TechLevel(game.TechCargo).F()),
}
for t, v := range sg.Tech {
bg.Tech[t.String()] = report.F(v.F())
@@ -77,7 +70,7 @@ func TransformBattle(c *Cache, b *Battle) *report.BattleReport {
}
}
for sgi, inBattle := range b.observerGroups {
for sgi, inBattle := range b.ObserverGroups {
if !inBattle {
addShipGroup(sgi, false)
}