mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Add UC_MAPMYSTICMELODY
If you activate an Ancient Shrine on that level, the condition triggers and the Challenge is achieved.
This commit is contained in:
parent
d386800c1e
commit
ce3b6e304b
4 changed files with 13 additions and 1 deletions
|
|
@ -2517,7 +2517,8 @@ static void readcondition(UINT16 set, UINT32 id, char *word2)
|
||||||
else if ((offset=0) || fastcmp(params[0], "MAPVISITED")
|
else if ((offset=0) || fastcmp(params[0], "MAPVISITED")
|
||||||
|| (++offset && fastcmp(params[0], "MAPBEATEN"))
|
|| (++offset && fastcmp(params[0], "MAPBEATEN"))
|
||||||
|| (++offset && fastcmp(params[0], "MAPENCORE"))
|
|| (++offset && fastcmp(params[0], "MAPENCORE"))
|
||||||
|| (++offset && fastcmp(params[0], "MAPSPBATTACK")))
|
|| (++offset && fastcmp(params[0], "MAPSPBATTACK"))
|
||||||
|
|| (++offset && fastcmp(params[0], "MAPMYSTICMELODY")))
|
||||||
{
|
{
|
||||||
PARAMCHECK(1);
|
PARAMCHECK(1);
|
||||||
ty = UC_MAPVISITED + offset;
|
ty = UC_MAPVISITED + offset;
|
||||||
|
|
|
||||||
|
|
@ -1010,6 +1010,7 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
|
||||||
case UC_MAPBEATEN: // Requires map x to be beaten
|
case UC_MAPBEATEN: // Requires map x to be beaten
|
||||||
case UC_MAPENCORE: // Requires map x to be beaten in encore
|
case UC_MAPENCORE: // Requires map x to be beaten in encore
|
||||||
case UC_MAPSPBATTACK: // Requires map x to be beaten in SPB Attack
|
case UC_MAPSPBATTACK: // Requires map x to be beaten in SPB Attack
|
||||||
|
case UC_MAPMYSTICMELODY: // Mystic Melody on map x's Ancient Shrine
|
||||||
{
|
{
|
||||||
UINT8 mvtype = MV_VISITED;
|
UINT8 mvtype = MV_VISITED;
|
||||||
if (cn->type == UC_MAPBEATEN)
|
if (cn->type == UC_MAPBEATEN)
|
||||||
|
|
@ -1018,6 +1019,8 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
|
||||||
mvtype = MV_ENCORE;
|
mvtype = MV_ENCORE;
|
||||||
else if (cn->type == UC_MAPSPBATTACK)
|
else if (cn->type == UC_MAPSPBATTACK)
|
||||||
mvtype = MV_SPBATTACK;
|
mvtype = MV_SPBATTACK;
|
||||||
|
else if (cn->type == UC_MAPMYSTICMELODY)
|
||||||
|
mvtype = MV_MYSTICMELODY;
|
||||||
|
|
||||||
return ((cn->requirement < nummapheaders)
|
return ((cn->requirement < nummapheaders)
|
||||||
&& (mapheaderinfo[cn->requirement])
|
&& (mapheaderinfo[cn->requirement])
|
||||||
|
|
@ -1459,6 +1462,7 @@ static const char *M_GetConditionString(condition_t *cn)
|
||||||
case UC_MAPBEATEN: // Requires map x to be beaten
|
case UC_MAPBEATEN: // Requires map x to be beaten
|
||||||
case UC_MAPENCORE: // Requires map x to be beaten in encore
|
case UC_MAPENCORE: // Requires map x to be beaten in encore
|
||||||
case UC_MAPSPBATTACK: // Requires map x to be beaten in SPB Attack
|
case UC_MAPSPBATTACK: // Requires map x to be beaten in SPB Attack
|
||||||
|
case UC_MAPMYSTICMELODY: // Mystic Melody on map x's Ancient Shrine
|
||||||
{
|
{
|
||||||
const char *prefix = "";
|
const char *prefix = "";
|
||||||
|
|
||||||
|
|
@ -1477,6 +1481,8 @@ static const char *M_GetConditionString(condition_t *cn)
|
||||||
work = "visit";
|
work = "visit";
|
||||||
else if (cn->type == UC_MAPSPBATTACK)
|
else if (cn->type == UC_MAPSPBATTACK)
|
||||||
work = "conquer";
|
work = "conquer";
|
||||||
|
else if (cn->type == UC_MAPMYSTICMELODY)
|
||||||
|
work = "activate the ancient shrine in";
|
||||||
|
|
||||||
work = va("%s%s %s",
|
work = va("%s%s %s",
|
||||||
prefix,
|
prefix,
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ typedef enum
|
||||||
UC_MAPBEATEN, // MAPBEATEN [map]
|
UC_MAPBEATEN, // MAPBEATEN [map]
|
||||||
UC_MAPENCORE, // MAPENCORE [map]
|
UC_MAPENCORE, // MAPENCORE [map]
|
||||||
UC_MAPSPBATTACK, // MAPSPBATTACK [map]
|
UC_MAPSPBATTACK, // MAPSPBATTACK [map]
|
||||||
|
UC_MAPMYSTICMELODY, // MAPMYSTICMELODY [map]
|
||||||
UC_MAPTIME, // MAPTIME [map] [time to beat, tics]
|
UC_MAPTIME, // MAPTIME [map] [time to beat, tics]
|
||||||
|
|
||||||
UC_CHARACTERWINS, // CHARACTERWINS [character] [x rounds]
|
UC_CHARACTERWINS, // CHARACTERWINS [character] [x rounds]
|
||||||
|
|
|
||||||
|
|
@ -7263,6 +7263,10 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
||||||
if (!(mapheaderinfo[gamemap-1]->records.mapvisited & MV_MYSTICMELODY))
|
if (!(mapheaderinfo[gamemap-1]->records.mapvisited & MV_MYSTICMELODY))
|
||||||
{
|
{
|
||||||
mapheaderinfo[gamemap-1]->records.mapvisited |= MV_MYSTICMELODY;
|
mapheaderinfo[gamemap-1]->records.mapvisited |= MV_MYSTICMELODY;
|
||||||
|
|
||||||
|
if (!M_UpdateUnlockablesAndExtraEmblems(true, true))
|
||||||
|
S_StartSound(NULL, sfx_ncitem);
|
||||||
|
gamedata->deferredsave = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue