From b79098d46ada729ae8e188d9a4786dec82c762c3 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 22 Nov 2018 01:39:43 -0500 Subject: [PATCH] v0.7.1: adjusted sprites for scorpio shots --- .../shatteredpixeldungeon/sprites/MissileSprite.java | 6 ++++-- .../shatteredpixeldungeon/sprites/ScorpioSprite.java | 10 ++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MissileSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MissileSprite.java index b1752a2f4..17fdba54d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MissileSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MissileSprite.java @@ -81,7 +81,6 @@ public class MissileSprite extends ItemSprite implements Tweener.Listener { private static final HashMap, Integer> ANGULAR_SPEEDS = new HashMap<>(); static { - ANGULAR_SPEEDS.put(SpiritBow.SpiritArrow.class, 0); ANGULAR_SPEEDS.put(Dart.class, 0); ANGULAR_SPEEDS.put(ThrowingKnife.class, 0); ANGULAR_SPEEDS.put(FishingSpear.class, 0); @@ -89,6 +88,9 @@ public class MissileSprite extends ItemSprite implements Tweener.Listener { ANGULAR_SPEEDS.put(Javelin.class, 0); ANGULAR_SPEEDS.put(Trident.class, 0); + ANGULAR_SPEEDS.put(SpiritBow.SpiritArrow.class, 0); + ANGULAR_SPEEDS.put(ScorpioSprite.ScorpioShot.class, 0); + //720 is default ANGULAR_SPEEDS.put(Boomerang.class, 1440); @@ -134,7 +136,7 @@ public class MissileSprite extends ItemSprite implements Tweener.Listener { if (item instanceof Dart && Dungeon.hero.belongings.weapon instanceof Crossbow){ speed *= 3f; } - if (item instanceof SpiritBow.SpiritArrow){ + if (item instanceof SpiritBow.SpiritArrow || item instanceof ScorpioSprite.ScorpioShot){ speed *= 1.5f; } PosTweener tweener = new PosTweener( this, to, d.length() / speed ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ScorpioSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ScorpioSprite.java index 24d832cdc..bfa62b0ae 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ScorpioSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ScorpioSprite.java @@ -23,7 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.sprites; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.Dart; +import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.watabou.noosa.TextureFilm; import com.watabou.utils.Callback; @@ -81,7 +81,7 @@ public class ScorpioSprite extends MobSprite { idle(); ((MissileSprite)parent.recycle( MissileSprite.class )). - reset( ch.pos, cellToAttack, new Dart(), new Callback() { + reset( ch.pos, cellToAttack, new ScorpioShot(), new Callback() { @Override public void call() { ch.onAttackComplete(); @@ -91,4 +91,10 @@ public class ScorpioSprite extends MobSprite { super.onComplete( anim ); } } + + public class ScorpioShot extends Item { + { + image = ItemSpriteSheet.FISHING_SPEAR; + } + } }