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.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
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.MagicImmune;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
@@ -177,10 +178,12 @@ public class UnstableSpellbook extends Artifact {
|
|||||||
scroll.anonymize();
|
scroll.anonymize();
|
||||||
checkForArtifactProc(curUser, scroll);
|
checkForArtifactProc(curUser, scroll);
|
||||||
scroll.doRead();
|
scroll.doRead();
|
||||||
|
Invisibility.dispel();
|
||||||
Talent.onArtifactUsed(Dungeon.hero);
|
Talent.onArtifactUsed(Dungeon.hero);
|
||||||
} else {
|
} else {
|
||||||
checkForArtifactProc(curUser, fScroll);
|
checkForArtifactProc(curUser, fScroll);
|
||||||
fScroll.doRead();
|
fScroll.doRead();
|
||||||
|
Invisibility.dispel();
|
||||||
Talent.onArtifactUsed(Dungeon.hero);
|
Talent.onArtifactUsed(Dungeon.hero);
|
||||||
}
|
}
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
@@ -194,6 +197,7 @@ public class UnstableSpellbook extends Artifact {
|
|||||||
} else {
|
} else {
|
||||||
checkForArtifactProc(curUser, scroll);
|
checkForArtifactProc(curUser, scroll);
|
||||||
scroll.doRead();
|
scroll.doRead();
|
||||||
|
Invisibility.dispel();
|
||||||
Talent.onArtifactUsed(Dungeon.hero);
|
Talent.onArtifactUsed(Dungeon.hero);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,6 +236,7 @@ public class UnstableSpellbook extends Artifact {
|
|||||||
@Override
|
@Override
|
||||||
public void call() {
|
public void call() {
|
||||||
scroll.doRead();
|
scroll.doRead();
|
||||||
|
Invisibility.dispel();
|
||||||
Item.updateQuickslot();
|
Item.updateQuickslot();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -194,7 +194,8 @@ public abstract class Scroll extends Item {
|
|||||||
public abstract void doRead();
|
public abstract void doRead();
|
||||||
|
|
||||||
public void readAnimation() {
|
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.spend( TIME_TO_READ );
|
||||||
curUser.busy();
|
curUser.busy();
|
||||||
((HeroSprite)curUser.sprite).read();
|
((HeroSprite)curUser.sprite).read();
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.spells;
|
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.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
@@ -112,6 +113,7 @@ public class UnstableSpell extends Spell {
|
|||||||
s.anonymize();
|
s.anonymize();
|
||||||
curItem = s;
|
curItem = s;
|
||||||
s.doRead();
|
s.doRead();
|
||||||
|
Invisibility.dispel();
|
||||||
|
|
||||||
Catalog.countUse(getClass());
|
Catalog.countUse(getClass());
|
||||||
if (Random.Float() < talentChance){
|
if (Random.Float() < talentChance){
|
||||||
|
|||||||
Reference in New Issue
Block a user