Add distance to target limit for mean husks' spam

Husks now only spam fireballs in a rage when within 30 units of
their target. They’ll still keep track of the number of shots and
enter this enraged state regardless of distance, but close
proximity is required for rapid-fire.
This commit is contained in:
Anton Tarasenko 2024-10-29 04:15:16 +07:00
parent 324e644db4
commit 618229b8d3

View File

@ -37,7 +37,7 @@ function RangedAttack(Actor A) {
//Increment the number of consecutive shtos taken and apply the cool down if needed
totalShots ++;
consecutiveShots ++;
if(consecutiveShots < 3 && totalShots > maxNormalShots)
if(consecutiveShots < 3 && totalShots > maxNormalShots && VSize(a.location - location) <= 900)
NextFireProjectileTime = Level.TimeSeconds;
else{
NextFireProjectileTime = Level.TimeSeconds + ProjectileFireInterval + (FRand() * 2.0);