v3.0.0: fixed ascended form buff detaching at 0 shield

This commit is contained in:
Evan Debenham
2024-12-18 11:50:08 -05:00
parent c2b1d0703d
commit ec74cbb59f

View File

@@ -77,7 +77,7 @@ public class AscendedForm extends ArmorAbility {
type = buffType.POSITIVE;
}
public static float DURATION = 10f;
public static float DURATION = 100f;
@Override
public int icon() {
@@ -109,6 +109,21 @@ public class AscendedForm extends ArmorAbility {
left = (int)DURATION;
}
@Override
//logic edited slightly as buff should not detach
public int absorbDamage(int dmg) {
if (shielding() <= 0) return dmg;
if (shielding() >= dmg){
decShield(dmg);
dmg = 0;
} else {
dmg -= shielding();
decShield(shielding());
}
return dmg;
}
@Override
public boolean act() {
left--;