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
@@ -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);
}
}
}