v0.7.1: adjusted sprites for scorpio shots

This commit is contained in:
Evan Debenham 2018-11-22 01:39:43 -05:00
parent bd3b87c9af
commit b79098d46a
2 changed files with 12 additions and 4 deletions

View File

@ -81,7 +81,6 @@ public class MissileSprite extends ItemSprite implements Tweener.Listener {
private static final HashMap<Class<?extends Item>, 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 );

View File

@ -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;
}
}
}