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
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user