Fixed #11286
This commit is contained in:
@@ -144,6 +144,8 @@ public class EnergyFieldAbility extends Ability{
|
|||||||
|
|
||||||
all.sort(h -> h.dst2(rx, ry));
|
all.sort(h -> h.dst2(rx, ry));
|
||||||
int len = Math.min(all.size, maxTargets);
|
int len = Math.min(all.size, maxTargets);
|
||||||
|
float scaledDamage = damage * state.rules.unitDamage(unit.team) * unit.damageMultiplier;
|
||||||
|
|
||||||
for(int i = 0; i < len; i++){
|
for(int i = 0; i < len; i++){
|
||||||
Healthc other = all.get(i);
|
Healthc other = all.get(i);
|
||||||
|
|
||||||
@@ -169,9 +171,9 @@ public class EnergyFieldAbility extends Ability{
|
|||||||
}else{
|
}else{
|
||||||
anyNearby = true;
|
anyNearby = true;
|
||||||
if(other instanceof Building b){
|
if(other instanceof Building b){
|
||||||
b.damage(unit.team, damage * state.rules.unitDamage(unit.team));
|
b.damage(unit.team, scaledDamage);
|
||||||
}else{
|
}else{
|
||||||
other.damage(damage * state.rules.unitDamage(unit.team));
|
other.damage(scaledDamage);
|
||||||
}
|
}
|
||||||
if(other instanceof Statusc s){
|
if(other instanceof Statusc s){
|
||||||
s.apply(status, statusDuration);
|
s.apply(status, statusDuration);
|
||||||
|
|||||||
Reference in New Issue
Block a user