actor BossSpawnHealthFlag : Inventory {inventory.amount 1 inventory.maxamount 30000}

actor LastSurvivorFlag : Once {}

actor Pain_PileDriver
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,5)
stop
}
}


actor Pain_ProtoBash
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,30)
stop
}
}

actor Pain_CrescentKick
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,20)
stop
}
}


actor Pain_GigaFist
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,8)
stop
}
}

actor Pain_DuoRush
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,3)
stop
}
}

actor Pain_FakeBaton
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,9)
stop
}
}


actor Pain_TimeScatter
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,50)
stop
}
}


actor ZaWarudoHaleFix
{
reactiontime 105
PROJECTILE +DONTBLAST +NOINTERACTION
states
{
Spawn:
TNT1 A 0 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 1 A_SpawnItemEx("TimeStopGFX", random(8, 64), 0, random(0, 64), 0, 0, 0, random(0, 359))
TNT1 A 0 A_JumpIfInTargetInventory("TimeStoppedCounter", 1, "Spawn")
Death:
TNT1 A 0 A_TakeFromTarget("DioFlashTimeHUD", 999) TNT1 A 0 A_GiveToTarget("TotallyFrozenOFFItem", 1)
stop}}

actor Pain_FalconKick
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,10)
stop
}
}

actor Pain_GutsManG
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,7)
stop
}
}

actor Pain_HSHBoss
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,160)
stop
}
}

actor Explosion_MWSWater
{
var int user_CRASH;
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_CRASH", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(3000,0,ACS_ExecuteWithResult(257,0),user_CRASH,10)
stop
}
}

actor PORollRageHit : BasicHitBase
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("PORollChargeHeal",1)
TNT1 A 0 A_GiveToTarget("PORollRageCharge_P",1)
stop
}
}

actor PainPlantPasture : BasicHitBase
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("PainPlantPastureHit_P",1)
stop
}
}

actor PainPlantPastureHit_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("Health",2)
stop
}
}

actor PainWilyGas : BasicHitBase
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("PainWilyGasHit_P",1)
stop
}
}

actor PainWilyGasHit_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("WilyAmmo2",3)
stop
}
}

actor Team_FailsafeVisibility : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("BAWS",1,"Nope")
TNT1 A 0 A_SetTranslucent(1.0, 0)
stop
Nope:
TNT1 A 0
stop
}
}

actor Team_FailsafeVisibility_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("Team_FailsafeVisibilityHelper")
stop
}
}

actor Team_FailsafeVisibilityHelper
{
PROJECTILE +DONTBLAST +NOINTERACTION
states
{
Spawn:
TNT1 A 0 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 1 A_GiveToTarget("Team_FailsafeVisibility",1)
TNT1 A 0 A_JumpIfInTargetInventory("PowerPreRoundProtect", 1, "Spawn")
Death:
TNT1 A 0
stop}}