v0.6.3: corrected some minor bugs with some missile weapons

This commit is contained in:
Evan Debenham 2018-01-20 15:34:38 -05:00
parent 8461500d66
commit 91f31aef9f
3 changed files with 7 additions and 12 deletions

View File

@ -95,8 +95,8 @@ public class Boomerang extends MissileWeapon {
}
@Override
public void rangedHit( Char enemy ) {
circleBack(enemy.pos, curUser);
public void rangedHit( Char enemy, int cell ) {
circleBack(cell, curUser);
}
@Override
@ -107,7 +107,7 @@ public class Boomerang extends MissileWeapon {
private void circleBack( int from, Hero owner ) {
((MissileSprite)curUser.sprite.parent.recycle( MissileSprite.class )).
reset( from, curUser.pos, curItem, null );
reset( from, owner.sprite, curItem, null );
if (throwEquiped) {
owner.belongings.weapon = this;

View File

@ -83,12 +83,7 @@ abstract public class MissileWeapon extends Weapon {
rangedMiss( cell );
} else {
//int bonus = RingOfSharpshooting.getBonus(curUser, RingOfSharpshooting.Aim.class);
//if (curUser.heroClass == HeroClass.HUNTRESS && enemy.buff(PinCushion.class) == null)
// bonus += 3;
rangedHit( enemy );
rangedHit( enemy, cell );
}
}
@ -129,7 +124,7 @@ abstract public class MissileWeapon extends Weapon {
return delay;
}
protected void rangedHit( Char enemy ){
protected void rangedHit( Char enemy, int cell ){
//if this weapon was thrown from a source stack, degrade that stack.
//unless a weapon is about to break, then break the one being thrown
if (parent != null){

View File

@ -38,11 +38,11 @@ public abstract class TippedDart extends Dart {
}
@Override
protected void rangedHit(Char enemy) {
protected void rangedHit(Char enemy, int cell) {
if (enemy.isAlive())
Buff.affect(enemy, PinCushion.class).stick(new Dart());
else
Dungeon.level.drop( new Dart(), enemy.pos).sprite.drop();
Dungeon.level.drop( new Dart(), cell ).sprite.drop();
}
@Override