actor RollMedicAmmo : Ammo
{
+INVENTORY.IGNORESKILL
inventory.amount 1
inventory.maxamount 240
}

actor RollMedic : MegaBuster
{
scale 2.0
//weapon.ammotype "RollMedicAmmo"
Obituary "%o was given a hand by %k's Roll Buster."
Inventory.Pickupmessage "You got the Roll Buster!"
weapon.ammotype "RollMedicAmmo"
tag "Roll Buster"
//inventory.icon "SXISIU"
States
{
Ready:
ROLH G 0 ACS_ExecuteAlways(998,0,10010)
ROLH G 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
ROLH G 1 A_Lower
Loop
Select:
TNT1 A 0 ACS_ExecuteAlways(404,0,1,630)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
ROLH G 1 A_Raise
Loop
Fire:
ROLH G 0 ACS_ExecuteAlways(991,0,10010)
ROLH G 0 A_GiveInventory("RollIsFiring", 1)
ROLH G 0 A_PlaySoundEx("weapon/rollbuster","Weapon")
ROLH G 0 A_FireCustomMissile("RollShotSpecial",0,0,8,0)
ROLH H 3
ROLH I 3
//ROLH G 1
ROLH H 2
ROLH G 0 A_WeaponReady(WRF_NOSECONDARY)
ROLH G 0 A_TakeInventory("RollIsFiring", 999)
goto Ready+1
Altfire:
ChargingHealing:
ROLH G 0 A_PlaySoundEx("weapon/WireAdp", "Weapon")
Althold:
TNT1 A 0 A_GiveInventory("TargHolder",1)
ROLH H 0 A_JumpIfInventory("RockLove", 8, "LoveRoll")
ROLH H 1 A_FireCustomMissile("RollHealFXFake", random(-1,1), 0, 8, random(0,5))
ROLH H 0 A_GiveInventory("RockLove", 1)
ROLH H 0 A_JumpIfInventory("RockLove", 8, "OpenToLove")
ROLH H 0 A_Refire
TNT1 A 0 A_TakeInventory("TargHolder",1)
goto NoAmmo


OpenToLove:
TNT1 A 0 A_GiveInventory("TargHolder",1)
ROLH G 0 A_GiveInventory("RollIsFiring", 1)
ROLH HI 2


LoveRoll:
ROLH G 0 A_JumpIfInventory("RollMedicAmmo", 6, 2)
ROLH G 0 A_Jump(256, "FinishedHealing")
ROLH A 0 A_PlaySoundEx("weapon/rollheal","weapon")
ROLH G 0 A_TakeInventory("RollMedicAmmo",3)
ROLH I 0 A_FireCustomMissile("HealBeam",0,0,8,0)
ROLH II 1
ROLH A 0 A_Refire("LoveRoll2")
goto FinishedHealing
LoveRoll2:
ROLH G 0 A_JumpIfInventory("RollMedicAmmo", 6, 2)
ROLH G 0 A_Jump(256, "FinishedHealing")
ROLH A 0 A_PlaySoundEx("weapon/rollheal","weapon")
ROLH G 0 A_TakeInventory("RollMedicAmmo",3)
ROLH I 0 A_FireCustomMissile("HealBeam2",0,0,8,0)
ROLH I 2
ROLH A 0 A_Refire("LoveRoll")
goto FinishedHealing
FinishedHealing:
ROLH IH 7
goto NoAmmo
NoAmmo:
ROLH I 0 A_TakeInventory("RollSelfHealPreventing", 999)
ROLH I 0 A_TakeInventory("RockLove", 999)
ROLH G 1 A_TakeInventory("RollIsFiring", 999)
Goto Ready+1
}
}

//Old Roll Beam Code
/*ROLH G 0 A_TakeInventory("RollMedicAmmo",3)
ROLH A 0 A_PlaySoundEx("weapon/rollheal","weapon")
ROLH A 0 A_GiveInventory("RollSelfHealPreventing", 1)
ROLH I 0// A_FireCustomMissile("RollHealFX", random(-3,3), 0, random(-8,20), random(0,25))
ROLH I 1 A_FireCustomMissile("RollHealFX", random(-3,3), 0, random(-8,20), random(0,10))
ROLH I 0 A_FireCustomMissile("RollHealFX", random(-3,3), 0, random(-8,20), random(0,10))
ROLH I 0 A_FireCustomMissile("RollHealProjectile", random(-3,3), 0, random(-8,20), random(0,10))
ROLH I 0// A_FireCustomMissile("RollHealFX", random(-3,3), 0, random(-8,20), random(0,25))
ROLH I 1 A_FireCustomMissile("RollHealFX", random(-3,3), 0, random(-8,20), random(0,10))
ROLH I 0 A_FireCustomMissile("RollHealFX", random(-3,3), 0, random(-8,20), random(0,10))
*/

//NEW ROLL BEAM//
actor TargetingFlag : Inventory{inventory.amount 1 inventory.maxamount 64}
actor TargetingRangeFlag : Inventory{inventory.amount 1 inventory.maxamount 3000}
Actor TargActive : Powerup{inventory.amount 1 powerup.duration 0x7FFFFFFF}
Actor TargScriptActive : Powerup{inventory.amount 1 powerup.duration 3}
Actor TargHolder : Powerup{inventory.amount 1 powerup.duration 7}
Actor HealDelay : powerup
{inventory.amount 1
Powerup.duration 5
}

actor HealBeam
{
PROJECTILE
+DONTBLAST
//+LOOKALLAROUND
+SEEKERMISSILE
+NOCLIP
+NOINTERACTION
Renderstyle "Translucent"
Alpha 0.95
radius 8
height 8
Damage (0)
Meleerange 100
speed 10
floatspeed 28
scale 3.0
Reactiontime 35
States
{
Spawn:
LASH A 0
LASH A 0 A_RearrangePointers(AAPTR_DEFAULT, AAPTR_TARGET, AAPTR_DEFAULT) //make the shooter our master
LASH A 0 A_TransferPointer(AAPTR_MASTER,AAPTR_DEFAULT,AAPTR_TRACER,AAPTR_TRACER) //Set the Bullet's tracer to the Shooter's, if they have one.
LASH A 0 A_JumpifTracercloser(630,"Targetspotted") //immediately got a tracer, let's aim for them!

TNT1 A 0 A_SpawnItemEx("HealFX2",30,random(-5,5),random(-5,5),momx/4,momy/4,1,random(-45,45),SXF_ABSOLUTEMOMENTUM)
TNT1 A 0 A_SpawnItemEx("HealFX3",30,random(-5,5),random(-5,5),momx/4,momy/4,1,random(-45,45),SXF_ABSOLUTEMOMENTUM)
TNT1 A 0
stop

Targetspotted:
LASH A 0 A_RearrangePointers(AAPTR_TRACER, AAPTR_DEFAULT, AAPTR_DEFAULT)
LASH A 0 A_Facetarget
TNT1 A 1 A_CustomMissile("HealBeamFX",0,0,0,0)
Goto AfterSpot
AfterSpot:
LASH A 0 A_RearrangePointers(AAPTR_MASTER, AAPTR_DEFAULT, AAPTR_TARGET) //make the target our tracer
LASH A 0 A_TransferPointer(AAPTR_DEFAULT,AAPTR_MASTER,AAPTR_TRACER,AAPTR_TRACER) //Set the shooter's tracer to the bullet's
LASH A 0 A_Jump(256,"GiveHealth")
goto GiveHealth
Death:
TNT1 A 0
stop
GiveHealth:
TNT1 A 1 A_Stop
LASH A 0 A_RearrangePointers(AAPTR_TRACER, AAPTR_DEFAULT, AAPTR_DEFAULT)
TNT1 A 0 A_GiveToTarget("HealBeamHeal",1)
TNT1 A 0 A_GiveInventory("TargHolder",1,AAPTR_MASTER)
stop
}
}

actor HealBeam2 : HealBeam
{
States
{
Targetspotted:
LASH A 0 A_RearrangePointers(AAPTR_TRACER, AAPTR_DEFAULT, AAPTR_DEFAULT)
LASH A 0 A_Facetarget
TNT1 A 1 A_CustomMissile("HealBeamFX2",0,0,0,0)
Goto AfterSpot
}
}


actor HealBeamHeal : CustomInventory
{
inventory.amount 1
Inventory.MaxAmount 100
+AUTOACTIVATE
States
{
Spawn:
TNT1 A 0
stop
Pickup:
TNT1 A 0 A_Jumpifinventory("HealDelay",1,"Nope")
TNT1 A 1 A_Giveinventory("HealDelay")
TNT1 A 0 A_Jumpifinventory("RollMedic",1,"RollHeal")
TNT1 A 0 HealThing(3)
TNT1 A 0 A_PlaySoundEx("item/energyup","Weapon")
TNT1 A 0 A_GiveInventory("RollHealingPartFake",1)
stop
RollHeal:
TNT1 A 0 HealThing(1)
TNT1 A 0 A_PlaySoundEx("item/energyup","Weapon")
TNT1 A 0
stop
Nope:
TNT1 A 0
stop
}
}

actor HealBeamFX
{
+MISSILE
+NOINTERACTION
+NOGRAVITY
-SOLID
+NOCLIP
Speed 25
Damage (0)
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jumpifcloser(100,"Death")
TNT1 A 0 A_Spawnitemex("BeamGraphic",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION)
TNT1 A 1 A_Facetarget
Goto BeamContinue
BeamContinue:
TNT1 A 0 A_CustomMissile("HealBeamFX2",0,0,0,0)
stop
Death:
TNT1 A 0
stop
}
}

actor HealBeamFX2
{
+MISSILE
+NOINTERACTION
+NOGRAVITY
-SOLID
+NOCLIP
Speed 25
Damage (0)
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jumpifcloser(100,"Death")
TNT1 A 0 A_Spawnitemex("BeamGraphic2",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION)
TNT1 A 1 A_Facetarget
Goto BeamContinue
BeamContinue:
TNT1 A 0 A_CustomMissile("HealBeamFX",0,0,0,0)
stop
Death:
TNT1 A 0
stop
}
}

actor BeamGraphic : BasicGraphicEffect
{
+NOINTERACTION
+NOGRAVITY
+CLIENTSIDEONLY
+FORCEXYBILLBOARD
-SOLID
scale 1.5
height 0
radius 0
States
{
Spawn:
TNT1 A 0
HEAL DDD 1
stop
}
}
actor BeamGraphic2 : BeamGraphic
{
States
{
Spawn:
TNT1 A 0
HEAL EEE 1
stop
}
}

actor HealFX2
{
PROJECTILE
+NOINTERACTION
+NOCLIP
+CLIENTSIDEONLY
radius 8
height 8
Damage (0)
scale 1.5
Reactiontime 35
Renderstyle "ADD"
Alpha 1
Translation "192:192=107:107"

States
{
Spawn:
HEAL A 0
HEAL A 10
HEAL AAAABBBCC 1 
stop
}
}
actor HealFX3
{
PROJECTILE
+NOINTERACTION
+NOCLIP
+CLIENTSIDEONLY
radius 8
height 8
Damage (0)
scale 1.5
Reactiontime 35
Renderstyle "ADD"
Alpha 1
Translation "192:192=176:176"
States
{
Spawn:
HEAL A 0
HEAL A 10
HEAL AAAABBBCC 1 
stop
}
}


actor RockLove : Inventory
 { 
 inventory.amount 1
 inventory.maxamount 8
 }
 


ACTOR RollDrain : PowerupGiver
{
	Game Doom
	Game Heretic
	Game Hexen
	+COUNTITEM
	+NOGRAVITY
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.INVBAR
	+INVENTORY.FANCYPICKUPSOUND
	Inventory.DefMaxAmount
	Inventory.MaxAmount 0
	Powerup.Duration 0x7FFFFFFC
	Powerup.type "Drain"
}

ACTOR RollDrainX : PowerupGiver
{
	Game Doom
	Game Heretic
	Game Hexen
	+COUNTITEM
	+NOGRAVITY
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.INVBAR
	+INVENTORY.FANCYPICKUPSOUND
	Inventory.DefMaxAmount
	Inventory.MaxAmount 0
	Powerup.Strength 1.0
	Powerup.Duration 0x7FFFFFFC
	Powerup.type "Drain"
}

ACTOR PowerDrain_Roll : RollDrain{}
ACTOR PowerDrain_Roll2 : RollDrainX{}

actor RollShotSpecial : MegaShot
{
+HITTRACER
damagetype "RollBuster"
damage (10) // 15 ; 13 ; 10
speed 40
Obituary "%o was given a hand by %k's Roll Buster."
states
{
Spawn:
TNT1 A 1
RSS1 BA 2
Goto Spawn+1
Crash:
TNT1 A 0 A_JumpIfInventory("Survivor",1,"Death",AAPTR_TRACER)
TNT1 A 0 A_JumpIfInventory("BoostFlag",1,"HealMe",AAPTR_TRACER)
TNT1 A 0 A_JumpIfInventory("BAWS",1,"HealMe",AAPTR_TRACER)
goto Death
HealMe:
TNT1 A 0 A_GiveToTarget("ItemEnergyUpSound",1)
TNT1 A 0 A_JumpIfInTargetInventory("PowerStrength",1,"Strength")
TNT1 A 0 A_GiveToTarget("RollMedicAmmo",4)
TNT1 A 0 A_GiveToTarget("Health",3)
Death:
RSS1 CDEF 2
stop
Strength:
TNT1 A 0 A_GiveToTarget("RollMedicAmmo",6)
TNT1 A 0 A_GiveToTarget("Health",5)
goto Death
}
}

actor GiveMeHealsPrettyPlease : Powerup{inventory.amount 1 inventory.maxamount 1 powerup.duration 12}


actor RollMedicSupportSummon : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("RollMedicSupport")
stop
}
}

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

actor RollHealFX
{
Translation "176:176=107:107"
//MONSTER
PROJECTILE
//-SOLID
//-SHOOTABLE
+DONTBLAST
+LOOKALLAROUND
//+NEVERRESPAWN
//+FLOAT
//+NOGRAVITY
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 ABC 1
SpawnQuick:
ROLH D 1// A_ClearTarget
ROLH EFABCD 1 A_LookEx(LOF_NOSOUNDCHECK, 1, 230, 230, 360, "MyLovelyWaifu")
//ROLH AAAABBBBCCCCDDDDEEEEFFFF 1
goto Death
MyLovelyWaifu:
ROLH A 0 A_JumpIfInTargetInventory("BeingAHale", 1, "SpawnQuick") // "is a hale !" GO AWAYYYYY MEANNEEEEEEEEEE
ROLH A 0 A_JumpIfInTargetInventory("MedicHealthMaximiser", 1, "SpawnQuick") // "has full health!" (not used yet)
ROLH A 0 A_JumpIfInTargetInventory("RollSelfHealPreventing", 1, "SpawnQuick") // "is the user !"
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX1", 0, 0, 0)
stop
FadeDeath:
Death:
ROLH A 0// A_ScaleVelocity(0.2)
ROLH ABCDEFABCDEF 1 A_FadeOut(0.08)
stop
}
}

actor RollHealFX1 : RollHealFX
{
+NOINTERACTION
speed 36
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH A 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX2", 0, 0, 0)
stop
}
}

actor RollHealFX2 : RollHealFX1
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH B 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX3", 0, 0, 0)
stop
}
}

actor RollHealFX3 : RollHealFX1
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH C 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX4", 0, 0, 0)
stop
}
}

actor RollHealFX4 : RollHealFX1
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH D 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX5", 0, 0, 0)
stop
}
}

actor RollHealFX5 : RollHealFX1
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH E 1 A_JumpIfCloser(100, "Death")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealFX6", 0, 0, 0)
stop
}
}

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

actor RollHealProjectile : RollHealFX
{
States
{
Spawn:
ROLH A 0
ROLH ABC 1
goto SpawnQuick
SpawnQuick:
ROLH D 1// A_ClearTarget
ROLH EFABCDEFABCDEF 1 A_LookEx(LOF_NOSOUNDCHECK, 1, 230, 230, 360, "MyLovelyWaifu")
//ROLH AAAABBBBCCCCDDDDEEEEFFFF 1
goto FadeDeath
MyLovelyWaifu:
ROLH A 0 A_JumpIfInTargetInventory("MedicHealthMaximiser", 1, "SpawnQuick")
ROLH A 0 A_JumpIfInTargetInventory("RollSelfHealPreventing", 1, "SpawnQuick")
ROLH A 0 A_JumpIfInTargetInventory("BeingAHale", 1, "SpawnQuick")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealProjectile1", 0, 0, 0)
stop
Crash:
XDeath:
TNT1 A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 50, 50, 360, "MyLovelyWaifu")
Death:
TNT1 A 0
stop
RollHealth:
ROLH A 1
ROLH A 0 A_GiveToTarget("RollHealingPart",1)
stop
}
}

actor RollHealFXFake : RollHealProjectile
{
Translation "176:176=93:93"
speed 200
+SKYEXPLODE
states
{
Spawn:
ROLH A 0
ROLH A 1
ROLH BC 1 A_LookEx(LOF_NOSOUNDCHECK, 1, 140, 140, 360, "MyLovelyWaifu")
goto SpawnQuick
SpawnQuick:
ROLH D 1
ROLH EF 1 A_LookEx(LOF_NOSOUNDCHECK, 1, 140, 140, 360, "MyLovelyWaifu")
goto FadeDeath
MyLovelyWaifu:
ROLH A 0 A_JumpIfInTargetInventory("MedicHealthMaximiser", 1, "SpawnQuick")
ROLH A 0 A_JumpIfInTargetInventory("RollSelfHealPreventing", 1, "SpawnQuick")
ROLH A 0 A_JumpIfInTargetInventory("BeingAHale", 1, "SpawnQuick")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealProjectile1Fake", 0, 0, 0)
stop
RollHealth:
ROLH A 1
ROLH A 0 A_GiveToTarget("RollHealingPartFake",1)
stop
Death: TNT1 A 0
stop
}
}

actor RollHealProjectile1 : RollHealProjectile
{
+NOINTERACTION
speed 36
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH A 1 A_JumpIfCloser(100, "RollHealth")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealProjectile2", 0, 0, 0)
stop
}
}

actor RollHealProjectile1Fake : RollHealProjectile1
{
+NOINTERACTION
speed 100
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH A 1 A_JumpIfCloser(100, "RollHealth")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealProjectile1Fake", 0, 0, 0)
stop
RollHealth:
ROLH A 1
ROLH A 0 A_GiveToTarget("RollHealingPartFake",1)
stop
}
}

actor RollHealProjectile2 : RollHealProjectile1
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH B 1 A_JumpIfCloser(100, "RollHealth")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealProjectile3", 0, 0, 0)
stop
}
}

actor RollHealProjectile3 : RollHealProjectile1
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH C 1 A_JumpIfCloser(100, "RollHealth")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealProjectile4", 0, 0, 0)
stop
}
}

actor RollHealProjectile4 : RollHealProjectile1
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH D 1 A_JumpIfCloser(100, "RollHealth")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealProjectile5", 0, 0, 0)
stop
}
}

actor RollHealProjectile5 : RollHealProjectile1
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH E 1 A_JumpIfCloser(100, "RollHealth")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealProjectile6", 0, 0, 0)
stop
}
}

actor RollHealProjectile6 : RollHealProjectile1
{
states
{
Spawn:
ROLH A 0
ROLH A 0 A_LookEx(LOF_NOSOUNDCHECK, 1, 200, 200, 360, "MyLovelyWaifu")
stop
MyLovelyWaifu:
ROLH F 1 A_JumpIfCloser(100, "RollHealth")
ROLH A 0 A_FaceTarget
ROLH A 0 A_CustomMissile("RollHealProjectile1", 0, 0, 0)
stop
}
}

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

actor RollHealingPart : CustomInventory
{
inventory.amount 1
+AUTOACTIVATE
States
{
Spawn:
TNT1 A 0
stop
Pickup:
TNT1 A 0 A_JumpIfInventory("RaThorMinionWeapon", 1, "FailingHard")
TNT1 A 0 A_JumpIfInventory("BeingAHale", 1, "FailingHard")
TNT1 A 0 A_JumpIfInventory("RollSelfHealPreventing", 1, "FailingHard")

TNT1 A 0 A_JumpIfInventory("DuoFistSpecial", 1, "HealingBreathalyzerTank")
TNT1 A 0 A_JumpIfInventory("ProtoBusterSpecial", 1, "HealingBreathalyzerSweeper")
TNT1 A 0 A_JumpIfInventory("BassBusterSpecial", 1, "HealingBreathalyzerSpeedster")
TNT1 A 0 A_JumpIfInventory("RollMedic", 1, "HealingBreathalyzerHealer")

HealingBreathalyzer:
TNT1 A 0 A_JumpIf(health==100,"LVX")
TNT1 A 0 A_JumpIfHealthLower(20, "LV1")
TNT1 A 0 A_JumpIfHealthLower(40, "LV2")
TNT1 A 0 A_JumpIfHealthLower(60, "LV3")
TNT1 A 0 A_JumpIfHealthLower(80, "LV4")
goto LV5
HealingBreathalyzerHealer:
TNT1 A 0 A_JumpIf(health==85,"LVX")
TNT1 A 0 A_JumpIfHealthLower(17, "LV1")
TNT1 A 0 A_JumpIfHealthLower(34, "LV2")
TNT1 A 0 A_JumpIfHealthLower(51, "LV3")
TNT1 A 0 A_JumpIfHealthLower(58, "LV4")
goto LV5
HealingBreathalyzerSpeedster:
TNT1 A 0 A_JumpIf(health==90,"LVX")
TNT1 A 0 A_JumpIfHealthLower(20, "LV1")
TNT1 A 0 A_JumpIfHealthLower(40, "LV2")
TNT1 A 0 A_JumpIfHealthLower(60, "LV3")
TNT1 A 0 A_JumpIfHealthLower(80, "LV4")
goto LV5
LV5:
TNT1 A 0 HealThing(2)
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
TNT1 A 0 A_SpawnItemEx("HealedFX5")
stop
LV1:
TNT1 A 0 HealThing(2)
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
TNT1 A 0 A_SpawnItemEx("HealedFX1")
stop
LV2:
TNT1 A 0 HealThing(2)
TNT1 A 0 A_SpawnItemEx("HealedFX2")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop
LV3:
TNT1 A 0 HealThing(2)
TNT1 A 0 A_SpawnItemEx("HealedFX3")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop
LV4:
TNT1 A 0 HealThing(2)
TNT1 A 0 A_SpawnItemEx("HealedFX4")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop

HealingBreathalyzerTank:
TNT1 A 0 A_JumpIf(health==150,"LVX")
TNT1 A 0 A_JumpIfHealthLower(32, "LV1Tank")
TNT1 A 0 A_JumpIfHealthLower(64, "LV2Tank")
TNT1 A 0 A_JumpIfHealthLower(96, "LV3Tank")
TNT1 A 0 A_JumpIfHealthLower(120, "LV4Tank")
goto LV5
LV5Tank:
TNT1 A 0 HealThing(3)
TNT1 A 0 A_SpawnItemEx("HealedFX5")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop
LV1Tank:
TNT1 A 0 HealThing(3) 
TNT1 A 0 A_SpawnItemEx("HealedFX1")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop
LV2Tank:
TNT1 A 0 HealThing(3) 
TNT1 A 0 A_SpawnItemEx("HealedFX2")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop
LV3Tank:
TNT1 A 0 HealThing(3) 
TNT1 A 0 A_SpawnItemEx("HealedFX3")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop
LV4Tank:
TNT1 A 0 HealThing(3) 
TNT1 A 0 A_SpawnItemEx("HealedFX4")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop


HealingBreathalyzerSweeper:
TNT1 A 0 A_JumpIf(health>79,"LVX")
TNT1 A 0 A_JumpIfHealthLower(14, "LV1Sweeper")
TNT1 A 0 A_JumpIfHealthLower(28, "LV2Sweeper")
TNT1 A 0 A_JumpIfHealthLower(42, "LV3Sweeper")
TNT1 A 0 A_JumpIfHealthLower(56, "LV4Sweeper")
goto LV5
LV5Sweeper:
TNT1 A 0 HealThing(random(1,2)) 
TNT1 A 0 A_SpawnItemEx("HealedFX5")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop
LV1Sweeper:
TNT1 A 0 HealThing(random(1,2)) 
TNT1 A 0 A_SpawnItemEx("HealedFX1")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop
LV2Sweeper:
TNT1 A 0 HealThing(random(1,2)) 
TNT1 A 0 A_SpawnItemEx("HealedFX2")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop
LV3Sweeper:
TNT1 A 0 HealThing(random(1,2)) 
TNT1 A 0 A_SpawnItemEx("HealedFX3")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop
LV4Sweeper:
TNT1 A 0 HealThing(random(1,2)) 
TNT1 A 0 A_SpawnItemEx("HealedFX4")
ROLH A 0 A_PlaySoundEx("weapon/mirrorabsorb","SoundSlot5")
stop

FailingHard:
TNT1 A 0
stop
LVX:
Nope:
TNT1 A 0 A_SpawnItemEx("HealedFXX")
ROLH A 0 A_PlaySoundEx("weapon/lshot","SoundSlot5")
stop
}
}

actor RollHealingPartFake : CustomInventory
{
States
{
Spawn:
TNT1 A 0
stop
Pickup:
TNT1 A 0 A_JumpIfInventory("RaThorMinionWeapon", 1, "FailingHard")
TNT1 A 0 A_JumpIfInventory("BeingAHale", 1, "FailingHard")
TNT1 A 0 A_JumpIfInventory("RollSelfHealPreventing", 1, "FailingHard")
TNT1 A 0 A_JumpIfInventory("DuoFistSpecial", 1, "HealingBreathalyzerTank")
TNT1 A 0 A_JumpIfInventory("ProtoBusterSpecial", 1, "HealingBreathalyzerSweeper")
TNT1 A 0 A_JumpIfInventory("BassBusterSpecial", 1, "HealingBreathalyzerSpeedster")
TNT1 A 0 A_JumpIfInventory("RollMedic", 1, "HealingBreathalyzerHealer")

HealingBreathalyzer:
TNT1 A 0 A_JumpIf(health==100,"LVX")
TNT1 A 0 A_JumpIfHealthLower(20, "LV1")
TNT1 A 0 A_JumpIfHealthLower(40, "LV2")
TNT1 A 0 A_JumpIfHealthLower(60, "LV3")
TNT1 A 0 A_JumpIfHealthLower(80, "LV4")
goto LV5
HealingBreathalyzerHealer:
TNT1 A 0 A_JumpIf(health==85,"LVX")
TNT1 A 0 A_JumpIfHealthLower(17, "LV1")
TNT1 A 0 A_JumpIfHealthLower(34, "LV2")
TNT1 A 0 A_JumpIfHealthLower(51, "LV3")
TNT1 A 0 A_JumpIfHealthLower(58, "LV4")
goto LV5
HealingBreathalyzerSpeedster:
TNT1 A 0 A_JumpIf(health==90,"LVX")
TNT1 A 0 A_JumpIfHealthLower(20, "LV1")
TNT1 A 0 A_JumpIfHealthLower(40, "LV2")
TNT1 A 0 A_JumpIfHealthLower(60, "LV3")
TNT1 A 0 A_JumpIfHealthLower(80, "LV4")
goto LV5
LV5:
TNT1 A 0 //HealThing(2) 
TNT1 A 0 A_SpawnItemEx("HealedFX5")
stop
LV1:
TNT1 A 0 //HealThing(2)
TNT1 A 0 A_SpawnItemEx("HealedFX1")
stop
LV2:
TNT1 A 0 //HealThing(2)
TNT1 A 0 A_SpawnItemEx("HealedFX2")
stop
LV3:
TNT1 A 0 //HealThing(2)
TNT1 A 0 A_SpawnItemEx("HealedFX3")
stop
LV4:
TNT1 A 0 //HealThing(2)
TNT1 A 0 A_SpawnItemEx("HealedFX4")
stop

HealingBreathalyzerTank:
TNT1 A 0 A_JumpIf(health==150,"LVX")
TNT1 A 0 A_JumpIfHealthLower(32, "LV1Tank")
TNT1 A 0 A_JumpIfHealthLower(64, "LV2Tank")
TNT1 A 0 A_JumpIfHealthLower(96, "LV3Tank")
TNT1 A 0 A_JumpIfHealthLower(120, "LV4Tank")
goto LV5
LV5Tank:
TNT1 A 0 //HealThing(3)
TNT1 A 0 A_SpawnItemEx("HealedFX5")
stop
LV1Tank:
TNT1 A 0 //HealThing(3) 
TNT1 A 0 A_SpawnItemEx("HealedFX1")
stop
LV2Tank:
TNT1 A 0 //HealThing(3) 
TNT1 A 0 A_SpawnItemEx("HealedFX2")
stop
LV3Tank:
TNT1 A 0 //HealThing(3) 
TNT1 A 0 A_SpawnItemEx("HealedFX3")
stop
LV4Tank:
TNT1 A 0 //HealThing(3) 
TNT1 A 0 A_SpawnItemEx("HealedFX4")
stop


HealingBreathalyzerSweeper:
TNT1 A 0 A_JumpIf(health>79,"LVX")
TNT1 A 0 A_JumpIfHealthLower(14, "LV1Sweeper")
TNT1 A 0 A_JumpIfHealthLower(28, "LV2Sweeper")
TNT1 A 0 A_JumpIfHealthLower(42, "LV3Sweeper")
TNT1 A 0 A_JumpIfHealthLower(56, "LV4Sweeper")
goto LV5
LV5Sweeper:
TNT1 A 0 //HealThing(random(1,2)) 
TNT1 A 0 A_SpawnItemEx("HealedFX5")
stop
LV1Sweeper:
TNT1 A 0 //HealThing(random(1,2)) 
TNT1 A 0 A_SpawnItemEx("HealedFX1")
stop
LV2Sweeper:
TNT1 A 0 //HealThing(random(1,2)) 
TNT1 A 0 A_SpawnItemEx("HealedFX2")
stop
LV3Sweeper:
TNT1 A 0 ////HealThing(random(1,2)) 
TNT1 A 0 A_SpawnItemEx("HealedFX3")
stop
LV4Sweeper:
TNT1 A 0 //HealThing(random(1,2)) 
TNT1 A 0 A_SpawnItemEx("HealedFX4")
stop

FailingHard:
TNT1 A 0
stop
LVX:
Nope:
TNT1 A 0 A_SpawnItemEx("HealedFXX")
ROLH A 0 A_PlaySoundEx("weapon/lshot","SoundSlot5")
stop
}
}

actor HealedFXX
{
+NOINTERACTION
-SOLID
renderstyle none
States
{
Spawn:
ROLH A 0
ROLH AAAAAA 0 A_SpawnItemEx("MedicHealedX",random(-32,32),random(-32,32),20+random(-8,8),0,0,random(5,10))
stop
}
}

actor HealedFX1 : HealedFXX
{
States
{
Spawn:
ROLH A 0
ROLH AAAAAA 0 A_SpawnItemEx("MedicHealed1",random(-32,32),random(-32,32),20+random(-8,8),0,0,random(5,10))
stop
}
}

actor HealedFX2 : HealedFX1
{
States
{
Spawn:
ROLH A 0
ROLH AAAAAA 0 A_SpawnItemEx("MedicHealed2",random(-32,32),random(-32,32),20+random(-8,8),0,0,random(5,10))
stop
}
}

actor HealedFX3 : HealedFX1
{
States
{
Spawn:
ROLH A 0
ROLH AAAAAA 0 A_SpawnItemEx("MedicHealed3",random(-32,32),random(-32,32),20+random(-8,8),0,0,random(5,10))
stop
}
}

actor HealedFX4 : HealedFX1
{
States
{
Spawn:
ROLH A 0
ROLH AAAAAA 0 A_SpawnItemEx("MedicHealed4",random(-32,32),random(-32,32),20+random(-8,8),0,0,random(5,10))
stop
}
}

actor HealedFX5 : HealedFX1
{
States
{
Spawn:
ROLH A 0
ROLH AAAAAA 0 A_SpawnItemEx("MedicHealed5",random(-32,32),random(-32,32),20+random(-8,8),0,0,random(5,10))
stop
}
}

actor MedicHealed1
{
Translation "176:176=188:188"
PROJECTILE
+NOINTERACTION
+DONTBLAST
+NOGRAVITY
scale 4.5
radius 6
height 6
states
{
Spawn:
ROLH A 0
ROLH AAAA 1 A_FadeOut(0.04)
TNT1 A 0 A_ScaleVelocity(1.60)
ROLH BB 1 A_FadeOut(0.04)
TNT1 A 0 A_ScaleVelocity(1.60)
ROLH CCCC 1 A_FadeOut(0.04)
TNT1 A 0 A_ScaleVelocity(1.60)
ROLH DD 1 A_FadeOut(0.04)
TNT1 A 0 A_ScaleVelocity(1.60)
ROLH EEEE 1 A_FadeOut(0.04)
TNT1 A 0 A_ScaleVelocity(1.60)
ROLH FF 1 A_FadeOut(0.04)
stop
}
}
actor MedicHealed2 : MedicHealed1{Translation "176:176=175:175"}
actor MedicHealed3 : MedicHealed1{Translation "176:176=219:219"}
actor MedicHealed4 : MedicHealed1{Translation "176:176=248:248"}
actor MedicHealed5 : MedicHealed1{Translation "176:176=160:160"}
actor MedicHealedX : MedicHealed1{Translation "176:176=107:107"}


actor RollMedicSupport
{
PROJECTILE
+NOINTERACTION
+DONTBLAST
states
{
Spawn:
TNT1 A 0
NormalCharge:
//TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 1 A_JumpIfInTargetInventory("IsDead", 1, "NoDouble")
//TNT1 AAAAAAAAAAAA 1 A_JumpIfInTargetInventory("IsDead", 1, "NoDouble")
TNT1 AAAAAAAAAAAA 1 A_JumpIfInTargetInventory("IsDead", 1, "NoDouble")
TNT1 A 0 A_GiveToTarget("RollMedicAmmo", 1)
loop
Death:
TNT1 A 0
stop
NoDouble:
TNT1 A 0
stop}}
