v3.2.0: anon scrolls no longer clear invis (fixed unstable spell bug)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user