v0.9.2b: fixed iron stomach not working with viscocity glyph

This commit is contained in:
Evan Debenham 2021-03-20 13:00:55 -04:00
parent 634d16fa79
commit 9a65da64c7

View File

@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor.Glyph;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
@ -49,6 +50,12 @@ public class Viscosity extends Glyph {
//should build in functionality for that, but this works for now
int realDamage = damage - defender.drRoll();
//account for icon stomach (just skip the glyph)
if (defender.buff(Talent.WarriorFoodImmunity.class) != null){
return damage;
}
//account for huntress armor piercing
if (attacker instanceof Hero
&& ((Hero) attacker).belongings.weapon instanceof MissileWeapon
&& ((Hero) attacker).subClass == HeroSubClass.SNIPER