789 lines
24 KiB
Text
789 lines
24 KiB
Text
// class replacements
|
|
|
|
extend Class SWWMHandler
|
|
{
|
|
bool nugflip; // h/a nugget flip-flop spawn counter
|
|
|
|
private Class<Actor> GetDRLAReplacee( Class<Actor> a )
|
|
{
|
|
static const Name refpool[] =
|
|
{
|
|
'Zombieman',
|
|
'Shotgunguy',
|
|
'Chaingunguy',
|
|
'DoomImp',
|
|
'Demon',
|
|
'Spectre',
|
|
'LostSoul',
|
|
'Cacodemon',
|
|
'HellKnight',
|
|
'BaronOfHell',
|
|
'Arachnotron',
|
|
'PainElemental',
|
|
'Revenant',
|
|
'Fatso',
|
|
'Archvile',
|
|
'Cyberdemon',
|
|
'SpiderMastermind',
|
|
'BossEye',
|
|
'BossBrain'
|
|
};
|
|
static const Name babypool[] =
|
|
{
|
|
'RLFormerHumanPistol',
|
|
'RLFormerSergeantShotgun',
|
|
'RLFormerCommandoChaingun',
|
|
'RLImp',
|
|
'RLDemon',
|
|
'RLSpectre',
|
|
'RLLostSoul',
|
|
'RLCacodemon',
|
|
'RLHellKnight',
|
|
'RLBaronOfHell',
|
|
'RLArachnotron',
|
|
'RLPainElemental',
|
|
'RLRevenant',
|
|
'RLMancubus',
|
|
'RLArchvile',
|
|
'RLCyberdemon',
|
|
'RLSpiderMastermindVariantSpawner',
|
|
'RLEasyBossEye',
|
|
'RLBossBrain'
|
|
};
|
|
static const Name easypool[] =
|
|
{
|
|
'RLFormerHumanNoArmageddonSpawner',
|
|
'RLFormerSergeantNoArmageddonSpawner',
|
|
'RLFormerCommandoNoArmageddonSpawner',
|
|
'RLImpNoArmageddonSpawner',
|
|
'RLDemonNoArmageddonSpawner',
|
|
'RLSpectreNoArmageddonSpawner',
|
|
'RLLostSoulNoArmageddonSpawner',
|
|
'RLCacodemonNoArmageddonSpawner',
|
|
'RLHellKnightNoArmageddonSpawner',
|
|
'RLBaronOfHellNoArmageddonSpawner',
|
|
'RLArachnotronNoArmageddonSpawner',
|
|
'RLPainElementalNoArmageddonSpawner',
|
|
'RLRevenantNoArmageddonSpawner',
|
|
'RLMancubusNoArmageddonSpawner',
|
|
'RLArchvileNoArmageddonSpawner',
|
|
'RLCyberdemonNoArmageddonSpawner',
|
|
'RLSpiderMastermindNoArmageddonSpawner',
|
|
'RLBossEye',
|
|
'RLBossBrain'
|
|
};
|
|
static const Name normalpool[] =
|
|
{
|
|
'RLFormerHumanNoArmageddonSpawner',
|
|
'RLFormerSergeantNoArmageddonSpawner',
|
|
'RLFormerCommandoNoArmageddonSpawner',
|
|
'RLImpNoArmageddonSpawner',
|
|
'RLDemonNoArmageddonSpawner',
|
|
'RLSpectreNoArmageddonSpawner',
|
|
'RLLostSoulNoArmageddonSpawner',
|
|
'RLCacodemonNoArmageddonSpawner',
|
|
'RLHellKnightNoArmageddonSpawner',
|
|
'RLBaronOfHellNoArmageddonSpawner',
|
|
'RLArachnotronNoArmageddonSpawner',
|
|
'RLPainElementalNoArmageddonSpawner',
|
|
'RLRevenantNoArmageddonSpawner',
|
|
'RLMancubusNoArmageddonSpawner',
|
|
'RLArchvileNoArmageddonSpawner',
|
|
'RLCyberdemonNoArmageddonSpawner',
|
|
'RLSpiderMastermindNoArmageddonSpawner',
|
|
'RLBossEye',
|
|
'RLBossBrain'
|
|
};
|
|
static const Name hardpool[] =
|
|
{
|
|
'RLFormerHumanSpawner',
|
|
'RLFormerSergeantSpawner',
|
|
'RLFormerCommandoSpawner',
|
|
'RLImpSpawner',
|
|
'RLDemonSpawner',
|
|
'RLSpectreSpawner',
|
|
'RLLostSoulSpawner',
|
|
'RLCacodemonSpawner',
|
|
'RLHellKnightSpawner',
|
|
'RLBaronOfHellSpawner',
|
|
'RLArachnotronSpawner',
|
|
'RLPainElementalSpawner',
|
|
'RLRevenantSpawner',
|
|
'RLMancubusSpawner',
|
|
'RLArchvileSpawner',
|
|
'RLCyberdemonSpawner',
|
|
'RLSpiderMastermindSpawner',
|
|
'RLUVBossEye',
|
|
'RLBossBrain'
|
|
};
|
|
static const Name nightmarepool[] =
|
|
{
|
|
'RLEliteFormerHumanSpawner',
|
|
'RLEliteFormerSergeantSpawner',
|
|
'RLEliteFormerCommandoSpawner',
|
|
'RLNightmareImp',
|
|
'RLNightmareDemon',
|
|
'RLNightmareSpectre',
|
|
'RLNightmareLostSoul',
|
|
'RLNightmareCacodemon',
|
|
'RLNightmareHellKnight',
|
|
'RLNightmareBaronOfHell',
|
|
'RLNightmareArachnotron',
|
|
'RLNightmarePainElemental',
|
|
'RLNightmareRevenant',
|
|
'RLNightmareMancubus',
|
|
'RLNightmareArchvile',
|
|
'RLNightmareCyberdemonSpawner',
|
|
'RLNightmareSpiderMastermindSpawner',
|
|
'RLNightmareBossEye',
|
|
'RLNightmareBossBrain'
|
|
};
|
|
static const Name technophobiapool[] =
|
|
{
|
|
'RLFormerCyborgBattleRifle',
|
|
'RLFormerCyborgBattleRifle',
|
|
'RLFormerCyborgBattleRifle',
|
|
'RLCyberneticImp',
|
|
'RLCyberneticDemon',
|
|
'RLCyberneticSpectre',
|
|
'RLCyberneticLostSoul',
|
|
'RLCacodemon',
|
|
'RLCyberneticHellKnight',
|
|
'RLCyberneticBaronOfHell',
|
|
'RLCyberneticArachnotron',
|
|
'RLCyberneticPainElemental',
|
|
'RLCyberneticRevenant',
|
|
'RLCyberneticMancubus',
|
|
'RLCyberneticArchvile',
|
|
'RLCyberneticCyberdemonSpawner',
|
|
'RLCyberneticSpiderMastermindSpawner',
|
|
'RLTechnophobiaBossEye',
|
|
'RLTechnophobiaBossBrain'
|
|
};
|
|
static const Name armageddonpool[] =
|
|
{
|
|
'RLFormerAssaultTrooper',
|
|
'RLFormerOverwatch',
|
|
'RLFormerShocktrooper',
|
|
'RLArmageddonImp',
|
|
'RLArmageddonDemon',
|
|
'RLArmageddonSpectreSpawner',
|
|
'RLTheHungrySpawner',
|
|
'RLArmageddonCacodemon',
|
|
'RLArmageddonHellKnightSpawner',
|
|
'RLArmageddonBaronOfHell',
|
|
'RLArmageddonArachnotron',
|
|
'RLArmageddonPainElemental',
|
|
'RLArmageddonRevenant',
|
|
'RLArmageddonMancubus',
|
|
'RLArmageddonArchvileSpawner',
|
|
'RLArmageddonCyberdemonSpawner',
|
|
'RLArmageddonSpiderMastermindSpawner',
|
|
'RLArmageddonBossEye',
|
|
'RLArmageddonBossBrain'
|
|
};
|
|
static const Name adaptivepool[] =
|
|
{
|
|
'RLAdaptiveFormerHuman',
|
|
'RLAdaptiveFormerSergeant',
|
|
'RLAdaptiveFormerCommando',
|
|
'RLAdaptiveImp',
|
|
'RLAdaptiveDemon',
|
|
'RLAdaptiveSpectre',
|
|
'RLAdaptiveLostSoul',
|
|
'RLAdaptiveCacodemon',
|
|
'RLAdaptiveHellKnight',
|
|
'RLAdaptiveBaronOfHell',
|
|
'RLAdaptiveArachnotron',
|
|
'RLAdaptivePainElemental',
|
|
'RLAdaptiveRevenant',
|
|
'RLAdaptiveMancubus',
|
|
'RLAdaptiveArchvile',
|
|
'RLAdaptiveCyberdemon',
|
|
'RLAdaptiveSpiderMastermind',
|
|
'RLUVBossEye',
|
|
'RLBossBrain'
|
|
};
|
|
switch ( swwm_drlaskill )
|
|
{
|
|
case 0:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == babypool[i]) ) continue;
|
|
return refpool[i];
|
|
}
|
|
break;
|
|
case 1:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == easypool[i]) ) continue;
|
|
return refpool[i];
|
|
}
|
|
break;
|
|
case 2:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == normalpool[i]) ) continue;
|
|
return refpool[i];
|
|
}
|
|
break;
|
|
case 3:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == hardpool[i]) ) continue;
|
|
return refpool[i];
|
|
}
|
|
break;
|
|
case 4:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == nightmarepool[i]) ) continue;
|
|
return refpool[i];
|
|
}
|
|
break;
|
|
case 5:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == technophobiapool[i]) ) continue;
|
|
return refpool[i];
|
|
}
|
|
break;
|
|
case 6:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == armageddonpool[i]) ) continue;
|
|
return refpool[i];
|
|
}
|
|
break;
|
|
case 7:
|
|
default:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == adaptivepool[i]) ) continue;
|
|
return refpool[i];
|
|
}
|
|
break;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
private Class<Actor> GetLOBReplacee( Class<Actor> a )
|
|
{
|
|
static const Name refpool[] =
|
|
{
|
|
'Zombieman',
|
|
'Shotgunguy',
|
|
'Chaingunguy',
|
|
'DoomImp',
|
|
'Demon',
|
|
'Spectre',
|
|
'Cacodemon',
|
|
'HellKnight',
|
|
'BaronOfHell',
|
|
'Revenant',
|
|
'Fatso',
|
|
'Arachnotron',
|
|
'Archvile'
|
|
};
|
|
static const Name reppool[] =
|
|
{
|
|
'LOBZombieman',
|
|
'LOBShotgunguy',
|
|
'LOBChaingunguy',
|
|
'LOBDoomImp',
|
|
'LOBDemon',
|
|
'LOBSpectre',
|
|
'LOBCacodemon',
|
|
'LOBHellKnight',
|
|
'LOBBaronOfHell',
|
|
'LOBRevenant',
|
|
'LOBFatso',
|
|
'LOBArachnotron',
|
|
'LOBArchvile'
|
|
};
|
|
for ( int i=0; i<13; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == reppool[i]) ) continue;
|
|
return refpool[i];
|
|
}
|
|
return null;
|
|
}
|
|
|
|
override void CheckReplacee( ReplacedEvent e )
|
|
{
|
|
if ( profiling ) ProfileTick();
|
|
// these are all needed so boss deaths work
|
|
if ( e.Replacement is 'DSparilHax' )
|
|
e.Replacee = 'Sorcerer2';
|
|
// legacy of rust funkytimes
|
|
else if ( e.Replacement is 'ID24TyrantBoss1' )
|
|
e.Replacee = 'Deh_Actor_156';
|
|
else if ( e.Replacement is 'ID24TyrantBoss2' )
|
|
e.Replacee = 'Deh_Actor_157';
|
|
// LOB 'double death' stuff
|
|
if ( haslegionofbones && swwm_lobdoubled )
|
|
{
|
|
let rep = GetLOBReplacee(e.Replacement);
|
|
if ( rep )
|
|
{
|
|
e.Replacee = rep;
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEE);
|
|
return;
|
|
}
|
|
}
|
|
// drla stuff
|
|
if ( !hasdrlamonsters )
|
|
{
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEE);
|
|
return;
|
|
}
|
|
let rep = GetDRLAReplacee(e.Replacement);
|
|
if ( rep ) e.Replacee = rep;
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEE);
|
|
}
|
|
|
|
private Class<Actor> GetDRLAReplacement( Class<Actor> a )
|
|
{
|
|
static const Name refpool[] =
|
|
{
|
|
'Zombieman',
|
|
'Shotgunguy',
|
|
'Chaingunguy',
|
|
'DoomImp',
|
|
'Demon',
|
|
'Spectre',
|
|
'LostSoul',
|
|
'Cacodemon',
|
|
'HellKnight',
|
|
'BaronOfHell',
|
|
'Arachnotron',
|
|
'PainElemental',
|
|
'Revenant',
|
|
'Fatso',
|
|
'Archvile',
|
|
'Cyberdemon',
|
|
'SpiderMastermind',
|
|
'BossEye',
|
|
'BossBrain'
|
|
};
|
|
static const Name babypool[] =
|
|
{
|
|
'RLFormerHumanPistol',
|
|
'RLFormerSergeantShotgun',
|
|
'RLFormerCommandoChaingun',
|
|
'RLImp',
|
|
'RLDemon',
|
|
'RLSpectre',
|
|
'RLLostSoul',
|
|
'RLCacodemon',
|
|
'RLHellKnight',
|
|
'RLBaronOfHell',
|
|
'RLArachnotron',
|
|
'RLPainElemental',
|
|
'RLRevenant',
|
|
'RLMancubus',
|
|
'RLArchvile',
|
|
'RLCyberdemon',
|
|
'RLSpiderMastermindVariantSpawner',
|
|
'RLEasyBossEye',
|
|
'RLBossBrain'
|
|
};
|
|
static const Name easypool[] =
|
|
{
|
|
'RLFormerHumanNoArmageddonSpawner',
|
|
'RLFormerSergeantNoArmageddonSpawner',
|
|
'RLFormerCommandoNoArmageddonSpawner',
|
|
'RLImpNoArmageddonSpawner',
|
|
'RLDemonNoArmageddonSpawner',
|
|
'RLSpectreNoArmageddonSpawner',
|
|
'RLLostSoulNoArmageddonSpawner',
|
|
'RLCacodemonNoArmageddonSpawner',
|
|
'RLHellKnightNoArmageddonSpawner',
|
|
'RLBaronOfHellNoArmageddonSpawner',
|
|
'RLArachnotronNoArmageddonSpawner',
|
|
'RLPainElementalNoArmageddonSpawner',
|
|
'RLRevenantNoArmageddonSpawner',
|
|
'RLMancubusNoArmageddonSpawner',
|
|
'RLArchvileNoArmageddonSpawner',
|
|
'RLCyberdemonNoArmageddonSpawner',
|
|
'RLSpiderMastermindNoArmageddonSpawner',
|
|
'RLBossEye',
|
|
'RLBossBrain'
|
|
};
|
|
static const Name normalpool[] =
|
|
{
|
|
'RLFormerHumanNoArmageddonSpawner',
|
|
'RLFormerSergeantNoArmageddonSpawner',
|
|
'RLFormerCommandoNoArmageddonSpawner',
|
|
'RLImpNoArmageddonSpawner',
|
|
'RLDemonNoArmageddonSpawner',
|
|
'RLSpectreNoArmageddonSpawner',
|
|
'RLLostSoulNoArmageddonSpawner',
|
|
'RLCacodemonNoArmageddonSpawner',
|
|
'RLHellKnightNoArmageddonSpawner',
|
|
'RLBaronOfHellNoArmageddonSpawner',
|
|
'RLArachnotronNoArmageddonSpawner',
|
|
'RLPainElementalNoArmageddonSpawner',
|
|
'RLRevenantNoArmageddonSpawner',
|
|
'RLMancubusNoArmageddonSpawner',
|
|
'RLArchvileNoArmageddonSpawner',
|
|
'RLCyberdemonNoArmageddonSpawner',
|
|
'RLSpiderMastermindNoArmageddonSpawner',
|
|
'RLBossEye',
|
|
'RLBossBrain'
|
|
};
|
|
static const Name hardpool[] =
|
|
{
|
|
'RLFormerHumanSpawner',
|
|
'RLFormerSergeantSpawner',
|
|
'RLFormerCommandoSpawner',
|
|
'RLImpSpawner',
|
|
'RLDemonSpawner',
|
|
'RLSpectreSpawner',
|
|
'RLLostSoulSpawner',
|
|
'RLCacodemonSpawner',
|
|
'RLHellKnightSpawner',
|
|
'RLBaronOfHellSpawner',
|
|
'RLArachnotronSpawner',
|
|
'RLPainElementalSpawner',
|
|
'RLRevenantSpawner',
|
|
'RLMancubusSpawner',
|
|
'RLArchvileSpawner',
|
|
'RLCyberdemonSpawner',
|
|
'RLSpiderMastermindSpawner',
|
|
'RLUVBossEye',
|
|
'RLBossBrain'
|
|
};
|
|
static const Name nightmarepool[] =
|
|
{
|
|
'RLEliteFormerHumanSpawner',
|
|
'RLEliteFormerSergeantSpawner',
|
|
'RLEliteFormerCommandoSpawner',
|
|
'RLNightmareImp',
|
|
'RLNightmareDemon',
|
|
'RLNightmareSpectre',
|
|
'RLNightmareLostSoul',
|
|
'RLNightmareCacodemon',
|
|
'RLNightmareHellKnight',
|
|
'RLNightmareBaronOfHell',
|
|
'RLNightmareArachnotron',
|
|
'RLNightmarePainElemental',
|
|
'RLNightmareRevenant',
|
|
'RLNightmareMancubus',
|
|
'RLNightmareArchvile',
|
|
'RLNightmareCyberdemonSpawner',
|
|
'RLNightmareSpiderMastermindSpawner',
|
|
'RLNightmareBossEye',
|
|
'RLNightmareBossBrain'
|
|
};
|
|
static const Name technophobiapool[] =
|
|
{
|
|
'RLFormerCyborgBattleRifle',
|
|
'RLFormerCyborgBattleRifle',
|
|
'RLFormerCyborgBattleRifle',
|
|
'RLCyberneticImp',
|
|
'RLCyberneticDemon',
|
|
'RLCyberneticSpectre',
|
|
'RLCyberneticLostSoul',
|
|
'RLCacodemon',
|
|
'RLCyberneticHellKnight',
|
|
'RLCyberneticBaronOfHell',
|
|
'RLCyberneticArachnotron',
|
|
'RLCyberneticPainElemental',
|
|
'RLCyberneticRevenant',
|
|
'RLCyberneticMancubus',
|
|
'RLCyberneticArchvile',
|
|
'RLCyberneticCyberdemonSpawner',
|
|
'RLCyberneticSpiderMastermindSpawner',
|
|
'RLTechnophobiaBossEye',
|
|
'RLTechnophobiaBossBrain'
|
|
};
|
|
static const Name armageddonpool[] =
|
|
{
|
|
'RLFormerAssaultTrooper',
|
|
'RLFormerOverwatch',
|
|
'RLFormerShocktrooper',
|
|
'RLArmageddonImp',
|
|
'RLArmageddonDemon',
|
|
'RLArmageddonSpectreSpawner',
|
|
'RLTheHungrySpawner',
|
|
'RLArmageddonCacodemon',
|
|
'RLArmageddonHellKnightSpawner',
|
|
'RLArmageddonBaronOfHell',
|
|
'RLArmageddonArachnotron',
|
|
'RLArmageddonPainElemental',
|
|
'RLArmageddonRevenant',
|
|
'RLArmageddonMancubus',
|
|
'RLArmageddonArchvileSpawner',
|
|
'RLArmageddonCyberdemonSpawner',
|
|
'RLArmageddonSpiderMastermindSpawner',
|
|
'RLArmageddonBossEye',
|
|
'RLArmageddonBossBrain'
|
|
};
|
|
static const Name adaptivepool[] =
|
|
{
|
|
'RLAdaptiveFormerHuman',
|
|
'RLAdaptiveFormerSergeant',
|
|
'RLAdaptiveFormerCommando',
|
|
'RLAdaptiveImp',
|
|
'RLAdaptiveDemon',
|
|
'RLAdaptiveSpectre',
|
|
'RLAdaptiveLostSoul',
|
|
'RLAdaptiveCacodemon',
|
|
'RLAdaptiveHellKnight',
|
|
'RLAdaptiveBaronOfHell',
|
|
'RLAdaptiveArachnotron',
|
|
'RLAdaptivePainElemental',
|
|
'RLAdaptiveRevenant',
|
|
'RLAdaptiveMancubus',
|
|
'RLAdaptiveArchvile',
|
|
'RLAdaptiveCyberdemon',
|
|
'RLAdaptiveSpiderMastermind',
|
|
'RLUVBossEye',
|
|
'RLBossBrain'
|
|
};
|
|
switch ( swwm_drlaskill )
|
|
{
|
|
case 0:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == refpool[i]) ) continue;
|
|
return babypool[i];
|
|
}
|
|
break;
|
|
case 1:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == refpool[i]) ) continue;
|
|
return easypool[i];
|
|
}
|
|
break;
|
|
case 2:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == refpool[i]) ) continue;
|
|
return normalpool[i];
|
|
}
|
|
break;
|
|
case 3:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == refpool[i]) ) continue;
|
|
return hardpool[i];
|
|
}
|
|
break;
|
|
case 4:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == refpool[i]) ) continue;
|
|
return nightmarepool[i];
|
|
}
|
|
break;
|
|
case 5:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == refpool[i]) ) continue;
|
|
return technophobiapool[i];
|
|
}
|
|
break;
|
|
case 6:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == refpool[i]) ) continue;
|
|
return armageddonpool[i];
|
|
}
|
|
break;
|
|
case 7:
|
|
default:
|
|
for ( int i=0; i<18; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == refpool[i]) ) continue;
|
|
return adaptivepool[i];
|
|
}
|
|
break;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
private Class<Actor> GetLOBReplacement( Class<Actor> a )
|
|
{
|
|
static const Name refpool[] =
|
|
{
|
|
'Zombieman',
|
|
'Shotgunguy',
|
|
'Chaingunguy',
|
|
'DoomImp',
|
|
'Demon',
|
|
'Spectre',
|
|
'Cacodemon',
|
|
'HellKnight',
|
|
'BaronOfHell',
|
|
'Revenant',
|
|
'Fatso',
|
|
'Arachnotron',
|
|
'Archvile'
|
|
};
|
|
static const Name reppool[] =
|
|
{
|
|
'LOBZombieman',
|
|
'LOBShotgunguy',
|
|
'LOBChaingunguy',
|
|
'LOBDoomImp',
|
|
'LOBDemon',
|
|
'LOBSpectre',
|
|
'LOBCacodemon',
|
|
'LOBHellKnight',
|
|
'LOBBaronOfHell',
|
|
'LOBRevenant',
|
|
'LOBFatso',
|
|
'LOBArachnotron',
|
|
'LOBArchvile'
|
|
};
|
|
for ( int i=0; i<13; i++ )
|
|
{
|
|
if ( !(a.GetClassName() == refpool[i]) ) continue;
|
|
return reppool[i];
|
|
}
|
|
return null;
|
|
}
|
|
|
|
override void CheckReplacement( ReplaceEvent e )
|
|
{
|
|
if ( profiling ) ProfileTick();
|
|
// respect final replacements
|
|
if ( e.IsFinal )
|
|
{
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEMENT);
|
|
return;
|
|
}
|
|
// DRLA Monsters stuff
|
|
if ( hasdrlamonsters )
|
|
{
|
|
let rep = GetDRLAReplacement(e.Replacee);
|
|
if ( rep )
|
|
{
|
|
e.Replacement = rep;
|
|
e.IsFinal = true;
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEMENT);
|
|
return;
|
|
}
|
|
}
|
|
// LOB 'double death' stuff
|
|
if ( haslegionofbones && swwm_lobdoubled )
|
|
{
|
|
let rep = GetLOBReplacement(e.Replacee);
|
|
if ( rep )
|
|
{
|
|
e.Replacement = rep;
|
|
e.IsFinal = true;
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEMENT);
|
|
return;
|
|
}
|
|
}
|
|
if ( (e.Replacee is 'Blood') || (bludtypes.Find(e.Replacee.GetClassName()) < bludtypes.Size()) ) e.Replacement = 'mkBlood';
|
|
else if ( e.Replacee is 'ItemFog' ) e.Replacement = 'SWWMItemFog';
|
|
else if ( e.Replacee is 'TeleportFog' ) e.Replacement = 'SWWMTeleportFog';
|
|
else if ( (e.Replacee is 'CommanderKeen') && (!e.Replacement || (e.Replacement == 'CommanderKeen')) )
|
|
{
|
|
if ( SWWMUtility.CheckDehackery(e.Replacee) )
|
|
{
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEMENT);
|
|
return;
|
|
}
|
|
e.Replacement = 'SWWMHangingKeen';
|
|
}
|
|
else if ( (e.Replacee is 'BossBrain') && (!e.Replacement || (e.Replacement == 'BossBrain')) )
|
|
{
|
|
if ( SWWMUtility.CheckDehackery(e.Replacee) )
|
|
{
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEMENT);
|
|
return;
|
|
}
|
|
e.Replacement = 'SWWMBossBrain';
|
|
}
|
|
else if ( (e.Replacee is 'RedCard') && !(e.Replacee is 'ChexRedCard') )
|
|
{
|
|
if ( level.GetChecksum() ~== "3805A661D5C4523AFF7BF86991071043" )
|
|
{
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEMENT);
|
|
return; // don't replace red key in Equinox MAP13
|
|
}
|
|
e.Replacement = 'SWWMRedCard';
|
|
}
|
|
else if ( (e.Replacee is 'BlueCard') && !(e.Replacee is 'ChexBlueCard') ) e.Replacement = 'SWWMBlueCard';
|
|
else if ( (e.Replacee is 'YellowCard') && !(e.Replacee is 'ChexYellowCard') ) e.Replacement = 'SWWMYellowCard';
|
|
else if ( e.Replacee.GetClassName() == 'GreenCard' ) e.Replacement = 'SWWMGreenCard';
|
|
else if ( e.Replacee.GetClassName() == 'RedSkullFake' ) e.Replacement = 'SWWMFakeRedSkull';
|
|
else if ( e.Replacee.GetClassName() == 'BlueSkullFake' ) e.Replacement = 'SWWMFakeBlueSkull';
|
|
else if ( e.Replacee.GetClassName() == 'YellowSkullFake' ) e.Replacement = 'SWWMFakeYellowSkull';
|
|
else if ( e.Replacee.GetClassName() == 'PurpleSkullFake' ) e.Replacement = 'SWWMFakePurpleSkull';
|
|
else if ( e.Replacee is 'RedSkull' ) e.Replacement = iskdizd?'SWWMSilverCardKDiZD':'SWWMRedSkull';
|
|
else if ( e.Replacee is 'BlueSkull' ) e.Replacement = iskdizd?'SWWMGreenCardKDiZD':'SWWMBlueSkull';
|
|
else if ( e.Replacee is 'YellowSkull' ) e.Replacement = iskdizd?'SWWMOrangeCardKDiZD':'SWWMYellowSkull';
|
|
else if ( e.Replacee.GetClassName() == 'PurpleSkull' ) e.Replacement = 'SWWMPurpleSkull';
|
|
else if ( e.Replacee is 'KeyGreen' ) e.Replacement = 'SWWMKeyGreen';
|
|
else if ( e.Replacee is 'KeyBlue' ) e.Replacement = 'SWWMKeyBlue';
|
|
else if ( e.Replacee is 'KeyYellow' ) e.Replacement = 'SWWMKeyYellow';
|
|
else if ( e.Replacee.GetClassName() == 'KeyRed' ) e.Replacement = 'SWWMKeyRed';
|
|
else if ( (e.Replacee is 'Chainsaw') || (e.Replacee is 'Gauntlets') || (e.Replacee is 'FWeapAxe') ) e.Replacement = SWWMUtility.IsEviternityTwo()?SWWMUtility.PickSWWMSlot0():SWWMUtility.PickSWWMSlot1();
|
|
else if ( (e.Replacee.GetClassName() == 'Perforator') && SWWMUtility.IsEviternityTwo() ) SWWMUtility.PickSWWMSlot0(); // Eviternity 2
|
|
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.Replacement = SWWMUtility.PickSWWMSlot2();
|
|
else if ( (e.Replacee is 'Shotgun') || (e.Replacee is 'CWeapStaff') ) e.Replacement = SWWMUtility.IsDoomOne()?SWWMUtility.PickDoomSlot3():SWWMUtility.PickSWWMSlot3();
|
|
else if ( (e.Replacee is 'SuperShotgun') || (e.Replacee is 'MWeapFrost') ) e.Replacement = SWWMUtility.PickSWWMSlot4();
|
|
else if ( e.Replacee is 'Crossbow' ) e.Replacement = SWWMUtility.PickDoomSlot3();
|
|
else if ( (e.Replacee is 'Chaingun') || (e.Replacee is 'Blaster') || (e.Replacee is 'FWeaponPiece3') ) e.Replacement = SWWMUtility.PickSWWMSlot5();
|
|
else if ( (e.Replacee is 'RocketLauncher') || (e.Replacee is 'PhoenixRod') || (e.Replacee is 'FWeapHammer') ) e.Replacement = SWWMUtility.PickSWWMSlot6();
|
|
else if ( (e.Replacee is 'PlasmaRifle') || (e.Replacee is 'ID24Incinerator') || (e.Replacee is 'SkullRod') ) e.Replacement = SWWMUtility.PickDoomSlot6();
|
|
else if ( e.Replacee is 'CWeapFlame' ) e.Replacement = SWWMUtility.PickSWWMSlot7();
|
|
else if ( e.Replacee is 'MWeapLightning' ) e.Replacement = SWWMUtility.PickSWWMSlot8();
|
|
else if ( (e.Replacee is 'BFG9000') || (e.Replacee is 'ID24CalamityBlade') || (e.Replacee is 'Mace') ) e.Replacement = SWWMUtility.PickDoomSlot7();
|
|
else if ( e.Replacee is 'CWeaponPiece2' ) e.Replacement = SWWMUtility.PickSWWMSlot9();
|
|
else if ( e.Replacee is 'MWeaponPiece1' ) e.Replacement = SWWMUtility.PickSWWMSlot0();
|
|
else if ( (e.Replacee is 'ShellBox') || (e.Replacee is 'CrossbowHefty') ) e.Replacement = 'SWWMShellAmmoBig';
|
|
else if ( (e.Replacee is 'Shell') || (e.Replacee is 'CrossbowAmmo') ) e.Replacement = 'SWWMShellAmmoSmall';
|
|
else if ( e.Replacee is 'ClipBox' ) e.Replacement = 'SWWMClipAmmoBig';
|
|
else if ( (e.Replacee is 'Clip') || (e.Replacee is 'GoldWandAmmo') ) e.Replacement = 'SWWMClipAmmoSmall';
|
|
else if ( e.Replacee is 'BlasterHefty' ) e.Replacement = 'SWWMBlastAmmoBig';
|
|
else if ( e.Replacee is 'BlasterAmmo' ) e.Replacement = 'SWWMBlastAmmoSmall';
|
|
else if ( (e.Replacee is 'RocketBox') || (e.Replacee is 'PhoenixRodHefty') || (e.Replacee is 'MaceHefty') ) e.Replacement = 'SWWMRocketAmmoBig';
|
|
else if ( (e.Replacee is 'RocketAmmo') || (e.Replacee is 'PhoenixRodAmmo') || (e.Replacee is 'MaceAmmo') ) e.Replacement = 'SWWMRocketAmmoSmall';
|
|
else if ( (e.Replacee is 'CellPack') || (e.Replacee is 'ID24FuelTank') || (e.Replacee is 'SkullRodHefty') ) e.Replacement = 'SWWMCellAmmoBig';
|
|
else if ( (e.Replacee is 'Cell') || (e.Replacee is 'ID24Fuel') || (e.Replacee is 'SkullRodAmmo') ) e.Replacement = 'SWWMCellAmmoSmall';
|
|
else if ( e.Replacee is 'Mana1' ) e.Replacement = 'FabricatorTier1';
|
|
else if ( e.Replacee is 'Mana2' ) e.Replacement = 'FabricatorTier2';
|
|
else if ( e.Replacee is 'Mana3' ) e.Replacement = 'FabricatorTier3';
|
|
else if ( e.Replacee is 'ArtiBoostMana' ) e.Replacement = 'FabricatorTier4';
|
|
else if ( (e.Replacee is 'Backpack') || (e.Replacee is 'BagOfHolding')
|
|
|| (e.Replacee is 'FWeaponPiece1') || (e.Replacee is 'FWeaponPiece2')
|
|
|| (e.Replacee is 'CWeaponPiece1') || (e.Replacee is 'CWeaponPiece3')
|
|
|| (e.Replacee is 'MWeaponPiece2') || (e.Replacee is 'MWeaponPiece3') ) e.Replacement = 'HammerspaceEmbiggener';
|
|
else if ( e.Replacee is 'ArmorBonus' ) e.Replacement = 'ArmorNuggetItem';
|
|
else if ( e.Replacee is 'HealthBonus' ) e.Replacement = 'HealthNuggetItem';
|
|
else if ( (e.Replacee is 'ArtiTimeBomb') || (e.Replacee is 'ArtiBlastRadius') || (e.Replacee is 'ArtiPoisonBag') || (e.Replacee is 'ArtiHealingRadius') ) e.Replacement = (nugflip=!nugflip)?'HealthNuggetItem':'ArmorNuggetItem';
|
|
else if ( (e.Replacee is 'Stimpack') || (e.Replacee is 'CrystalVial') ) e.Replacement = 'TetraHealthItem';
|
|
else if ( (e.Replacee is 'Medikit') || (e.Replacee is 'ArtiHealth') ) e.Replacement = 'CubeHealthItem';
|
|
else if ( (e.Replacee is 'Soulsphere') || (e.Replacee is 'ArtiSuperHealth') ) e.Replacement = 'RefresherItem';
|
|
else if ( (e.Replacee is 'Megasphere') || (e.Replacee is 'ArtiEgg') || (e.Replacee is 'ArtiBoostArmor') ) e.Replacement = (deathmatch||Random[Replacements](0,3)||SWWMUtility.ItemExists('DivineSprite',worldonly:true)||!SWWMUtility.CheckNeedsItem('DivineSprite',true))?'GrilledCheeseSandwich':'DivineSprite';
|
|
else if ( (e.Replacee is 'Blursphere') || (e.Replacee is 'ArtiInvisibility') ) e.Replacement = (deathmatch||Random[Replacements](0,2)||SWWMUtility.ItemExists('Mykradvo',worldonly:true)||!SWWMUtility.CheckNeedsItem('Mykradvo',true))?'GhostArtifact':'Mykradvo';
|
|
else if ( e.Replacee is 'Radsuit' ) e.Replacement = 'EBarrier';
|
|
else if ( (e.Replacee is 'ArtiFly') ) e.Replacement = 'GravitySuppressor';
|
|
else if ( (e.Replacee is 'InvulnerabilitySphere') || (e.Replacee is 'ArtiInvulnerability') || (e.Replacee is 'ArtiInvulnerability2') ) e.Replacement = (deathmatch||Random[Replacements](0,3)||SWWMUtility.ItemExists('Mykradvo',worldonly:true)||!SWWMUtility.CheckNeedsItem('Mykradvo',true))?'FuckingInvinciball':'Mykradvo';
|
|
else if ( (e.Replacee is 'Berserk') || (e.Replacee == 'ArtiTomeOfPower') || (e.Replacee == 'ArtiSpeedBoots') ) e.Replacement = (deathmatch||Random[Replacements](0,2)||SWWMUtility.ItemExists('AngerySigil',worldonly:true)||!SWWMUtility.CheckNeedsItem('AngerySigil',true))?'Ragekit':'AngerySigil';
|
|
else if ( (e.Replacee is 'AllMap') || (e.Replacee is 'SuperMap') ) e.Replacement = 'Omnisight';
|
|
else if ( (e.Replacee is 'Infrared') || (e.Replacee is 'ArtiTorch') ) e.Replacement = 'SWWMLamp';
|
|
else if ( (e.Replacee is 'GreenArmor') || (e.Replacee is 'SilverShield') || (e.Replacee is 'PlatinumHelm') || (e.Replacee is 'AmuletOfWarding') ) e.Replacement = 'BlastSuitItem';
|
|
else if ( (e.Replacee is 'BlueArmor') || (e.Replacee is 'EnchantedShield') || (e.Replacee is 'MeshArmor') || (e.Replacee is 'FalconShield') ) e.Replacement = 'WarArmorItem';
|
|
else if ( (e.Replacee is 'ArtiDarkServant') || (e.Replacee == 'ArtiTeleportOther') || (e.Replacee == 'ArtiPork') ) e.Replacement = 'ChanceboxSpawner';
|
|
else if ( e.Replacee is 'ArtiTeleport' ) e.Replacement = 'SafetyTether';
|
|
else
|
|
{
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEMENT);
|
|
return;
|
|
}
|
|
// this last part is kind of ugly, but it works
|
|
// guarantees that OUR replacements are all final
|
|
e.IsFinal = true;
|
|
if ( profiling ) ProfileTock(PT_CHECKREPLACEMENT);
|
|
}
|
|
}
|