v2.3.0: fixed mimics not dropping loot if ally buffed from hiding
This commit is contained in:
@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
@@ -50,7 +51,7 @@ public abstract class AllyBuff extends Buff{
|
||||
//for when applying an ally buff should also cause that enemy to give exp/loot as if they had died
|
||||
//consider that chars with the ally alignment do not drop items or award exp on death
|
||||
public static void affectAndLoot(Mob enemy, Hero hero, Class<?extends AllyBuff> buffCls){
|
||||
boolean wasEnemy = enemy.alignment == Char.Alignment.ENEMY;
|
||||
boolean wasEnemy = enemy.alignment == Char.Alignment.ENEMY || enemy instanceof Mimic;
|
||||
Buff.affect(enemy, buffCls);
|
||||
|
||||
if (enemy.buff(buffCls) != null && wasEnemy){
|
||||
|
||||
Reference in New Issue
Block a user