v0.3.5: fixed some bugs
This commit is contained in:
@@ -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) ){
|
||||||
hero.belongings.armor.affixSeal(new BrokenSeal());
|
if (!Dungeon.isChallenged(Challenges.NO_ARMOR))
|
||||||
|
hero.belongings.armor.affixSeal(new BrokenSeal());
|
||||||
Dungeon.quickslot.setSlot(0, darts);
|
Dungeon.quickslot.setSlot(0, darts);
|
||||||
} else {
|
} else {
|
||||||
BrokenSeal seal = new BrokenSeal();
|
if (!Dungeon.isChallenged(Challenges.NO_ARMOR)) {
|
||||||
seal.collect();
|
BrokenSeal seal = new BrokenSeal();
|
||||||
Dungeon.quickslot.setSlot(0, seal);
|
seal.collect();
|
||||||
|
Dungeon.quickslot.setSlot(0, seal);
|
||||||
|
}
|
||||||
Dungeon.quickslot.setSlot(1, darts);
|
Dungeon.quickslot.setSlot(1, darts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,32 +79,33 @@ public class Blandfruit extends Food {
|
|||||||
@Override
|
@Override
|
||||||
public void execute( Hero hero, String action ) {
|
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);
|
super.execute(hero, action);
|
||||||
|
|
||||||
if (action.equals( AC_EAT )){
|
if (action.equals( AC_EAT ) && potionAttrib != null){
|
||||||
if (potionAttrib == null) {
|
|
||||||
|
|
||||||
GLog.w( Messages.get(this, "raw"));
|
|
||||||
|
|
||||||
|
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 {
|
} else {
|
||||||
|
potionAttrib.apply(hero);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user