Removed challenges from main campaign.

This commit is contained in:
Steve 2015-11-29 08:44:34 +00:00
parent 542209c24c
commit 46337a1f16
7 changed files with 4 additions and 111 deletions

View File

@ -12,20 +12,6 @@
"targetType" : "TT_DESTROY"
}
],
"challenges" : [
{
"type" : "CHALLENGE_ARMOUR",
"targetValue" : 100
},
{
"type" : "CHALLENGE_TIME",
"targetValue" : 30
},
{
"type" : "CHALLENGE_ACCURACY",
"targetValue" : 25
}
],
"player" : {
"type" : "TAF",
"side" : "SIDE_ALLIES",

View File

@ -12,20 +12,6 @@
"targetType" : "TT_DESTROY"
}
],
"challenges" : [
{
"type" : "CHALLENGE_NO_LOSSES",
"targetValue" : 0
},
{
"type" : "CHALLENGE_ARMOUR",
"targetValue" : 100
},
{
"type" : "CHALLENGE_PLAYER_KILLS",
"targetValue" : 15
}
],
"player" : {
"type" : "TAF",
"side" : "SIDE_ALLIES",

View File

@ -13,20 +13,6 @@
"targetType" : "TT_DESTROY"
}
],
"challenges" : [
{
"type" : "CHALLENGE_1_LOSS",
"targetValue" : 0
},
{
"type" : "CHALLENGE_ARMOUR",
"targetValue" : 80
},
{
"type" : "CHALLENGE_PLAYER_KILLS",
"targetValue" : 10
}
],
"player" : {
"type" : "TAF",
"side" : "SIDE_ALLIES",

View File

@ -33,16 +33,6 @@
"isCondition" : 1
}
],
"challenges" : [
{
"type" : "CHALLENGE_TIME_MINS",
"targetValue" : 3
},
{
"type" : "CHALLENGE_DISABLE",
"targetValue" : 3
}
],
"player" : {
"type" : "Ray",
"side" : "SIDE_ALLIES",

View File

@ -58,7 +58,6 @@ static float ssx, ssy;
static float arrowPulse;
static int show;
static int completedMissions, totalMissions;
static int completedChallenges, totalChallenges;
void initGalacticMap(void)
{
@ -151,7 +150,7 @@ static void doStarSystems(void)
StarSystem *starSystem;
int cx, cy;
completedMissions = totalMissions = completedChallenges = totalChallenges = 0;
completedMissions = totalMissions = 0;
cx = app.mouse.x - 32;
cy = app.mouse.y - 32;
@ -162,8 +161,6 @@ static void doStarSystems(void)
{
completedMissions += starSystem->completedMissions;
totalMissions += starSystem->totalMissions;
completedChallenges += starSystem->completedChallenges;
totalChallenges += starSystem->totalChallenges;
if (starSystem->totalMissions > 0 && collision(cx, cy, 64, 64, starSystem->x - camera.x, starSystem->y - camera.y, 4, 4))
{
@ -260,22 +257,6 @@ static void addPulses(void)
pulseTail->next = pulse;
pulseTail = pulse;
}
else if (starSystem->completedChallenges < starSystem->totalChallenges)
{
if (pulseTimer % (FPS * 2) == 0)
{
pulse = malloc(sizeof(Pulse));
memset(pulse, 0, sizeof(Pulse));
pulse->x = starSystem->x;
pulse->y = starSystem->y;
pulse->life = 255;
pulse->r = pulse->g = 255;
pulseTail->next = pulse;
pulseTail = pulse;
}
}
else if (starSystem->totalMissions > 0)
{
if (pulseTimer % (FPS * 3) == 0)
@ -478,8 +459,7 @@ static void drawInfoBars(void)
SDL_RenderFillRect(app.renderer, &r);
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
drawText((SCREEN_WIDTH / 2) - 50, 5, 18, TA_RIGHT, colors.white, "Missions: %d / %d", completedMissions, totalMissions);
drawText((SCREEN_WIDTH / 2) + 50, 5, 18, TA_LEFT, colors.white, "Challenges: %d / %d", completedChallenges, totalChallenges);
drawText((SCREEN_WIDTH / 2), 5, 18, TA_CENTER, colors.white, "Missions: %d / %d", completedMissions, totalMissions);
}
static void selectStarSystem(void)
@ -497,7 +477,6 @@ static void drawStarSystemDetail(void)
{
int y;
Mission *mission;
Challenge *challenge;
SDL_Rect r;
r.w = 900;
@ -564,27 +543,6 @@ static void drawStarSystemDetail(void)
drawText(525, SCREEN_HEIGHT - 95, 18, TA_LEFT, colors.yellow, "Note: this is an Epic Mission.");
}
if (selectedMission && selectedMission->available && selectedMission->challengeHead.next)
{
y = SCREEN_HEIGHT - 100;
for (challenge = selectedMission->challengeHead.next ; challenge != NULL ; challenge = challenge->next)
{
y -= 25;
}
drawText(525, y, 22, TA_LEFT, colors.yellow, "Challenges");
y += 30;
for (challenge = selectedMission->challengeHead.next ; challenge != NULL ; challenge = challenge->next)
{
drawText(525, y, 18, TA_LEFT, challenge->passed ? colors.green : colors.lightGrey, "%s%s", getChallengeDescription(challenge), challenge->passed ? " - COMPLETE" : "");
y += 25;
}
}
drawWidgets("starSystem");
}

View File

@ -154,11 +154,10 @@ void updateStarSystemDescriptions(void)
{
StarSystem *starSystem;
Mission *mission;
Challenge *challenge;
for (starSystem = game.starSystemHead.next ; starSystem != NULL ; starSystem = starSystem->next)
{
starSystem->completedMissions = starSystem->totalMissions = starSystem->completedChallenges = starSystem->totalChallenges = 0;
starSystem->completedMissions = starSystem->totalMissions;
for (mission = starSystem->missionHead.next ; mission != NULL ; mission = mission->next)
{
@ -168,19 +167,9 @@ void updateStarSystemDescriptions(void)
{
starSystem->completedMissions++;
}
for (challenge = mission->challengeHead.next ; challenge != NULL ; challenge = challenge->next)
{
starSystem->totalChallenges++;
if (challenge->passed)
{
starSystem->completedChallenges++;
}
}
}
sprintf(starSystem->description, "[ %s ] [ Missions %d / %d ] [ Challenges %d / %d ]", starSystem->name, starSystem->completedMissions, starSystem->totalMissions, starSystem->completedChallenges, starSystem->totalChallenges);
sprintf(starSystem->description, "[ %s ] [ Missions %d / %d ]", starSystem->name, starSystem->completedMissions, starSystem->totalMissions);
}
}

View File

@ -214,8 +214,6 @@ struct StarSystem {
int y;
int completedMissions;
int totalMissions;
int completedChallenges;
int totalChallenges;
Mission missionHead, *missionTail;
StarSystem *next;
};