Added AIF_ZAK_SUSPICIOUS.
This commit is contained in:
parent
36228ac167
commit
c17f1af851
|
@ -29,5 +29,6 @@
|
|||
}
|
||||
],
|
||||
"missiles" : 2,
|
||||
"flags" : "EF_TAKES_DAMAGE+EF_IMMORTAL+EF_MISSION_TARGET"
|
||||
"flags" : "EF_TAKES_DAMAGE+EF_IMMORTAL+EF_MISSION_TARGET+EF_AI_LEADER",
|
||||
"aiFlags" : "+AIF_WANDERS+AIF_UNLIMITED_RANGE+AIF_ZAK_SUSPICIOUS"
|
||||
}
|
||||
|
|
|
@ -970,7 +970,7 @@ void checkSuspicionLevel(void)
|
|||
{
|
||||
battle.hasSuspicionLevel = 0;
|
||||
|
||||
if (battle.status == MS_IN_PROGRESS && self->side == player->side)
|
||||
if (battle.status == MS_IN_PROGRESS && player->side != SIDE_ALLIES)
|
||||
{
|
||||
battle.hasSuspicionLevel = 1;
|
||||
|
||||
|
@ -1005,3 +1005,24 @@ void checkSuspicionLevel(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* only used in final optional mission */
|
||||
void checkZackariaSuspicionLevel(void)
|
||||
{
|
||||
if (battle.zackariaSuspicionLevel < MAX_ZAK_SUSPICION_LEVEL)
|
||||
{
|
||||
if (getDistance(self->x, self->y, player->x, player->y) < SCREEN_HEIGHT)
|
||||
{
|
||||
if (++battle.zackariaSuspicionLevel >= MAX_ZAK_SUSPICION_LEVEL)
|
||||
{
|
||||
runScriptFunction("Zackaria");
|
||||
|
||||
battle.unwinnable = 1;
|
||||
|
||||
battle.hasSuspicionLevel = 0;
|
||||
|
||||
self->thrust = self->speed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ extern void addMessageBox(char *title, char *body, int type);
|
|||
extern void destroyScript(void);
|
||||
extern void activateTrespasserSpawner(void);
|
||||
extern void activateJumpgate(int activate);
|
||||
extern void runScriptFunction(char *format, ...);
|
||||
|
||||
extern Battle battle;
|
||||
extern Colors colors;
|
||||
|
|
|
@ -261,6 +261,11 @@ void doFighter(void)
|
|||
{
|
||||
checkSuspicionLevel();
|
||||
}
|
||||
|
||||
if (self->aiFlags & AIF_ZAK_SUSPICIOUS)
|
||||
{
|
||||
checkZackariaSuspicionLevel();
|
||||
}
|
||||
}
|
||||
|
||||
if (self->alive == ALIVE_ESCAPED)
|
||||
|
|
|
@ -52,6 +52,7 @@ extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
|||
extern void awardTrophy(char *id);
|
||||
extern void addRandomItem(int x, int y);
|
||||
extern void checkSuspicionLevel(void);
|
||||
extern void checkZackariaSuspicionLevel(void);
|
||||
|
||||
extern Battle battle;
|
||||
extern Colors colors;
|
||||
|
|
|
@ -131,6 +131,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define AIF_DROPS_MINES (2 << 17)
|
||||
#define AIF_ASSASSIN (2 << 18)
|
||||
#define AIF_SUSPICIOUS (2 << 19)
|
||||
#define AIF_ZAK_SUSPICIOUS (2 << 20)
|
||||
|
||||
/* player abilities */
|
||||
#define BOOST_RECHARGE_TIME (FPS * 7)
|
||||
|
@ -145,7 +146,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define SS_SOL 1
|
||||
#define SS_PANDORAN 2
|
||||
|
||||
#define MAX_SUSPICION_LEVEL 1500.0
|
||||
#define MAX_SUSPICION_LEVEL 1500.0
|
||||
#define MAX_ZAK_SUSPICION_LEVEL (FPS * 30)
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -354,6 +354,7 @@ typedef struct {
|
|||
int hasSuspicionLevel;
|
||||
int suspicionLevel;
|
||||
int suspicionCoolOff;
|
||||
int zackariaSuspicionLevel;
|
||||
Entity *missionTarget;
|
||||
Entity *jumpgate;
|
||||
Entity *messageSpeaker;
|
||||
|
|
|
@ -92,6 +92,7 @@ void initLookups(void)
|
|||
addLookup("AIF_DROPS_MINES", AIF_DROPS_MINES);
|
||||
addLookup("AIF_ASSASSIN", AIF_ASSASSIN);
|
||||
addLookup("AIF_SUSPICIOUS", AIF_SUSPICIOUS);
|
||||
addLookup("AIF_ZAK_SUSPICIOUS", AIF_ZAK_SUSPICIOUS);
|
||||
|
||||
addLookup("DT_ANY", DT_ANY);
|
||||
addLookup("DT_NO_SPIN", DT_NO_SPIN);
|
||||
|
|
Loading…
Reference in New Issue