actor ChoZoWeapon : MegaBuster
{
tag "Fists of Steel"
Weapon.AmmoUse 0
Weapon.AmmoGive 0
Weapon.SlotNumber 1
Obituary "$OB_CHOZOPUNCH"
+INVENTORY.UNDROPPABLE
weapon.ammotype "BossJumpCharge"
weapon.ammotype2 "BossRageCharge"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
Spawn:
TNT1 A 0
stop
Ready:
SXH2 K 0 ACS_NamedExecuteAlways("GiveExecution",0)
CHOZ A 0 A_GiveInventory("ChoZoExplodeProtect")
CHOZ A 0 ACS_ExecuteAlways(991,0,540)
CHOZ A 1 A_WeaponReady(WRF_NOSWITCH)
Goto Ready+2
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
CHOZ A 1 A_Lower
loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
CHOZ A 1 A_Raise
Loop
Fire:
CHOZ A 1 Offset(-18, 14)
CHOZ H 1 Offset(-36, -4)
CHOZ A 0 A_PlaySoundEx("CHOZO/PAWNCH","Weapon")
SXH1 A 0 ACS_NamedExecuteAlways("StateChange",0,3) //CustomState 1
CHOZ H 4 Offset(-45, -13)A_FireCustomMissile("ChoZoFist",0,1,8,0)
CHOZ H 3 Offset(-48, -18)
CHOZ H 1 Offset(-36, -4)
CHOZ A 1 Offset(-18, 14)
CHOZ AC 1 A_WeaponReady(WRF_NOFIRE)
CHOZ C 1 Offset(18, 14)
CHOZ I 1 Offset(36, -4)
CHOZ A 0 A_GiveInventory("ChoZoFMissileFlag")
CHOZ A 0 A_PlaySoundEx("CHOZO/PAWNCH","Weapon")
SXH1 A 0 ACS_NamedExecuteAlways("StateChange",0,4) //CustomState 2
CHOZ I 4 Offset(45, -13)A_FireCustomMissile("ChoZoFist",0,1,-8,0)
CHOZ I 3 Offset(48, -18)
CHOZ I 1 Offset(36, -4)
CHOZ C 1 Offset(18, 14)
TNT1 A 1 Offset(311, 147)
CHOZ B 1 Offset(284, 136)
CHOZ B 1 Offset(227, 116)
CHOZ B 1 Offset(161, 91)
CHOZ B 1 Offset(161, 91)
CHOZ B 0 A_GiveInventory("ChoZoFMissileFlag")
CHOZ B 0 A_PlaySoundEx("weapon/napalm","Weapon")
CHOZ B 0 A_PlaySoundEx("CHOZO/PAWNCH","SoundSlot6")
SXH1 A 0 ACS_NamedExecuteAlways("StateChange",0,3) //CustomState 1
CHOZ B 0 A_FireCustomMissile("ChoZoFist2",0,1,0,0)
CHOZ B 0 A_Quake(2,14,0,8,"none")
CHOZ B 1 Offset(103, 98)
CHOZ B 1 Offset(89, 120)
CHOZ B 1 Offset(76, 143)
CHOZ B 1 Offset(54, 168)
CHOZ B 1 Offset(23, 198)
TNT1 A 4 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
TNT1 A 1 Offset(0, 112)
CHOZ A 1 Offset(0, 112)
CHOZ A 1 Offset(0, 96)
CHOZ A 1 Offset(0, 80)
CHOZ A 1 Offset(0, 64)
CHOZ A 1 Offset(0, 48)
CHOZ A 15 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
Goto Ready+2
AltFire:
CHOZ A 0 A_JumpIfInventory("BossRageCharge",500,"Rage")
CHOZ A 1 A_CheckFloor("AltFire2")
goto Ready+2
AltFire2:
CHOZ DEFG 1
CHOZ B 0 A_GiveInventory("ChoZoFMissileFlag")
CHOZ B 0 A_PlaySoundEx("weapon/napalm","Weapon")
CHOZ B 0 A_PlaySoundEx("CHOZO/PAWNCH","SoundSlot6")
CHOZ B 0 A_SpawnItemEx("ChoZoSlam")
CHOZ B 0 A_SpawnItemEx("ChoZoSlamExplode")
CHOZ B 0 A_Quake(8,14,0,8,"none")
CHOZ G 1 Offset(0, 34)
CHOZ G 1 Offset(0, 30)
CHOZ G 1 Offset(0, 34)
CHOZ G 1 Offset(0, 30)
CHOZ G 1 Offset(0, 34)
CHOZ G 1 Offset(0, 30)
CHOZ G 1 Offset(0, 34)
CHOZ G 1 Offset(0, 30)
TNT1 A 4 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
TNT1 A 1 Offset(0, 112)
CHOZ A 1 Offset(0, 112)
CHOZ A 1 Offset(0, 96)
CHOZ A 1 Offset(0, 80)
CHOZ A 1 Offset(0, 64)
CHOZ A 1 Offset(0, 48)
CHOZ A 8 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
Goto Ready+2
Rage:
CHOZ A 0 A_PlaySoundEx("CHOZO/RAGE","Item")
CHOZ A 0 A_SpawnItemEx("ChoZoRollHelper")
NEDR A 0 A_SpawnItemEx("ChoZoHealer")
NEDR A 0 A_PlaySoundEx("Class/NeedleRevup","SoundSlot6")
SXH1 A 0 ACS_NamedExecuteAlways("StateChange",0,6) //CustomState 4
CHOZ A 1 Offset(0, 48) A_GiveInventory("ChozoMinigunAmmo",116) 
CHOZ A 1 Offset(0, 64)
CHOZ A 1 Offset(0, 80)
CHOZ A 1 Offset(0, 96)
CHOZ A 1 Offset(0, 112)
CHOZ JJKKL 2 A_WeaponReady(14)
CHOZ L 11
FireStart:
CHOZ N 0 A_WeaponReady(14)
CHOZ N 0 A_GunFlash
CHOZ N 0 A_GiveInventory("ChoZoFMissileFlag")
CHOZ N 0 A_TakeInventory("ChozoMinigunAmmo",1)
CHOZ N 0 ACS_NamedExecuteAlways("StateChange",0,7) //CustomState 5
CHOZ N 0 A_PlaySoundEx("weapon/coilfire2","Weapon")
CHOZ M 1 A_FireCustomMissile("ChoZoBullet",frandom(-4,4),0,0,0,0,frandom(-4,4))
CHOZ M 0 A_FireCustomMissile("ChoZoBullet",frandom(-4,4),0,0,0,0,frandom(-4,4))
CHOZ MM 1
FireLoop:
CHOZ M 0 A_GunFlash
CHOZ M 0 A_GiveInventory("ChoZoFMissileFlag")
CHOZ M 0 A_TakeInventory("ChozoMinigunAmmo",1)
CHOZ M 0 ACS_NamedExecuteAlways("StateChange",0,8) //CustomState 6
CHOZ M 0 A_PlaySoundEx("weapon/coilfire2","Weapon")
CHOZ N 1 A_FireCustomMissile("ChoZoBullet",frandom(-4,4),0,0,0,0,frandom(-4,4))
CHOZ M 0 A_FireCustomMissile("ChoZoBullet",frandom(-4,4),0,0,0,0,frandom(-4,4))
CHOZ NN 1
CHOZ M 0 A_JumpIfInventory("ChozoMinigunAmmo",1,"FireLoop2")
Goto UnRev
FireLoop2:
CHOZ N 0 A_GunFlash
CHOZ N 0 A_GiveInventory("ChoZoFMissileFlag")
CHOZ N 0 A_TakeInventory("ChozoMinigunAmmo",1)
CHOZ N 0 ACS_NamedExecuteAlways("StateChange",0,7) //CustomState 5
CHOZ N 0 A_PlaySoundEx("weapon/coilfire2","Weapon")
CHOZ M 1 A_FireCustomMissile("ChoZoBullet",frandom(-4,4),0,0,0,0,frandom(-4,4))
CHOZ N 0 A_FireCustomMissile("ChoZoBullet",frandom(-4,4),0,0,0,0,frandom(-4,4))
CHOZ MM 1
CHOZ N 0 A_JumpIfInventory("ChozoMinigunAmmo",1,"FireLoop")
Goto UnRev

UnRev:
CHOZ A 0 A_TakeInventory("WeaponCharge",999)
CHOZ A 0 A_TakeInventory("BossRageCharge",999)
CHOZ L 5
CHOZ LLKKJ 3
CHOZ A 1 Offset(0, 112)
CHOZ A 1 Offset(0, 96)
CHOZ A 1 Offset(0, 80)
CHOZ A 1 Offset(0, 64)
CHOZ A 1 Offset(0, 48)
Goto Ready+2

Flash:
TNT1 A 3
TNT1 A 0 A_PlaySoundEx("Class/NeedleRevved","Body")
stop

NoAmmo:
CHOZ A 1 ACS_Execute(979,0)
CHOZ A 0 A_Refire
goto Ready+2
RageColorsReady:
CHOZ A 0// ACS_ExecuteAlways(991,0,516)
CHOZ A 1 A_WeaponReady(WRF_NOSWITCH)
CHOZ A 1 A_GiveInventory("BossJumpCharge",1)
Goto Ready+2
}
}

actor ChozoMinigunAmmo : Inventory
{
inventory.amount 1
inventory.maxamount 116
}

actor ChoZoHealer
{
+MISSILE
-SOLID
+NOINTERACTION
+NOGRAVITY
+DONTBLAST
+DONTREFLECT
+THRUACTORS
renderstyle none
radius 2
height 2
reactiontime 175
States
{
Spawn:
TNT1 A 0
Spawn2:
TNT1 A 2
TNT1 A 0 A_GiveToTarget("ChoZoHeal",1)
TNT1 A 0 A_Countdown
loop
Death:
TNT1 A 1
stop
}
}

actor ChoZoHeal : CustomInventory
{
States
{
Pickup:
TNT1 A 0 HealThing(1)
stop
Death:
TNT1 A 1
stop
}
}

actor ChoZoSlam
{
Translation "192:192=216:216","198:198=42:42"
Damagetype "ChoZoSlam"
+MISSILE
-SOLID
+DONTBLAST
+NOGRAVITY
+RIPPER
+SKYEXPLODE
+NOINTERACTION
+DONTSPLASH
+THRUGHOST
+THRUACTORS
+DONTREFLECT
Damage 0
radius 2
height 2
//Scale 2.5
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("misc/hugequake","Body")
TNT1 A 0 A_Quake(6,10,0,300)
TNT1 AAAAAA 0 A_SpawnItemEx("ChoZoSlamFX",random(0,32),0,0,random(0,2),0,random(15,20),random(0,359),1)
TNT1 A 3
TNT1 AAAAAA 0 A_SpawnItemEx("ChoZoSlamFX",random(0,32),0,0,random(0,2),0,random(15,20),random(0,359),1)
TNT1 A 3
stop
}
}

actor ChoZoSlamExplode
{//Easy way of managing every explosion such as topspin
Damagetype "ChoZoSlam"
Obituary "$OB_CHOZOSLAM"
+MISSILE
-SOLID
+DONTBLAST
+NOGRAVITY
+RIPPER
+SKYEXPLODE
+NOINTERACTION
+DONTSPLASH
+THRUGHOST
+THRUACTORS
+DONTREFLECT
Damage 0
radius 2
height 2
//Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(10,140,0,0,80)
stop
}
}

actor ChoZoSlamFX
{
+MISSILE
-NOGRAVITY
+THRUACTORS
+CLIENTSIDEONLY
+DOOMBOUNCE
wallbouncefactor 0.1
bouncefactor 0.5
bouncecount 2
damage 0
radius 6
height 6
scale 2.5
states
{
Spawn:
TNT1 A 0
TNT1 A 0 ThrustThingZ(0,4,0,1)
TNT1 A 0 A_SetArg(0,random(0,2.0))
TNT1 A 0 A_SetScale(scalex - args[0],scaley - args[0])
URAH YZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZYZ 1
stop
}
}

actor ChoZoBullet
{
PROJECTILE
Damagetype "ChoZoMinigun"
Obituary "$OB_CHOZORAGE"
damage (8)
Radius 8
Height 8
speed 75
scale 2.5
States
{
Spawn:
NEDR T 1
loop
Death:
TNT1 A 1 A_Stop
NEDR UVWXXWVU 1
stop
}
}

actor ChoZoFist
{
translation "202:202=210:210"
PROJECTILE
damagetype "ChoZoPunch"
Obituary "$OB_CHOZOPUNCH"
+DONTBLAST
reactiontime 1
damage (10)
Radius 20
Height 20
speed 85
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_CountDown
wait
Death:
UMFX R 0 A_Explode(15,40,0,0,40)
goto XDeath
XDeath:
UMFX R 0 A_Stop
UMFX R 2
YMFX Q 2
UMFX RS 2
stop
}
}

actor ChoZoFist2
{
translation "202:202=210:210"
PROJECTILE
damagetype "ChoZoPunchTwo"
Obituary "$OB_CHOZOPUNCH"
+DONTBLAST
reactiontime 1
damage (30)
Radius 25
Height 25
speed 100
scale 3
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_CountDown
wait
Death:
UMFX R 0 A_Explode(40,56,0,0,56)
goto XDeath
XDeath:
UMFX R 0 A_Stop
UMFX R 2
YMFX Q 2
UMFX RS 2
stop
}
}

actor ChoZoPunchPowerup : PowerUp{powerup.duration 53}
actor ChoZoFMissileFlag : PowerUp{powerup.duration 3} 

actor ChoZoDeathExplosion
{
PROJECTILE
Damagetype "ChoZoExplosion"
Obituary "$OB_CHOZOCHAINBLAST"
+DONTBLAST
+NOCLIP
+NOINTERACTION
Radius 1
Height 1
speed 0
scale 2.5
States
{
Spawn:
CHZO A 0
CHZO A 0 A_Explode(400,240,0)
CHZO A 0 A_PlaySoundEx("CHOZO/EXPLOSION", "Weapon")
CHZO ABCD 1
CHZO EFGHIJKLMNOPQRS 1
TNT1 A 150
stop
}
}

//Flings
actor PainBaseFlingHit : BasicHitBaseF
{
var int user_Amount;
states
{
Spawn:
TNT1 A 0
//TNT1 A 0 A_GiveToTarget("TempPitProtect",1)
TNT1 A 0 A_SetUserVar("user_HIT", ACS_ExecuteWithResult(257,0))
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 ACS_ExecuteAlways(C_JAX_FLINGACS,0,ACS_ExecuteWithResult(257,0),user_HIT,user_Amount)
stop
}
}

actor ChoZoKnockback : PainBaseFlingHit
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_Amount",15)
goto PainBaseFlingHit::Spawn
}
}

actor ChoZoKnockback3 : PainBaseFlingHit
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_Amount",25)
goto PainBaseFlingHit::Spawn
}
}

actor ChoZoRollHelper
{
PROJECTILE
+NOINTERACTION
+DONTBLAST
reactiontime 175
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_RearrangePointers(0,0,2)
TNT1 A 0 A_FaceTarget
Spawn2:
TNT1 AA 1 A_Warp(AAPTR_TRACER,0,0,28,180,0)
TNT1 A 0 A_PlaySoundEx("item/energyup","Body")
TNT1 A 0 A_SpawnItemEx("ChoZoRollL",50,-200)
TNT1 A 0 A_SpawnItemEx("ChoZoRollR",50,200)
TNT1 A 0 A_Countdown
loop
Death:
TNT1 A 1
stop
}
}

actor ChoZoRollL
{
	PROJECTILE
	+NOGRAVITY
	+DONTBLAST
	+DONTREFLECT
	+NOTARGETSWITCH
	+NOINTERACTION
	+NOCLIP
	Radius 1
	Height 1
	scale 2.5
	speed 0
	var int user_angle;
	reactiontime 175
	States
	{
		Spawn:
		ROLL F 0
		ROLL F 0 A_RearrangePointers(0,0,2)
		ROLL F 0 A_FaceTarget
		ROLL F 1 A_SpawnItemEx("RollHealFXChoZo",random(-3,3),random(-3,3),32,30)
		ROLL F 0 A_FaceTarget
		ROLL F 0 A_SpawnItemEx("RollHealFXChoZo",random(-3,3),random(-3,3),32,30)
		ROLL F 1 A_SpawnItemEx("RollHealFXChoZo",random(-3,3),random(-3,3),32,30)
		ROLL F 0 A_FaceTarget
		ROLL F 0 A_SpawnItemEx("RollHealFXChoZo",random(-3,3),random(-3,3),32,30)
		stop
	}
}

actor ChoZoRollR
{
	PROJECTILE
	+NOGRAVITY
	+DONTBLAST
	+DONTREFLECT
	+NOTARGETSWITCH
	+NOINTERACTION
	+NOCLIP
	Radius 1
	Height 1
	scale 2.5
	speed 0
	var int user_angle;
	reactiontime 175
	States
	{
		Spawn:
		ROLL F 0
		ROLL F 0 A_RearrangePointers(0,0,2)
		ROLL F 0 A_FaceTarget
		ROLL F 1 A_SpawnItemEx("RollHealFXChoZo",random(-3,3),random(-3,3),32,30)
		ROLL F 0 A_FaceTarget
		ROLL F 0 A_SpawnItemEx("RollHealFXChoZo",random(-3,3),random(-3,3),32,30)
		ROLL F 1 A_SpawnItemEx("RollHealFXChoZo",random(-3,3),random(-3,3),32,30)
		ROLL F 0 A_FaceTarget
		ROLL F 0 A_SpawnItemEx("RollHealFXChoZo",random(-3,3),random(-3,3),32,30)
		stop
	}
}

actor RollHealFXChoZo
{
Translation "176:176=107:107"
PROJECTILE
+DONTBLAST
scale 1.2
radius 12
height 12
damagetype "Buster"
Damage (0)
Meleerange 100
speed 58
floatspeed 48
Health 1000
States
{
Spawn:
ROLH A 0
ROLH ABCDEF 1
goto Death
Death:
ROLH A 0
stop
}
}

actor RollHealFX1ChoZo : RollHealFXChoZo
{
+NOINTERACTION
speed 36
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 1000, 1000, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH A 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX2ChoZo", 0, 0, 0)
stop
}
}

actor RollHealFX2ChoZo : RollHealFX1ChoZo
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 1000, 1000, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH B 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX3ChoZo", 0, 0, 0)
stop
}
}

actor RollHealFX3ChoZo : RollHealFX1ChoZo
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 1000, 1000, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH C 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX4ChoZo", 0, 0, 0)
stop
}
}

actor RollHealFX4ChoZo : RollHealFX1ChoZo
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 1000, 1000, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH D 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX5ChoZo", 0, 0, 0)
stop
}
}

actor RollHealFX5ChoZo : RollHealFX1ChoZo
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 1000, 1000, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH E 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX6ChoZo", 0, 0, 0)
stop
}
}

actor RollHealFX6ChoZo : RollHealFX1ChoZo
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 1000, 1000, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH F 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX1ChoZo", 0, 0, 0)
stop
}
}

actor ChozoExplosionSpawner
{
Obituary "$OB_CHOZOCHAINBLAST"
states
{
Spawn:
TNT1 A 0
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("ChozoExplosion")
TNT1 A 35
stop
}
}

actor ChozoExplosion : BasicExplosion
{
damagetype "ChoZoExplosion"
Obituary "$OB_CHOZOCHAINBLAST"
Scale 2.5
States
{
Spawn:
CHZO E 0
CHZO A 0 A_Explode(400,240,0)
CHZO A 0 A_PlaySoundEx("CHOZO/EXPLOSION", "Weapon")
CHZO ABCD 1
CHZO EFGHIJKLMNOPQRS 1
TNT1 A 150
stop
}
}
