v0.3.5: big consistency pass on how items handle execution

This commit is contained in:
Evan Debenham
2016-04-19 19:34:08 -04:00
parent a571dc7f02
commit e715e147ff
36 changed files with 163 additions and 151 deletions
@@ -112,6 +112,9 @@ public class Armor extends EquipableItem {
@Override
public void execute(Hero hero, String action) {
super.execute(hero, action);
if (action.equals(AC_DETACH) && seal){
seal = false;
BrokenSeal.WarriorShield sigilBuff = hero.buff(BrokenSeal.WarriorShield.class);
@@ -127,8 +130,6 @@ public class Armor extends EquipableItem {
if (!sigil.collect()){
Dungeon.level.drop(sigil, hero.pos);
}
} else {
super.execute(hero, action);
}
}
@@ -101,6 +101,9 @@ abstract public class ClassArmor extends Armor {
@Override
public void execute( Hero hero, String action ) {
super.execute( hero, action );
if (action.equals(AC_SPECIAL)) {
if (hero.HP < 3) {
@@ -113,8 +116,6 @@ abstract public class ClassArmor extends Armor {
doSpecial();
}
} else {
super.execute( hero, action );
}
}