v0.9.1: fixed shield dmg counting toward regen in the DM-300 fight

This commit is contained in:
Evan Debenham 2020-12-05 15:56:51 -05:00
parent 7a4c21e81f
commit 7242fdbf60

View File

@ -427,13 +427,17 @@ public class NewDM300 extends Mob {
@Override
public void damage(int dmg, Object src) {
int preHP = HP;
super.damage(dmg, src);
if (isInvulnerable(src.getClass())){
return;
}
LockedFloor lock = Dungeon.hero.buff(LockedFloor.class);
if (lock != null && !isImmune(src.getClass())) lock.addTime(dmg);
int dmgTaken = preHP - HP;
if (dmgTaken > 0) {
LockedFloor lock = Dungeon.hero.buff(LockedFloor.class);
if (lock != null && !isImmune(src.getClass())) lock.addTime(dmgTaken*1.5f);
}
int threshold = HT/3 * (2- pylonsActivated);