v0.3.0: removed wand of blink (and moved visual fx to scroll of teleportation)
This commit is contained in:
committed by
Evan Debenham
parent
60ff641bc5
commit
39f140a4f5
@@ -21,6 +21,7 @@ import java.util.HashSet;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
@@ -36,7 +37,6 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.ArmorKit;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfDisintegration;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Death;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.CityBossLevel;
|
||||
@@ -189,7 +189,7 @@ public class King extends Mob {
|
||||
undead.pos = j;
|
||||
GameScene.add( undead );
|
||||
|
||||
WandOfBlink.appear( undead, j );
|
||||
ScrollOfTeleportation.appear( undead, j );
|
||||
new Flare( 3, 32 ).color( 0x000000, false ).show( undead.sprite, 2f ) ;
|
||||
|
||||
PathFinder.distance[j] = Integer.MAX_VALUE;
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
@@ -29,7 +30,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Leech;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
@@ -99,7 +99,7 @@ public class Succubus extends Mob {
|
||||
if (Actor.findChar( cell ) != null && cell != this.pos)
|
||||
cell = route.path.get(route.dist-1);
|
||||
|
||||
WandOfBlink.appear( this, cell );
|
||||
ScrollOfTeleportation.appear( this, cell );
|
||||
|
||||
delay = BLINK_DELAY;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.armor;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
@@ -28,7 +29,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
@@ -98,7 +98,7 @@ public class RogueArmor extends ClassArmor {
|
||||
}
|
||||
}
|
||||
|
||||
WandOfBlink.appear( curUser, target );
|
||||
ScrollOfTeleportation.appear( curUser, target );
|
||||
CellEmitter.get( target ).burst( Speck.factory( Speck.WOOL ), 10 );
|
||||
Sample.INSTANCE.play( Assets.SND_PUFF );
|
||||
Dungeon.level.press( target, curUser );
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor.Glyph;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||
@@ -46,7 +46,7 @@ public class Displacement extends Glyph {
|
||||
int pos = Random.Int( Level.LENGTH );
|
||||
if (Dungeon.visible[pos] && Level.passable[pos] && Actor.findChar( pos ) == null) {
|
||||
|
||||
WandOfBlink.appear( defender, pos );
|
||||
ScrollOfTeleportation.appear( defender, pos );
|
||||
Dungeon.level.press( pos, defender );
|
||||
Dungeon.observe();
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.MirrorImage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor.Glyph;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
@@ -58,7 +58,7 @@ public class Multiplicity extends Glyph {
|
||||
MirrorImage mob = new MirrorImage();
|
||||
mob.duplicate( (Hero)defender );
|
||||
GameScene.add( mob );
|
||||
WandOfBlink.appear( mob, Random.element( respawnPoints ) );
|
||||
ScrollOfTeleportation.appear( mob, Random.element( respawnPoints ) );
|
||||
|
||||
defender.damage( Random.IntRange( 1, defender.HT / 6 ), this );
|
||||
checkOwner( defender );
|
||||
|
||||
@@ -29,7 +29,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
||||
@@ -164,7 +163,7 @@ public class LloydsBeacon extends Artifact {
|
||||
} else if (action == AC_RETURN) {
|
||||
|
||||
if (returnDepth == Dungeon.depth) {
|
||||
WandOfBlink.appear( hero, returnPos );
|
||||
ScrollOfTeleportation.appear( hero, returnPos );
|
||||
Dungeon.level.press( returnPos, hero );
|
||||
Dungeon.observe();
|
||||
} else {
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.MirrorImage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.watabou.utils.Random;
|
||||
@@ -57,7 +56,7 @@ public class ScrollOfMirrorImage extends Scroll {
|
||||
MirrorImage mob = new MirrorImage();
|
||||
mob.duplicate( curUser );
|
||||
GameScene.add( mob );
|
||||
WandOfBlink.appear( mob, respawnPoints.get( index ) );
|
||||
ScrollOfTeleportation.appear( mob, respawnPoints.get( index ) );
|
||||
|
||||
respawnPoints.remove( index );
|
||||
nImages--;
|
||||
|
||||
@@ -17,13 +17,15 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.tweeners.AlphaTweener;
|
||||
|
||||
public class ScrollOfTeleportation extends Scroll {
|
||||
|
||||
@@ -67,7 +69,7 @@ public class ScrollOfTeleportation extends Scroll {
|
||||
|
||||
} else {
|
||||
|
||||
WandOfBlink.appear( hero, pos );
|
||||
appear( hero, pos );
|
||||
Dungeon.level.press( pos, hero );
|
||||
Dungeon.observe();
|
||||
|
||||
@@ -75,6 +77,22 @@ public class ScrollOfTeleportation extends Scroll {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void appear( Char ch, int pos ) {
|
||||
|
||||
ch.sprite.interruptMotion();
|
||||
|
||||
ch.move( pos );
|
||||
ch.sprite.place( pos );
|
||||
|
||||
if (ch.invisible == 0) {
|
||||
ch.sprite.alpha( 0 );
|
||||
ch.sprite.parent.add( new AlphaTweener( ch.sprite, 1, 0.4f ) );
|
||||
}
|
||||
|
||||
ch.sprite.emitter().start( Speck.factory(Speck.LIGHT), 0.2f, 3 );
|
||||
Sample.INSTANCE.play( Assets.SND_TELEPORT );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2014 Oleg Dolya
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.wands;
|
||||
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.noosa.tweeners.AlphaTweener;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
|
||||
//TODO: pull visual logic out of here to another place, then remove
|
||||
public abstract class WandOfBlink extends Wand {
|
||||
|
||||
public static void appear( Char ch, int pos ) {
|
||||
|
||||
ch.sprite.interruptMotion();
|
||||
|
||||
ch.move( pos );
|
||||
ch.sprite.place( pos );
|
||||
|
||||
if (ch.invisible == 0) {
|
||||
ch.sprite.alpha( 0 );
|
||||
ch.sprite.parent.add( new AlphaTweener( ch.sprite, 1, 0.4f ) );
|
||||
}
|
||||
|
||||
ch.sprite.emitter().start( Speck.factory( Speck.LIGHT ), 0.2f, 3 );
|
||||
Sample.INSTANCE.play( Assets.SND_TELEPORT );
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bestiary;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.watabou.utils.Random;
|
||||
@@ -82,7 +82,7 @@ public class SummoningTrap {
|
||||
Mob mob = Bestiary.mob( Dungeon.depth );
|
||||
mob.state = mob.WANDERING;
|
||||
GameScene.add( mob, DELAY );
|
||||
WandOfBlink.appear( mob, point );
|
||||
ScrollOfTeleportation.appear( mob, point );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.bags.ScrollHolder;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.SeedPouch;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.WandHolster;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.LootIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ResumeIndicator;
|
||||
@@ -52,7 +53,6 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Ripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlink;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
||||
@@ -283,11 +283,11 @@ public class GameScene extends PixelScene {
|
||||
|
||||
switch (InterlevelScene.mode) {
|
||||
case RESURRECT:
|
||||
WandOfBlink.appear( Dungeon.hero, Dungeon.level.entrance );
|
||||
ScrollOfTeleportation.appear( Dungeon.hero, Dungeon.level.entrance );
|
||||
new Flare( 8, 32 ).color( 0xFFFF66, true ).show( hero, 2f ) ;
|
||||
break;
|
||||
case RETURN:
|
||||
WandOfBlink.appear( Dungeon.hero, Dungeon.hero.pos );
|
||||
ScrollOfTeleportation.appear( Dungeon.hero, Dungeon.hero.pos );
|
||||
break;
|
||||
case FALL:
|
||||
Chasm.heroLand();
|
||||
|
||||
Reference in New Issue
Block a user