Adapt boss IDs and trigger tags to UDMF

This commit is contained in:
MascaraSnake 2021-12-27 15:07:37 +01:00
parent a14eacd63a
commit 06bbee50bf
5 changed files with 245 additions and 35 deletions

View file

@ -3895,6 +3895,25 @@ udmf
sprite = "EGGMA1";
width = 24;
height = 76;
arg0
{
title = "Boss ID";
}
arg1
{
title = "Death trigger tag";
type = 15;
}
arg2
{
title = "Victory trigger tag";
type = 15;
}
arg3
{
title = "Pinch trigger tag";
type = 15;
}
}
201
{
@ -3902,6 +3921,25 @@ udmf
sprite = "EGGNA1";
width = 24;
height = 76;
arg0
{
title = "Boss ID";
}
arg1
{
title = "Death trigger tag";
type = 15;
}
arg2
{
title = "Victory trigger tag";
type = 15;
}
arg3
{
title = "Pinch trigger tag";
type = 15;
}
}
202
{
@ -3909,6 +3947,25 @@ udmf
sprite = "EGGOA1";
width = 32;
height = 116;
arg0
{
title = "Boss ID";
}
arg1
{
title = "Death trigger tag";
type = 15;
}
arg2
{
title = "Victory trigger tag";
type = 15;
}
arg3
{
title = "Pinch trigger tag";
type = 15;
}
}
203
{
@ -3916,6 +3973,30 @@ udmf
sprite = "EGGPA1";
width = 24;
height = 76;
arg0
{
title = "Boss ID";
}
arg1
{
title = "Death trigger tag";
type = 15;
}
arg2
{
title = "Victory trigger tag";
type = 15;
}
arg3
{
title = "Pinch trigger tag";
type = 15;
}
arg4
{
title = "Cage drop trigger tag";
type = 15;
}
}
204
{
@ -3923,6 +4004,25 @@ udmf
sprite = "FANGA1";
width = 24;
height = 60;
arg0
{
title = "Boss ID";
}
arg1
{
title = "Death trigger tag";
type = 15;
}
arg2
{
title = "Victory trigger tag";
type = 15;
}
arg3
{
title = "Pinch trigger tag";
type = 15;
}
}
206
{
@ -3930,6 +4030,30 @@ udmf
sprite = "BRAKB1";
width = 48;
height = 160;
arg0
{
title = "Boss ID";
}
arg1
{
title = "Death trigger tag";
type = 15;
}
arg2
{
title = "Victory trigger tag";
type = 15;
}
arg3
{
title = "Pinch trigger tag";
type = 15;
}
arg4
{
title = "Platform trigger tag";
type = 15;
}
}
207
{
@ -3944,6 +4068,25 @@ udmf
sprite = "METLC1";
width = 16;
height = 48;
arg0
{
title = "Boss ID";
}
arg1
{
title = "Death trigger tag";
type = 15;
}
arg2
{
title = "Victory trigger tag";
type = 15;
}
arg3
{
title = "Pinch trigger tag";
type = 15;
}
}
209
{
@ -3951,6 +4094,30 @@ udmf
sprite = "BRAK01";
width = 48;
height = 160;
arg0
{
title = "Boss ID";
}
arg1
{
title = "Death trigger tag";
type = 15;
}
arg2
{
title = "Victory trigger tag";
type = 15;
}
arg3
{
title = "Pinch trigger tag";
type = 15;
}
arg4
{
title = "Attack trigger tag";
type = 15;
}
}
290
{

View file

@ -1452,7 +1452,7 @@ state_t states[NUMSTATES] =
{SPR_FANG, 18, 16, {A_FaceTarget}, 3, 0, S_FANG_PINCHLOBSHOT1}, // S_FANG_PINCHLOBSHOT0
{SPR_FANG, 19, 2, {A_FaceTarget}, 3, 0, S_FANG_PINCHLOBSHOT2}, // S_FANG_PINCHLOBSHOT1
{SPR_FANG, 20, 30, {A_Boss5MakeItRain}, MT_FBOMB, -16, S_FANG_PINCHLOBSHOT3}, // S_FANG_PINCHLOBSHOT2
{SPR_FANG, 20, 18, {A_LinedefExecute}, LE_BOSS4DROP, 0, S_FANG_PINCHLOBSHOT4}, // S_FANG_PINCHLOBSHOT3
{SPR_FANG, 20, 18, {A_LinedefExecuteFromArg}, 3, 0, S_FANG_PINCHLOBSHOT4}, // S_FANG_PINCHLOBSHOT3
{SPR_FANG, 0, 0, {A_Boss5Calm}, 0, 0, S_FANG_PATHINGSTART1}, // S_FANG_PINCHLOBSHOT4
{SPR_FANG, 21, 0, {A_DoNPCPain}, 0, 0, S_FANG_DIE2}, // S_FANG_DIE1
@ -1584,7 +1584,7 @@ state_t states[NUMSTATES] =
{SPR_BRAK, 21, 3*TICRATE, {NULL}, 0, 0, S_BLACKEGG_DESTROYPLAT2}, // S_BLACKEGG_DESTROYPLAT1
{SPR_BRAK, 21, 1, {A_PlaySound}, sfx_s3k54, 0, S_BLACKEGG_DESTROYPLAT3}, // S_BLACKEGG_DESTROYPLAT2
{SPR_BRAK, 21, 14, {A_LinedefExecute}, LE_BRAKPLATFORM, 0, S_BLACKEGG_STND}, // S_BLACKEGG_DESTROYPLAT3
{SPR_BRAK, 21, 14, {A_LinedefExecuteFromArg}, 4, 0, S_BLACKEGG_STND}, // S_BLACKEGG_DESTROYPLAT3
{SPR_NULL, 0, 1, {A_CapeChase}, (160 - 20) << 16, 0, S_BLACKEGG_HELPER}, // S_BLACKEGG_HELPER
@ -1618,7 +1618,7 @@ state_t states[NUMSTATES] =
{SPR_BRAK, 26 + FF_FULLBRIGHT, 2, {A_BrakFireShot}, MT_CYBRAKDEMON_FLAMESHOT, 128, S_CYBRAKDEMON_FLAME_ATTACK4}, // S_CYBRAKDEMON_FLAME_ATTACK3 // Fire
{SPR_BRAK, 7, 1, {A_Repeat}, 30, S_CYBRAKDEMON_FLAME_ATTACK3, S_CYBRAKDEMON_FINISH_ATTACK1}, // S_CYBRAKDEMON_FLAME_ATTACK4 // Loop
{SPR_BRAK, 0, 6, {A_RandomState}, S_CYBRAKDEMON_VILE_ATTACK1, S_CYBRAKDEMON_NAPALM_ATTACK1, S_CYBRAKDEMON_MISSILE_ATTACK1}, // S_CYBRAKDEMON_CHOOSE_ATTACK2
{SPR_BRAK, 20, 0, {A_LinedefExecute}, LE_BRAKVILEATACK, 0, S_CYBRAKDEMON_VILE_ATTACK2}, // S_CYBRAKDEMON_VILE_ATTACK1
{SPR_BRAK, 20, 0, {A_LinedefExecuteFromArg}, 4, 0, S_CYBRAKDEMON_VILE_ATTACK2}, // S_CYBRAKDEMON_VILE_ATTACK1
{SPR_BRAK, 20, 24, {A_VileTarget}, MT_CYBRAKDEMON_TARGET_RETICULE, 1, S_CYBRAKDEMON_VILE_ATTACK3}, // S_CYBRAKDEMON_VILE_ATTACK2
{SPR_BRAK, 19, 8, {A_FaceTarget}, 0, 0, S_CYBRAKDEMON_VILE_ATTACK4}, // S_CYBRAKDEMON_VILE_ATTACK3
{SPR_BRAK, 18, 8, {A_FaceTarget}, 0, 0, S_CYBRAKDEMON_VILE_ATTACK5}, // S_CYBRAKDEMON_VILE_ATTACK4
@ -1631,7 +1631,7 @@ state_t states[NUMSTATES] =
{SPR_BRAK, 0, 0, {A_SetReactionTime}, 0, 0, S_CYBRAKDEMON_WALK1}, // S_CYBRAKDEMON_FINISH_ATTACK2 // If just attacked, remove MF2_FRET w/out going back to spawnstate
{SPR_BRAK, 18, 24, {A_Pain}, 0, 0, S_CYBRAKDEMON_PAIN2}, // S_CYBRAKDEMON_PAIN1
{SPR_BRAK, 18, 0, {A_CheckHealth}, 3, S_CYBRAKDEMON_PAIN3, S_CYBRAKDEMON_CHOOSE_ATTACK1}, // S_CYBRAKDEMON_PAIN2
{SPR_BRAK, 18, 0, {A_LinedefExecute}, LE_PINCHPHASE, 0, S_CYBRAKDEMON_CHOOSE_ATTACK1}, // S_CYBRAKDEMON_PAIN3
{SPR_BRAK, 18, 0, {A_LinedefExecuteFromArg}, 3, 0, S_CYBRAKDEMON_CHOOSE_ATTACK1}, // S_CYBRAKDEMON_PAIN3
{SPR_BRAK, 18, 1, {A_Repeat}, 1, S_CYBRAKDEMON_DIE1, S_CYBRAKDEMON_DIE2}, // S_CYBRAKDEMON_DIE1
{SPR_BRAK, 18, 2, {A_BossScream}, 2, 0, S_CYBRAKDEMON_DIE3}, // S_CYBRAKDEMON_DIE2
{SPR_BRAK, 18, 0, {A_Repeat}, 52, S_CYBRAKDEMON_DIE2, S_CYBRAKDEMON_DIE4}, // S_CYBRAKDEMON_DIE3

View file

@ -3911,7 +3911,8 @@ static void P_DoBossVictory(mobj_t *mo)
}
// victory!
P_LinedefExecute(LE_ALLBOSSESDEAD, mo, NULL);
if (mo->spawnpoint)
P_LinedefExecute(mo->spawnpoint->args[1], mo, NULL);
if (stoppedclock && modeattacking) // if you're just time attacking, skip making the capsule appear since you don't need to step on it anyways.
return;
@ -4081,14 +4082,14 @@ static void P_DoBoss5Death(mobj_t *mo)
static void P_DoBossDefaultDeath(mobj_t *mo)
{
UINT8 extrainfo = (mo->spawnpoint ? mo->spawnpoint->extrainfo : 0);
INT32 bossid = (mo->spawnpoint ? mo->spawnpoint->args[0] : 0);
// Stop exploding and prepare to run.
P_SetMobjState(mo, mo->info->xdeathstate);
if (P_MobjWasRemoved(mo))
return;
P_SetTarget(&mo->target, P_FindBossFlyPoint(mo, extrainfo));
P_SetTarget(&mo->target, P_FindBossFlyPoint(mo, bossid));
mo->flags |= MF_NOGRAVITY|MF_NOCLIP;
mo->flags |= MF_NOCLIPHEIGHT;
@ -4122,12 +4123,12 @@ static void P_DoBossDefaultDeath(mobj_t *mo)
void A_BossDeath(mobj_t *mo)
{
INT32 i;
UINT8 extrainfo = (mo->spawnpoint ? mo->spawnpoint->extrainfo : 0);
if (LUA_CallAction(A_BOSSDEATH, mo))
return;
P_LinedefExecute(LE_BOSSDEAD+(extrainfo*LE_PARAMWIDTH), mo, NULL);
if (mo->spawnpoint)
P_LinedefExecute(mo->spawnpoint->args[1], mo, NULL);
mo->health = 0;
// Boss is dead (but not necessarily fleeing...)
@ -7070,10 +7071,8 @@ void A_Boss1Chase(mobj_t *actor)
}
else
{
if (actor->spawnpoint && actor->spawnpoint->extrainfo)
P_LinedefExecute(LE_PINCHPHASE+(actor->spawnpoint->extrainfo*LE_PARAMWIDTH), actor, NULL);
else
P_LinedefExecute(LE_PINCHPHASE, actor, NULL);
if (actor->spawnpoint)
P_LinedefExecute(actor->spawnpoint->args[3], actor, NULL);
P_SetMobjState(actor, actor->info->raisestate);
}
@ -8324,8 +8323,6 @@ void A_LinedefExecute(mobj_t *actor)
if (locvar2)
tagnum += locvar2*(AngleFixed(actor->angle)>>FRACBITS);
else if (actor->spawnpoint && actor->spawnpoint->extrainfo)
tagnum += (actor->spawnpoint->extrainfo*LE_PARAMWIDTH);
CONS_Debug(DBG_GAMELOGIC, "A_LinedefExecute: Running mobjtype %d's sector with tag %d\n", actor->type, tagnum);
@ -12714,7 +12711,7 @@ void A_Boss5FindWaypoint(mobj_t *actor)
INT32 locvar1 = var1;
boolean avoidcenter;
INT32 i;
UINT8 extrainfo = (actor->spawnpoint ? actor->spawnpoint->extrainfo : 0);
INT32 bossid = (actor->spawnpoint ? actor->spawnpoint->args[0] : 0);
if (LUA_CallAction(A_BOSS5FINDWAYPOINT, actor))
return;
@ -12723,7 +12720,7 @@ void A_Boss5FindWaypoint(mobj_t *actor)
if (locvar1 == 2) // look for the boss flypoint
{
P_SetTarget(&actor->tracer, P_FindBossFlyPoint(actor, extrainfo));
P_SetTarget(&actor->tracer, P_FindBossFlyPoint(actor, bossid));
if (!actor->tracer)
return; // no boss flypoints found
@ -12735,7 +12732,7 @@ void A_Boss5FindWaypoint(mobj_t *actor)
if (avoidcenter)
goto nowaypoints; // if we can't go the center, why on earth are we doing this?
TAG_ITER_THINGS(extrainfo, i)
TAG_ITER_THINGS(bossid, i)
{
if (!mapthings[i].mobj)
continue;
@ -12762,7 +12759,7 @@ void A_Boss5FindWaypoint(mobj_t *actor)
actor->z += hackoffset;
// first, count how many waypoints we have
TAG_ITER_THINGS(extrainfo, i)
TAG_ITER_THINGS(bossid, i)
{
if (!mapthings[i].mobj)
continue;
@ -12817,7 +12814,7 @@ void A_Boss5FindWaypoint(mobj_t *actor)
numfangwaypoints = 0;
// now find them again and add them to the table!
TAG_ITER_THINGS(extrainfo, i)
TAG_ITER_THINGS(bossid, i)
{
if (!mapthings[i].mobj)
continue;

View file

@ -4347,7 +4347,8 @@ static void P_Boss2Thinker(mobj_t *mobj)
{
mobj->flags &= ~MF_NOGRAVITY;
A_Boss2Pogo(mobj);
P_LinedefExecute(LE_PINCHPHASE, mobj, NULL);
if (mobj->spawnpoint)
P_LinedefExecute(mobj->spawnpoint->args[3], mobj, NULL);
}
}
@ -4476,7 +4477,8 @@ static void P_Boss3Thinker(mobj_t *mobj)
dummy->cusval = mobj->cusval;
CONS_Debug(DBG_GAMELOGIC, "Eggman path %d - Dummy selected paths %d and %d\n", way0, way1, way2);
P_LinedefExecute(LE_PINCHPHASE+(mobj->cusval*LE_PARAMWIDTH), mobj, NULL);
if (mobj->spawnpoint)
P_LinedefExecute(mobj->spawnpoint->args[3], mobj, NULL);
}
}
else if (mobj->movecount) // Firing mode
@ -4642,12 +4644,14 @@ static void P_Boss3Thinker(mobj_t *mobj)
// Move Boss4's sectors by delta.
static boolean P_Boss4MoveCage(mobj_t *mobj, fixed_t delta)
{
const UINT16 tag = 65534 + (mobj->spawnpoint ? mobj->spawnpoint->extrainfo*LE_PARAMWIDTH : 0);
INT32 snum;
sector_t *sector;
boolean gotcage = false;
TAG_ITER_SECTORS(tag, snum)
if (!mobj->spawnpoint)
return false;
TAG_ITER_SECTORS(mobj->spawnpoint->args[3], snum)
{
sector = &sectors[snum];
sector->floorheight += delta;
@ -4726,13 +4730,15 @@ static void P_Boss4PinchSpikeballs(mobj_t *mobj, angle_t angle, fixed_t dz)
// Destroy cage FOFs.
static void P_Boss4DestroyCage(mobj_t *mobj)
{
const UINT16 tag = 65534 + (mobj->spawnpoint ? mobj->spawnpoint->extrainfo*LE_PARAMWIDTH : 0);
INT32 snum;
size_t a;
sector_t *sector, *rsec;
ffloor_t *rover;
TAG_ITER_SECTORS(tag, snum)
if (!mobj->spawnpoint)
return;
TAG_ITER_SECTORS(mobj->spawnpoint->args[3], snum)
{
sector = &sectors[snum];
@ -5005,13 +5011,15 @@ static void P_Boss4Thinker(mobj_t *mobj)
{ // Proceed to pinch phase!
P_Boss4DestroyCage(mobj);
mobj->movedir = 3;
P_LinedefExecute(LE_PINCHPHASE + (mobj->spawnpoint ? mobj->spawnpoint->extrainfo*LE_PARAMWIDTH : 0), mobj, NULL);
if (mobj->spawnpoint)
P_LinedefExecute(mobj->spawnpoint->args[3], mobj, NULL);
P_Boss4MoveSpikeballs(mobj, FixedAngle(mobj->movecount), 0);
var1 = 3;
A_BossJetFume(mobj);
return;
}
P_LinedefExecute(LE_BOSS4DROP - (mobj->info->spawnhealth-mobj->health) + (mobj->spawnpoint ? mobj->spawnpoint->extrainfo*LE_PARAMWIDTH : 0), mobj, NULL);
if (mobj->spawnpoint)
P_LinedefExecute(mobj->spawnpoint->args[4] - (mobj->info->spawnhealth-mobj->health), mobj, NULL);
// 1 -> 1.5 second timer
mobj->threshold = TICRATE+(TICRATE*(mobj->info->spawnhealth-mobj->health)/10);
if (mobj->threshold < 1)
@ -5043,7 +5051,8 @@ static void P_Boss4Thinker(mobj_t *mobj)
{ // Proceed to pinch phase!
P_Boss4DestroyCage(mobj);
mobj->movedir = 3;
P_LinedefExecute(LE_PINCHPHASE + (mobj->spawnpoint ? mobj->spawnpoint->extrainfo*LE_PARAMWIDTH : 0), mobj, NULL);
if (mobj->spawnpoint)
P_LinedefExecute(mobj->spawnpoint->args[3], mobj, NULL);
var1 = 3;
A_BossJetFume(mobj);
return;
@ -5183,7 +5192,8 @@ static void P_Boss7Thinker(mobj_t *mobj)
// Begin platform destruction
mobj->flags2 |= MF2_FRET;
P_SetMobjState(mobj, mobj->info->raisestate);
P_LinedefExecute(LE_PINCHPHASE, mobj, NULL);
if (mobj->spawnpoint)
P_LinedefExecute(mobj->spawnpoint->args[3], mobj, NULL);
}
}
else if (mobj->state == &states[S_BLACKEGG_HITFACE4] && mobj->tics == mobj->state->tics)
@ -5277,7 +5287,7 @@ static void P_Boss7Thinker(mobj_t *mobj)
INT32 i;
boolean foundgoop = false;
INT32 closestNum;
UINT8 extrainfo = (mobj->spawnpoint ? mobj->spawnpoint->extrainfo : 0);
UINT8 bossid = (mobj->spawnpoint ? mobj->spawnpoint->args[0] : 0);
// Looks for players in goop. If you find one, try to jump on him.
for (i = 0; i < MAXPLAYERS; i++)
@ -5307,7 +5317,7 @@ static void P_Boss7Thinker(mobj_t *mobj)
continue;
if (!mo2->spawnpoint)
continue;
if (mo2->spawnpoint->extrainfo != extrainfo)
if (mo2->spawnpoint->extrainfo != bossid)
continue;
if (mobj->health <= mobj->info->damage && !(mo2->spawnpoint->options & 7))
continue; // don't jump to center
@ -5364,7 +5374,7 @@ static void P_Boss7Thinker(mobj_t *mobj)
continue;
if ((mo2->spawnpoint->options & 7) != waypointNum)
continue;
if (mo2->spawnpoint->extrainfo != extrainfo)
if (mo2->spawnpoint->extrainfo != bossid)
continue;
hitspot = mo2;
@ -6040,7 +6050,8 @@ static void P_Boss9Thinker(mobj_t *mobj)
mobj->watertop = mobj->floorz + 16*FRACUNIT;
else
mobj->watertop = mobj->target->floorz + 16*FRACUNIT;
P_LinedefExecute(LE_PINCHPHASE, mobj, NULL);
if (mobj->spawnpoint)
P_LinedefExecute(mobj->spawnpoint->args[3], mobj, NULL);
#if 0
whoosh = P_SpawnMobjFromMobj(mobj, 0, 0, 0, MT_GHOST); // done here so the offset is correct
@ -10147,7 +10158,7 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->flags & MF_NOTHINK)
return;
if ((mobj->flags & MF_BOSS) && mobj->spawnpoint && (bossdisabled & (1<<mobj->spawnpoint->extrainfo)))
if ((mobj->flags & MF_BOSS) && mobj->spawnpoint && (bossdisabled & (1<<mobj->spawnpoint->args[0])))
return;
// Remove dead target/tracer.

View file

@ -3175,6 +3175,8 @@ static line_t *P_FindPointPushLine(taglist_t *list)
static void P_ConvertBinaryMap(void)
{
size_t i;
mobjtype_t mobjtypeofthing[4096];
mobjtype_t mobjtype;
for (i = 0; i < numlines; i++)
{
@ -4872,6 +4874,14 @@ static void P_ConvertBinaryMap(void)
}
}
for (i = 0; i < NUMMOBJTYPES; i++)
{
if (mobjinfo[i].doomednum < 0 || mobjinfo[i].doomednum >= 4096)
continue;
mobjtypeofthing[mobjinfo[i].doomednum] = (mobjtype_t)i;
}
for (i = 0; i < nummapthings; i++)
{
if (mapthings[i].type >= 1 && mapthings[i].type <= 35)
@ -4880,6 +4890,19 @@ static void P_ConvertBinaryMap(void)
continue;
}
mobjtype = mobjtypeofthing[mapthings[i].type];
if (mobjtype)
{
if (mobjinfo[mobjtype].flags & MF_BOSS)
{
INT32 paramoffset = mapthings[i].extrainfo*LE_PARAMWIDTH;
mapthings[i].args[0] = mapthings[i].extrainfo;
mapthings[i].args[1] = LE_BOSSDEAD + paramoffset;
mapthings[i].args[2] = LE_ALLBOSSESDEAD + paramoffset;
mapthings[i].args[3] = LE_PINCHPHASE + paramoffset;
}
}
switch (mapthings[i].type)
{
case 102: //SDURF
@ -4901,6 +4924,18 @@ static void P_ConvertBinaryMap(void)
case 136: //Pyre Fly
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
break;
case 203: //Egg Colosseum
mapthings[i].args[4] = LE_BOSS4DROP + mapthings[i].extrainfo * LE_PARAMWIDTH;
break;
case 204: //Fang
mapthings[i].args[3] = LE_BOSS4DROP + mapthings[i].extrainfo*LE_PARAMWIDTH;
break;
case 206: //Brak Eggman (Old)
mapthings[i].args[4] = LE_BRAKPLATFORM + mapthings[i].extrainfo*LE_PARAMWIDTH;
break;
case 209: //Brak Eggman
mapthings[i].args[4] = LE_BRAKVILEATACK + mapthings[i].extrainfo*LE_PARAMWIDTH;
break;
case 294:
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
break;