v3.0.0: cleaned up inconsistency in use of spawnedForEffect

This commit is contained in:
Evan Debenham
2025-02-10 14:05:32 -05:00
parent 19ee7d2fe2
commit 28c157928f
2 changed files with 4 additions and 4 deletions

View File

@@ -301,16 +301,16 @@ abstract public class MissileWeapon extends Weapon {
protected void rangedHit( Char enemy, int cell ){
decrementDurability();
if (durability > 0){
if (durability > 0 && !spawnedForEffect){
//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);
if (p.target == enemy){
p.stick(this);
return;
}
}
if (!spawnedForEffect) Dungeon.level.drop( this, cell ).sprite.drop();
Dungeon.level.drop( this, cell ).sprite.drop();
}
}

View File

@@ -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.
Dart d = new Dart();
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);
if (p.target == enemy){
p.stick(d);