v0.9.4: armor with the seal on it now states its max shielding
This commit is contained in:
parent
6ae71ea544
commit
9849491f77
|
@ -89,7 +89,7 @@ items.armor.armor.inscribed=It is inscribed with a _%s._
|
|||
items.armor.armor.cursed_worn=Because this armor is cursed, you are powerless to remove it.
|
||||
items.armor.armor.cursed=You can feel a malevolent magic lurking within this armor.
|
||||
items.armor.armor.not_cursed=This armor is free of malevolent magic.
|
||||
items.armor.armor.seal_attached=The Warrior's broken seal is attached to this armor.
|
||||
items.armor.armor.seal_attached=The Warrior's broken seal is attached to this armor, it is providing him up to _%d shielding_.
|
||||
items.armor.armor$glyph.glyph=glyph
|
||||
items.armor.armor$glyph.killed=%s killed you...
|
||||
|
||||
|
|
|
@ -67,6 +67,10 @@ public class BrokenSeal extends Item {
|
|||
this.glyph = glyph;
|
||||
}
|
||||
|
||||
public int maxShield( int armTier, int armLvl ){
|
||||
return armTier + armLvl + Dungeon.hero.pointsInTalent(Talent.IRON_WILL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemSprite.Glowing glowing() {
|
||||
return glyph != null ? glyph.glowing() : null;
|
||||
|
@ -191,8 +195,8 @@ public class BrokenSeal extends Item {
|
|||
}
|
||||
|
||||
public synchronized int maxShield() {
|
||||
if (armor != null && armor.isEquipped((Hero)target)) {
|
||||
return armor.tier + armor.level() + ((Hero) target).pointsInTalent(Talent.IRON_WILL);
|
||||
if (armor != null && armor.isEquipped((Hero)target) && armor.checkSeal() != null) {
|
||||
return armor.checkSeal().maxShield(armor.tier, armor.level());
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -480,7 +480,7 @@ public class Armor extends EquipableItem {
|
|||
} else if (cursedKnown && cursed) {
|
||||
info += "\n\n" + Messages.get(Armor.class, "cursed");
|
||||
} else if (seal != null) {
|
||||
info += "\n\n" + Messages.get(Armor.class, "seal_attached");
|
||||
info += "\n\n" + Messages.get(Armor.class, "seal_attached", seal.maxShield(tier, level()));
|
||||
} else if (!isIdentified() && cursedKnown){
|
||||
info += "\n\n" + Messages.get(Armor.class, "not_cursed");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user