v3.2.0: thrown weps (inc. arrows) no longer use atk delay on empty space
This commit is contained in:
@@ -58,9 +58,19 @@ public class ForceCube extends MissileWeapon {
|
|||||||
//no hitsound as it never hits enemies directly
|
//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
|
@Override
|
||||||
protected void onThrow(int cell) {
|
protected void onThrow(int cell) {
|
||||||
if (Dungeon.level.pit[cell]){
|
if ((Dungeon.level.pit[cell] && Actor.findChar(cell) == null)){
|
||||||
super.onThrow(cell);
|
super.onThrow(cell);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -392,7 +392,12 @@ abstract public class MissileWeapon extends Weapon {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float castDelay(Char user, int dst) {
|
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 ){
|
protected void rangedHit( Char enemy, int cell ){
|
||||||
|
|||||||
Reference in New Issue
Block a user