diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 90f3cf570..e90390699 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -343,6 +343,7 @@ items.artifacts.etherealchains$chainsrecharge.levelup=Your chains grow stronger! items.artifacts.holytome.name=holy tome items.artifacts.holytome.ac_cast=CAST 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.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. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HolyTome.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HolyTome.java index 58f1722e8..63c460f71 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HolyTome.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/HolyTome.java @@ -86,6 +86,7 @@ public class HolyTome extends Artifact { if (action.equals(AC_CAST)) { 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 { GameScene.show(new WndClericSpells(this, hero, false)); @@ -318,6 +319,11 @@ public class HolyTome extends Artifact { @Override public void doAction() { + if (cursed){ + GLog.w(Messages.get(HolyTome.this, "cursed")); + return; + } + if (!canCast(Dungeon.hero, quickSpell)){ GLog.w(Messages.get(HolyTome.this, "no_spell")); return;