From 94e7ea056148c1c32f07866d0b4683c73895885b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 15 Aug 2022 13:13:52 -0400 Subject: [PATCH] v1.4.0: fixed further issues with spellbook and siren's song --- .../items/artifacts/UnstableSpellbook.java | 6 ++++-- .../items/scrolls/exotic/ScrollOfSirensSong.java | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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 747cebb9e..561011e11 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 @@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.bags.ScrollHolder; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; @@ -124,7 +125,7 @@ public class UnstableSpellbook extends Artifact { Scroll scroll; do { - scroll = (Scroll) Generator.randomUsingDefaults(Generator.Category.SCROLL); + scroll = new ScrollOfLullaby(); } while (scroll == null //reduce the frequency of these scrolls by half ||((scroll instanceof ScrollOfIdentify || @@ -155,6 +156,7 @@ public class UnstableSpellbook extends Artifact { if (index == 1){ Scroll scroll = Reflection.newInstance(ExoticScroll.regToExo.get(fScroll.getClass())); charge--; + scroll.anonymize(); scroll.doRead(); Talent.onArtifactUsed(Dungeon.hero); } else { @@ -292,7 +294,7 @@ public class UnstableSpellbook extends Artifact { && target.buff(MagicImmune.class) == null && (lock == null || lock.regenOn())) { //120 turns to charge at full, 80 turns to charge at 0/8 - float chargeGain = 1 / (120f - (chargeCap - charge)*5f); + float chargeGain = 1; chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); partialCharge += chargeGain; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfSirensSong.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfSirensSong.java index 473f6e29d..58ba3f737 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfSirensSong.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfSirensSong.java @@ -56,7 +56,7 @@ public class ScrollOfSirensSong extends ExoticScroll { @Override public void onSelect(Integer cell) { - if (cell == null && isKnown() && !anonymous){ + if (cell == null && isKnown()){ return; }