actor Replacer {
    +SOLID
    +SHOOTABLE
    +NOGRAVITY
    +ISMONSTER
    +COUNTKILL
    +LOOKALLAROUND
    +FLOORCLIP
    +NOTIMEFREEZE
    Health 0x7FFFFFFF
    Mass 0x7FFFFFFF
    RenderStyle Fuzzy
    States {
    Spawn:
        TNT1 A 1 A_Look
        Loop
    See:
        TNT1 A 0 A_UnsetSolid
        TNT1 A 0 A_UnsetShootable
        TNT1 A 1 ACS_ExecuteAlways(21000, 0)
        TNT1 A 0 Thing_Remove(0)
        Stop
    }
}

actor BossReplacer : Replacer {
    States {
    See:
        TNT1 A 0 A_UnsetSolid
        TNT1 A 0 A_UnsetShootable
        TNT1 A 0 A_ChangeFlag("COUNTKILL", false)
        TNT1 A 1 ACS_ExecuteAlways(21000, 0)
        TNT1 A -1
    Death:
        TNT1 A 0 A_BossDeath
        TNT1 A 0 Thing_Remove(0)
        Stop
    }
}

actor FastMonsterInventory : CustomInventory {
    States {
    Pickup:
        TNT1 A 0 A_ChangeFlag("ALWAYSFAST", true)
        Stop
    }
}

actor ArachnotronOriginal : Arachnotron {}
actor ArachnotronReplacer : BossReplacer replaces Arachnotron {
    Radius 64
    Height 64
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        BSPI AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        BSPI BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor ArchvileOriginal : Archvile {}
actor ArchvileReplacer : Replacer replaces Archvile {
    Radius 20
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        VILE AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        VILE BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor BaronOfHellOriginal : BaronOfHell {}
actor BaronOfHellReplacer : BossReplacer replaces BaronOfHell {
    Radius 24
    Height 64
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        BOSS AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        BOSS BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor CacodemonOriginal : Cacodemon {}
actor CacodemonReplacer : Replacer replaces Cacodemon {
    Radius 31
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        HEAD AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        HEAD BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor ChaingunGuyOriginal : ChaingunGuy {}
actor ChaingunGuyReplacer : Replacer replaces ChaingunGuy {
    Radius 20
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        CPOS AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        CPOS BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor CyberdemonOriginal : Cyberdemon {}
actor CyberdemonReplacer : BossReplacer replaces Cyberdemon {
    Radius 40
    Height 110
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        CYBR AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        CYBR BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor DemonOriginal : Demon {}
actor DemonReplacer : Replacer replaces Demon {
    Radius 30
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        SARG AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        SARG BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor DoomImpOriginal : DoomImp {}
actor DoomImpReplacer : Replacer replaces DoomImp {
    Radius 20
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        TROO AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        TROO BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor FatsoOriginal : Fatso {}
actor FatsoReplacer : BossReplacer replaces Fatso {
    Radius 48
    Height 64
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        FATT AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        FATT BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor HellKnightOriginal : HellKnight {}
actor HellKnightReplacer : Replacer replaces HellKnight {
    Radius 24
    Height 64
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        BOS2 AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        BOS2 BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor LostSoulOriginal : LostSoul {}
actor LostSoulReplacer : Replacer replaces LostSoul {
    Radius 16
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        SKUL AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        SKUL BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor PainElementalOriginal : PainElemental {}
actor PainElementalReplacer : Replacer replaces PainElemental {
    Radius 31
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        PAIN AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        PAIN BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor RevenantOriginal : Revenant {}
actor RevenantReplacer : Replacer replaces Revenant {
    Radius 20
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        SKEL AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        SKEL BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor ShotgunGuyOriginal : ShotgunGuy {}
actor ShotgunGuyReplacer : Replacer replaces ShotgunGuy {
    Radius 20
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        SPOS AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        SPOS BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor SpectreOriginal : Spectre {}
actor SpectreReplacer : Replacer replaces Spectre {
    Radius 30
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        SARG AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        SARG BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor SpiderMastermindOriginal : SpiderMastermind {}
actor SpiderMastermindReplacer : BossReplacer replaces SpiderMastermind {
    Radius 128
    Height 100
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        SPID AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        SPID BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor WolfensteinSSOriginal : WolfensteinSS {}
actor WolfensteinSSReplacer : Replacer replaces WolfensteinSS {
    Radius 20
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        SSWV AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        SSWV BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor ZombieManOriginal : ZombieMan {}
actor ZombieManReplacer : Replacer replaces ZombieMan {
    Radius 20
    Height 56
    States {
    Spawn:
        TNT1 A 1
    LookLoop:
        POSS AAAAA 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        POSS BBBBB 2 A_Look
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21001), "See")
        Loop
    }
}

actor ItemReplacer {
    +NEVERRESPAWN
    +NOGRAVITY
    +NOBLOCKMAP
    +NOINTERACTION
    +NOSECTOR
    +NOTIMEFREEZE
    States {
    Spawn:
        TNT1 A 1
        TNT1 A 1 ACS_ExecuteAlways(21000, 0)
        TNT1 A -1
    }
}

actor ChainsawReplacer : ItemReplacer replaces Chainsaw {}
actor ShotgunReplacer : ItemReplacer replaces Shotgun {}
actor SuperShotgunReplacer : ItemReplacer replaces SuperShotgun {}
actor ChaingunReplacer : ItemReplacer replaces Chaingun {}
actor RocketLauncherReplacer : ItemReplacer replaces RocketLauncher {}
actor PlasmaRifleReplacer : ItemReplacer replaces PlasmaRifle {}
actor BFG9000Replacer : ItemReplacer replaces BFG9000 {}

actor BackpackReplacer : ItemReplacer replaces Backpack {}
actor CellReplacer : ItemReplacer replaces Cell {}
actor CellPackReplacer : ItemReplacer replaces CellPack {}
actor ClipReplacer : ItemReplacer replaces Clip {}
actor ClipBoxReplacer : ItemReplacer replaces ClipBox {}
actor RocketAmmoReplacer : ItemReplacer replaces RocketAmmo {}
actor RocketBoxReplacer : ItemReplacer replaces RocketBox {}
actor ShellReplacer : ItemReplacer replaces Shell {}
actor ShellBoxReplacer : ItemReplacer replaces ShellBox {}

actor AllmapReplacer : ItemReplacer replaces Allmap {}
actor ArmorBonusReplacer : ItemReplacer replaces ArmorBonus {}
actor BerserkReplacer : ItemReplacer replaces Berserk {}
actor BlueArmorReplacer : ItemReplacer replaces BlueArmor {}
actor BlurSphereReplacer : ItemReplacer replaces BlurSphere {}
actor GreenArmorReplacer : ItemReplacer replaces GreenArmor {}
actor HealthBonusReplacer : ItemReplacer replaces HealthBonus {}
actor InfraredReplacer : ItemReplacer replaces Infrared {}
actor InvulnerabilitySphereReplacer : ItemReplacer replaces InvulnerabilitySphere {}
actor MedikitReplacer : ItemReplacer replaces Medikit {}
actor MegasphereReplacer : ItemReplacer replaces Megasphere {}
actor RadSuitReplacer : ItemReplacer replaces RadSuit {}
actor SoulsphereReplacer : ItemReplacer replaces Soulsphere {}
actor StimpackReplacer : ItemReplacer replaces Stimpack {}

actor FastMonsterIndicatorSpawner {
    +CLIENTSIDEONLY
    +NOGRAVITY
    +NOBLOCKMAP
    +NOINTERACTION
    +NOTELEPORT
    +NOSECTOR
    +NOTIMEFREEZE
    States {
    Spawn:
        TNT1 A 1
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21030) == false, "LowEffect")
        TNT1 AAAAAAAA 1 A_SpawnItemEx("FastMonsterIndicator", frandom(-12.0, 12.0), frandom(-12.0, 12.0), 0.0, 0.0, 0.0, 3.0, SXF_CLIENTSIDE | SXF_NOCHECKPOSITION)
        Stop
    LowEffect:
        TNT1 AA 1 A_SpawnItemEx("FastMonsterIndicator", frandom(-12.0, 12.0), frandom(-12.0, 12.0), 0.0, 0.0, 0.0, 3.0, SXF_CLIENTSIDE | SXF_NOCHECKPOSITION)
        Stop
    }
}

actor BigFastMonsterIndicatorSpawner {
    +CLIENTSIDEONLY
    +NOGRAVITY
    +NOBLOCKMAP
    +NOINTERACTION
    +NOTELEPORT
    +NOSECTOR
    +NOTIMEFREEZE
    States {
    Spawn:
        TNT1 A 1
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21030) == false, "LowEffect")
        TNT1 AAAAAAAA 1 A_SpawnItemEx("FastMonsterIndicator", frandom(-48.0, 48.0), frandom(-48.0, 48.0), 0.0, 0.0, 0.0, 4.0, SXF_CLIENTSIDE | SXF_NOCHECKPOSITION)
        Stop
    LowEffect:
        TNT1 AA 1 A_SpawnItemEx("FastMonsterIndicator", frandom(-48.0, 48.0), frandom(-48.0, 48.0), 0.0, 0.0, 0.0, 4.0, SXF_CLIENTSIDE | SXF_NOCHECKPOSITION)
        Stop
    }
}

actor HugeFastMonsterIndicatorSpawner {
    +CLIENTSIDEONLY
    +NOGRAVITY
    +NOBLOCKMAP
    +NOINTERACTION
    +NOTELEPORT
    +NOSECTOR
    +NOTIMEFREEZE
    States {
    Spawn:
        TNT1 A 1
        TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(21030) == false, "LowEffect")
        TNT1 AAAAAAAA 1 A_SpawnItemEx("FastMonsterIndicator", frandom(-80.0, 80.0), frandom(-80.0, 80.0), 0.0, 0.0, 0.0, 5.0, SXF_CLIENTSIDE | SXF_NOCHECKPOSITION)
        Stop
    LowEffect:
        TNT1 AA 1 A_SpawnItemEx("FastMonsterIndicator", frandom(-80.0, 80.0), frandom(-80.0, 80.0), 0.0, 0.0, 0.0, 5.0, SXF_CLIENTSIDE | SXF_NOCHECKPOSITION)
        Stop
    }
}

actor FastMonsterIndicator {
    Speed 1
    Radius 0
    Height 0
    Scale 0.28
    Translation "80:111=112:127"
    RenderStyle Add
    Alpha 0.8
    +MISSILE
    +NOGRAVITY
    +NOBLOCKMAP
    +NOINTERACTION
    +NOTELEPORT
    +DONTSPLASH
    +NOTIMEFREEZE
    +CLIENTSIDEONLY
    -SOLID
    States {
    Spawn:
        FMFX A 5 Bright
        TNT1 A 0 A_Jump(128, "FadeOutFaster")
    Normal:
        FMFX AAAAAAAA 1 Bright A_FadeOut(0.05)
        Stop
    FadeOutFaster:
        FMFX AAAAAAAA 1 Bright A_FadeOut(0.075)
        Stop
    }
}

// vim: set ft=c:
