diff --git a/src/battle/entities.c b/src/battle/entities.c index ae66015..3be8eff 100644 --- a/src/battle/entities.c +++ b/src/battle/entities.c @@ -432,7 +432,7 @@ static void drawHealthBar(Entity *e) r.w = 32; r.h = 1; - if (e->side == SIDE_ALLIES) + if (e->side == SIDE_ALLIES || e->flags & EF_FRIENDLY_HEALTH_BAR) { SDL_SetRenderDrawColor(app.renderer, 0, 128, 0, 255); } @@ -445,7 +445,7 @@ static void drawHealthBar(Entity *e) r.w = 32 * (e->health * 1.0f / e->maxHealth); - if (e->side == SIDE_ALLIES) + if (e->side == SIDE_ALLIES || e->flags & EF_FRIENDLY_HEALTH_BAR) { SDL_SetRenderDrawColor(app.renderer, 0, 255, 0, 255); } diff --git a/src/defs.h b/src/defs.h index 38b1e39..40e02e7 100644 --- a/src/defs.h +++ b/src/defs.h @@ -105,6 +105,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define EF_AI_IGNORE (2 << 19) #define EF_NON_SOLID (2 << 20) #define EF_NO_HEALTH_BAR (2 << 21) +#define EF_FRIENDLY_HEALTH_BAR (2 << 22) #define AIF_NONE 0 #define AIF_FOLLOWS_PLAYER (2 << 0) diff --git a/src/system/lookup.c b/src/system/lookup.c index acb27cf..366eecc 100644 --- a/src/system/lookup.c +++ b/src/system/lookup.c @@ -65,6 +65,7 @@ void initLookups(void) addLookup("EF_AI_LEADER", EF_AI_LEADER); addLookup("EF_NO_KILL_INC", EF_NO_KILL_INC); addLookup("EF_NO_MT_BOX", EF_NO_MT_BOX); + addLookup("EF_FRIENDLY_HEALTH_BAR", EF_FRIENDLY_HEALTH_BAR); addLookup("AIF_NONE", AIF_NONE); addLookup("AIF_MOVES_TO_PLAYER", AIF_MOVES_TO_PLAYER);