This commit is contained in:
Anuken
2022-10-23 11:25:00 -04:00
parent c8fb0659d4
commit a33c482ead
4 changed files with 5 additions and 3 deletions

View File

@@ -101,7 +101,7 @@ public class EnergyFieldAbility extends Ability{
if(hitUnits){
Units.nearby(null, rx, ry, range, other -> {
if(other != unit && other.checkTarget(targetAir, targetGround) && other.targetable(unit.team)){
if(other != unit && other.checkTarget(targetAir, targetGround) && other.targetable(unit.team) && (other.team != unit.team || other.damaged())){
all.add(other);
}
});
@@ -109,7 +109,7 @@ public class EnergyFieldAbility extends Ability{
if(hitBuildings && targetGround){
Units.nearbyBuildings(rx, ry, range, b -> {
if(b.team != Team.derelict || state.rules.coreCapture){
if((b.team != Team.derelict || state.rules.coreCapture) && (b.team != unit.team || b.damaged())){
all.add(b);
}
});