v3.1.0: broken seal no longer requires ID or uncurse, just curse known

This commit is contained in:
Evan Debenham
2025-04-03 13:12:33 -04:00
parent e1d677845f
commit e7bdda0dbe
3 changed files with 23 additions and 9 deletions

View File

@@ -799,7 +799,7 @@ actors.hero.hero.revive=The ankh explodes with life-giving energy!
##classes
actors.hero.heroclass.warrior=warrior
actors.hero.heroclass.warrior_desc_short=The Warrior endures extra damage with shielding granted by his _broken seal._ The seal can be moved between armors and _transfers a single upgrade._
actors.hero.heroclass.warrior_desc=The Warrior starts with a _unique broken seal_ that generates shielding over his health. The seal can be moved between armors, and can _transfer a single upgrade_ with it.\n\nThe Warrior also starts with a _worn shortsword_, _three throwing stones_, cloth armor, a waterskin, and a velvet pouch.\n\nThe Warrior automatically identifies:\n_-_ Scrolls of Identify\n_-_ Potions of Healing\n_-_ Scrolls of Rage
actors.hero.heroclass.warrior_desc=The Warrior starts with a _unique broken seal_ that grants him a burst of shielding when he is below half health. The seal can be moved between armors, and can _transfer a single upgrade_ with it.\n\nThe Warrior also starts with a _worn shortsword_, _three throwing stones_, cloth armor, a waterskin, and a velvet pouch.\n\nThe Warrior automatically identifies:\n_-_ Scrolls of Identify\n_-_ Potions of Healing\n_-_ Scrolls of Rage
actors.hero.heroclass.warrior_unlock=The Warrior is automatically unlocked.
actors.hero.heroclass.mage=mage

View File

@@ -2257,13 +2257,13 @@ items.arcaneresin.discover_hint=You can craft this item via alchemy.
items.brokenseal.name=broken seal
items.brokenseal.ac_affix=AFFIX
items.brokenseal.prompt=Select an armor
items.brokenseal.unknown_armor=You must identify that armor first.
items.brokenseal.cursed_armor=The seal won't apply to cursed armor.
items.brokenseal.unknown_armor=You must identify whether that armor is cursed or not first.
items.brokenseal.affix=You affix the seal to your armor!
items.brokenseal.desc=A wax seal, affixed to armor as a symbol of valor. All the markings on the seal have worn off with age and it is broken in half down the middle.\n\nA memento from his home, the seal helps the warrior persevere. While wearing the seal the warrior will instantly gain shielding when he is about to be damaged to half health or lower.\n\nThe seal can be _affixed to armor,_ and moved between armors. It can carry a single upgrade with it, so long as that upgrade was applied to the armor while the seal was attached to it.
items.brokenseal.inscribed=The seal is inscribed with a _%s._
items.brokenseal.choose_title=Choose a Glyph
items.brokenseal.choose_desc=Both this armor and the broken seal are carrying a glyph. Pick which glyph should be kept.\n\nNote that if you pick the glyph that is currently on the armor, the seal will not be able to transfer it later.
items.brokenseal.choose_curse_warn=_Your armor is cursed but your seal is not, so you cannot choose the seal's glyph!_
items.brokenseal.discover_hint=One of the heroes starts with this item.
items.brokenseal$warriorshield.name=Warrior Shield
items.brokenseal$warriorshield.desc_active=The Warrior's broken seal is currently helping him persevere, granting him shielding on top of his health. There is a 100 turn cooldown after the shielding initially triggers before it can be used again.\n\nThis shield does not decay over time, but will end if no enemies are nearby for a few turns. When it ends, any unused shielding will reduce the cooldown, up to a max of 50%%.\n\nShield remaining: %1$d.\n\nCurrent Cooldown: %2$d.

View File

@@ -162,21 +162,27 @@ public class BrokenSeal extends Item {
BrokenSeal seal = (BrokenSeal) curItem;
if (item != null && item instanceof Armor) {
Armor armor = (Armor)item;
if (!armor.levelKnown){
if (!armor.cursedKnown){
GLog.w(Messages.get(BrokenSeal.class, "unknown_armor"));
} else if (armor.cursed && (seal.getGlyph() == null || !seal.getGlyph().curse())){
GLog.w(Messages.get(BrokenSeal.class, "cursed_armor"));
} else if (armor.glyph != null && seal.getGlyph() != null
} else if (armor.glyph != null && seal.getGlyph() != null
&& armor.glyph.getClass() != seal.getGlyph().getClass()) {
//cannot apply the seal's non-curse glyph to a curse glyph armor
final boolean sealGlyphApplicable = !armor.glyph.curse() || seal.getGlyph().curse();
String bodyText = Messages.get(BrokenSeal.class, "choose_desc");
if (!sealGlyphApplicable){
bodyText += "\n\n" + Messages.get(BrokenSeal.class, "choose_curse_warn");
}
GameScene.show(new WndOptions(new ItemSprite(seal),
Messages.get(BrokenSeal.class, "choose_title"),
Messages.get(BrokenSeal.class, "choose_desc"),
bodyText,
armor.glyph.name(),
seal.getGlyph().name()){
@Override
protected void onSelect(int index) {
if (index == -1) return;
if (index == 0) seal.setGlyph(null);
//if index is 1, then the glyph transfer happens in affixSeal
@@ -186,6 +192,14 @@ public class BrokenSeal extends Item {
armor.affixSeal(seal);
seal.detach(Dungeon.hero.belongings.backpack);
}
@Override
protected boolean enabled(int index) {
if (index == 1 && !sealGlyphApplicable){
return false;
}
return super.enabled(index);
}
});
} else {