// Hales inherit from this actor
// This actor possesses the common properties of every hale

actor BasisForHales : PlayerPawn
{
player.displayname "megaman"
player.soundclass "megaman"
player.damagescreencolor "white", 0.2
damagefactor "Instagib", 0.0
// The 6 damagefactor below are modified though, if the hale needs resistance/weakness against it
damagefactor "IceSlasher", 0.6
damagefactor "GravityHold", 1.6
damagefactor "AtomicFire3", 0.65
damagefactor "WindStorm", 0.7
damagefactor "TopSpin", 0.65
damagefactor "IceWall", 0.45

damagefactor "DioFlash", 0.0
damagefactor "BossInstagib", 0.0
damagefactor "InstagibSH", 0.0
damagefactor "HyperStormH", 0.0
damagefactor "HyperStormHJump", 0.0
damagefactor "MegaWaterS", 0.0
damagefactor "BusterRodG", 0.0
damagefactor "BusterRodGFire", 0.0
damagefactor "BusterRodGIce", 0.0
damagefactor "BusterRodGElec", 0.0
damagefactor "ShunGokuSatsuFateOthers", 0.0
damagefactor "MorshuFire", 0.0
damagefactor "ContagiousBurningMorshu", 0.0
damagefactor "CaveStory", 0.0
damagefactor "Torchic", 0.0
damagefactor "RebirthDynamo", 0.0
damagefactor "ThorMinion", 0.0
damagefactor "WilyFire", 0.0
damagefactor "MegaWaterSWater", 0.0
damagefactor "HSHPushAway", 0.0
damagefactor "ChoZoExplosion", 0.0

damagefactor "Crush", 0.5
damagefactor "Telefrag",0.00020
damagefactor "Falling", 0.5
damagefactor "Fire", 0.5
damagefactor "Drowning", 0.5
damagefactor "Slime", 0.5
damagefactor "Ice", 0.5
damagefactor "Spiney", 0.5
/*damagefactor "DoomRam", 0.0
damagefactor "FireCircle", 0.0
damagefactor "MinionSH", 0.0*/
+NOBLOOD
+DONTBLAST
+NOSKIN
-PICKUP
-CANTSEEK
var int user_hp;
player.jumpz 10
Player.MaxHealth 20000 // Those health properties are defined in SAXTON.acs anyway :D
Health 20000
+NODAMAGETHRUST
player.colorrange 0 0
mass 9999
gravity 0.8
scale 2.5 // scaling may differ on occasion for some Hales
species "SaxtonBoss"
+THRUSPECIES
+DONTHARMSPECIES
+MTHRUSPECIES
+QUICKTORETALIATE

states
{
Spawn:
"----" A 0
"----" B 1
"----" A 1
Goto Spawn+2
See:
"----" BCDE 5
Goto Spawn
Missile:
"----" F 5 
"----" G 4 
goto Spawn

pain.LaserTrident:
"----" H 0 A_GiveInventory("LaserTridentProtect", 1)
goto HitstunLV1
Pain.PileDriver:
"----" H 0 A_GiveInventory("PileDriverProtect",1)
"----" H 0 A_ChangeVelocity(0,0,8,CVF_RELATIVE|CVF_REPLACE)
"----" H 0 A_SpawnItemEx("Pain_PileDriver")
goto HitstunLV1

Pain.PlantPasture:
"----" H 0 A_SpawnItemEx("PainPlantPasture")
goto Pain+1

Pain.ProtoBash:
"----" H 0 A_GiveInventory("ProtoBashProtection")
"----" H 0 A_ChangeVelocity(0,0,8,CVF_RELATIVE|CVF_REPLACE)
"----" H 0 A_SpawnItemEx("Pain_ProtoBash")
goto HitstunLV1
Pain.BassCrescentKick:
"----" H 0 A_GiveInventory("CrescentKickProtection")
"----" H 0 A_ChangeVelocity(0,0,12,CVF_RELATIVE|CVF_REPLACE)
"----" H 0 A_SpawnItemEx("Pain_CrescentKick")
goto HitstunLV1
Pain.GigaFistSH:
"----" H 0 A_GiveInventory("GigaFistProtection")
"----" H 0 A_ChangeVelocity(0,0,8,CVF_RELATIVE|CVF_REPLACE)
"----" H 0 A_SpawnItemEx("Pain_GigaFist")
goto HitstunLV1
Pain.DuoRapidFist: 
"----" H 0 A_GiveInventory("DuoRushProtection")
"----" H 0 //A_ChangeVelocity(0,0,2,CVF_RELATIVE|CVF_REPLACE)
"----" H 0 A_SpawnItemEx("Pain_DuoRush")
goto HitstunLV1
Pain.FakeBaton: 
"----" H 0 A_JumpIfInventory("IsSunstar",1,"Pain")
"----" H 0 //A_ChangeVelocity(0,0,2,CVF_RELATIVE|CVF_REPLACE)
"----" H 0 A_ChangeVelocity(0,0,4,CVF_RELATIVE|CVF_REPLACE)
"----" H 0 A_SpawnItemEx("Pain_FakeBaton")
goto HitstunLV1
Pain.TimeScatter:
"----" H 0 A_ChangeVelocity(0,0,16,CVF_RELATIVE|CVF_REPLACE)
"----" H 0 A_SpawnItemEx("Pain_TimeScatter")
goto HitstunLV1
Pain.W_StarSpur:
"----" H 0 A_ScaleVelocity(0.25)
goto HitstunLV1
Pain.Telefrag: 
"----" H 0 A_GiveInventory("ExitUnitAuto",1)
Pain.FireSpin:
Pain.QuickBoomerang:
Pain.Buster:
Pain.BassBuster:
Pain.WildCoil:
Pain.ChargeKick:
Pain.YamatoSpear:
Pain.DiveMissile:
Pain.StarCrash:
Pain.CentaurFlash:
Pain.FreezeCracker:
Pain.ScrewCrusher:
Pain.PharaohHold:
Pain.TornadoHold:
Pain.TrebleSentry:
Pain.ScorchWheel:
Pain.MagnetMissile:
Pain.JunkShield:
Pain.OilSlider:
Pain.BassBuster:
Pain.WaveBurner:
Pain.WaveBurnerUW:
Pain.Misc:
Pain.Treble:
Pain.FlameSwordSpark:
Pain.Bass2:

Pain.IceCircle:
Pain.SpinWheel:

Pain.WaterBalloon:
Pain.FlashBomb:
Pain.RemoteMine:
Pain.IceWall:

"----" H 0 
Goto HitstunLV1
Pain.Reggae:
"----" H 0 A_PlaySoundEx("item/reggae", "SoundSlot7", 0)
Goto HitstunLV1
Pain.SpreadDrill:
Pain.SpreadDrill2:
Pain.SpreadDrill3:
"----" H 0 A_JumpIfInventory("SpreadDrillProtect", 1 ,2)
"----" H 0 A_PlaySoundEx("weapon/spreaddrillhit","SoundSlot5")
"----" H 0 A_GiveInventory("SpreadDrillProtect", 1)
Goto HitstunLV1
Pain.FlameSword:
"----" H 0 A_GiveInventory("FlameSwordProtect",1)
"----" H 0 A_PlaySoundEx("weapon/flamehit","SoundSlot5")
"----" HH 0 A_SpawnItemEx("ScorchBit",0,0,0,random(-10,10),random(-10,10),random(10,15),random(0,360))
Goto HitstunLV2
Pain.TenguSlash:
"----" H 0 A_PlaySoundEx("weapon/tenguhit","SoundSlot5")
goto HitstunLV2
Pain.BlazingTorch:
"----" H 0 A_GiveInventory("BlazingTorchProtect", 1)
Goto HitstunLV1
Pain.TundraStorm:
"----" H 0 A_GiveInventory("TundraStormProtect",1)
goto HitstunLV3TS
Pain.TimeHold:
"----" H 0 A_Stop
goto HitstunLV3
Pain.WindStorm:
"----" H 0 A_JumpIfInventory("SlendermanBossWeapon", 1, "HitstunLV1")
"----" H 0 ThrustThingZ(0,5,0,0)
Goto HitstunLV1
Pain.FlingDamage:
"----" H 0 A_JumpIfInventory("SlendermanBossWeapon", 1, "HitstunLV1")
"----" H 0 //ThrustThing(random(0,255),50,1,0)
"----" H 0 ThrustThing(random(0,255),5,0,0)
"----" H 0 ThrustThingZ(0,30,0,0)
Goto HitstunLV1
Pain.SlashClaw:
"----" H 0 A_PlaySoundEx("weapon/slashclawhit","SoundSlot5")
Goto HitstunLV2
Pain.FlashStopper:
"----" H 0 A_JumpIfInventory("BrightBlind", 1,3)
"----" H 0 A_GiveInventory("BrightBlind",100)
"----" H 0 ACS_ExecuteAlways(249, 0, 0)
Goto HitstunLV1
"----" H 0 A_GiveInventory("BrightBlind",58)
Goto HitstunLV1
Pain.TimeSlow:
"----" H 0 A_GiveInventory("Slowed",1)
Goto HitstunLV1
Pain.SparkShock:
"----" H 0 A_GiveInventory("SparkShockProtect",1)
"----" H 0 A_GiveInventory("SlowedSpark",1)
"----" H 0 ACS_NamedExecuteAlways("sh_speeds", 0, 666)
"----" H 0 A_JumpIfInventory("SlendermanBossWeapon", 1, "HitstunLV1")
"----" H 0 A_ScaleVelocity(0.55)
//"----" H 0 A_Recoil(1)
//Goto HitstunLV3
Goto HitstunLV2
Pain.CrashBomb:
"----" H 0 //A_Stop
Goto HitstunLV2
Pain.GravityHold:
"----" H 0 A_JumpIfInventory("SlendermanBossWeapon", 1, "HitstunLV1")
"----" H 0 ThrustThingZ(0,40,0,0)
Goto HitstunLV1
Pain.WilyFire:
"----" H 0 //A_ChangeFlag("SHOOTABLE",0)
"----" H 0 A_SpawnItemEx("ImOnFire")
"----" H 0 A_GiveInventory("FireVision",1)
Goto HitstunLV2
Pain.ConcreteShot:
"----" H 0 A_JumpIfInventory("ConcreteVision", 1, "ConcreteReset")
"----" H 0 A_GiveInventory("ConcreteVision", 1)
"----" H 0 A_GiveInventory("ConcreteTime", 105)
"----" H 0 A_SpawnItemEx("ConcreteWatcher")
Goto HitstunLV2
ConcreteReset:
"----" H 0 A_GiveInventory("ConcreteTime", 105)
Goto HitstunLV2
Pain.TornadoBlow:
"----" H 0 ThrustThingZ(0, 60, 0, 0)
Goto HitstunLV2
Pain.WilyIce:
"----" H 0 A_ChangeFlag("SHOOTABLE",0)
"----" H 0 SetPlayerProperty(0,1,4)
"----" H 0 A_SpawnItemEx("ImFrozen")
"----" H 0 A_GiveInventory("IceVision",1)
"----" H 30 A_Stop
"----" H 30 A_ChangeFlag("SHOOTABLE",1)
"----" H 0 SetPlayerProperty(0,0,0)
"----" H 0 A_TakeInventory("IceVision",1)
Goto Spawn
Pain.AtomicFireMelee:
"----" H 0 A_GiveInventory("AtomicFireMeleeProtection",1)
goto HitstunLV1

Pain.PlasmaCutter:
"----" H 0 A_PlaySoundEx("weapon/slashclawhit","SoundSlot5")
"----" H 0 A_SpawnItemEx("PlasmaShockFX",4,0,32)
"----" H 0 A_GiveInventory("PlasmaShock",1)
"----" H 0 A_Stop
goto HitstunLV1
Pain.PlasmaCutter2:
"----" H 0 A_PlaySoundEx("weapon/slashclawhit","SoundSlot5")
"----" H 0 ACS_NamedExecuteAlways("DOSR_PlasmaCutter", 0, 30)
"----" H 0 A_GiveInventory("PlasmaCutterProtect", 1)
goto HitstunLV1

Pain.BlowTorch:
"----" H 0 A_JumpIfInventory("BlowTorchStack6",1,"BlowTorchStack5")
"----" H 0 A_JumpIfInventory("BlowTorchStack5",1,"BlowTorchStack5")
"----" H 0 A_JumpIfInventory("BlowTorchStack4",1,"BlowTorchStack4")
"----" H 0 A_JumpIfInventory("BlowTorchStack3",1,"BlowTorchStack3")
"----" H 0 A_JumpIfInventory("BlowTorchStack2",1,"BlowTorchStack2")
"----" H 0 A_JumpIfInventory("BlowTorchStack1",1,"BlowTorchStack1")
"----" H 0 A_SpawnItemEx("TorchParticle", 0, 0, 32, random(-14, 14), 0, random(-14, 14), random(0, 359))
"----" H 0 A_GiveInventory("BlowTorchStack1",1)
goto HitstunLV1
BlowTorchStack1:
"----" HH 0 A_SpawnItemEx("TorchParticle", 0, 0, 32, random(-14, 14), 0, random(-14, 14), random(0, 359))
"----" H 0 A_GiveInventory("BlowTorchStack2",1)
goto HitstunLV1
BlowTorchStack2:
"----" HHH 0 A_SpawnItemEx("TorchParticle", 0, 0, 32, random(-14, 14), 0, random(-14, 14), random(0, 359))
"----" H 0 A_GiveInventory("BlowTorchStack3",1)
goto HitstunLV1
BlowTorchStack3:
"----" H 0 A_PlaySoundEx("weapon/flamehit","SoundSlot5")
"----" HHHH 0 A_SpawnItemEx("TorchParticle", 0, 0, 32, random(-14, 14), 0, random(-14, 14), random(0, 359))
"----" H 0 A_GiveInventory("BlowTorchStack4",1)
goto HitstunLV1
BlowTorchStack4:
"----" H 0 A_PlaySoundEx("weapon/flamehit","SoundSlot5")
"----" HHHHH 0 A_SpawnItemEx("TorchParticle", 0, 0, 32, random(-14, 14), 0, random(-14, 14), random(0, 359))
"----" H 0 A_GiveInventory("BlowTorchStack5",1)
goto Pain+1
BlowTorchStack5:
"----" H 0 A_PlaySoundEx("weapon/flamehit","SoundSlot5")
"----" HHHHHH 0 A_SpawnItemEx("TorchParticle", 0, 0, 32, random(-14, 14), 0, random(-14, 14), random(0, 359))
"----" H 0 A_GiveInventory("BlowTorchStack6",1)
goto HitstunLV1

Pain.SludgeBurst:
"----" H 0 A_GiveInventory("SludgeBurstVisionBlocker",1)
goto HitstunLV1


Pain.Falling:
Pain.Drowning:
Pain.Slime:
Pain.Fire:
Pain.Spiney:
Pain.Crush:
Pain.Beam:
"----" H 0 
"----" H 0 A_GiveInventory("FallingRespawn",1)
Goto HitstunLV1
Pain.TimeStopper:
"----" H 0 A_GiveInventory("TimeStopActivator", 1)
Goto HitstunLV3
BeatAssist:
"----" H 0 
"----" H 0 HealThing(2)
"----" H 0 ThrustThingZ(0,25,0,0)
"----" H 0 ACS_ExecuteAlways(205,0)
Goto HitstunLV1
Pain.BlackHoleBomb:
//"----" H 0 A_Changeflag("NOPAIN",1)
"----" H 0 A_GiveInventory("BlackHoleBombProtection",1)
"----" H 0 A_Stop
"----" H 0 A_Recoil(20)//ThrustThing(80,20,1,0)
//"----" H 0 A_Changeflag("NOPAIN",0)
Goto HitstunLV1
Pain.WaterShield:
"----" H 0 A_GiveInventory("WaterShieldProtect",1)
goto Pain

HitstunLV3: // "speed on X/Y/Z axis becomes 0% of the speed"
"----" H 0 A_JumpIfInventory("NoHitstunHale", 1, "HitstunLV1")
"----" H 0 //A_Stop
goto HitstunLV1
HitstunLV3TS: // "speed on X/Y/Z axis becomes 0% of the speed"
"----" H 0 A_JumpIfInventory("NoHitstunHale", 1, "HitstunLV1")
"----" H 0 A_Stop
goto HitstunLV1
Pain:
HitstunLV2: // "speed on X/Y/Z axis becomes 95% of the speed"
"----" H 0 A_JumpIfInventory("NoHitstunHale", 1, "HitstunLV1")
"----" H 0 A_ScaleVelocity(0.95)
goto HitstunLV1
Pain.ChillSpike:
"----" H 0 //A_GiveInventory("ChillFreeze", 1) //Nope
goto Pain+1
Pain.SparkChaser:
"----" H 0 A_GiveInventory("SparkChaserTagged", 1)
goto HitstunLV1
Pain.BreakDash:
"----" H 0 A_GiveInventory("BreakDashProtect", 1)
"----" H 0 A_Stop
goto HitstunLV1
Pain.WilyGas:
"----" H 0 A_SpawnItemEx("PainWilyGas")
"----" H 0 A_GiveInventory("WilyGasProtection")
GOTO HitstunLV1

pain.SkullBarrier:
pain.WaterWave:
Pain.DuoFist1:
HitstunLV1: // speed on X/Y/Z axis becomes 100% of the speed"
"----" H 0 A_ScaleVelocity(1.00)
"----" H 0 A_Pain
"----" H 0 ACS_NamedExecuteWithResult("core_decdmg_begin")
"----" H 0 ACS_ExecuteAlways(401, 0, 21) // THE ALMIGHTY SCRIPT THAT GIVES RAGE :O
"----" H 0 A_Jump(256, "BossPain")
goto BossPain
BossPain:
"----" HHHHHHHHH 2 A_SpawnItem("PainFX",-3,18)
"----" H 0 SetPlayerProperty(0,0,1)
"----" H 0 A_Jump(256, "Spawn")
Goto Spawn
Death:
"----" H 0 SetPlayerProperty(0, 0, 4)
"----" H 0 A_TakeInventory("WeaponCharge",999)
"----" H 0 A_NoBlocking
"----" H 0 A_GiveInventory("CutterFlag",999)
"----" H 0 A_GiveInventory("IsDead",1)
"----" H 0 A_Stop
"----" H 0 A_GiveToTarget("KilledMeStock",1)
"----" H 1 A_GiveToTarget("KilledMe",1)
"----" H 19 ACS_ExecuteAlways(999,0,0)
"----" H 0 SetPlayerProperty(0, 0, 4)
"----" H 0 A_PlayerScream
"----" H 0 A_ChangeFlag("NOTARGET",1)
"----" H 0 A_SpawnItemEx("FakeDeathFX", 0, 0, 32)
"----" Z 1 A_CheckPlayerDone
wait
Ice:
"----" H 0 SetPlayerProperty(0, 0, 4)
"----" H 0 A_GiveInventory("CutterFlag",999)
"----" H 0 A_GiveInventory("IsDead",1)
"----" H 0 A_TakeInventory("WeaponCharge",999)
"----" Z 0 A_GiveToTarget("KilledMeStock",1)
"----" Z 0 A_GiveToTarget("KilledMe",1)
"----" H 1 A_PlayerScream
"----" H 0 ACS_ExecuteAlways(998,0,105,1)
"----" H 0 A_NoBlocking
"----" H 0 A_FreezeDeath
"----" H 35
"----" H 0 A_SpawnItemEx("FrozenDeathFX", 0, 0, 16)
"----" Z 1 A_CheckPlayerDone
wait
}
}

actor PainFXSH replaces PainFX
{
+NOINTERACTION
+NOGRAVITY
-SOLID
+CLIENTSIDEONLY
scale 2.5
renderstyle translucent
alpha 0.5
height 0
radius 0
+MISSILE
States
{
Spawn:
MMFX AA 1 
stop
}
}
