From 55462db981cc8bfa902bf9f71376e635f022e64d Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 5 May 2016 11:11:54 +0100 Subject: [PATCH] Added EF_NO_THREAT to help with Eliminate All. --- src/battle/entities.c | 2 +- src/defs.h | 1 + src/system/lookup.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/battle/entities.c b/src/battle/entities.c index 4fbc235..8333e4b 100644 --- a/src/battle/entities.c +++ b/src/battle/entities.c @@ -604,7 +604,7 @@ void countNumEnemies(void) for (e = battle.entityHead.next ; e != NULL ; e = e->next) { - if (e->side != SIDE_ALLIES && e->type == ET_FIGHTER) + if (e->side != SIDE_ALLIES && e->type == ET_FIGHTER && (!(e->flags & EF_NO_THREAT))) { battle.numInitialEnemies++; } diff --git a/src/defs.h b/src/defs.h index 284c722..9025723 100644 --- a/src/defs.h +++ b/src/defs.h @@ -106,6 +106,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define EF_NON_SOLID (2 << 20) #define EF_NO_HEALTH_BAR (2 << 21) #define EF_FRIENDLY_HEALTH_BAR (2 << 22) +#define EF_NO_THREAT (2 << 23) #define AIF_NONE 0 #define AIF_FOLLOWS_PLAYER (2 << 0) diff --git a/src/system/lookup.c b/src/system/lookup.c index b2d06f0..e671cee 100644 --- a/src/system/lookup.c +++ b/src/system/lookup.c @@ -67,6 +67,7 @@ void initLookups(void) addLookup("EF_NO_MT_BOX", EF_NO_MT_BOX); addLookup("EF_FRIENDLY_HEALTH_BAR", EF_FRIENDLY_HEALTH_BAR); addLookup("EF_AI_IGNORE", EF_AI_IGNORE); + addLookup("EF_NO_THREAT", EF_NO_THREAT); addLookup("AIF_NONE", AIF_NONE); addLookup("AIF_MOVES_TO_PLAYER", AIF_MOVES_TO_PLAYER);