v3.2.0: thrown weps (inc. arrows) no longer use atk delay on empty space

This commit is contained in:
Evan Debenham
2025-07-28 12:48:51 -04:00
parent 460d9880d3
commit 5c3fc8c9e9
2 changed files with 17 additions and 2 deletions

View File

@@ -58,9 +58,19 @@ public class ForceCube extends MissileWeapon {
//no hitsound as it never hits enemies directly
}
@Override
public float castDelay(Char user, int dst) {
//special rules as throwing this onto empty space or yourself does trigger it
if (!Dungeon.level.pit[dst] && Actor.findChar(dst) == null){
return delayFactor( user );
} else {
return super.castDelay(user, dst);
}
}
@Override
protected void onThrow(int cell) {
if (Dungeon.level.pit[cell]){
if ((Dungeon.level.pit[cell] && Actor.findChar(cell) == null)){
super.onThrow(cell);
return;
}

View File

@@ -392,7 +392,12 @@ abstract public class MissileWeapon extends Weapon {
@Override
public float castDelay(Char user, int dst) {
return delayFactor( user );
if (Actor.findChar(dst) != null && Actor.findChar(dst) != user){
//TODO force cube
return delayFactor( user );
} else {
return super.castDelay(user, dst);
}
}
protected void rangedHit( Char enemy, int cell ){