Start of custom mission plus settings.
This commit is contained in:
parent
60d8020c4e
commit
181fc83632
13
src/defs.h
13
src/defs.h
|
@ -434,10 +434,9 @@ enum
|
|||
ST_MAX
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PLUS_NONE,
|
||||
PLUS,
|
||||
PLUS_PLUS,
|
||||
PLUS_PLUS_PLUS
|
||||
};
|
||||
#define PLUS_NONE 0
|
||||
#define PLUS_BASIC (2 << 0)
|
||||
#define PLUS_STRONGER (2 << 1)
|
||||
#define PLUS_RANDOM (2 << 2)
|
||||
#define PLUS_KILL_ALL (2 << 3)
|
||||
#define PLUS_MIRROR (2 << 4)
|
||||
|
|
|
@ -81,7 +81,7 @@ static void init(void)
|
|||
u->health = u->healthMax = rrnd(1, 4);
|
||||
}
|
||||
|
||||
if (game.plus == PLUS_PLUS_PLUS)
|
||||
if (game.plus & PLUS_STRONGER)
|
||||
{
|
||||
u->canCarryItem = 1;
|
||||
u->health = u->healthMax = rrnd(4, 8);
|
||||
|
|
|
@ -370,7 +370,7 @@ typedef struct {
|
|||
char worldId[MAX_NAME_LENGTH];
|
||||
int isComplete;
|
||||
int saveSlot;
|
||||
int plus;
|
||||
unsigned int plus;
|
||||
Tuple keys[MAX_KEY_TYPES];
|
||||
Tuple missionStatusHead, *missionStatusTail;
|
||||
Trophy trophyHead, *trophyTail;
|
||||
|
|
|
@ -30,8 +30,8 @@ static HashTable table;
|
|||
|
||||
void setLanguage(char *applicationName, char *languageCode)
|
||||
{
|
||||
char language[MAX_LINE_LENGTH], c[MAX_LINE_LENGTH];
|
||||
char **key, **value;
|
||||
char language[MAX_LINE_LENGTH];
|
||||
char **key, **value, *c;
|
||||
#ifndef _WIN32
|
||||
char *lang;
|
||||
#endif
|
||||
|
|
|
@ -52,13 +52,13 @@ void initObjectives(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (world.isReturnVisit || game.plus != PLUS_NONE)
|
||||
if (world.isReturnVisit || game.plus & PLUS_KILL_ALL)
|
||||
{
|
||||
o->targetValue = o->totalValue;
|
||||
o->required = game.plus != PLUS_NONE;
|
||||
o->required = game.plus & PLUS_KILL_ALL;
|
||||
}
|
||||
|
||||
if ((strcmp(o->targetName, "ENEMY") == 0 && o->targetValue == o->totalValue) || game.plus != PLUS_PLUS_PLUS)
|
||||
if ((strcmp(o->targetName, "ENEMY") == 0 && o->targetValue == o->totalValue) || game.plus & PLUS_KILL_ALL)
|
||||
{
|
||||
world.isEliminateAllEnemies = 1;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ void loadWorld(char *id)
|
|||
world.missionType = strncmp(world.id, "outpost", 7) == 0 ? MT_OUTPOST : world.missionType;
|
||||
world.missionType = strncmp(world.id, "boss", 4) == 0 ? MT_BOSS : world.missionType;
|
||||
|
||||
if (game.plus < PLUS_PLUS)
|
||||
if (!(game.plus & PLUS_RANDOM))
|
||||
{
|
||||
loadEnemyTypes(cJSON_GetObjectItem(root, "enemyTypes")->valuestring);
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ static void loadObjectives(cJSON *root)
|
|||
world.numObjectives++;
|
||||
}
|
||||
|
||||
if (game.plus == PLUS_PLUS_PLUS && !hasEliminateAll)
|
||||
if ((game.plus & PLUS_KILL_ALL) && !hasEliminateAll)
|
||||
{
|
||||
o = malloc(sizeof(Objective));
|
||||
memset(o, 0, sizeof(Objective));
|
||||
|
|
Loading…
Reference in New Issue