From bf1e8f64f60a0d540ede1cfffd5f6f5333e0d65a Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 23 Feb 2018 19:25:07 +0000 Subject: [PATCH] Make enemies less aggressive, except in Outposts. --- src/entities/evilBlobs/evilBlob.c | 10 ++++++++-- src/entities/eyeDroids/eyeDroid.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/entities/evilBlobs/evilBlob.c b/src/entities/evilBlobs/evilBlob.c index 8a44aaf..8435cc9 100644 --- a/src/entities/evilBlobs/evilBlob.c +++ b/src/entities/evilBlobs/evilBlob.c @@ -237,18 +237,24 @@ static void lookForPlayer(void) } r = randF(); + + if (world.missionType == MT_OUTPOST) + { + r = randF() * 0.65; + } + if (u->isMissionTarget) { r = randF() * 0.3; } - if (r < 0.125) + if (r < 0.065) { moveTowardsPlayer(); u->shotsToFire = rrnd(1, u->maxShotsToFire); u->action = u->preFire; } - else if (r < 0.25) + else if (r < 0.12) { u->dx = 0; u->shotsToFire = rrnd(1, u->maxShotsToFire); diff --git a/src/entities/eyeDroids/eyeDroid.c b/src/entities/eyeDroids/eyeDroid.c index db80115..e9af9b0 100644 --- a/src/entities/eyeDroids/eyeDroid.c +++ b/src/entities/eyeDroids/eyeDroid.c @@ -222,18 +222,24 @@ static void lookForPlayer(void) } r = randF(); + + if (world.missionType == MT_OUTPOST) + { + r = randF() * 0.65; + } + if (u->isMissionTarget) { r = randF() * 0.3; } - if (r < 0.125) + if (r < 0.065) { chase(); u->shotsToFire = rrnd(1, u->maxShotsToFire); u->action = u->preFire; } - else if (r < 0.25) + else if (r < 0.12) { u->dx = 0; u->shotsToFire = rrnd(1, u->maxShotsToFire);