Wow, quite an update, some of these units are really interesting (and all of them at least somewhat so).
I was going to chime in about the autotargetting-vs-micro issue on the absorbers, but I'm glad to see someone else already did so
Not sure what solutions would be good here; the only "clear" one I can think of is basically not having absorption beyond the absorber itself being immune to the damage type in question. But that's not interesting
But here's something that I think would work if the cpu cost was endurable:
1) when firing a shot, if the target is "covered" (within range of friendly absorber) against that shot's damage type, the shot is actually fired at the covering ship (the firing ship's actual target does not change).
2) the autotargetting logic will always prefer a non-covered target over a covered one
Thus achieving both the goal of "area" absorption and the goal that autotargetting is not substantially crippled compared to smart manual targetting
Here's some horrible psuedo-code-ish fragments:
// absorber ship "refresh" code to update the lookups before either targetting or firing
foreach(ship in AllShipsInSystem)
foreach(damageType in AllDamageTypes)
ship.AbsorberShips[damageType] = null;
foreach(ship in AllShipsInSystem)
if(ship.AbsorbedDamageTypes.Count != 0)
foreach(absorbedDamageType in ship.AbsorbedDamageTypes)
foreach(otherShip in GetFriendlyShipsWithinInCircle(ship.Location,ship.AbsorptionRange))
otherShip.AbsorberShips[absorbedDamageType] = ship;
// in the autotargetting code
foreach(possibleTarget in AllShipsInSystem)
{
// earlier autotargetting quick-case logic or whatever
if
(
bestTargetSoFar != null
&& bestTargetSoFar.AbsorberShips[targettingShip.Weapon.DamageType] == null
&& possibleTarget.AbsorberShips[targettingShip.Weapon.DamageType] != null
)
{
// current best target is not covered by absorber, and this possibleTarget IS covered, so ignore this possibleTarget
continue;
}
// rest of autotargetting logic ...
}
// When actually firing a shot:
if(targetShip.AbsorberShips[ship.Weapon.DamageType] != null)
FireAtTarget(targetShip.AbsorberShips[ship.Weapon.DamageType]);
else
FireAtTarget(targetShip);
I didn't include various optimizations that came to mind (maintain an AllAbsoberShipsInSystem list, don't refresh if no ships have moved or died, etc) since it's kinda pointless without knowing more about the real code. If this sort of solution is conceivably possible cpu-cost wise I can refine it
Thanks,
Keith