v0.3.5a: fixed warrior's seal working incorrectly with class armor

This commit is contained in:
Evan Debenham 2016-05-06 16:39:31 -04:00
parent ae450603a3
commit f898df2c22
2 changed files with 5 additions and 2 deletions

View File

@ -55,7 +55,7 @@ public class Armor extends EquipableItem {
private static final int HITS_TO_KNOW = 10; private static final int HITS_TO_KNOW = 10;
private static final String TXT_TO_STRING = "%s :%d"; private static final String TXT_TO_STRING = "%s :%d";
private static final String AC_DETACH = "DETACH"; protected static final String AC_DETACH = "DETACH";
public int tier; public int tier;

View File

@ -29,6 +29,7 @@ import com.watabou.utils.Bundle;
import java.util.ArrayList; import java.util.ArrayList;
//FIXME: this should be upgradeable, fix in 0.4.0
abstract public class ClassArmor extends Armor { abstract public class ClassArmor extends Armor {
private static final String AC_SPECIAL = "SPECIAL"; private static final String AC_SPECIAL = "SPECIAL";
@ -70,6 +71,7 @@ abstract public class ClassArmor extends Armor {
break; break;
} }
classArmor.level(armor.level());
classArmor.STR = armor.STR; classArmor.STR = armor.STR;
classArmor.DR = armor.DR(); classArmor.DR = armor.DR();
@ -98,6 +100,7 @@ abstract public class ClassArmor extends Armor {
@Override @Override
public ArrayList<String> actions( Hero hero ) { public ArrayList<String> actions( Hero hero ) {
ArrayList<String> actions = super.actions( hero ); ArrayList<String> actions = super.actions( hero );
actions.remove( AC_DETACH );
if (hero.HP >= 3 && isEquipped( hero )) { if (hero.HP >= 3 && isEquipped( hero )) {
actions.add( AC_SPECIAL ); actions.add( AC_SPECIAL );
} }