From c0ec2f1e2e42fe536888b64bf8449b6b0707cbd8 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 22 Aug 2020 12:57:39 -0400 Subject: [PATCH] v0.8.2c: removed now outdated empowered read effects from scrolls --- .../items/scrolls/Scroll.java | 3 -- .../items/scrolls/ScrollOfIdentify.java | 23 --------------- .../items/scrolls/ScrollOfLullaby.java | 11 -------- .../items/scrolls/ScrollOfMagicMapping.java | 11 -------- .../items/scrolls/ScrollOfMirrorImage.java | 12 -------- .../items/scrolls/ScrollOfRage.java | 16 ----------- .../items/scrolls/ScrollOfRecharging.java | 6 ---- .../items/scrolls/ScrollOfRemoveCurse.java | 13 --------- .../items/scrolls/ScrollOfRetribution.java | 21 -------------- .../items/scrolls/ScrollOfTeleportation.java | 28 ------------------- .../items/scrolls/ScrollOfTerror.java | 15 ---------- .../items/scrolls/ScrollOfTransmutation.java | 5 ---- .../items/scrolls/ScrollOfUpgrade.java | 5 ---- .../items/scrolls/exotic/ExoticScroll.java | 5 ---- 14 files changed, 174 deletions(-) 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 c0deca9db..d0602cdbf 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 @@ -190,9 +190,6 @@ public abstract class Scroll extends Item { } public abstract void doRead(); - - //currently unused. Used to be used for unstable spellbook prior to 0.7.0 - public void empoweredRead(){} protected void readAnimation() { curUser.spend( TIME_TO_READ ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfIdentify.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfIdentify.java index 7446b0651..762afdfaf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfIdentify.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfIdentify.java @@ -21,7 +21,6 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; -import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.effects.Identification; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -29,10 +28,6 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; -import com.watabou.noosa.audio.Sample; -import com.watabou.utils.Random; - -import java.util.ArrayList; public class ScrollOfIdentify extends InventoryScroll { @@ -43,24 +38,6 @@ public class ScrollOfIdentify extends InventoryScroll { bones = true; } - @Override - public void empoweredRead() { - ArrayList unIDed = new ArrayList<>(); - - for( Item i : curUser.belongings){ - if (!i.isIdentified()){ - unIDed.add(i); - } - } - - if (unIDed.size() > 1) { - Random.element(unIDed).identify(); - Sample.INSTANCE.play( Assets.Sounds.TELEPORT ); - } - - doRead(); - } - @Override protected void onItemSelected( Item item ) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java index 9dcd9fc2f..64bd3c6c0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java @@ -59,17 +59,6 @@ public class ScrollOfLullaby extends Scroll { readAnimation(); } - @Override - public void empoweredRead() { - doRead(); - for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { - if (Dungeon.level.heroFOV[mob.pos]) { - Buff drowsy = mob.buff(Drowsy.class); - if (drowsy != null) drowsy.act(); - } - } - } - @Override public int value() { return isKnown() ? 40 * quantity : super.value(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicMapping.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicMapping.java index 4d4970ce5..7ac689bc9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicMapping.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicMapping.java @@ -23,9 +23,6 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MindVision; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite; @@ -87,14 +84,6 @@ public class ScrollOfMagicMapping extends Scroll { readAnimation(); } - @Override - public void empoweredRead() { - doRead(); - Buff.affect( curUser, MindVision.class, MindVision.DURATION ); - Buff.affect( curUser, Awareness.class, Awareness.DURATION ); - Dungeon.observe(); - } - @Override public int value() { return isKnown() ? 40 * quantity : super.value(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMirrorImage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMirrorImage.java index 05e12b0fd..eaad713f0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMirrorImage.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMirrorImage.java @@ -58,18 +58,6 @@ public class ScrollOfMirrorImage extends Scroll { readAnimation(); } - @Override - public void empoweredRead() { - //spawns 2 images right away, delays 3 of them, 5 total. - new DelayedImageSpawner(5 - spawnImages(curUser, 2), 1, 2).attachTo(curUser); - - setKnown(); - - Sample.INSTANCE.play( Assets.Sounds.READ ); - - readAnimation(); - } - //returns the number of images spawned public static int spawnImages( Hero hero, int nImages ){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java index d34980cdd..1a545c474 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java @@ -58,22 +58,6 @@ public class ScrollOfRage extends Scroll { readAnimation(); } - @Override - public void empoweredRead() { - for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { - if (Dungeon.level.heroFOV[mob.pos]) { - Buff.prolong(mob, Amok.class, 5f); - } - } - - setKnown(); - - curUser.sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.3f, 3 ); - Sample.INSTANCE.play( Assets.Sounds.READ ); - - readAnimation(); - } - @Override public int value() { return isKnown() ? 40 * quantity : super.value(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRecharging.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRecharging.java index 4b63fa850..d460995d3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRecharging.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRecharging.java @@ -54,12 +54,6 @@ public class ScrollOfRecharging extends Scroll { readAnimation(); } - @Override - public void empoweredRead() { - doRead(); - Buff.append(curUser, Recharging.class, Recharging.DURATION/3f); - } - public static void charge( Char user ) { user.sprite.centerEmitter().burst( EnergyParticle.FACTORY, 15 ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java index 0ab6bc70e..2c36983aa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRemoveCurse.java @@ -21,7 +21,6 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; -import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; @@ -36,7 +35,6 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; -import com.watabou.noosa.audio.Sample; public class ScrollOfRemoveCurse extends InventoryScroll { @@ -45,17 +43,6 @@ public class ScrollOfRemoveCurse extends InventoryScroll { mode = WndBag.Mode.UNCURSABLE; } - @Override - public void empoweredRead() { - for (Item item : curUser.belongings){ - if (item.cursed){ - item.cursedKnown = true; - } - } - Sample.INSTANCE.play( Assets.Sounds.READ ); - doRead(); - } - @Override protected void onItemSelected(Item item) { new Flare( 6, 32 ).show( curUser.sprite, 2f ) ; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRetribution.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRetribution.java index add5b13c1..c40578471 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRetribution.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRetribution.java @@ -68,27 +68,6 @@ public class ScrollOfRetribution extends Scroll { } - @Override - public void empoweredRead() { - GameScene.flash( 0xFFFFFF ); - - Sample.INSTANCE.play( Assets.Sounds.BLAST ); - - //scales from 3x to 5x power, maxing at ~20% HP - float hpPercent = (curUser.HT - curUser.HP)/(float)(curUser.HT); - float power = Math.min( 5f, 3f + 2.5f*hpPercent); - - for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { - if (Dungeon.level.heroFOV[mob.pos]) { - mob.damage(Math.round(mob.HP * power/5f), this); - } - } - - setKnown(); - - readAnimation(); - } - @Override public int value() { return isKnown() ? 40 * quantity : super.value(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java index a452375c0..ef00d8bf6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java @@ -33,9 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret.SecretRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; -import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; -import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -64,32 +62,6 @@ public class ScrollOfTeleportation extends Scroll { readAnimation(); } - @Override - public void empoweredRead() { - - if (Dungeon.bossLevel()){ - GLog.w( Messages.get(this, "no_tele") ); - return; - } - - GameScene.selectCell(new CellSelector.Listener() { - @Override - public void onSelect(Integer target) { - if (target != null) { - //time isn't spent - ((HeroSprite)curUser.sprite).read(); - teleportToLocation(curUser, target); - - } - } - - @Override - public String prompt() { - return Messages.get(ScrollOfTeleportation.class, "prompt"); - } - }); - } - public static void teleportToLocation(Hero hero, int pos){ PathFinder.buildDistanceMap(pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null)); if (PathFinder.distance[hero.pos] == Integer.MAX_VALUE diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java index 2f2bedc69..e9fdd2b2e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java @@ -25,7 +25,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; @@ -74,20 +73,6 @@ public class ScrollOfTerror extends Scroll { readAnimation(); } - @Override - public void empoweredRead() { - doRead(); - for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { - if (Dungeon.level.heroFOV[mob.pos]) { - Terror t = mob.buff(Terror.class); - if (t != null){ - Buff.prolong(mob, Terror.class, 15f); - Buff.affect(mob, Paralysis.class, 5f); - } - } - } - } - @Override public int value() { return isKnown() ? 40 * quantity : super.value(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java index 760b4c06d..b36d4936a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java @@ -267,11 +267,6 @@ public class ScrollOfTransmutation extends InventoryScroll { } } - @Override - public void empoweredRead() { - //does nothing, this shouldn't happen - } - @Override public int value() { return isKnown() ? 50 * quantity : super.value(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java index 3a46b8a57..b32c3459f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java @@ -122,11 +122,6 @@ public class ScrollOfUpgrade extends InventoryScroll { hero.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10 ); } - @Override - public void empoweredRead() { - //does nothing for now, this should never happen. - } - @Override public int value() { return isKnown() ? 50 * quantity : super.value(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ExoticScroll.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ExoticScroll.java index 3a028ff34..a73918f0c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ExoticScroll.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ExoticScroll.java @@ -110,11 +110,6 @@ public abstract class ExoticScroll extends Scroll { } } - @Override - public void empoweredRead() { - - } - @Override //20 gold more than its none-exotic equivalent public int value() {