v3.0.0: added functionality for the holy tome to be cursed

This commit is contained in:
Evan Debenham
2024-12-20 12:32:01 -05:00
parent cbe3c64716
commit b8aa706ac3
2 changed files with 7 additions and 0 deletions

View File

@@ -343,6 +343,7 @@ items.artifacts.etherealchains$chainsrecharge.levelup=Your chains grow stronger!
items.artifacts.holytome.name=holy tome items.artifacts.holytome.name=holy tome
items.artifacts.holytome.ac_cast=CAST items.artifacts.holytome.ac_cast=CAST
items.artifacts.holytome.no_spell=You're not able to cast that spell right now. items.artifacts.holytome.no_spell=You're not able to cast that spell right now.
items.artifacts.holytome.cursed=You cannot use a cursed tome.
items.artifacts.holytome.levelup=Your tome grows stronger! items.artifacts.holytome.levelup=Your tome grows stronger!
items.artifacts.holytome.desc=A holy tome that acts as a focus for the Cleric's divine magic. Using the tome lets the Cleric cast a variety of magical spells.\n\nThe tome will steadily get more powerful as the Cleric uses it, giving the Cleric more maximum charges and slightly increasing the recharging speed. items.artifacts.holytome.desc=A holy tome that acts as a focus for the Cleric's divine magic. Using the tome lets the Cleric cast a variety of magical spells.\n\nThe tome will steadily get more powerful as the Cleric uses it, giving the Cleric more maximum charges and slightly increasing the recharging speed.

View File

@@ -86,6 +86,7 @@ public class HolyTome extends Artifact {
if (action.equals(AC_CAST)) { if (action.equals(AC_CAST)) {
if (!isEquipped(hero) && !hero.hasTalent(Talent.LIGHT_READING)) GLog.i(Messages.get(Artifact.class, "need_to_equip")); if (!isEquipped(hero) && !hero.hasTalent(Talent.LIGHT_READING)) GLog.i(Messages.get(Artifact.class, "need_to_equip"));
else if (cursed) GLog.i( Messages.get(this, "cursed") );
else { else {
GameScene.show(new WndClericSpells(this, hero, false)); GameScene.show(new WndClericSpells(this, hero, false));
@@ -318,6 +319,11 @@ public class HolyTome extends Artifact {
@Override @Override
public void doAction() { public void doAction() {
if (cursed){
GLog.w(Messages.get(HolyTome.this, "cursed"));
return;
}
if (!canCast(Dungeon.hero, quickSpell)){ if (!canCast(Dungeon.hero, quickSpell)){
GLog.w(Messages.get(HolyTome.this, "no_spell")); GLog.w(Messages.get(HolyTome.this, "no_spell"));
return; return;