actor ChoZo : BasisForHales
{
player.soundclass "BOSS006"
player.forwardmove 0.9, 0.9
player.sidemove 0.88, 0.88
player.morphweapon "ChoZoWeapon"
States
{
Spawn:
NEED A 0
CHZS B 1 A_JumpIfInventory("ChoZoFMissileFlag",1,"Missile")
CHZS A 1 A_JumpIfInventory("ChoZoFMissileFlag",1,"Missile")
Goto Spawn+2
See:
CHZS BBBBBCCCCCDDDDDEEEEE 1 A_JumpIfInventory("ChoZoFMissileFlag",1,"Missile")
Goto Spawn
Missile:
CHZS F 5
CHZS G 4
goto Spawn
BossPain:
CHZS H 0 A_PlaySound("misc/devilpain")
CHZS HHHHHHHHH 2 A_SpawnItem("PainFX",-3,25)
CHZS H 0 SetPlayerProperty(0,0,1)
Goto Spawn

Pain.RNCZaWarudo:
Pain.TimeStopper:
TNT1 A 0 SetPlayerProperty(0,1,4) TNT1 A 0 A_GiveInventory("DioFlashTimeHUD", 1) TNT1 A 0 A_SpawnItem("ZaWarudoHaleFix")
CHZS AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_Stop
CHZS A 1 SetPlayerProperty(0,0,4)
Goto Spawn

Death:
CHZS H 0 ACS_ExecuteAlways(720,0,8)
CHZS H 0 SetPlayerProperty(0,0,4) 
CHZS H 0 A_NoBlocking
CHZS H 0 A_Stop
CHZS H 1 A_GiveToTarget("KilledMe",1)
CHZS H 18
CHZS H 0 ACS_ExecuteAlways(400,0,437)
CHZS H 0 SetPlayerProperty(0,0,4)
CHZS H 0 A_PlayerScream
CHZS H 0 A_SpawnItemEx("FakeDeathFX", 0, 0, 32)
PLAY Z -1
//PLAY Z 1 A_CheckPlayerDone
wait

CustomState1:
CHZS FFFF 1
CHZS FFFFF 1
goto Spawn
CustomState2:
CHZS GGGG 1
CHZS GGGGG 1
goto Spawn
CustomState4:
CHZS IJIJIJIJIJIJIJIJIJIJIJIJIJIJIJIJIJ 3
goto Spawn
CustomState5:
CHZS KKKKK 1
CHZS IIIII 1
goto Spawn
CustomState6:
CHZS LLLLL 1
CHZS JJJJJ 1
goto Spawn

}
}



// Jump //

actor ChoZoItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "SXISI1"
+INVENTORY.UNDROPPABLE
+COUNTITEM
+INVBAR
states
{
Spawn:
TNT1 A 0
loop
Use:
TNT1 A 0 A_JumpIfInventory("InBoat",1,2)
TNT1 A 0 A_JumpIfInventory("BossJumpCharge",125,"Jump")
TNT1 A 0
fail
Jump:
TNT1 A 0 A_TakeInventory("BossJumpCharge",125)
TNT1 A 1 ThrustThingZ(0,120,0,0)
TNT1 A 0 A_PlaySoundEx("CHOZO/JUNP","Item")
TNT1 A 1 A_TakeInventory("JumpCancler",1)
TNT1 A 0
}
}

actor ChoZoExplodeProtect : PowerProtection
{
PowerUp.Duration 0x7FFFFFFD 
DamageFactor "ChoZoExplosion", 0.0
}

// Voice Lines Option

actor ChoZoVoicelineFlag : Once {}
actor ChoZoLinePickup_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(CallACS("sh_ChoZoLineVar"),"Pickup1")
goto Pickup0
Pickup0:
TNT1 A 0 A_TakeInventory("ChoZoVoicelineFlag",99)
stop
Pickup1:
TNT1 A 0 A_GiveInventory("ChoZoVoicelineFlag",1)
stop
}
}


actor Chozo_SpawnLine : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_GiveInventory("ChoZoLinePickup_P",1)
TNT1 A 0 A_JumpIfInventory("ChoZoVoicelineFlag",1,"Line")
goto NoLines
Line:
TNT1 A 0 ACS_NamedExecuteAlways("ChoZoLocalLine",0,1)
stop
NoLines:
TNT1 A 0
stop
}
}

actor Chozo_KillLine : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_GiveInventory("ChoZoLinePickup_P",1)
TNT1 A 0 A_JumpIfInventory("ChoZoVoicelineFlag",1,"Line")
goto NoLines
Line:
TNT1 A 0 ACS_NamedExecuteAlways("ChoZoLocalLine",0,2)
stop
NoLines:
TNT1 A 0
stop
}
}

actor Chozo_DeathLine : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_GiveInventory("ChoZoLinePickup_P",1)
TNT1 A 0 A_JumpIfInventory("ChoZoVoicelineFlag",1,"Line")
goto NoLines
Line:
TNT1 A 0 ACS_NamedExecuteAlways("ChoZoLocalLine",0,3)
stop
NoLines:
TNT1 A 0
stop
}
}