Fixed shields not capping properly

This commit is contained in:
Anuken
2021-09-18 20:39:43 -04:00
parent 66f56d9e98
commit 9dfb5888ec
2 changed files with 2 additions and 2 deletions

View File

@@ -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;