v0.3.5: big consistency pass on how items handle execution
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user