actor RollSwingBoss : MegaBuster
{
Weapon.AmmoUse 0
Weapon.AmmoGive 0
Weapon.SlotNumber 6
Obituary "%k wiped the floor with %o."
Inventory.Pickupmessage "Power up! Roll Swing!"
weapon.ammotype "RollHealAmmo"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
Spawn:
RSWB Z 1
loop
Ready:
RSWB A 0 ACS_ExecuteAlways (998,0,77)
RSWB A 0 A_JumpIfInventory("SecondSwing",15,"Fire2")
RSWB A 0 A_TakeInventory("SecondSwing",1)
RSWB A 1 A_WeaponReady
Goto Ready+1
Deselect:
RSWB A 0 A_TakeInventory("SecondSwing",999)
TNT1 A 0 A_SelectWeapon("RollBucketBoss")
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
TNT1 A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
RSWB A 1 A_Raise
Loop
Fire:
MKIC A 0 A_TakeInventory("RollSlide",1)
//RSWB S 0 SetPlayerProperty(0,0,0)
RSWB A 0 A_JumpIfInventory("SecondSwing",1,"Fire2")
RSWB A 0 A_PlaySoundEx("weapon/chargekick","Weapon")
RSWB AB 2 
RSWB C 0 A_GiveInventory("Repulsion",1)
RSWB C 0 A_FireCustomMissile("BossRollSwing",0,0,8,0)
RSWB CD 2
RSWB E 2 SetPlayerProperty(0,0,0)
TNT1 A 17
TNT1 A 1 A_GiveInventory("SecondSwing",15)
TNT1 A 0 A_Refire
Goto SecondSwingReady
SecondSwingReady:
TNT1 A 0 A_TakeInventory("SecondSwing",1)
TNT1 A 1 A_WeaponReady
RSWB A 0 A_JumpIfInventory("SecondSwing",1,"SecondSwingReady")
Goto Ready+3
Fire2:
RSWB F 0 A_PlaySoundEx("weapon/chargekick","Weapon")
RSWB FG 2 
RSWB G 0 A_GiveInventory("Repulsion",1)
RSWB G 0 A_FireCustomMissile("BossRollSwing",0,0,8,0)
RSWB HI 2 
TNT1 A 19 SetPlayerProperty(0,0,0)
TNT1 A 0 A_TakeInventory("SecondSwing",15)
TNT1 A 0 A_Refire
Goto Ready+3
NoAmmo:
goto Ready+1
Altfire:
TNT1 A 0 A_TakeInventory("SecondSwing",999)
MKIC A 0 A_GiveInventory("RollSlide",1)
MKIC C 0 A_PlaySoundEx("weapon/superboost","Weapon")
MKIC C 0 SetPlayerProperty(0,1,0)
RSWB R 0 //ACS_ExecuteAlways(191,0,5)
RSWB R 0 A_GiveInventory("RollSlideThrust",1)
RSWB R 2 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH)
//RSWB T 0 //SetPlayerProperty(0,0,0)
RSWB T 8 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH)
RSWB S 0 SetPlayerProperty(0,0,0)
RSWB S 5 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH)
//RSWB R 0 //ACS_ExecuteAlways(191,0,0)
RSWB R 5 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH)
MKIC A 0 A_TakeInventory("RollSlide",1)
MKIC C 0 A_Refire
Goto Ready+2
}
}

actor RollBucketBoss : MegaBuster
{
Weapon.AmmoUse 0
Weapon.AmmoGive 0
Weapon.SlotNumber 6
Obituary "%o was wetified by %k's roll bucket."
Inventory.Pickupmessage "Power up! Roll Bucket!"
weapon.ammotype "RollHealAmmo"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
Spawn:
RSWB Z 1
loop
Ready:
RSWB A 0 ACS_ExecuteAlways (998,0,77)
RSWB O 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 A 0 A_SelectWeapon("RollSwingBoss")
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
TNT1 A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
RSWB O 1 A_Raise
Loop
Fire:
RSWB A 0 A_JumpIfInventory("RollSlide",1,"Fire2")
//RSWB S 0 SetPlayerProperty(0,0,0)
MKIC A 0 A_TakeInventory("RollSlide",1)
WAVA A 0 A_PlaySoundEx("weapon/waterwave","Weapon")
RSWB O 0 A_FireCustomMissile("RollCleanser",0,0,8,0)
RSWB OPQP 2
RSWB OOOOO 2 SetPlayerProperty(0,0,0)
RSWB O 0 A_Refire
goto Ready+1
Fire2:
MKIC A 0 A_TakeInventory("RollSlide",1)
WAVA A 0 A_PlaySoundEx("weapon/waterwave","Weapon")
RSWB O 0 A_FireCustomMissile("RollCleanser",0,0,8,0)
RSWB OPQP 2
RSWB OOOOOOOO 2 SetPlayerProperty(0,0,0)
RSWB O 0 A_Refire
goto Ready+1
NoAmmo:
RSWB O 0
goto Ready+1
Altfire:
MKIC A 0 A_GiveInventory("RollSlide",1)
MKIC C 0 A_PlaySoundEx("weapon/superboost","Weapon")
MKIC C 0 SetPlayerProperty(0,1,0)
RSWB R 0 //ACS_ExecuteAlways(191,0,5)
RSWB R 0 A_GiveInventory("RollSlideThrust",1)
RSWB R 2 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH)
//RSWB T 0 //SetPlayerProperty(0,0,0)
RSWB T 8 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH)
RSWB S 0 SetPlayerProperty(0,0,0)
RSWB S 5 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH)
//RSWB R 0 //ACS_ExecuteAlways(191,0,0)
RSWB R 5 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH)
MKIC A 0 A_TakeInventory("RollSlide",1)
MKIC C 0 A_Refire
Goto Ready+1
}
}

actor RollSlideThrust : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz==0,"Ground")
TNT1 A 0 A_Recoil(-20)
stop
Ground:
TNT1 A 0 A_Recoil(-25)
stop
}
}

actor RollHealAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 56
}

actor BossRollSwing
{
PROJECTILE
Damage (10)
Height 16
Radius 16
+DONTBLAST
+NOGRAVITY
Scale 2.0
speed 32
damagetype "Roll"

-NOBLOCKMAP
+SHOOTABLE
//+NODAMAGE
+INVULNERABLE
+NORADIUSDMG
+DONTRIP
+NOBLOOD
States
{
Spawn:
RSWB J 0
RSWB JK 2 
Death:
RSWB J 0 
RSWB K 0 //A_Explode(40, 80, 0)
stop
XDeath:
RSWB J 0 
RSWB K 0 A_Explode(20, 128, 0)
stop
}
}


actor SecondSwing : Inventory
{
inventory.amount 1
inventory.maxamount 15
}

actor RollCleanser
{
Translation "103:103=199:199", "151:255=4:4", "0:102=4:4"
PROJECTILE
Damage (15)
damagetype "Bubble"
Height 5
Radius 8
-NOGRAVITY
Scale 2.0
speed 32
States
{
Spawn:
OILL D 5 
loop
Crash:
XDeath:
OILL D 1 
stop
Death:
OILL D 1 A_SpawnItemEx("RollCleanserBlob",0,0,0)
stop
}
}


Actor RollCleanserBlob
{
Translation "103:103=199:199", "151:255=4:4", "0:102=4:4"
+MISSILE
+NODAMAGETHRUST
+NOBLOOD
+DONTSPLASH
+NOEXPLODEFLOOR
Damage (10)
damagetype "NeutralShock"
Height 10
Radius 8
scale 2.5
mass 99999
reactiontime 250
painchance 256

states
{
Spawn:
OILL D 0
OILL D 1 A_JumpIf(z-floorz<=1,"Spawn2")
OILL D 0 A_CountDown
loop
Spawn2:
OILL G 5 
OILL E 90
stop
Death:
TNT1 A 0
stop
}
}

actor RollSlide : Inventory
{
inventory.amount 1
inventory.maxamount 1
}

actor RollHealItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "RollIcon"
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
RSWB L 1
loop
Use:
TNT1 A 0 A_JumpIfInventory("RollHealAmmo",28,"Success")
fail
Success:
TNT1 A 0 A_TakeInventory("RollHealAmmo",28)
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
DIVA A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==0,"BlueHeal")
DIVA A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==1,"RedHeal")
DIVA A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==2,"OrangeHeal")
DIVA A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==3,"PurpleHeal")
TNT1 A 0 A_SpawnItemEx("RollHeal", 40, 0, 256, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
fail
BlueHeal:
TNT1 A 0 A_SpawnItemEx("BlueRollHeal", 40, 0, 256, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
fail
RedHeal:
TNT1 A 0 A_SpawnItemEx("RedRollHeal", 40, 0, 256, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
fail
OrangeHeal:
TNT1 A 0 A_SpawnItemEx("OrangeRollHeal", 40, 0, 256, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
fail
PurpleHeal:
TNT1 A 0 A_SpawnItemEx("PurpleRollHeal", 40, 0, 256, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
fail
}
}

actor RollHeal : CustomInventory
{
inventory.pickupmessage "Picked up Roll's health gift."
inventory.pickupsound "item/energyup"
Scale 2.0
Gravity 0.5
States
{
Spawn:
RSWB MNMNMNMMNMNMNMNMNMNMNMNMNMNMNMNMNMNMNMNMNMN 6
stop
Pickup:
Health:
TNT1 A 0 A_GiveInventory("Health",25)
stop
}
}

actor BlueRollHeal : RollHeal
{
Translation "112:128=198:198"
States
{
Pickup:
DIVA A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==0,"Health")
stop
}
}

actor RedRollHeal : RollHeal
{
Translation "112:128=178:178"
States
{
Pickup:
DIVA A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==1,"Health")
stop
}
}

actor OrangeRollHeal : RollHeal
{
Translation "112:128=218:218"
States
{
Pickup:
DIVA A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==2,"Health")
stop
}
}

actor PurpleRollHeal : RollHeal
{
Translation "112:128=254:254"
States
{
Pickup:
DIVA A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==3,"Health")
stop
}
}