v0.3.5: fixed some bugs

This commit is contained in:
Evan Debenham
2016-04-21 22:20:24 -04:00
parent 01f957f70f
commit 6dbd6d1fc1
3 changed files with 30 additions and 26 deletions
@@ -109,12 +109,15 @@ public enum HeroClass {
darts.identify().collect(); darts.identify().collect();
if ( Badges.global.contains(Badges.Badge.TUTORIAL_WARRIOR) ){ if ( Badges.global.contains(Badges.Badge.TUTORIAL_WARRIOR) ){
if (!Dungeon.isChallenged(Challenges.NO_ARMOR))
hero.belongings.armor.affixSeal(new BrokenSeal()); hero.belongings.armor.affixSeal(new BrokenSeal());
Dungeon.quickslot.setSlot(0, darts); Dungeon.quickslot.setSlot(0, darts);
} else { } else {
if (!Dungeon.isChallenged(Challenges.NO_ARMOR)) {
BrokenSeal seal = new BrokenSeal(); BrokenSeal seal = new BrokenSeal();
seal.collect(); seal.collect();
Dungeon.quickslot.setSlot(0, seal); Dungeon.quickslot.setSlot(0, seal);
}
Dungeon.quickslot.setSlot(1, darts); Dungeon.quickslot.setSlot(1, darts);
} }
@@ -79,17 +79,17 @@ public class Blandfruit extends Food {
@Override @Override
public void execute( Hero hero, String action ) { public void execute( Hero hero, String action ) {
super.execute(hero, action); if (action.equals( AC_EAT ) && potionAttrib == null) {
if (action.equals( AC_EAT )){
if (potionAttrib == null) {
GLog.w( Messages.get(this, "raw")); GLog.w( Messages.get(this, "raw"));
return;
} else { }
super.execute(hero, action); super.execute(hero, action);
if (action.equals( AC_EAT ) && potionAttrib != null){
if (potionAttrib instanceof PotionOfFrost) { if (potionAttrib instanceof PotionOfFrost) {
GLog.i(Messages.get(this, "ice_msg")); GLog.i(Messages.get(this, "ice_msg"));
FrozenCarpaccio.effect(hero); FrozenCarpaccio.effect(hero);
@@ -102,9 +102,10 @@ public class Blandfruit extends Food {
} else if (potionAttrib instanceof PotionOfParalyticGas) { } else if (potionAttrib instanceof PotionOfParalyticGas) {
GLog.i(Messages.get(this, "para_msg")); GLog.i(Messages.get(this, "para_msg"));
Buff.affect(hero, EarthImbue.class, EarthImbue.DURATION); Buff.affect(hero, EarthImbue.class, EarthImbue.DURATION);
} else } else {
potionAttrib.apply(hero); potionAttrib.apply(hero);
} }
} }
} }
@@ -59,7 +59,7 @@ public class SpearTrap extends Trap {
} }
Char ch = Actor.findChar( pos); Char ch = Actor.findChar( pos);
if (ch != null){ if (ch != null && !ch.flying){
int damage = Random.NormalIntRange(Dungeon.depth, Dungeon.depth*2); int damage = Random.NormalIntRange(Dungeon.depth, Dungeon.depth*2);
damage -= Random.IntRange( 0, ch.dr()); damage -= Random.IntRange( 0, ch.dr());
ch.damage( Math.max(damage, 0) , this); ch.damage( Math.max(damage, 0) , this);