Added Firefly, tweaked fighter speeds. Adjusted mission requirements.
This commit is contained in:
parent
81a3f26336
commit
483768fe79
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"name" : "Firefly",
|
||||||
|
"health" : 35,
|
||||||
|
"shield" : 35,
|
||||||
|
"speed" : 1.9,
|
||||||
|
"reloadTime" : 12,
|
||||||
|
"shieldRechargeRate" : 30,
|
||||||
|
"textureName" : "gfx/fighters/firefly.png",
|
||||||
|
"guns" : [
|
||||||
|
{
|
||||||
|
"type" : "BT_PARTICLE",
|
||||||
|
"x" : -12,
|
||||||
|
"y" : -2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type" : "BT_PARTICLE",
|
||||||
|
"x" : 12,
|
||||||
|
"y" : -2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type" : "BT_PARTICLE",
|
||||||
|
"x" : 0,
|
||||||
|
"y" : -4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"missiles" : {
|
||||||
|
"type" : "MISSILE_MISSILE",
|
||||||
|
"ammo" : 3
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,5 +8,6 @@
|
||||||
"data/fighters/taf.json",
|
"data/fighters/taf.json",
|
||||||
"data/fighters/unarmedDart.json",
|
"data/fighters/unarmedDart.json",
|
||||||
"data/fighters/ray.json",
|
"data/fighters/ray.json",
|
||||||
"data/fighters/nymph.json"
|
"data/fighters/nymph.json",
|
||||||
|
"data/fighters/firefly.json"
|
||||||
]
|
]
|
||||||
|
|
|
@ -114,7 +114,9 @@
|
||||||
"side" : "SIDE_UNF",
|
"side" : "SIDE_UNF",
|
||||||
"x": 465,
|
"x": 465,
|
||||||
"y": 235,
|
"y": 235,
|
||||||
"missions" : []
|
"missions" : [
|
||||||
|
"data/missions/alba/01 - patrol #1.json"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Aster",
|
"name": "Aster",
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
"name" : "Patrol #1",
|
||||||
|
"description" : "With the Pandorans having invaded Independent systems boardering the Mitikas Empire, we need to become more vigilant. Patrols around Torelli are being stepped up. Ensure you hit all the waypoints, and report any unusual activity that you encounter.",
|
||||||
|
"background" : "gfx/backgrounds/background03.jpg",
|
||||||
|
"planet" : "gfx/planets/torelli.png",
|
||||||
|
"music" : "music/heroism.ogg",
|
||||||
|
"requires" : "data/missions/temper/03 - pirate uprising #3.json",
|
||||||
|
"objectives" : [
|
||||||
|
{
|
||||||
|
"description" : "Check all Wayponts",
|
||||||
|
"targetName" : "Waypoint",
|
||||||
|
"targetValue" : 5,
|
||||||
|
"targetType" : "TT_WAYPOINT"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"player" : {
|
||||||
|
"type" : "Firefly",
|
||||||
|
"side" : "SIDE_ALLIES",
|
||||||
|
"pilot" : "Curtis Rice",
|
||||||
|
"squadron" : "Eightballers"
|
||||||
|
},
|
||||||
|
"fighterGroups" : [
|
||||||
|
{
|
||||||
|
"name" : "Ally",
|
||||||
|
"types" : "Firefly;Nymph",
|
||||||
|
"number" : 3,
|
||||||
|
"side" : "SIDE_ALLIES",
|
||||||
|
"x" : 640,
|
||||||
|
"y" : 1000,
|
||||||
|
"scatter" : 64
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"entityGroups" : [
|
||||||
|
{
|
||||||
|
"type" : "ET_WAYPOINT",
|
||||||
|
"number" : 5,
|
||||||
|
"x" : 640,
|
||||||
|
"y" : 480,
|
||||||
|
"scatter" : 7500
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"background" : "gfx/backgrounds/background03.jpg",
|
"background" : "gfx/backgrounds/background03.jpg",
|
||||||
"planet" : "gfx/planets/mythos.png",
|
"planet" : "gfx/planets/mythos.png",
|
||||||
"music" : "music/heroism.ogg",
|
"music" : "music/heroism.ogg",
|
||||||
"requires" : "temper/03 - pirate uprising #3.json",
|
"requires" : "data/missions/temper/03 - pirate uprising #3.json",
|
||||||
"objectives" : [
|
"objectives" : [
|
||||||
{
|
{
|
||||||
"description" : "Destroy all enemy targets",
|
"description" : "Destroy all enemy targets",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"background" : "gfx/backgrounds/background03.jpg",
|
"background" : "gfx/backgrounds/background03.jpg",
|
||||||
"planet" : "gfx/planets/spirit.png",
|
"planet" : "gfx/planets/spirit.png",
|
||||||
"music" : "music/battleThemeA.mp3",
|
"music" : "music/battleThemeA.mp3",
|
||||||
|
"requires" : "PREVIOUS",
|
||||||
"objectives" : [
|
"objectives" : [
|
||||||
{
|
{
|
||||||
"description" : "Eliminate Darts",
|
"description" : "Eliminate Darts",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"background" : "gfx/backgrounds/background03.jpg",
|
"background" : "gfx/backgrounds/background03.jpg",
|
||||||
"planet" : "gfx/planets/spirit.png",
|
"planet" : "gfx/planets/spirit.png",
|
||||||
"music" : "music/battleThemeA.mp3",
|
"music" : "music/battleThemeA.mp3",
|
||||||
|
"requires" : "PREVIOUS",
|
||||||
"objectives" : [
|
"objectives" : [
|
||||||
{
|
{
|
||||||
"description" : "Capture Pirate Leader",
|
"description" : "Capture Pirate Leader",
|
||||||
|
|
|
@ -492,10 +492,6 @@ static void drawStarSystemDetail(void)
|
||||||
{
|
{
|
||||||
drawText(210, y, 24, TA_LEFT, mission->completed ? colors.white : colors.yellow, mission->name);
|
drawText(210, y, 24, TA_LEFT, mission->completed ? colors.white : colors.yellow, mission->name);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
drawText(210, y, 24, TA_LEFT, colors.darkGrey, "[LOCKED]");
|
|
||||||
}
|
|
||||||
|
|
||||||
y += 50;
|
y += 50;
|
||||||
}
|
}
|
||||||
|
|
|
@ -398,6 +398,30 @@ Mission *getMission(char *filename)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int isMissionAvailable(Mission *mission, Mission *prev)
|
||||||
|
{
|
||||||
|
Mission *reqMission;
|
||||||
|
|
||||||
|
if (mission->requires)
|
||||||
|
{
|
||||||
|
if (strcmp(mission->requires, "PREVIOUS") == 0)
|
||||||
|
{
|
||||||
|
return prev->completed;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reqMission = getMission(mission->requires);
|
||||||
|
|
||||||
|
if (reqMission != NULL)
|
||||||
|
{
|
||||||
|
return reqMission->completed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static unsigned long hashcode(const char *str)
|
static unsigned long hashcode(const char *str)
|
||||||
{
|
{
|
||||||
unsigned long hash = 5381;
|
unsigned long hash = 5381;
|
||||||
|
|
|
@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
static void loadStarSystem(cJSON *starSystemJSON);
|
static void loadStarSystem(cJSON *starSystemJSON);
|
||||||
static void loadMissionMeta(char *filename, StarSystem *starSystem);
|
static void loadMissionMeta(char *filename, StarSystem *starSystem);
|
||||||
static int isAvailable(Mission *mission, Mission *prev);
|
|
||||||
|
|
||||||
void initStarSystems(void)
|
void initStarSystems(void)
|
||||||
{
|
{
|
||||||
|
@ -192,6 +191,10 @@ void updateStarSystemMissions(void)
|
||||||
prev = &starSystem->missionHead;
|
prev = &starSystem->missionHead;
|
||||||
|
|
||||||
for (mission = starSystem->missionHead.next ; mission != NULL ; mission = mission->next)
|
for (mission = starSystem->missionHead.next ; mission != NULL ; mission = mission->next)
|
||||||
|
{
|
||||||
|
mission->available = isMissionAvailable(mission, prev);
|
||||||
|
|
||||||
|
if (mission->available)
|
||||||
{
|
{
|
||||||
starSystem->totalMissions++;
|
starSystem->totalMissions++;
|
||||||
|
|
||||||
|
@ -199,31 +202,13 @@ void updateStarSystemMissions(void)
|
||||||
{
|
{
|
||||||
starSystem->completedMissions++;
|
starSystem->completedMissions++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
mission->available = isAvailable(mission, prev);
|
|
||||||
|
|
||||||
prev = mission;
|
prev = mission;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int isAvailable(Mission *mission, Mission *prev)
|
|
||||||
{
|
|
||||||
Mission *reqMission;
|
|
||||||
|
|
||||||
if (mission->requires)
|
|
||||||
{
|
|
||||||
reqMission = getMission(mission->requires);
|
|
||||||
|
|
||||||
if (reqMission != NULL)
|
|
||||||
{
|
|
||||||
return reqMission->completed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return prev->completed;
|
|
||||||
}
|
|
||||||
|
|
||||||
void destroyStarSystems(void)
|
void destroyStarSystems(void)
|
||||||
{
|
{
|
||||||
StarSystem *starSystem;
|
StarSystem *starSystem;
|
||||||
|
|
|
@ -26,6 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
extern char *readFile(char *filename);
|
extern char *readFile(char *filename);
|
||||||
extern long lookup(char *name);
|
extern long lookup(char *name);
|
||||||
extern Mission *getMission(char *filename);
|
extern int isMissionAvailable(Mission *mission, Mission *prev);
|
||||||
|
|
||||||
extern Game game;
|
extern Game game;
|
||||||
|
|
Loading…
Reference in New Issue