v0.8.2c: removed now outdated empowered read effects from scrolls

This commit is contained in:
Evan Debenham 2020-08-22 12:57:39 -04:00
parent 1940663bb7
commit c0ec2f1e2e
14 changed files with 0 additions and 174 deletions

View File

@ -190,9 +190,6 @@ public abstract class Scroll extends Item {
} }
public abstract void doRead(); public abstract void doRead();
//currently unused. Used to be used for unstable spellbook prior to 0.7.0
public void empoweredRead(){}
protected void readAnimation() { protected void readAnimation() {
curUser.spend( TIME_TO_READ ); curUser.spend( TIME_TO_READ );

View File

@ -21,7 +21,6 @@
package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.effects.Identification; import com.shatteredpixel.shatteredpixeldungeon.effects.Identification;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; 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.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; 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 { public class ScrollOfIdentify extends InventoryScroll {
@ -43,24 +38,6 @@ public class ScrollOfIdentify extends InventoryScroll {
bones = true; bones = true;
} }
@Override
public void empoweredRead() {
ArrayList<Item> 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 @Override
protected void onItemSelected( Item item ) { protected void onItemSelected( Item item ) {

View File

@ -59,17 +59,6 @@ public class ScrollOfLullaby extends Scroll {
readAnimation(); 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 @Override
public int value() { public int value() {
return isKnown() ? 40 * quantity : super.value(); return isKnown() ? 40 * quantity : super.value();

View File

@ -23,9 +23,6 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; 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.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite; import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
@ -87,14 +84,6 @@ public class ScrollOfMagicMapping extends Scroll {
readAnimation(); readAnimation();
} }
@Override
public void empoweredRead() {
doRead();
Buff.affect( curUser, MindVision.class, MindVision.DURATION );
Buff.affect( curUser, Awareness.class, Awareness.DURATION );
Dungeon.observe();
}
@Override @Override
public int value() { public int value() {
return isKnown() ? 40 * quantity : super.value(); return isKnown() ? 40 * quantity : super.value();

View File

@ -58,18 +58,6 @@ public class ScrollOfMirrorImage extends Scroll {
readAnimation(); 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 //returns the number of images spawned
public static int spawnImages( Hero hero, int nImages ){ public static int spawnImages( Hero hero, int nImages ){

View File

@ -58,22 +58,6 @@ public class ScrollOfRage extends Scroll {
readAnimation(); 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 @Override
public int value() { public int value() {
return isKnown() ? 40 * quantity : super.value(); return isKnown() ? 40 * quantity : super.value();

View File

@ -54,12 +54,6 @@ public class ScrollOfRecharging extends Scroll {
readAnimation(); readAnimation();
} }
@Override
public void empoweredRead() {
doRead();
Buff.append(curUser, Recharging.class, Recharging.DURATION/3f);
}
public static void charge( Char user ) { public static void charge( Char user ) {
user.sprite.centerEmitter().burst( EnergyParticle.FACTORY, 15 ); user.sprite.centerEmitter().burst( EnergyParticle.FACTORY, 15 );
} }

View File

@ -21,7 +21,6 @@
package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; 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.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
import com.watabou.noosa.audio.Sample;
public class ScrollOfRemoveCurse extends InventoryScroll { public class ScrollOfRemoveCurse extends InventoryScroll {
@ -45,17 +43,6 @@ public class ScrollOfRemoveCurse extends InventoryScroll {
mode = WndBag.Mode.UNCURSABLE; 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 @Override
protected void onItemSelected(Item item) { protected void onItemSelected(Item item) {
new Flare( 6, 32 ).show( curUser.sprite, 2f ) ; new Flare( 6, 32 ).show( curUser.sprite, 2f ) ;

View File

@ -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 @Override
public int value() { public int value() {
return isKnown() ? 40 * quantity : super.value(); return isKnown() ? 40 * quantity : super.value();

View File

@ -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.secret.SecretRoom;
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
@ -64,32 +62,6 @@ public class ScrollOfTeleportation extends Scroll {
readAnimation(); 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){ public static void teleportToLocation(Hero hero, int pos){
PathFinder.buildDistanceMap(pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null)); PathFinder.buildDistanceMap(pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null));
if (PathFinder.distance[hero.pos] == Integer.MAX_VALUE if (PathFinder.distance[hero.pos] == Integer.MAX_VALUE

View File

@ -25,7 +25,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 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.buffs.Terror;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
@ -74,20 +73,6 @@ public class ScrollOfTerror extends Scroll {
readAnimation(); 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 @Override
public int value() { public int value() {
return isKnown() ? 40 * quantity : super.value(); return isKnown() ? 40 * quantity : super.value();

View File

@ -267,11 +267,6 @@ public class ScrollOfTransmutation extends InventoryScroll {
} }
} }
@Override
public void empoweredRead() {
//does nothing, this shouldn't happen
}
@Override @Override
public int value() { public int value() {
return isKnown() ? 50 * quantity : super.value(); return isKnown() ? 50 * quantity : super.value();

View File

@ -122,11 +122,6 @@ public class ScrollOfUpgrade extends InventoryScroll {
hero.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10 ); hero.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10 );
} }
@Override
public void empoweredRead() {
//does nothing for now, this should never happen.
}
@Override @Override
public int value() { public int value() {
return isKnown() ? 50 * quantity : super.value(); return isKnown() ? 50 * quantity : super.value();

View File

@ -110,11 +110,6 @@ public abstract class ExoticScroll extends Scroll {
} }
} }
@Override
public void empoweredRead() {
}
@Override @Override
//20 gold more than its none-exotic equivalent //20 gold more than its none-exotic equivalent
public int value() { public int value() {