Actor PowerPreRoundProtect : PowerProtection{powerup.duration -3 damagefactor "Normal", 0.0}

actor NoOneGetsHurt : PowerupGiver
{
+COUNTITEM
+INVENTORY.AUTOACTIVATE
+INVENTORY.ALWAYSPICKUP
Inventory.MaxAmount 1
Powerup.Type "PowerNOONEGETSHURTBUTTHEBOSS"
States
{
Spawn:
TNT1 A 1
Loop
}
}

actor SuperEffectiveSound : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/SuperEffective", "SoundSlot6")
stop
}
}

actor NotEffectiveSound : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/NotEffective", "SoundSlot6")
stop
}
}

actor PowerNOONEGETSHURTBUTTHEBOSS : PowerProtection
{
Powerup.Duration 0x7FFFFFFF
damagefactor "Peekaboo", 1.0
damagefactor "Scared", 1.0
damagefactor "CaveStory", 1.0
damagefactor "Clone", 1.0
damagefactor "instagib", 1.0
damagefactor "Dummy", 0.0
damagefactor "RollBuster", 0.0
damagefactor "BlockDropper", 0.0
damagefactor "PileDriver", 0.0
damagefactor "Buster", 0.0
damagefactor "EddieBomber", 0.0
damagefactor "Reggae", 0.0
damagefactor "SkullBarrier", 0.0
damagefactor "WireAdaptor", 0.0
damagefactor "MegaBuster", 0.0
damagefactor "ProtoBuster", 0.0
damagefactor "ProtoBuster2", 0.0
damagefactor "ProtoBash", 0.0
damagefactor "BassCrescentKick", 0.0
damagefactor "ProtoBuster3", 0.0
damagefactor "BassBuster", 0.0
damagefactor "SuperAdaptor", 0.0
damagefactor "DuoFist1", 0.0
damagefactor "DuoFist2", 0.0
damagefactor "DuoFist3", 0.0
damagefactor "TimeStopper", 0.0
damagefactor "ChargeBuster", 0.0
damagefactor "LaserBuster", 0.0
damagefactor "ArrowBuster", 0.0
damagefactor "Beat", 0.0
damagefactor "Treble", 0.0
damagefactor "Tango", 0.0
damagefactor "RollingCutter", 0.0
damagefactor "SuperArm", 0.0
damagefactor "ThunderBeam", 0.0
damagefactor "OilSlider", 0.0
damagefactor "OilFlame", 0.0
damagefactor "TimeSlow", 0.0
damagefactor "FireStorm", 0.0
damagefactor "FireSpin", 0.0
damagefactor "HyperBomb", 0.0
damagefactor "IceSlasher", 0.0
damagefactor "AirShooter", 0.0
damagefactor "AtomicFire1", 0.0
damagefactor "AtomicFire2", 0.0
damagefactor "AtomicFire3", 0.0
damagefactor "BubbleLead", 0.0
damagefactor "CrashBomb", 0.0
damagefactor "LeafShield", 0.0
damagefactor "MetalBlade", 0.0
damagefactor "QuickBoomerang", 0.0
damagefactor "GeminiLaser", 0.0
damagefactor "HardKnuckle", 0.0
damagefactor "MagnetMissile", 0.0
damagefactor "NeedleCannon", 0.0
damagefactor "SearchSnake", 0.0
damagefactor "ShadowBlade", 0.0
damagefactor "SparkShock", 0.0
damagefactor "TopSpin", 0.0
damagefactor "DiveMissile", 0.0
damagefactor "DrillBomb", 0.0
damagefactor "DustCrusher", 0.0
damagefactor "DustCrusherBit", 0.0
damagefactor "FlashStopper", 0.0
damagefactor "PharaohShot1", 0.0
damagefactor "PharaohShot2", 0.0
damagefactor "PharaohShot3", 0.0
damagefactor "PharaohHold", 0.0
damagefactor "RainFlush", 0.0
damagefactor "RingBoomerang", 0.0
damagefactor "ChargeKick", 0.0
damagefactor "CrystalEye", 0.0
damagefactor "CrystalEyeBit", 0.0
damagefactor "GravityHold", 0.0
damagefactor "GyroAttack", 0.0
damagefactor "NapalmBomb", 0.0
damagefactor "PowerStone", 0.0
damagefactor "StarCrash", 0.0
damagefactor "WaterWave", 0.0
damagefactor "BlizzardAttack", 0.0
damagefactor "PlantBarrier", 0.0
damagefactor "CentaurFlash", 0.0
damagefactor "FlameBlast", 0.0
damagefactor "KnightCrush", 0.0
damagefactor "SilverTomahawk", 0.0
damagefactor "WindStorm", 0.0
damagefactor "YamatoSpear", 0.0
damagefactor "FreezeCracker", 0.0
damagefactor "FreezeCrackerBit", 0.0
damagefactor "DangerWrap", 0.0
damagefactor "JunkShield", 0.0
damagefactor "NoiseCrush1", 0.0
damagefactor "NoiseCrush2", 0.0
damagefactor "ScorchWheel", 0.0
damagefactor "ThunderBolt", 0.0
damagefactor "WildCoil", 0.0
damagefactor "SlashClaw", 0.0
damagefactor "MegaBall", 0.0
damagefactor "AstroCrush", 0.0
damagefactor "FlameSword", 0.0
damagefactor "FlameSwordSpark", 0.0
damagefactor "FlashBomb", 0.0
damagefactor "HomingSniper", 0.0
damagefactor "IceWave", 0.0
damagefactor "ThunderClaw", 0.0
damagefactor "TornadoHold", 0.0
damagefactor "TornadoHoldPod", 0.0
damagefactor "WaterBalloon", 0.0
damagefactor "BalladeCracker", 0.0
damagefactor "ScrewCrusher", 0.0
damagefactor "MirrorBuster", 0.0
damagefactor "MirrorBuster1", 0.0
damagefactor "MirrorBuster2", 0.0
damagefactor "MirrorBuster3", 0.0
damagefactor "Sakugarne", 0.0
damagefactor "Bass2", 0.0
damagefactor "StunBuster", 0.0
damagefactor "WilyGas", 0.0
damagefactor "TenguBlade", 0.0
damagefactor "WaveBurner", 0.0
damagefactor "WaveBurnerUW", 0.0
damagefactor "SpreadDrill", 0.0
damagefactor "SpreadDrill2", 0.0
damagefactor "SpreadDrill3", 0.0
damagefactor "CopyVision", 0.0
damagefactor "MagicCard", 0.0
damagefactor "RemoteMine", 0.0
damagefactor "IceWall", 0.0
damagefactor "LightningBolt", 0.0
damagefactor "TrebleBoost", 0.0
damagefactor "Treble", 0.0
damagefactor "FlameSwordSpark", 0.0
damagefactor "HornetChaser", 0.0
damagefactor "LaserTrident", 0.0
damagefactor "ConcreteShot", 0.0
damagefactor "BlackHoleBomb", 0.0
damagefactor "JewelSatellite", 0.0
damagefactor "PlugBall", 0.0
damagefactor "TornadoBlow", 0.0
damagefactor "MagmaBazooka1", 0.0
damagefactor "MagmaBazooka2", 0.0
damagefactor "SolarBlaze", 0.0
damagefactor "ChillSpike", 0.0
damagefactor "ChillSpike1", 0.0
damagefactor "ChillSpike2", 0.0
damagefactor "WheelCutter", 0.0
damagefactor "CommandoBomb", 0.0
damagefactor "CommandoBombWave", 0.0
damagefactor "TripleBlade", 0.0
damagefactor "ReboundStriker", 0.0
damagefactor "ThunderWool", 0.0
damagefactor "WaterShield", 0.0
damagefactor "PirateMineBomb", 0.0
damagefactor "SparkChaser", 0.0
damagefactor "Treble", 0.0
}

actor XRayBundle : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_GiveInventory("XRayFlag",1)
TNT1 A 0 ACS_NamedExecute("SH_FoeRecon",0)
stop
}
}
actor XRayFlag : OnceC {}

actor 75PercentsJumpCharger
{
PROJECTILE
+NOINTERACTION
states
{
Spawn:
TNT1 A 2
TNT1 A 0 A_GiveToTarget("BossJumpCharge", 1)
TNT1 A 3
TNT1 A 0 A_GiveToTarget("BossJumpCharge", 1)
loop
}
}



actor TornadoHoldPodS : TornadoHoldPod replaces TornadoHoldPod {damagetype "TornadoHoldPod"}
actor WildCoilS : WildCoil replaces WildCoil {damagetype "WildCoil"}
actor WildCoil2S : WildCoil2 replaces WildCoil2 {damagetype "WildCoil"}
actor ThunderClawDamagerS : ThunderClawDamager replaces ThunderClawDamager {damagetype "ThunderClaw"}
actor JunkProjectileS : JunkProjectile replaces JunkProjectile {damagetype "JunkShield"}

actor BTWIMRIGHTHERE
{
+NOINTERACTION
-SOLID
Height 1
Radius 1
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GivetoTarget("StopShield",1)
TNT1 A 2 A_PlaySoundEx("Boss/Here","Voice")
stop
}
}

actor FallingRespawn : ArtiTeleport
{
inventory.maxamount 0 
+COUNTITEM 
+INVENTORY.AUTOACTIVATE 
+INVENTORY.ALWAYSPICKUP
states
{
Spawn:
TNT1 A 1
loop
}
}

actor FallingRespawnFatButts : CustomInventory // Special item for large hales like Hyper Storm H.
{				// It prevents them from being teleported inside a wall
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("FallingRespawnAssist", 0, 0, 0, 0, 0, 0)
stop
}
}

actor FallingRespawnAssist
{
+NOINTERACTION
+DONTBLAST
+NOBLOCKMAP
states
{
Spawn:
TNT1 A 1
TNT1 A 0 ACS_ExecuteAlways(400, 0, 225)
stop
}
}

actor CheckingRecoil : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_Recoil(-5)
stop
}
}

actor Survivor : OnceC {}
actor BAWS : OnceC {}

actor SaxtonHaleAbility : Ammo
{
inventory.amount 1
inventory.maxamount 200
}

actor Item1PlatformS : Item1Platform {-THRUSPECIES}

actor PartiallyFrozenONItem : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 SetPlayerProperty(0, 1, 0)
stop
}
}

actor PartiallyFrozenOFFItem : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 SetPlayerProperty(0, 0, 0)
stop
}
}

actor TotallyFrozenOFFItem : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 SetPlayerProperty(0, 0, 4)
stop
}
}

actor TotallyFrozenONItem : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 SetPlayerProperty(0, 1, 4)
stop
}
}

actor FlyingONItem : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 SetPlayerProperty(0,1,3)
stop
}
}

actor FlyingOFFItem : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 SetPlayerProperty(0,0,3)
stop
}
}

actor DiscreteInvulnerabilityONItem : CustomInventory
{
states
{
Pickup:
GUTS H 0 A_ChangeFlag("INVULNERABLE", 1)
stop
}
}

actor DiscreteInvulnerabilityOFFItem : CustomInventory
{
states
{
Pickup:
GUTS H 0 A_ChangeFlag("INVULNERABLE", 0)
stop
}
}

actor UninvisibleSHItem : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SetTranslucent(1.0)
stop
}
}

actor InvisibleSHItem : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SetTranslucent(0.01)
stop
}
}

actor MidVisibleSHItem : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SetTranslucent(0.60)
stop
}
}

actor NoGravityONItem : CustomInventory
{
states
{
Pickup:
GUTS H 0 A_ChangeFlag("NOGRAVITY", 1)
stop
}
}

actor NoGravityOFFItem : CustomInventory
{
states
{
Pickup:
GUTS H 0 A_ChangeFlag("NOGRAVITY", 0)
stop
}
}

actor SaxtonHaleStopItem : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_Stop
stop
}
}

actor DrainRuneHUD : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 A_GiveInventory("DrainRuneFlag", 1)
TNT1 A 0 ACS_ExecuteAlways(400, 0, 246)
TNT1 A 0 ACS_NamedExecute("DrainRuneCheck",0)
stop
}
}

actor HasteRuneHUD : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 A_GiveInventory("HasteRuneFlag", 1)
TNT1 A 0 ACS_ExecuteAlways(400, 0, 246)
stop
}
}

actor StrengthRuneHUD : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 A_GiveInventory("StrengthRuneFlag", 1)
TNT1 A 0 ACS_ExecuteAlways(400, 0, 246)
TNT1 A 0 ACS_NamedExecute("StrengthRuneCheck",0)
stop
}
}

actor RageRuneHUD : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 A_GiveInventory("RageRuneFlag", 1)
TNT1 A 0 ACS_ExecuteAlways(400, 0, 246)
TNT1 A 0 ACS_NamedExecute("RageRuneCheck",0)

stop
}
}

actor SpreadRuneHUD : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 A_GiveInventory("SpreadRuneFlag", 1)
TNT1 A 0 ACS_ExecuteAlways(400, 0, 246)
TNT1 A 0 ACS_NamedExecute("SpreadRuneCheck",0)
stop
}
}

actor RegenerationRuneHUD : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 A_GiveInventory("RegenerationRuneFlag", 1)
TNT1 A 0 ACS_ExecuteAlways(400, 0, 246)
stop
}
}
actor ResistanceRuneHUD : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0 A_GiveInventory("ResistanceRuneFlag", 1)
TNT1 A 0 ACS_ExecuteAlways(400, 0, 246)
TNT1 A 0 ACS_NamedExecute("ResistanceRuneCheck",0)
stop
}
}

actor StrengthRuneFlag : OnceC {}
actor RageRuneFlag : OnceC {}
actor SpreadRuneFlag : OnceC {}
actor HasteRuneFlag : OnceC {}
actor RegenerationRuneFlag : OnceC {}
actor ResistanceRuneFlag : OnceC {}
actor DrainRuneFlag : OnceC {}

actor MakeMeInvisible : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0
TNT1 A 0 A_SetTranslucent(0.0, 0)
stop
}
}

actor MakeMeVisible : CustomInventory
{
STATES
{
Pickup:
TNT1 A 0
TNT1 A 0 A_SetTranslucent(1.0, 0)
stop
}
}

actor BeingAHale : OnceC {}

actor ETankS : ETank replaces ETank
{
States
{
Use:
EBAL E 0 A_JumpIfInventory("ImHeavyWeaponsGuy", 1, "TankUse")
EBAL E 0 A_JumpIfInventory("ProtoBusterSpecial", 1, "SweeperUse")
EBAL E 0 A_JumpIfHealthLower(100,"Success")
fail
TankUse:
EBAL E 0 A_JumpIfHealthLower(160,"Success")
fail
SweeperUse:
EBAL E 0 A_JumpIfHealthLower(70,"Success")
fail
Success:
EBAL E 0 A_PlaySound("item/energyup")
EBAL E 0 A_PlaySoundEx("item/refill","Voice")
EBAL E 0 HealThing(160) // 1600
EBAL E 0 A_TakeInventory("ETankS",1)
fail
}
}

actor ETankSX : ETankS
{
States
{
Pickup:
EBAL E 0 A_JumpIfInventory("ImHeavyWeaponsGuy", 1, "TankUse")
EBAL E 0 A_JumpIfInventory("ProtoBusterSpecial", 1, "SweeperUse")
goto Success
TankUse:
TNT1 A 0
goto Success
SweeperUse:
TNT1 A 0
goto Success
Success:
EBAL E 0 A_PlaySound("item/energyup")
EBAL E 0 A_PlaySoundEx("item/refill","Voice")
EBAL E 0 HealThing(100) // 160
EBAL E 0 A_TakeInventory("ETankSX",1)
fail
}
}

actor MTankS : MTank replaces MTank
{
States
{
Use:
EBAL E 0 A_PlaySound("item/energyup")
EBAL E 0 A_PlaySoundEx("item/refill","Voice")
EBAL E 0 HealThing(160) // 1600
EBAL E 0 ACS_ExecuteAlways(992, 0, 0, 1)
Goto Additional
}
}

actor ItemEnergyUpSound : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("item/energyup","Voice")
stop
}
}

actor SupportItemAtomiser : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BassBusterSpecial", 1, "Boom")
TNT1 A 0 A_JumpIfInventory("RollMedic", 1, "Boom")
TNT1 A 0 A_JumpIfInventory("AutoShopItem_1", 1, "Boom")
TNT1 A 0 A_JumpIfInventory("WilyBusterSpecial1", 1, "Boom")
//TNT1 A 0 A_JumpIfInventory("DuoFistSpecial", 1, "CleverPony")
TNT1 A 0 A_JumpIfInventory("ProtoBusterSpecial", 1, "Boom")
TNT1 A 0 A_JumpIfInventory("DuoFistSpecial", 1, "Boom")
TNT1 A 0 A_TakeInventory("ETankS", 999)
stop
CleverPony:
TNT1 A 0
stop
Boom:
TNT1 A 0 A_SpawnItemEx("ImmaDestroyThose")
stop
}
}
actor ImmaDestroyThose
{
PROJECTILE +NOINTERACTION
states
{
Spawn:
TNT1 A 5
TNT1 A 0 A_TakeFromTarget("WTank", 999)
TNT1 A 0 A_TakeFromTarget("MTankS", 999)
TNT1 A 0 A_TakeFromTarget("EddieSummon", 999)
TNT1 A 0 A_TakeFromTarget("ETankS", 999)
STOP}}

actor IsUnderWaterHale : OnceC {}
actor SaxtonHalePerfect : OnceC {}

actor PowerShockSH : CustomInventory
{
states
{
Pickup:
TNT1 A 0 ACS_NamedExecuteAlways("sh_speeds", 0, 666)
stop
}
}

actor ShockFXMid : ShockFX{Scale 4.5}
actor ShockFXBig : ShockFX{Scale 7.5}
actor ShockFXGiant : ShockFX{Scale 10.0}

actor SaxtonHaleHealItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 5000
states
{
Pickup:
TNT1 A 0 HealThing(1)
stop
}
}

actor GoukiNormalGravity : CustomInventory
{
States
{
Pickup:
TNT1 A 1 ACS_ExecuteAlways(204,0,2)
TNT1 A 1 A_TakeInventory("IsUnderWater", 999)
stop
}
}

actor GoukiLowGravity : CustomInventory
{
States
{
Pickup:
TNT1 A 1 ACS_ExecuteAlways(204,0,3)
TNT1 A 1 A_GiveInventory("IsUnderWater", 1)
stop
}
}

actor Special1NormalGravity : CustomInventory
{
States
{
Pickup:
TNT1 A 1 ACS_ExecuteAlways(204,0,4)
TNT1 A 1 A_TakeInventory("IsUnderWater", 999)
stop
}
}

actor Special1LowGravity : CustomInventory
{
States
{
Pickup:
TNT1 A 1 ACS_ExecuteAlways(204,0,5)
TNT1 A 1 A_GiveInventory("IsUnderWater", 1)
stop
}
}

actor UnSolid : OnceC {}

actor ReSolidifier
{
Height 0
Radius 0
+NOINTERACTION
-SOLID
+NOGRAVITY
+MISSILE
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("UnSolid",1)
Spawn2:
TNT1 A 0 A_GiveToTarget("ReSolidifierCheckPickup",1)
TNT1 A 1
TNT1 A 0 A_JumpIfInTargetInventory("UnSolid",1,"Spawn2")
stop
Death:
TNT1 A 0
stop
}
}

actor ReSolidifierCheckPickup : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("ReSolidifierCheck", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
stop
}
}

actor ReSolidifierCheck
{
PROJECTILE
+DONTSPLASH
+SKYEXPLODE
Damage (0)
radius 24
height 84
States
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_GiveToTarget("ReSolidify",1)
stop
Death:
XDeath:
TNT1 A 0
stop
}
}

actor ReSolidify : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInventory("UnSolid",1,"Pickup2")
stop
Pickup2:
TNT1 A 0 A_ChangeFlag("SOLID",1)
TNT1 A 0 A_TakeInventory("UnSolid",1)
stop
}
}

actor SaxtonHaleOfficialWeaponsPack : CustomInventory
{
states
{
Pickup:
TNT1 A 0
TNT1 A 0 ACS_ExecuteAlways(981,0,0)
stop
}
}

actor DeadFlag : OnceC {}

actor NoHitstunHale : DeadFlag {}

actor MartyrSuicide : PowerProtection
{
damagefactor "Normal", 1337.0
}

actor MaxDefenseYes : PowerProtection
{
powerup.duration 0x7FFFFFFF
damagefactor "Normal", 0.0
}


actor MultiplierOfficial : PowerProtection
{
powerup.duration 0x7FFFFFFF
damagefactor "Normal", 10.0
damagefactor "DioFlashTime", 1.0
}
