Deathkings of the Dark Citadel support.

This commit is contained in:
Mari the Deer 2021-02-11 23:25:16 +01:00
commit d913752e31
20 changed files with 427 additions and 68 deletions

View file

@ -308,11 +308,12 @@ Class SWWMHandler : EventHandler
MAP_DMAP07,
MAP_DMAP30,
MAP_HMAP12,
MAP_HMAP23_HMAP27,
MAP_HMAP23_HMAP27_HMAP48_HMAP55,
MAP_HMAP36,
MAP_HMAP37,
MAP_HMAP38,
MAP_HMAP40,
MAP_HMAP60,
MAP_EVMAP30 // eviternity
};
@ -350,8 +351,10 @@ Class SWWMHandler : EventHandler
|| (mapsum ~== "91AD797F95CC4C6D6AE33B21F664C60B")
|| (mapsum ~== "188B1B4244BD8DA501D8532696EC8654")
|| (mapsum ~== "5B29D0889DF09A8250D62FA09EB2B452")
|| (mapsum ~== "D3C5FA777BA52264546E6569F167AF0D") )
return MAP_HMAP23_HMAP27;
|| (mapsum ~== "D3C5FA777BA52264546E6569F167AF0D")
|| (mapsum ~== "15FC0991D975325556EFF71F241A4458")
|| (mapsum ~== "2FAD54B58487884F06EAFA507B553921") )
return MAP_HMAP23_HMAP27_HMAP48_HMAP55;
if ( (mapsum ~== "4444C95C2029DA6EECAC92DAA31CE665")
|| (mapsum ~== "33752742BCA8E539A6EE3E5D0FDA8744")
|| (mapsum ~== "3FFAF2F624C1B4BB6F581DCF7B99CBA7") )
@ -368,6 +371,8 @@ Class SWWMHandler : EventHandler
|| (mapsum ~== "1C5DE5A921DEE405E98E7E09D9829387")
|| (mapsum ~== "2A6C4235B942467D25FD50D5B313E67A") )
return MAP_HMAP40;
if ( mapsum ~== "B0ADDB295A3ACCE43978AAC91FB8C58A" )
return MAP_HMAP60;
if ( mapsum ~== "5C5E5C08AF3572F31CF27318679F2B4E" )
return MAP_EVMAP30;
return MAP_NONE;
@ -2033,7 +2038,7 @@ Class SWWMHandler : EventHandler
bosstag = "$BT_DRAGON";
}
}
else if ( bossmap == MAP_HMAP23_HMAP27 )
else if ( bossmap == MAP_HMAP23_HMAP27_HMAP48_HMAP55 )
{
if ( e.Thing is 'Heresiarch' )
{
@ -2053,6 +2058,17 @@ Class SWWMHandler : EventHandler
bosstag = "$BT_KORAX";
}
}
else if ( bossmap == MAP_HMAP60 )
{
if ( (e.Thing is 'FighterBoss') || (e.Thing is 'ClericBoss') || (e.Thing is 'MageBoss') )
{
bossactors.Push(e.Thing);
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 4;
if ( trk ) trk.bBOSS = true;
bosstag = "$BT_DEATHKINGS";
initialized = true; // healthbar shows from the start
}
}
else if ( bossmap == MAP_EVMAP30 )
{
if ( e.Thing.GetClassName() == "ArchangelusA" )
@ -2320,7 +2336,7 @@ Class SWWMHandler : EventHandler
else if ( (e.Replacee is 'Chainsaw') || (e.Replacee is 'Gauntlets') || (e.Replacee is 'FWeapAxe') ) e.Replacement = SWWMUtility.PickSWWMSlot1();
else if ( (e.Replacee is 'Fist') || (e.Replacee is 'Staff') ) e.Replacement = 'DeepImpact';
else if ( (e.Replacee is 'Pistol') || (e.Replacee is 'GoldWand') || (e.Replacee is 'FWeapFist') || (e.Replacee is 'CWeapMace') || (e.Replacee is 'MWeapWand') || (e.Replacee.GetClassName() == 'TangoPistol') ) e.Replacement = SWWMUtility.PickSWWMSlot2();
else if ( (e.Replacee is 'Shotgun') || (e.Replacee is 'CWeapStaff') || (e.Replacee.GetClassName() == 'TangoShotgun') ) e.Replacement = SWWMUtility.PickSWWMSlot3();
else if ( (e.Replacee is 'Shotgun') || (e.Replacee is 'CWeapStaff') || (e.Replacee.GetClassName() == 'TangoShotgun') ) e.Replacement = SWWMUtility.IsDoomOne()?SWWMUtility.PickHereticSlot3():SWWMUtility.PickSWWMSlot3();
else if ( (e.Replacee is 'SuperShotgun') || (e.Replacee is 'MWeapFrost') || (e.Replacee.GetClassName() == 'TangoSuperShotgun') ) e.Replacement = SWWMUtility.PickSWWMSlot4();
else if ( (e.Replacee is 'Crossbow') || (e.Replacee.GetClassName() == 'TangoScrapGun') ) e.Replacement = SWWMUtility.PickHereticSlot3();
else if ( (e.Replacee is 'Chaingun') || (e.Replacee is 'Blaster') || (e.Replacee is 'FWeaponPiece3') || (e.Replacee.GetClassName() == 'TangoAssaultRifle') || (e.Replacee.GetClassName() == 'TangoChaingun') ) e.Replacement = SWWMUtility.PickSWWMSlot5();

View file

@ -145,6 +145,7 @@ Class DemolitionistMenu : GenericMenu
hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
// mission text
bool nrftl = false;
bool hexdd = false;
if ( (gameinfo.gametype&GAME_Doom) && SWWMUtility.IsKnownMap() )
{
int clus = level.cluster;
@ -214,7 +215,11 @@ Class DemolitionistMenu : GenericMenu
}
else if ( (gameinfo.gametype&GAME_Hexen) && SWWMUtility.IsKnownMap() )
{
missionstr = String.Format("$SWWM_MISSION_HEXEN%d",level.cluster);
// detect deathkings in the most amazing way imaginable
int mapnamenum = level.mapname.Mid(3).ToInt(10);
if ( mapnamenum > 40 ) hexdd = true;
String gstr = hexdd?"HEXDD":"HEXEN";
missionstr = String.Format("$SWWM_MISSION_%s%d",gstr,level.cluster);
if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) )
missionstr = "$SWWM_MISSION_NONE";
int csiz = stats.clustervisit.Size();
@ -224,7 +229,7 @@ Class DemolitionistMenu : GenericMenu
if ( (stats.clustervisit[i] == level.cluster) && !firstskip )
continue;
firstskip = true;
String xstr = String.Format("$SWWM_MISSION_HEXEN%d",stats.clustervisit[i]);
String xstr = String.Format("$SWWM_MISSION_%s%d",gstr,stats.clustervisit[i]);
if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) )
continue;
missionbacklog.Push(xstr);
@ -259,6 +264,13 @@ Class DemolitionistMenu : GenericMenu
c_hour = 16;
c_minute = 41;
c_tz = "JST";
if ( hexdd )
{
// deathkings happen the day after
c_day = 25;
c_hour = 10;
c_minute = 28;
}
}
else if ( gameinfo.gametype&GAME_Strife )
{

View file

@ -456,3 +456,16 @@ Class SWWMGreenKeyGesture : SWWMKeyGesture {}
Class SWWMBlueKeyGesture : SWWMKeyGesture {}
Class SWWMYellowKeyGesture : SWWMKeyGesture {}
Class SWWMRedKeyGesture : SWWMKeyGesture {}
// HEXDD thingy
Class SWWMChaosSphere : Key
{
Default
{
Tag "$T_CHAOSSPHERE";
Inventory.InterHubAmount 1; // don't strip, this thing is always kept
+INVENTORY.UNDROPPABLE;
+INVENTORY.UNTOSSABLE;
+INVENTORY.UNCLEARABLE;
}
}

View file

@ -380,6 +380,17 @@ Class Demolitionist : PlayerPawn
eg.chambered = true;
DualExplodiumGun(eg.SisterWeapon).chambered = true;
player.ReadyWeapon = player.PendingWeapon = eg;
// in hexdd, we start with the chaos sphere in our grasp
if ( SWWMUtility.IsVanillaHexenMap() )
{
// this really is a dumb way to detect the expansion
int mapnamenum = level.mapname.Mid(3).ToInt(10);
if ( mapnamenum > 40 )
{
let cs = Inventory(Spawn('SWWMChaosSphere'));
cs.AttachToOwner(self);
}
}
bInDefaultInventory = false;
}
override void ClearInventory()
@ -2016,7 +2027,7 @@ Class Demolitionist : PlayerPawn
if ( (item is 'Weapon') && !(item is 'SWWMGesture') && !(item is 'SWWMItemGesture') && mystats && !mystats.GotWeapon(Weapon(item).GetClass()) && CheckLocalView() )
SWWMHandler.AddOneliner("getweapon",2);
}
if ( (item is 'Key') && !key_reentrant && !deathmatch )
if ( (item is 'Key') && !key_reentrant && !deathmatch && !bInDefaultInventory )
{
// score
int score = 100;

View file

@ -263,7 +263,7 @@ Class GhostPower : PowerInvisibility
Powerup.Duration -60;
Powerup.Strength 100;
Powerup.Mode "Translucent";
Powerup.Color "F0E0FF", 0.1;
Powerup.Color "F0 E0 FF", 0.1;
+INVENTORY.ADDITIVETIME;
}
@ -640,7 +640,7 @@ Class InvinciballPower : Powerup
{
Powerup.Duration -30;
Inventory.Icon "graphics/HUD/Icons/I_Invinciball.png";
Powerup.Color "FF3000", 0.1;
Powerup.Color "FF 30 00", 0.1;
+INVENTORY.ADDITIVETIME;
}
@ -879,7 +879,7 @@ Class RagekitPower : Powerup
{
Powerup.Duration -30;
Inventory.Icon "graphics/HUD/Icons/I_Ragekit.png";
Powerup.Color "FF0000", 0.2;
Powerup.Color "FF 00 00", 0.2;
+INVENTORY.ADDITIVETIME;
}
@ -1854,7 +1854,7 @@ Class BarrierPower : PowerIronFeet
{
Inventory.Icon "graphics/HUD/Icons/I_Barrier.png";
Powerup.Duration -60;
Powerup.Color "20FF00", 0.1;
Powerup.Color "20 FF 00", 0.1;
Powerup.Mode "Full"; // no leaky damage
+INVENTORY.ADDITIVETIME;
}

View file

@ -1120,6 +1120,7 @@ Class SWWMUtility
|| (csum ~== "3417A4859C8FECE797C9DAA715D14D63")
|| (csum ~== "38028DC7E09DC5C91068AAC565A3962B") )
return true;
// no TNT / Plutonia (non-canon Demolitionist appearance)
return false;
}
static bool IsVanillaHereticMap()
@ -1278,9 +1279,35 @@ Class SWWMUtility
|| (csum ~== "78979A583B1E30D94C9DAE2BCFA9A18D")
|| (csum ~== "112599C94EB03328D217233D4CB65A70")
|| (csum ~== "7729174BAA658C8FD86CF8290422F512")
|| (csum ~== "33752742BCA8E539A6EE3E5D0FDA8744") )
|| (csum ~== "33752742BCA8E539A6EE3E5D0FDA8744")
// Deathkings
|| (csum ~== "0C7B62B11C7970DAAF66F9084C8E408E")
|| (csum ~== "A5F820CB016DE3D9A402C0173E7F9998")
|| (csum ~== "B0ADDB295A3ACCE43978AAC91FB8C58A")
|| (csum ~== "B295A2FBB187A1DC8AEFDE825DFB084A")
|| (csum ~== "B77D810C972976C54A694C62361FFF9D")
|| (csum ~== "C35E3C2727CCD7EF7793230AEF6255E7")
|| (csum ~== "C35F7CB2E9F93BB331FFCEB6622ABD64")
|| (csum ~== "CA7825F84BC08E76C6C85A41AEFE4370")
|| (csum ~== "CB0334184147FF565F6EF437F316B3EB")
|| (csum ~== "E2B5D1400279335811C1C1C0B437D9C8")
|| (csum ~== "E3EFB0156A20ADF2DF00915A0EA85DF5")
|| (csum ~== "2FAD54B58487884F06EAFA507B553921")
|| (csum ~== "3BB1724A4B66E85E2431110E4D7C4B76")
|| (csum ~== "6C886A3E37410C6FC83ED87BB6E9864F")
|| (csum ~== "6FAFFEAAE301FD341169A3CC63CBE183")
|| (csum ~== "7C28FD1ED662667FC54CDA123CF0614A")
|| (csum ~== "7DC65D5029DD834481CD716B3D71388A")
|| (csum ~== "11A83AAE9F747E1BA649F52D6C2DDB3A")
|| (csum ~== "15FC0991D975325556EFF71F241A4458")
|| (csum ~== "56D7CFFF0440328ADB20521ED70C739A")
|| (csum ~== "90B4951F996BA30096F2D4238EEC39CA")
|| (csum ~== "2945EDC2A9D7222AE54F0C68E1EA79FC")
|| (csum ~== "4482A52290F42C50D6F80A0D4751A0E4")
|| (csum ~== "4945FC07392AF9D2F1FABDD471C691A5")
|| (csum ~== "7721B620EA970DF48FF4A18489822F6C")
|| (csum ~== "0487193FFC57884EDB053F3E9148C534") )
return true;
// no deathkings (yet)
return false;
}
@ -1343,6 +1370,17 @@ Class SWWMUtility
p.health = p.mo.Health = p.mo.SpawnHealth();
}
// checks if we're playing in doom 1
// this is used so we can sometimes replace the shotgun with a SSG slot weapon
static bool IsDoomOne()
{
if ( !(gameinfo.GameType&GAME_DOOM) ) return false;
// is the map in ExMx format? Then it's likely we're playing a doom 1 map
if ( (level.mapname.Length() >= 4) && (level.mapname.Mid(0,1) == "E") && (level.mapname.ByteAt(1) >= 0x30) && (level.mapname.ByteAt(1) < 0x40) && (level.mapname.Mid(2,1) == "M") && (level.mapname.ByteAt(3) >= 0x30) && (level.mapname.ByteAt(3) < 0x40) )
return true;
return false;
}
// check that all players can get enough of this if needed
// multi: check for multiple copies, not just single instances
// (useful e.g. for dual wieldable weapons)
@ -1438,7 +1476,7 @@ Class SWWMUtility
//return PickPair(PickSWWMSlot9(),PickSWWMSlot0(),2);
return PickPair('CandyGun','Ynykron',2);
}
static Class<Inventory> PickHereticSlot3()
static Class<Inventory> PickHereticSlot3() // also used for Doom 1
{
//return PickPair(PickSWWMSlot3(),PickSWWMSlot4(),2);
return PickPair('Spreadgun','Wallbuster',2);