diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 6a6e2775b..d534708d3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -62,6 +62,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.huntress.NaturesPower; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.warrior.Endure; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Monk; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Snake; @@ -436,7 +437,8 @@ public class Hero extends Char { public boolean shoot( Char enemy, MissileWeapon wep ) { this.enemy = enemy; - boolean wasEnemy = enemy.alignment == Alignment.ENEMY; + boolean wasEnemy = enemy.alignment == Alignment.ENEMY + || (enemy instanceof Mimic && enemy.alignment == Alignment.NEUTRAL); //temporarily set the hero's weapon to the missile weapon being used //TODO improve this! @@ -1922,7 +1924,8 @@ public class Hero extends Char { public void onAttackComplete() { AttackIndicator.target(enemy); - boolean wasEnemy = enemy.alignment == Alignment.ENEMY; + boolean wasEnemy = enemy.alignment == Alignment.ENEMY + || (enemy instanceof Mimic && enemy.alignment == Alignment.NEUTRAL); boolean hit = attack( enemy ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java index 047821183..200f60a95 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java @@ -33,6 +33,7 @@ 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.actors.hero.abilities.ArmorAbility; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic; import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; @@ -122,7 +123,8 @@ public class Shockwave extends ArmorAbility { } if (Random.Int(10) < 3*hero.pointsInTalent(Talent.STRIKING_WAVE)){ - boolean wasEnemy = ch.alignment == Char.Alignment.ENEMY; + boolean wasEnemy = ch.alignment == Char.Alignment.ENEMY + || (ch instanceof Mimic && ch.alignment == Char.Alignment.NEUTRAL); damage = hero.attackProc(ch, damage); ch.damage(damage, hero); if (hero.subClass == HeroSubClass.GLADIATOR && wasEnemy){