actor RainFlushBoss : BaseMM8BDMWep_CBM
{
dropitem "RainFlushWepCDropped"
Weapon.AmmoUse 7
Weapon.AmmoGive 28
Weapon.SlotNumber 6
Obituary "$OB_RAINFLUSH"
weapon.ammotype "ShantaeDanceAmmo"
Inventory.Pickupmessage "You cheater."
States
{
Spawn:
C_04 B 1
loop
Ready:
TARM A 0 ACS_ExecuteAlways(998,0,781)
TARM A 0 A_GiveInventory("SpawningMisfire",1)
goto Ready2
Ready2:
TARM A 2 A_WeaponReady
TARM A 0 A_TakeInventory("SpawningMisfire",1)
Goto Ready3
Ready3:
TARM A 0 A_GiveInventory("ToadLeapFlagE",1)
TARM A 0 A_TakeInventory("ToadLeapFlag",999)
TARM A 0 A_JumpIfInventory("ToadLeapDelay",1,"Ready3a")
TARM A 1 A_WeaponReady
Goto Ready3+3
Ready3a:
TARM A 1 A_WeaponReady(8)
Goto Ready3

Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
TARM A 1 A_Lower
loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
TARM A 1 A_Raise
Loop
Fire:
TARM A 0 A_JumpIfInventory("IsBot",1,"BotFire")
TARM A 0 A_JumpIfInventory("SpawningMisfire",1,"SpawnProtect")
TARM A 0 A_JumpIfInventory("ToadDancingFlag",1,"FirePT2")
TARM A 0 A_GiveInventory("ToadDancingFlag",1)
TARM A 0 A_GiveInventory("ToadLeapFlagE",1)
TARM A 0 SetPlayerProperty(0,1,0)
TARM A 0 ACS_ExecuteAlways(648,0,1)
TARM A 0 A_PlaySound("class/ToadDance",1,1.0)
TARM B 1
TARM B 0 A_TakeInventory("ToadLeapFlag",999)
TARM B 1 A_TakeInventory("ToadLeapFlagX",999)
TARM CDE 6
Goto FirePT2
Altfire:
TARM A 0 A_JumpIf(floorz-z==0,"Leap")
TARM A 1
Goto Ready3
Leap:
TARM A 0 A_GiveInventory("StunArmor",1)
TARM A 0 A_GiveInventory("ToadLeapFlag",1)
TARM A 0 A_TakeInventory("ToadLeapFlagE",999)
TARM A 0 ThrustThingZ(0,20,1,0)
TARM JI 4
TARM J 0 A_PlaySoundEx("weapon/superarmuse","Weapon")
TARM J 0 ThrustThingZ(0,80,0,0)
TARM J 0 A_Recoil(-30)
TARM J 0 A_GiveInventory("ToadLeapDelay",1)
//TARM J 15
//TARM A 0 A_TakeInventory("StunArmor",999)
//TARM J 25
Goto LeapUp

LeapUp:
TARM JJJJJJJJJJJJJJJ 1 A_JumpIf(momz<=0,"LeapFallS")
goto LeapFallS
LeapFallS:
TARM J 0 A_TakeInventory("StunArmor",999)
goto LeapFall
LeapBounce:
TARM IIJ 2
TARM J 2 A_TakeInventory("ToadLeapFlagX",999)
goto LeapFall

LeapFall:
TARM J 0 A_JumpIfInventory("ToadLeapFlagX",1,"LeapBounce")
TARM J 0 A_JumpIf(z-floorz==0,"Ready3")
TARM J 0 A_JumpIf(momz==0,4)
TARM J 0 A_SpawnItemEx("ToadLeapCrush",0,0,-10,momx,momy,-10,0,8)
TARM J 1 A_WeaponReady(14)
TARM J 0 A_JumpIfInventory("ToadLeapDelay",1,"LeapFall")
goto LeapFallR
TARM J 0 A_JumpIfInventory("ToadLeapFlagX",1,"LeapBounce")
TARM J 0 A_SpawnItemEx("ToadLeapCrush",0,0,-10,momx,momy,-10,0,8)
TARM J 1 A_WeaponReady(14)
TARM J 0 A_JumpIf(z-floorz==0,"Ready3")
TARM J 0 A_JumpIf(momz==0,"Ready3")
TARM J 0 A_JumpIfInventory("ToadLeapDelay",1,"LeapFall")
goto LeapFallR
LeapFallR:
TARM J 0 A_JumpIfInventory("ToadLeapFlagX",1,"LeapBounce")
TARM J 0 A_JumpIf(z-floorz==0,"Ready3")
TARM J 0 A_JumpIf(momz==0,3)
TARM J 0 A_SpawnItemEx("ToadLeapCrush",0,0,-10,momx,momy,-10,0,8)
TARM J 1 A_WeaponReady(2)
loop
TARM J 0 A_JumpIfInventory("ToadLeapFlagX",1,"LeapBounce")
TARM J 0 A_SpawnItemEx("ToadLeapCrush",0,0,-10,momx,momy,-10,0,8)
TARM J 1 A_WeaponReady(2)
TARM J 0 A_JumpIf(z-floorz==0,"Ready3")
TARM J 0 A_JumpIf(momz==0,"Ready3")
loop

FirePT2: //To make it work with spread, its FireCustomMissile, if an issue, easy to change back.
TARM F 0 //A_SpawnItemEx("RainFlushClass",0,0,0)
TARM F 0
TARM F 2 offset(-16,32) A_GiveInventory("ToadmanMain_CI",1)//A_FireCustomMissile("RainFlushClass")
TARM F 2 offset(-8,32)
TARM F 2 offset(1,32)
TARM F 2 offset(8,32)
TARM F 2 offset(16,32) A_GiveInventory("ToadmanMain1_CI",1)
TARM F 2 offset(8,32)
TARM F 2 offset(-1,32)
TARM F 2 offset(-8,32)
TARM F 2 offset(-16,32) A_GiveInventory("ToadmanMain2_CI",1)
TARM F 2 offset(-8,32)
TARM F 2 offset(1,32)
TARM F 2 offset(8,32)
TARM F 2 offset(16,32) A_GiveInventory("ToadmanMain2_CI",1)
TARM F 2 offset(8,32)
TARM F 2 offset(-1,32)
TARM F 2 offset(-8,32) A_GiveInventory("StunArmor", 1)
TARM A 0 A_Refire("FireHRain")
goto FireEnd
FireHRain:
TARM F 0 A_GiveInventory("ToadmanMainXS_CI",1)
TARM F 2 offset(-16,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(-8,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(1,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(8,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 0 A_GiveInventory("ToadmanMainXS_CI",1)
TARM F 2 offset(16,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(8,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(-1,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(-8,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 0 A_GiveInventory("ToadmanMainXS_CI",1)
TARM F 2 offset(-16,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(-8,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(1,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(8,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 0 A_GiveInventory("ToadmanMainXS_CI",1)
TARM F 2 offset(16,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(8,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 2 offset(-1,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire(1)
goto FireEnd
TARM F 0 ACS_ExecuteAlways(974,0)
TARM F 2 offset(-8,32) A_GiveInventory("ToadFireFlag",1)
TARM F 1 A_Refire("FireHRain")
goto FireEnd

FireEnd:
TNT1 A 0 A_TakeInventory("StunArmor", 999)
TNT1 A 0 A_TakeInventory("ToadFireFlag",99)
TNT1 A 0 SetPlayerProperty(0,0,0)
TNT1 A 2 ACS_ExecuteAlways(648,0,2)
TNT1 A 18 A_TakeInventory("ToadDancingFlag",99)
TNT1 A 0 ACS_ExecuteAlways(974,0)
TARM IJ 2 
Goto Ready3
SpawnProtect:
TARM A 1
Goto Ready2

BotFire:
TNT1 A 0 A_JumpIfCloser(1000,"BotFire2")
TARM A 1 A_Jump(16,"AltFire")
goto Ready3
BotFire2:
TNT1 A 0 A_Jump(220,2)
TNT1 A 0 A_GiveInventory("BotJumpC",1)
//TNT1 A 0 A_JumpIfCloser(450,"BotFire3")
TNT1 A 0 A_JumpIfCloser(200,"BotFire3")
TARM A 1 A_Jump(4,"AltFire")
goto Ready3
BotFire3:
TARM A 0
goto Fire+2
}
}

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

actor ToadFireFlag : Inventory
{
inventory.amount 1
inventory.maxamount 6
}


actor ToadLeapDelay : Powerup
{
Powerup.Duration 40
}
actor ToadLeapFlag :OnceC{}
actor ToadLeapFlagX :OnceC{}
actor ToadLeapFlagE :OnceC{}

actor ToadDancingFlag :OnceC{}

actor RainFlushClass : BasicExplosion
{
Translation "198:198=104:104", "202:202=248:248"
damagetype "RainFlush"
Obituary "$OB_RAINFLUSH"
ReactionTime 35
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Stop
TNT1 A 0 A_PlaySoundEx("weapon/rainflush","SoundSlot6")
TNT1 A 0 A_Explode(12,480,0,0,112)//256//A_Explode(50,450,0)
Spawn2://random(-168,308)
TNT1 AAAA 0 A_SpawnItemEx("RainSprinkleBoss", random(-248,428), random(-438,438), 306, -30, 0, -30, 180, 129)
TNT1 A 1 A_SpawnItemEx("RainSprinkleBoss", random(-248,428), random(-438,438), 306, -30, 0, -30, 180, 129)//SXF_TRANSFERTRANSLATION|SXF_CLIENTSIDE//|SXF_ABSOLUTEANGLE
TNT1 A 0 A_CountDown
loop
}
}

actor RainFlushClassB : RainFlushClass{translation "202:202=205:205", "198:198=74:74"}
actor RainFlushClassR : RainFlushClass{translation "202:202=171:171", "198:198=41:41"}
actor RainFlushClassO : RainFlushClass{translation "202:202=104:104", "198:198=128:128"}
actor RainFlushClassP : RainFlushClass{translation "202:202=229:229", "198:198=232:232"}

actor RainFlushClass15 : RainFlushClass
{
ReactionTime 1
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Stop
TNT1 A 0// A_PlaySoundEx("weapon/ShortRain","SoundSlot6")
TNT1 A 0 A_Explode(12,488,0,0,80)
goto Spawn2
}
}

actor RainFlushClass15B : RainFlushClass15{translation "202:202=205:205", "198:198=74:74"}
actor RainFlushClass15R : RainFlushClass15{translation "202:202=171:171", "198:198=41:41"}
actor RainFlushClass15O : RainFlushClass15{translation "202:202=104:104", "198:198=128:128"}
actor RainFlushClass15P : RainFlushClass15{translation "202:202=229:229", "198:198=232:232"}

actor RainFlushClass10 : RainFlushClass
{
damagetype "RainFlushWeak"
ReactionTime 1
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Stop
TNT1 A 0// A_PlaySoundEx("weapon/ShortRain","SoundSlot6")
TNT1 A 0 A_Explode(10,496,0,0,48)
goto Spawn2
}
}

actor RainFlushClass10B : RainFlushClass10{translation "202:202=205:205", "198:198=74:74"}
actor RainFlushClass10R : RainFlushClass10{translation "202:202=171:171", "198:198=41:41"}
actor RainFlushClass10O : RainFlushClass10{translation "202:202=104:104", "198:198=128:128"}
actor RainFlushClass10P : RainFlushClass10{translation "202:202=229:229", "198:198=232:232"}

actor RainFlushClassX : RainFlushClass
{
damagetype "RainFlushWeak"
ReactionTime 9
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Stop
TNT1 A 0 A_Explode(9,512,0,0,8)
goto Spawn2
}
}

actor RainFlushClassXB : RainFlushClassX{translation "202:202=205:205", "198:198=74:74"}
actor RainFlushClassXR : RainFlushClassX{translation "202:202=171:171", "198:198=41:41"}
actor RainFlushClassXO : RainFlushClassX{translation "202:202=104:104", "198:198=128:128"}
actor RainFlushClassXP : RainFlushClassX{translation "202:202=229:229", "198:198=232:232"}

actor RainFlushClassXS : RainFlushClass
{
damagetype "RainFlushWeak"
ReactionTime 9
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Stop
TNT1 A 0 A_PlaySoundEx("weapon/ShortRain","SoundSlot6")
TNT1 A 0 A_Explode(9,512,0,0,8)
goto Spawn2
}
}

actor RainFlushClassXSB : RainFlushClassXS{translation "202:202=205:205", "198:198=74:74"}
actor RainFlushClassXSR : RainFlushClassXS{translation "202:202=171:171", "198:198=41:41"}
actor RainFlushClassXSO : RainFlushClassXS{translation "202:202=104:104", "198:198=128:128"}
actor RainFlushClassXSP : RainFlushClassXS{translation "202:202=229:229", "198:198=232:232"}

actor RainSprinkleBoss : RainSprinkle
{
States
{
Spawn:
RAIN DEDEDEDEDEDEDED 2
stop
}
}

actor ToadLeapCrush
{
PROJECTILE
+DONTBLAST
+DONTREFLECT
+THRUGHOST
damage (20)
Radius 15
Height 2
Obituary "$OB_TOADLEAP"
damagetype "ToadLeap"
renderstyle none
States
{
Spawn:
TNT1 A 1
stop
}
}

actor ToadLeapProtect : PowerProtection
{
Powerup.Duration 6
DamageFactor "ToadLeap", 0.0
}

actor ToadLeap_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("ToadLeapFlagX",1)
TNT1 A 0 A_PlaySoundEx("weapon/ToadCrush","Body")
TNT1 A 0 ThrustThingZ(0,48,0,0)
stop
}
}


actor ToadmanMain_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("RainFlushClass",0,0,0,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("RainFlushClassB",0,0,0,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("RainFlushClassR",0,0,0,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("RainFlushClassO",0,0,0,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("RainFlushClassP",0,0,0,0)goto Done}}
actor ToadmanMain1_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("RainFlushClass15",0,0,0,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("RainFlushClass15B",0,0,0,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("RainFlushClass15R",0,0,0,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("RainFlushClass15O",0,0,0,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("RainFlushClass15P",0,0,0,0)goto Done}}
actor ToadmanMain2_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("RainFlushClass10",0,0,0,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("RainFlushClass10B",0,0,0,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("RainFlushClass10R",0,0,0,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("RainFlushClass10O",0,0,0,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("RainFlushClass10P",0,0,0,0)goto Done}}
actor ToadmanMainX_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("RainFlushClassX",0,0,0,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("RainFlushClassXB",0,0,0,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("RainFlushClassXR",0,0,0,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("RainFlushClassXO",0,0,0,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("RainFlushClassXP",0,0,0,0)goto Done}}
actor ToadmanMainXS_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("RainFlushClassXS",0,0,0,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("RainFlushClassXSB",0,0,0,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("RainFlushClassXSR",0,0,0,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("RainFlushClassXSO",0,0,0,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("RainFlushClassXSP",0,0,0,0)goto Done}}