diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java index 970d043a8..fb5139279 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java @@ -109,12 +109,15 @@ public enum HeroClass { darts.identify().collect(); if ( Badges.global.contains(Badges.Badge.TUTORIAL_WARRIOR) ){ - hero.belongings.armor.affixSeal(new BrokenSeal()); + if (!Dungeon.isChallenged(Challenges.NO_ARMOR)) + hero.belongings.armor.affixSeal(new BrokenSeal()); Dungeon.quickslot.setSlot(0, darts); } else { - BrokenSeal seal = new BrokenSeal(); - seal.collect(); - Dungeon.quickslot.setSlot(0, seal); + if (!Dungeon.isChallenged(Challenges.NO_ARMOR)) { + BrokenSeal seal = new BrokenSeal(); + seal.collect(); + Dungeon.quickslot.setSlot(0, seal); + } Dungeon.quickslot.setSlot(1, darts); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/food/Blandfruit.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/food/Blandfruit.java index 5ad9dba02..27c034440 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/food/Blandfruit.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/food/Blandfruit.java @@ -79,32 +79,33 @@ public class Blandfruit extends Food { @Override public void execute( Hero hero, String action ) { + if (action.equals( AC_EAT ) && potionAttrib == null) { + + GLog.w( Messages.get(this, "raw")); + return; + + } + super.execute(hero, action); - if (action.equals( AC_EAT )){ - if (potionAttrib == null) { - - GLog.w( Messages.get(this, "raw")); + if (action.equals( AC_EAT ) && potionAttrib != null){ + if (potionAttrib instanceof PotionOfFrost) { + GLog.i(Messages.get(this, "ice_msg")); + FrozenCarpaccio.effect(hero); + } else if (potionAttrib instanceof PotionOfLiquidFlame){ + GLog.i(Messages.get(this, "fire_msg")); + Buff.affect(hero, FireImbue.class).set(FireImbue.DURATION); + } else if (potionAttrib instanceof PotionOfToxicGas) { + GLog.i(Messages.get(this, "toxic_msg")); + Buff.affect(hero, ToxicImbue.class).set(ToxicImbue.DURATION); + } else if (potionAttrib instanceof PotionOfParalyticGas) { + GLog.i(Messages.get(this, "para_msg")); + Buff.affect(hero, EarthImbue.class, EarthImbue.DURATION); } else { - - super.execute(hero, action); - - if (potionAttrib instanceof PotionOfFrost) { - GLog.i(Messages.get(this, "ice_msg")); - FrozenCarpaccio.effect(hero); - } else if (potionAttrib instanceof PotionOfLiquidFlame){ - GLog.i(Messages.get(this, "fire_msg")); - Buff.affect(hero, FireImbue.class).set(FireImbue.DURATION); - } else if (potionAttrib instanceof PotionOfToxicGas) { - GLog.i(Messages.get(this, "toxic_msg")); - Buff.affect(hero, ToxicImbue.class).set(ToxicImbue.DURATION); - } else if (potionAttrib instanceof PotionOfParalyticGas) { - GLog.i(Messages.get(this, "para_msg")); - Buff.affect(hero, EarthImbue.class, EarthImbue.DURATION); - } else - potionAttrib.apply(hero); + potionAttrib.apply(hero); } + } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java index c49a53a8e..96c644822 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/SpearTrap.java @@ -59,7 +59,7 @@ public class SpearTrap extends Trap { } Char ch = Actor.findChar( pos); - if (ch != null){ + if (ch != null && !ch.flying){ int damage = Random.NormalIntRange(Dungeon.depth, Dungeon.depth*2); damage -= Random.IntRange( 0, ch.dr()); ch.damage( Math.max(damage, 0) , this);