v3.0.0: fixed ascended form buff detaching at 0 shield
This commit is contained in:
@@ -77,7 +77,7 @@ public class AscendedForm extends ArmorAbility {
|
|||||||
type = buffType.POSITIVE;
|
type = buffType.POSITIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static float DURATION = 10f;
|
public static float DURATION = 100f;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int icon() {
|
public int icon() {
|
||||||
@@ -109,6 +109,21 @@ public class AscendedForm extends ArmorAbility {
|
|||||||
left = (int)DURATION;
|
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
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
left--;
|
left--;
|
||||||
|
|||||||
Reference in New Issue
Block a user