Fixed shields not capping properly
This commit is contained in:
@@ -32,7 +32,7 @@ public class ShieldRegenFieldAbility extends Ability{
|
||||
|
||||
Units.nearby(unit.team, unit.x, unit.y, range, other -> {
|
||||
if(other.shield < max){
|
||||
other.shield = Math.max(other.shield + amount, max);
|
||||
other.shield = Math.min(other.shield + amount, max);
|
||||
other.shieldAlpha = 1f; //TODO may not be necessary
|
||||
applyEffect.at(unit.x, unit.y, 0f, unit.team.color, parentizeEffects ? other : null);
|
||||
applied = true;
|
||||
|
||||
Reference in New Issue
Block a user