v3.0.0: cleaned up inconsistency in use of spawnedForEffect
This commit is contained in:
@@ -301,16 +301,16 @@ abstract public class MissileWeapon extends Weapon {
|
|||||||
|
|
||||||
protected void rangedHit( Char enemy, int cell ){
|
protected void rangedHit( Char enemy, int cell ){
|
||||||
decrementDurability();
|
decrementDurability();
|
||||||
if (durability > 0){
|
if (durability > 0 && !spawnedForEffect){
|
||||||
//attempt to stick the missile weapon to the enemy, just drop it if we can't.
|
//attempt to stick the missile weapon to the enemy, just drop it if we can't.
|
||||||
if (sticky && !spawnedForEffect && enemy != null && enemy.isActive() && enemy.alignment != Char.Alignment.ALLY){
|
if (sticky && enemy != null && enemy.isActive() && enemy.alignment != Char.Alignment.ALLY){
|
||||||
PinCushion p = Buff.affect(enemy, PinCushion.class);
|
PinCushion p = Buff.affect(enemy, PinCushion.class);
|
||||||
if (p.target == enemy){
|
if (p.target == enemy){
|
||||||
p.stick(this);
|
p.stick(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!spawnedForEffect) Dungeon.level.drop( this, cell ).sprite.drop();
|
Dungeon.level.drop( this, cell ).sprite.drop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public abstract class TippedDart extends Dart {
|
|||||||
//attempt to stick the dart to the enemy, just drop it if we can't.
|
//attempt to stick the dart to the enemy, just drop it if we can't.
|
||||||
Dart d = new Dart();
|
Dart d = new Dart();
|
||||||
Catalog.countUse(getClass());
|
Catalog.countUse(getClass());
|
||||||
if (sticky && !spawnedForEffect && enemy != null && enemy.isAlive() && enemy.alignment != Char.Alignment.ALLY){
|
if (sticky && enemy != null && enemy.isAlive() && enemy.alignment != Char.Alignment.ALLY){
|
||||||
PinCushion p = Buff.affect(enemy, PinCushion.class);
|
PinCushion p = Buff.affect(enemy, PinCushion.class);
|
||||||
if (p.target == enemy){
|
if (p.target == enemy){
|
||||||
p.stick(d);
|
p.stick(d);
|
||||||
|
|||||||
Reference in New Issue
Block a user