diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java index db2dccbf5..855595ac0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; @@ -177,10 +178,12 @@ public class UnstableSpellbook extends Artifact { scroll.anonymize(); checkForArtifactProc(curUser, scroll); scroll.doRead(); + Invisibility.dispel(); Talent.onArtifactUsed(Dungeon.hero); } else { checkForArtifactProc(curUser, fScroll); fScroll.doRead(); + Invisibility.dispel(); Talent.onArtifactUsed(Dungeon.hero); } updateQuickslot(); @@ -194,6 +197,7 @@ public class UnstableSpellbook extends Artifact { } else { checkForArtifactProc(curUser, scroll); scroll.doRead(); + Invisibility.dispel(); Talent.onArtifactUsed(Dungeon.hero); } @@ -232,6 +236,7 @@ public class UnstableSpellbook extends Artifact { @Override public void call() { scroll.doRead(); + Invisibility.dispel(); Item.updateQuickslot(); } }); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java index 379545346..0b8f2aa32 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java @@ -194,7 +194,8 @@ public abstract class Scroll extends Item { public abstract void doRead(); public void readAnimation() { - Invisibility.dispel(); + //if scroll is being created for its effect, depend on creating item to dispel + if (!anonymous) Invisibility.dispel(); curUser.spend( TIME_TO_READ ); curUser.busy(); ((HeroSprite)curUser.sprite).read(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/UnstableSpell.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/UnstableSpell.java index 0cd39732d..289913f9a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/UnstableSpell.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/UnstableSpell.java @@ -21,6 +21,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.spells; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -112,6 +113,7 @@ public class UnstableSpell extends Spell { s.anonymize(); curItem = s; s.doRead(); + Invisibility.dispel(); Catalog.countUse(getClass()); if (Random.Float() < talentChance){