actor SakugarneBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_KD"
dropitem "SakugarneWepCDropped"
Weapon.AmmoUse 0
Weapon.AmmoGive 28
Obituary "$OB_SAKUGARNE"
Inventory.Pickupmessage "Power up! Sakugarne!"
weapon.ammotype "BackToTheAmmo"
weapon.ammotype2 "MMXQuintAmmo"
inventory.icon "SAKUSI"
States
{
Spawn:
C_0K D 1
loop
Ready:
QBUS A 0 ACS_ExecuteAlways(998,0,DYE_QUINT)
QBUS A 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_JumpZ,0,1)//Disable Jump
QBUS A 0 A_GiveInventory("QuintNoPogo",1)
QBUS A 0 A_GiveInventory("NoJumpCancel",1)
QBUS A 0 A_GiveInventory("SakuAmmoDelay",1)
QBUS A 0 A_GunFlash
Goto Ready1
Ready1:
QBUS A 1 A_WeaponReady(12)
Goto Fire

Deselect:
QBUS A 0 A_TakeInventory("QuintIsAir",1)
QBUS A 0 A_TakeInventory("SakugarneActive",1)
QBUS A 0 A_TakeInventory("NoJumpCancel",1)
QBUS A 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_JumpZ,10,1)
QBUS A 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,1,1)
QBUS AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
QBUS A 1 A_Lower
goto Deselect+5
Select:
QBUS A 0 A_TakeInventory("QuintIsAir",1)
QBUS A 0 A_TakeInventory("SakugarneActive",1)
QBUS A 0 A_TakeInventory("NoJumpCancel",1)
QBUS AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
QBUS A 1 A_Raise
goto Select+3

Fire:
QBUS A 0 A_JumpIfInventory("SakugarneActive",1,"AirStomp")
QBUS A 1 A_WeaponReady(12)
QBUS A 0 A_GiveInventory("QuintAmmoHelp_P",1)
QBUS A 0 A_JumpIf(z-floorz==0,"JumpStart")
QBUS A 0 A_JumpIf(momz==0,"FireV")
loop
FireV:
QBUS A 1 A_WeaponReady(12)
QBUS A 0 A_JumpIf(z-floorz==0,"JumpStart")
QBUS A 0 A_JumpIf(momz==0,"JumpStart")
goto Fire

JumpStart:
QBUS A 0 A_JumpIfInventory("SakugarneActive",1,"Air")
QBUS A 0 A_PlaySoundEx("weapon/sakugarne","Weapon")
QBUS A 0 A_GiveInventory("QuintYesPogo",1)
QBUS A 0 A_TakeInventory("QuintNoPogo",9)
QBUS A 0 A_GunFlash
QBUS BC 2
TNT1 A 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,165,100)
QBUS C 0 A_ChangeVelocity(0,0,16,CVF_RELATIVE)
QBUS C 0 A_GiveInventory("SakugarneActive",1)
QBUS C 2 A_GiveInventory("QuintIsAir",1)
QBUS C 2 A_GiveInventory("Quint_LeapWeaken")
Goto Air

Air:
QBUS C 0 A_JumpIfInventory("BackToTheAmmo",7,"Air2")
QBUS C 0 A_JumpIf(z-floorz==0,"Jump")
QBUS C 0 A_JumpIfInventory("VivifyDelay6",1,"AirBounce")
QBUS C 0 A_SpawnItemEx("QuintLeapCrush",4,0,-10,momx,momy,-100,0,8)
QBUS C 1 A_WeaponReady(12)
QBUS C 0 A_GiveInventory("QuintAmmoHelp_P",1)
//QBUS C 0 A_JumpIfInventory("IsBot",1,"BotAir")
loop
AirBounce:
QBUS A 3
QBUS B 3 A_TakeInventory("VivifyDelay6",1)
goto Air

Air2:
QBUS C 0 A_JumpIfInventory("BackToTheAmmo",28,"Air3")
QBUS C 0 A_JumpIf(z-floorz==0,"Jump")
QBUS C 0 A_JumpIfInventory("VivifyDelay6",1,"AirBounce")
QBUS C 0 A_SpawnItemEx("QuintLeapCrush",4,0,-10,momx,momy,-100,0,8)
QBUS C 1 A_WeaponReady(8)
QBUS C 0 A_GiveInventory("QuintAmmoHelp_P",1)
//QBUS C 0 A_JumpIfInventory("IsBot",1,"BotAir")
loop

Air3:
QBUS C 0 A_JumpIf(z-floorz==0,"Jump")
QBUS C 0 A_JumpIfInventory("VivifyDelay6",1,"AirBounce")
QBUS C 0 A_SpawnItemEx("QuintLeapCrush",4,0,-10,momx,momy,-100,0,8)
QBUS C 1 A_WeaponReady
QBUS A 0 A_GiveInventory("QuintAmmoHelp_P",1)
//QBUS C 0 A_JumpIfInventory("IsBot",1,"BotAir")
loop

BotAir:
QBUS C 0 A_Jump(2,1)
Goto Air
QBUS C 0 A_SelectWeapon("QuintBusterBoss")
Goto Air

AirStomp:
QBUS C 0 A_JumpIf(z-floorz==0,"JumpWaveCheck")
QBUS C 0 A_JumpIfInventory("VivifyDelay6",1,"AirBounce")
QBUS C 0 A_SpawnItemEx("QuintLeapCrush",4,0,-10,momx,momy,-100,0,8)
QBUS C 1 A_GiveInventory("SakuThrust_Pickup")
//QBUS C 0 A_JumpIfInventory("IsBot",1,"BotAirStomp")
loop

BotAirStomp:
QBUS C 0 A_JumpIfCloser(96,"Altfire")
QBUS C 0 A_Jump(4,"SpinJump")
QBUS C 0 A_Jump(1,2)
QBUS C 0 A_Refire("AirReady")
Goto Air
QBUS C 0 A_SelectWeapon("QuintBusterBoss")
QBUS C 0 A_Refire("AirReady")
Goto Air

Jump:
QBUS A 0 A_JumpIfInventory("VivifyDelay6",1,"AirBounce")
QBUS A 0 A_GiveInventory("QuintMain2_CI",1)
QBUS A 0 A_FireCustomMissile("QuintSakuBlastLand2",0,0,0,0)
QBUS A 0 A_GiveInventory("QuintDive_Pickup",1)
QBUS A 0 A_PlaySoundEx("weapon/sakugarne","Weapon")
QBUS A 0 A_TakeInventory("QuintIsAir",1)
QBUS A 0 A_GunFlash
QBUS A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"Jump2")

//QBUS A 0 A_SetArg(3,momy*100000)
//QBUS A 0 A_SetArg(2,momx*100000)

QBUS AABB 2
QBUS A 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,165,100)//SetPlayerProperty(0,0,0)
//QBUS A 0 A_ChangeVelocity(Args[2]*0.00001,Args[3]*0.00001,16,CVF_REPLACE)//17 0 16 //CVF_RELATIVE
QBUS A 0 ThrustThingZ(0,64,0,0)
QBUS C 4 A_GiveInventory("QuintIsAir",1)
QBUS C 1 A_JumpIfInventory("IsBot",1,"BotJump")
QBUS C 1 A_GiveInventory("Quint_LeapWeaken")
QBUS A 0 A_WeaponReady(12)
Goto Air

BotJump:
QBUS C 2 A_Jump(20,3)
QBUS A 0
QBUS A 0 A_WeaponReady(12)
Goto Air
QBUS C 2 A_SelectWeapon("QuintBusterBoss")
QBUS A 0
QBUS A 0 A_WeaponReady(12)
Goto Air

Jump2:
QBUS AB 3
QBUS A 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,165,100)//SetPlayerProperty(0,0,0)
QBUS A 0 ThrustThingZ(0,84,0,0)//A_ChangeVelocity(0,0,21,CVF_RELATIVE)//16,0,21
QBUS C 4 A_GiveInventory("QuintIsAir",1)
QBUS C 1
QBUS C 1 A_GiveInventory("Quint_LeapWeaken")
QBUS A 0 A_WeaponReady(12)
Goto Air

JumpWaveCheck:
QBUS A 0 A_JumpIfInventory("VivifyDelay6",1,"AirBounce")
QBUS A 0 A_JumpIfInventory("BackToTheAmmo",7,"JumpWave")
goto Jump+1
JumpWave:
QBUS A 0 A_PlaySoundEx("misc/mm3explosion","Body")
QBUS A 0 A_GiveInventory("QuintMainX_CI",1)
QBUS A 0 A_GiveInventory("SelfStoppedTF",1)
QBUS A 0 A_TakeInventory("QuintIsAir",1)
QBUS A 0 A_GunFlash
QBUS AB 4 A_Stop
QBUS B 0 A_GiveInventory("SelfStoppedUnfreeze",1)
goto Jump+3

Altfire:
QBUS C 0 A_JumpIfInventory("BackToTheAmmo",28,"SpinJump")
goto Air

SpinJump:
QBUS C 0 A_GiveInventory("StunArmor",1)
QBUS C 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,40,100)//10
/*
QBUS C 0 A_ChangeVelocity(48,0,0,3)
QBUS C 0 A_JumpIfInventory("FlightDisableFlag",1,2)
QBUS C 0 ThrustThingZ(0,80,0,0)
QBUS C 2
QBUS C 4 A_TakeInventory("WeaponCharge",999)
QBUS C 3 A_TakeInventory("BackToTheAmmo",28)
*/

QBUS C 0 A_TakeInventory("BackToTheAmmo",28,1)
QBUS C 0 A_TakeInventory("WeaponCharge",999)
QBUS C 0 ThrustThingZ(0,4,0,0)

QBUS C 1 A_SetArg(3,angle)
QBUS C 0 A_PlaySoundEx("misc/quintspin","Body")
QBUS C 0 A_Stop
QBUS C 0 A_JumpIfInventory("FlightDisableFlag",1,"SpinningFall")
QBUS C 0 //A_ChangeVelocity(0,0,23,3)
goto SpinningUp
SpinningUp:
QBUS C 0 A_SetAngle(angle+30)
QBUS C 0 A_SpawnItemEx("QuintSakuAltSpin",0,0,-16,0,0,0,0,1)
QBUS C 0 ThrustThingZ(0,4,0,0)
QBUS C 1 A_GiveInventory("WeaponCharge",1)
QBUS C 0 A_JumpIfInventory("WeaponCharge",20,"SpinningPush")
goto SpinningUp
SpinningPush:
QBUS C 0 ThrustThing(args[3]*256/360,1,1,0)
QBUS C 0 A_GiveInventory("QuintSpinningDelay",1)
goto SpinningFall
SpinningFall:
QBUS C 0 A_SetAngle(angle+30)
QBUS C 0 A_SpawnItemEx("QuintSakuAltSpin",0,0,-16,0,0,0,0,1)
QBUS C 0 A_ChangeVelocity(0,0,-1,CVF_RELATIVE)
QBUS C 1 A_JumpIf(z-floorz==0,"SpinLand")
QBUS C 0 A_JumpIfInventory("WeaponCharge",26,"SpinLand")
QBUS C 0 A_JumpIfInventory("QuintSpinningDelay",1,"SpinningFall")
goto SpinningHelp
SpinningHelp:
QBUS C 0 ThrustThing(args[3]*256/360,20,1,0)
QBUS C 0 A_SetArg(3,random(0,255))
QBUS C 0 A_GiveInventory("WeaponCharge",1)
QBUS C 0 A_GiveInventory("QuintSpinningDelay",1)
goto SpinningFall

SpinLand:
QBUS C 0 A_SetAngle(args[3])
QBUS B 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,0,1)
QBUS B 0 A_GiveInventory("QuintDive",1)
QBUS B 0 A_TakeInventory("QuintIsAir",9)
QBUS B 0 A_TakeInventory("StunArmor",9)
QBUS B 0 A_GunFlash
QBUS B 0 A_GiveInventory("QuintAltX_CI",1)
QBUS BABABABABABABABA 2 A_Stop
QBUS A 0 A_TakeInventory("QuintDive",9)
Goto Jump+3


Flash:
TNT1 A 1
stop
}
}

actor QuintBusterBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_KD2"
dropitem "SakugarneWepCDropped"
Weapon.AmmoUse 0
Weapon.AmmoGive 3
Obituary "$OB_QUINTBUSTER"
Inventory.Pickupmessage "You Lose! Good day sir!"
weapon.ammotype "BackToTheAmmo"
weapon.ammotype2 "MMXQuintAmmo"
+WEAPON.NOAUTOAIM
inventory.icon "QBustIcn"
States
{
Spawn:
C_0K D 1
loop
Ready:
QBUS D 0 ACS_ExecuteAlways(998,0,DYE_QUINT)
QBUS D 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_JumpZ,10,1)
QBUS D 0 A_TakeInventory("QuintYesPogo",1)
QBUS D 0 A_GiveInventory("QuintNoPogo",1)//A_GunFlash
Goto Ready1
Ready1:
QBUS D 0 A_JumpIfInventory("MMXQuintAmmo",100,"Ready2")
QBUS D 9 A_WeaponReady(8)
QBUS D 0 A_GiveInventory("BackToTheAmmo",1)
loop
Ready1:
QBUS D 9 A_WeaponReady
QBUS D 0 A_GiveInventory("BackToTheAmmo",1)
loop
Deselect:
QBUS D 0 A_TakeInventory("QuintDive",99)
QBUS DDDDDDDDDDDDDDDDDDDDDD 0 A_Lower
QBUS D 1 A_Lower
goto Deselect+1
Select:
QBUS D 0 A_TakeInventory("QuintDive",99)
QBUS D 0 A_TakeInventory("SakugarneActive",1)
QBUS DDDDDDDDDDDDDDDDDDDDDD 0 A_Raise
QBUS D 1 A_Raise
goto Select+2
Fire:
QBUS D 0 A_JumpIfInventory("IsBot",1,"BotFire")
QBUS D 0 A_PlaySoundEx("weapon/GameBoyFire","Weapon")
QBUS D 0 A_GiveInventory("QuintMain_CI",1)
QBUS EF 3
QBUS D 4 
QBUS D 0 A_GiveInventory("BackToTheAmmo",1)
goto Ready1
FireV://Lazy desync fix?
AirStomp://
JumpStart://
goto Fire
Altfire:
QBUS D 0 A_JumpIfInventory("MMXQuintAmmo",100,"Altfire2")
goto Ready1
Altfire2:
QBUS G 0 A_GiveInventory("QuintMMX_StaminaUse_P",1)
QBUS G 0 A_GiveInventory("VivifyDelay10",1)
QBUS G 0 A_Refire(1)
QBUS G 0 A_PlaySoundEx("weapon/GameBoyMMXDash","Weapon")
QBUS G 0 A_ChangeVelocity(40,0,momz,3)
QBUS G 0 A_SetArg(3,momy*100000)
QBUS G 0 A_SetArg(2,momx*100000)
goto AltfireH
AltfireH:
QBUS GGGGGGGGGG 1 A_GiveInventory("QuintSlide_Pickup",1)
QBUS G 1 OffSet(-10,52)A_ChangeVelocity(momx*0.75,momy*0.75,momz,2)
QBUS G 1 OffSet(-20,72)
QBUS D 2 OffSet(12,112)
QBUS D 2 OffSet(9,92)
QBUS D 2 OffSet(6,72)
QBUS D 2 OffSet(3,52)
goto Ready1

BotFire:
QBUS D 0 A_JumpIfCloser(64,2)
QBUS D 0 A_Jump(8,1)
goto Fire+1
QBUS D 0 A_SelectWeapon("SakugarneBoss")
goto Fire+1
Flash:
TNT1 A 1
stop
}
}

actor BackToTheAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}

actor MMXQuintAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 300
+INVENTORY.IGNORESKILL
}


actor QuintYesPogo :OnceC{}
actor QuintNoPogo :OnceC{}


actor QuintDive :OnceC{}

actor QuintIsAir :OnceC{}


actor SakuThrustDelay : Powerup
{
Powerup.Duration 2
}

actor SakuAmmoDelay : Powerup
{
+INVENTORY.ADDITIVETIME
Powerup.Duration 6
}

actor QuintSpinningDelay : Powerup
{
Powerup.Duration 88
}


actor SakuThrust_Pickup : CustomInventory
{
States
{
Pickup:
//TNT1 A 0 A_LOGINT(MOMX*MOMX+MOMY*MOMY)
//TNT1 A 0 A_LOGINT(MOMX)
//TNT1 A 0 A_LOGINT(MOMY)
TNT1 A 0 A_ChangeVelocity(1,0,-1,CVF_RELATIVE)
TNT1 A 0 A_ChangeVelocity((momx)*1.045,(momy)*1.045,(momz),CVF_REPLACE)
TNT1 A 0 A_JumpIfInventory("SakuThrustDelay",1,"No")
goto PickupFX
PickupFX:
TNT1 A 0 A_GiveInventory("SakuThrustDelay",1)
TNT1 A 0 A_SpawnItemEx("SakuTrailFX",0,0,0,0,0,0,0,1)
stop
No:
TNT1 A 0
stop
}
}

actor SakuArgMath_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(Args[2]<0,"S_2")
TNT1 A 0 A_JumpIf(Args[3]<0,"S_3")
TNT1 A 0 A_ChangeVelocity(Args[2]+Args[3],0,16,3)
stop
S_2:
TNT1 A 0 A_JumpIf(Args[3]<0,"S_23")
TNT1 A 0 A_ChangeVelocity(Args[2]*-1+Args[3],0,16,3)
stop
S_3:
TNT1 A 0 A_ChangeVelocity(Args[2]+Args[3]*-1,0,16,3)
stop
S_23:
TNT1 A 0 A_ChangeVelocity(Args[2]*-1+Args[3]*-1,0,16,3)
stop
}
}

actor QuintDive_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("QuintDive",1,"Pickup0X")
stop
Pickup0X:
TNT1 A 0 //A_Stop
TNT1 A 0 A_TakeInventory("QuintDive",9)
TNT1 A 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,0,1)//SetPlayerProperty(0,1,0)
stop
}
}

actor QuintSlide_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,"Dash2")
goto Dash1
Dash1:
TNT1 A 0 A_ChangeVelocity(Args[2]*0.00001,Args[3]*0.00001,0,CVF_REPLACE)
goto DashEnd
Dash2:
TNT1 A 0 A_ChangeVelocity(Args[2]*0.00001,Args[3]*0.00001,momz,CVF_REPLACE)
goto DashEnd
DashEnd:
TNT1 A 0 A_SpawnItemEx("SakuDashTrailFX",0,0,0,0,0,0,0,1)
stop
}
}

actor QuintAmmoHelp_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("SakuAmmoDelay",1,"No")
goto PickupA
PickupA:
TNT1 A 0 A_GiveInventory("BackToTheAmmo",1)
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"PickupA_R")
TNT1 A 0 A_GiveInventory("SakuAmmoDelay",1)
goto PickupA_R
PickupA_R:
TNT1 A 0 A_GiveInventory("SakuAmmoDelay",1)
stop
No:
TNT1 A 0
stop
}
}

actor QuintMMX_StaminaUse_H : BasicHelper
{
+SERVERSIDEONLY
States
{
Spawn:
TNT1 A 0
TNT1 A 5
Spawn2:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("SlideLimitRestoreDelay",1,2)
TNT1 A 0 A_GiveToTarget("MMXQuintAmmo",1)
TNT1 A 1 A_JumpIfInTargetInventory("QuintNoPogo",1,1)
TNT1 A 1
TNT1 A 0 A_JumpIfInTargetInventory("SlideLimitRestoreDelay",1,"Spawn2")
TNT1 A 0 A_JumpIfInTargetInventory("MMXQuintAmmo",300,"Death")
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
loop
}
}

actor QuintMMX_StaminaUse_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("SlideLimitRestoreDelay",1)
TNT1 A 0 A_JumpIfInventory("MMXQuintAmmo",300,"Pickup_H")
TNT1 A 0 A_JumpIfInventory("MMXQuintAmmo",100,"Pickup2")
stop
Pickup_H:
TNT1 A 0 A_TakeInventory("MMXQuintAmmo",100,1)
TNT1 A 0 A_JumpIfInventory("MMXQuintAmmo",300,2)
TNT1 A 0 A_SpawnItemEx("QuintMMX_StaminaUse_H",0,0,24)
TNT1 A 0
stop
Pickup2:
TNT1 A 0 A_TakeInventory("MMXQuintAmmo",100,1)
stop
}
}


actor SakuShockwaveSpawner : BasicExplosion
{
Translation "202:202=214:214","199:199=248:248","204:204=215:215"
damagetype "Quint_SakuLand"
Obituary "$OB_QUINTEXPLODE"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,15,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,30,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,45,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,60,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,75,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,90,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,105,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,120,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,135,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,150,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,165,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,180,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,195,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,210,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,225,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,240,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,255,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,270,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,285,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,300,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,315,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,330,1)
TNT1 A 0 A_SpawnItemEx("SakuShockwaveBit",0,0,0,20,0,0,345,1)
TNT1 A 0 A_Explode(120,128,0,0,128)
TNT1 AAAAAAAAAA 0 A_SpawnItemEx("SakuRockCrushFX",0,0,5,0,random(2,8),random(5,10),random(0,360),1)
TNT1 A 1
stop
}
}

actor SakuShockwaveSpawnerB : SakuShockwaveSpawner{translation "202:202=205:205","199:199=74:74","204:204=205:205"}
actor SakuShockwaveSpawnerR : SakuShockwaveSpawner{translation "202:202=171:171","199:199=41:41","204:204=171:171"}
actor SakuShockwaveSpawnerO : SakuShockwaveSpawner{translation "202:202=104:104","199:199=128:128","204:204=104:104"}
actor SakuShockwaveSpawnerP : SakuShockwaveSpawner{translation "202:202=229:229","199:199=232:232","204:204=229:229"}


actor SakuShockwaveBit
{
PROJECTILE
damagetype "Quint_Wave"
Obituary "$OB_QUINTROCK"
//+FLOORHUGGER
Damage (60)
Radius 32
Height 8
Speed 30
Scale 2.0
States
{
Spawn:
TNT1 A 0
TNT1 A 1
QBOP G 10
QBOP GGG 1 A_FadeOut(0.25)
stop
Death:
TNT1 A 1
stop
}
}

actor Quint_WaveProtect : PowerProtection
{
Powerup.Duration 7
DamageFactor "Quint_Wave", 0.2
}


actor QuintLeapCrush
{
PROJECTILE
damagetype "Quint_Leap"
Obituary "$OB_QUINTCRUSH"
+DONTBLAST
+DONTREFLECT
+THRUGHOST
damage (320)
Radius 28
Height 2
renderstyle none
States
{
Spawn:
TNT1 A 1
stop
}
}

actor Quint_LeapWeaken : PowerDamage
{
Powerup.Duration 9
DamageFactor "Quint_Leap", 0.5
}

actor Quint_LeapProtect : PowerProtection
{
Powerup.Duration 8
DamageFactor "Quint_Leap", 0.0
}

actor QuintLeap_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("VivifyDelay6",1)
TNT1 A 0 A_PlaySoundEx("weapon/ToadCrush","SoundSlot7")
goto PickupT
PickupT:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"PickupT2")
goto PickupT1
PickupT1:
TNT1 A 0 ThrustThingZ(0,60,0,0)
stop
PickupT2:
TNT1 A 0 ThrustThingZ(0,100,0,0)
stop
}
}


actor QuintSakuBlastLand : BasicExplosion
{
Translation "202:202=214:214","199:199=248:248"
damagetype "Quint_SakuLand"
Obituary "$OB_QUINTEXPLODE"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("QuintSakuBlastLandFX",frandom(0,6),0,-20,frandom(1,3),0,Frandom(2,6),random(0,17)*4,1)
TNT1 A 0 A_SpawnItemEx("QuintSakuBlastLandFX",frandom(0,6),0,-20,frandom(1,3),0,Frandom(2,6),random(18,35)*4,1)
TNT1 A 0 A_SpawnItemEx("QuintSakuBlastLandFX",frandom(0,6),0,-20,frandom(1,3),0,Frandom(2,6),random(36,53)*4,1)
TNT1 A 0 A_SpawnItemEx("QuintSakuBlastLandFX",frandom(0,6),0,-20,frandom(1,3),0,Frandom(2,6),random(54,71)*4,1)
TNT1 A 0 A_SpawnItemEx("QuintSakuBlastLandFX",frandom(0,6),0,-20,frandom(1,3),0,Frandom(2,6),random(72,89)*4,1)
TNT1 A 0 A_Explode(80,128,0,0,128)
TNT1 A 4
stop
}
}
actor QuintSakuBlastLandB : QuintSakuBlastLand{Translation "202:202=205:205","199:199=74:74"}
actor QuintSakuBlastLandR : QuintSakuBlastLand{Translation "202:202=171:171","199:199=41:41"}
actor QuintSakuBlastLandO : QuintSakuBlastLand{Translation "202:202=104:104","199:199=128:128"}
actor QuintSakuBlastLandP : QuintSakuBlastLand{Translation "202:202=229:229","199:199=232:232"}


actor QuintSakuBlastLand2 : QuintSakuBlastLand
{
damagetype "Quint_SakuLand2"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(120,128,0,0,32)
TNT1 A 4
stop
}
}

actor QuintSakuBlastLandFX
{
+MISSILE
+DONTBLAST
+THRUACTORS
+CLIENTSIDEONLY
+FLOORCLIP
+DONTSPLASH
Damage (0)
Radius 3
Height 3
Speed 5
Scale 1.0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,"Debris1","Debris2","Debris3","Debris4","Debris5")
Debris1:
QROC A -1
wait
Debris2:
QROC B -1
wait
Debris3:
QROC C -1
wait
Debris4:
QROC D -1
wait
Debris5:
QROC E -1
wait
}
}

actor QuintSakuAltSpin : BasicExplosion
{
damagetype "Quint_Spin"
Obituary "$OB_SAKUGARNE"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("QuintSakuAltSpinFX",0,0,8,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("QuintSakuAltSpinFX",0,0,8,0,0,0,180,1)
TNT1 A 4 A_Explode(70,64,0,0,64)
stop
}
}


actor QuintSakuAltSpinFX : BasicClientSide
{
renderstyle add
Scale 5.0
States
{
Spawn:
QROC H 0 A_SetAngle(angle-5)
QROC H 0 A_FadeOut(0.08)
QROC H 1 A_ChangeVelocity(10,0,8,3)
QROC I 0 A_SetAngle(angle-5)
QROC I 0 A_FadeOut(0.08)
QROC I 1 A_ChangeVelocity(10,0,8,3)
loop
}
}


actor SakuRockCrusher : BasicExplosion
{
Translation "202:202=214:214","199:199=248:248","204:204=215:215"
var int user_A;
var int user_R;
damagetype "Quint_Rock"
Obituary "$OB_QUINTROCK"
ReactionTime 24//2
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("misc/hugequake2","Weapon")
TNT1 A 0 A_PlaySoundEx("misc/hugequake2","Voice")
TNT1 A 0 A_Explode(80,128,0,0,128)
TNT1 A 0 A_SetUserVar("user_A",random(0,179))
TNT1 A 0 A_SetUserVar("user_R",user_A+180)
Spawn2:
TNT1 A 0 A_SpawnItemEx("SakuRockCrush",0,0,0,25,0,5,0+user_A,1)
TNT1 A 0 A_SpawnItemEx("SakuRockCrush",0,0,0,25,0,5,180+user_A,1)
TNT1 A 1 A_SpawnItemEx("SakuRockCrushFX",0,0,5,0,random(2,8),random(5,10),random(0,360),1,128)
TNT1 A 0 A_CountDown
TNT1 A 0 A_SetUserVar("user_A",user_A+15)
TNT1 A 0 A_JumpIf(user_A>=user_R,"Spawn3")
loop
Spawn3:
TNT1 A 0 A_SetUserVar("user_A",user_A+8)
TNT1 A 0 A_SetUserVar("user_R",user_R+188)
goto Spawn2
Death:
TNT1 AAAA 1 A_SpawnItemEx("SakuRockCrushFX",0,0,5,0,random(2,8),random(5,10),random(0,360),1)
stop
}
}

actor SakuRockCrusherB : SakuRockCrusher{Translation "202:202=205:205","199:199=74:74","204:204=205:205"}
actor SakuRockCrusherR : SakuRockCrusher{Translation "202:202=171:171","199:199=41:41","204:204=171:171"}
actor SakuRockCrusherO : SakuRockCrusher{Translation "202:202=104:104","199:199=128:128","204:204=104:104"}
actor SakuRockCrusherP : SakuRockCrusher{Translation "202:202=229:229","199:199=232:232","204:204=229:229"}


actor Quint_RockProtect : PowerProtection
{
Powerup.Duration 6
DamageFactor "Quint_Rock", 0.25
}

actor SakuRockCrush
{
PROJECTILE
damagetype "Quint_Rock"
Obituary "$OB_QUINTROCK"
-NOGRAVITY
+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
//+ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
WALLBOUNCEFACTOR 0.85
BOUNCEFACTOR 0.85
Bouncecount 3

+THRUSPECIES
Species "DumbQuintRock"
+SHOOTABLE
-NOBLOCKMAP
+DONTDRAIN
+NOTARGETSWITCH
+NOPAIN
Health 280

gravity 0.5
Damage (120)
Radius 18
Height 18
Speed 5
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_Jump(256,"Debris3","Debris4")
Debris3:
TNT1 A 0
QROC D -1
Debris4:
TNT1 A 0
QROC F -1
Death:
VMFX I 0 A_ChangeFlag("NOGRAVITY",1)
VMFX III 0 A_SpawnItemEx("SakuRockCrushFX",0,0,5,0,random(-5,5),random(5,8),random(0,360),1)
VMFX IJK 3 A_Stop
XMFX D 3 A_Stop
stop
}
}


actor SakuRockCrushFX
{
+MISSILE
+DONTBLAST
+THRUACTORS
+CLIENTSIDEONLY
+FLOORCLIP
+DONTSPLASH
Damage (0)//(100)
Radius 4//32
Height 4//32
Scale 2.0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,"Debris1","Debris2","Debris3","Debris4")
Debris1:
QROC A -1
wait
Debris2:
QROC B -1
wait
Debris3:
QROC C -1
wait
Debris4:
QROC E -1
wait
Death:
TNT1 A 0 A_SpawnItemEx("SakuRockCrushFX2",0,0,20,0,0,0,0,1)
stop
}
}
actor SakuRockCrushFX2 : BasicClientSide
{
Scale 2.0
States
{
Spawn:
VMFX I 0
VMFX IJK 2
XMFX D 2
stop
}
}

actor SakuTrailFX : BasicClientSide
{
renderstyle translucent
alpha 0.9
states
{
Spawn:
QEGA Y 1 A_FadeOut(0.1)
loop
}
}
actor SakuDashTrailFX : BasicClientSide
{
renderstyle translucent
alpha 0.9
states
{
Spawn:
TNT1 A 1
QEGA K 1 A_SetTranslucent(0.9,1)
QEGA K 1 A_SetTranslucent(0.6,0)
QEGA K 1 A_SetTranslucent(0.8,1)
QEGA K 1 A_SetTranslucent(0.5,0)
QEGA K 1 A_SetTranslucent(0.7,1)
QEGA K 1 A_SetTranslucent(0.4,0)
stop
}
}

actor QShot
{
Translation "204:204=215:215"
PROJECTILE
damagetype "Quint_Shot"
Obituary "$OB_QUINTBUSTER"
+BRIGHT
Damage (100)
radius 5
height 5
Speed 32
scale 2.5
States
{
Spawn:
TNT1 A 2
W_0B B 1
wait
Death:
W_0B B 1
stop
}
}
actor QShotB : QShot{translation "204:204=205:205"}
actor QShotR : QShot{translation "204:204=171:171"}
actor QShotO : QShot{translation "204:204=104:104"}
actor QShotP : QShot{translation "204:204=229:229"}


actor QuintMain2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("QuintSakuBlastLand",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("QuintSakuBlastLandB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("QuintSakuBlastLandR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("QuintSakuBlastLandO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("QuintSakuBlastLandP",0,0,0,0)
goto Done
}
}

actor QuintMainX_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("SakuShockwaveSpawner",0,0,0,-16)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("SakuShockwaveSpawnerB",0,0,0,-16)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("SakuShockwaveSpawnerR",0,0,0,-16)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("SakuShockwaveSpawnerO",0,0,0,-16)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("SakuShockwaveSpawnerP",0,0,0,-16)
goto Done
Done:
TNT1 A 0 A_TakeInventory("BackToTheAmmo",7,1)
stop
}
}

actor QuintAltX_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("SakuRockCrusher",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("SakuRockCrusherB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("SakuRockCrusherR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("SakuRockCrusherO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("SakuRockCrusherP",0,0,0,0)
goto Done
}
}


actor QuintMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("QShot",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("QShotB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("QShotR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("QShotO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("QShotP",0,0,8,0)
goto Done
}
}
