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
@@ -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--;
|
||||
|
||||
+20
-2
@@ -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 );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user