actor PaintSplashWep_NormalBar : NormalBar {args 87,219}

Actor PaintSplashWep : BaseMM8BDMWep
{
dropitem "PaintSplashWep"
Weapon.AmmoUse 1
Weapon.AmmoGive 42
Weapon.SlotNumber 3
Obituary "$OB_PAINTSPLASH"
Tag "$TAG_PAINTSPLASH"
Inventory.Pickupmessage "$PU_PAINTSPLASH"
weapon.ammotype "PaintSplashAmmo"
inventory.icon "PSPHICON"
States
{
SpawnLoop:
PSPH Z -1
loop
Ready:
PSPH A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_PAINTSPLASH)
PSPH A 1 A_WeaponReady
Goto Ready+1
ReadyC: Goto Ready+1
Deselect:
PSPH A 0 
goto DeselectSwap
Select:
PSPH A 0 
goto SelectSwap
Fire:
PSPH A 0 A_JumpIfNoAmmo("NoAmmo")
PSPH A 0 A_PlaySoundEx("weapon/oilshot","Weapon")
PSPH A 0 A_FireCustomMissile("PaintSplashShot",frandom(-2,2),1,8,0)
PSPH B 1
PSPH B 1 A_FireCustomMissile("PaintSplashShot",frandom(-6,6),0,8,0)
PSPH C 2
PSPH A 1
PSPH A 0 A_Refire
Goto Ready+1
NoAmmo:
PSPH A 1 ACS_NamedExecuteAlways("core_noammo",0)
Goto Ready+1
}
}

Actor PaintSplashAmmo : Ammo
{
	Inventory.Amount 1
	Inventory.MaxAmount 42
	+INVENTORY.IGNORESKILL
}


//Shots
actor PaintSplashShot : BasicProjectile
{
PROJECTILE
+FORCEXYBILLBOARD
Damage (CallACS("vile_cbm_damage",6))
damagetype "PaintSplash"
Obituary "$OB_PAINTSPLASH"
Height 8
Radius 8
-NOGRAVITY
Scale 2.0
speed 28
States
{
Spawn:
PSPH D 0
PSPH D 2 A_CheckFloor("Death")
loop
Crash:
XDeath:
PSPH D 1
stop
Death:
PSPH D 0 
PSPH D 0 A_JumpIf(z-floorz<=0,"Death2")
PSPH D 1 A_GiveInventory("CutterFlag", 1)
PSPH D 0 A_JumpIfInventory("CutterFlag", 175, "Xdeath")
loop
Death2:
PSPH D 1 A_SpawnItemEx("PaintSplashed",0,0,0)
stop
}
}

Actor PaintSplashed : BasicProjectile
{
+MISSILE
+NODAMAGETHRUST
+NOBLOOD
-NOGRAVITY
+DONTSPLASH
+NOEXPLODEFLOOR
+NOTARGETSWITCH
+NOTAUTOAIMED
Damage (CallACS("vile_cbm_damage",6))
damagetype "PaintSplash"
Obituary "$OB_PAINTSPLASH"
Height 5
Radius 8
scale 2.5
yscale 2.5
mass 99999
reactiontime 250
states
{
Spawn:
PSPH F 0
PSPH F 1 
TNT1 A 0 A_JumpIf(CallACS("core_checkmode",1)==0,"SpawnDM")
PSPH F 0
Goto Spawn2
SpawnDM:
PSPH F 0 A_GiveInventory("WeaponCharge",1)
goto Spawn2
Spawn2:
PSPH E 1 A_Stop
Goto SlideWait
SlideWait:
PSPH E 0 A_JumpIfInventory("WeaponCharge",1,"SlideDM")
PSPH E 0 A_GiveInventory("PaintSplashBoost_P1",1)
PSPH E 1 A_GiveInventory("CutterFlag", 1)
//PSPH E 0 A_JumpIfCloser(24,"SpeedFriend")
PSPH E 0 A_JumpIf(z-floorz>0,"NewShot")
PSPH E 0 A_JumpIfInventory("CutterFlag", 175, "Death")
loop
SlideDM:
PSPH E 1 A_GiveInventory("CutterFlag", 1)
PSPH E 0 A_JumpIfCloser(24,"SpeedFriend")
PSPH E 0 A_JumpIf(z-floorz>0,"NewShot")
PSPH E 0 A_JumpIfInventory("CutterFlag", 175, "Death")
loop
SpeedFriend:
PSPH F 0 A_PlaySoundEx("weapons/mm1/oilsliderslide","Weapon")
PSPH F 2 A_GiveToTarget("PaintSplashBoost_P2",1)
PSPH GEE 7 A_GiveInventory("Cutterflag",3)
PSPH E 0 A_JumpIfInventory("CutterFlag", 175, "Death")
goto SlideWait 
NewShot:
PSPH D 0 A_SpawnItemEx("PaintSplashShot", 0, 0, 0, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM)
Goto Death 
Death:
TNT1 A 0
stop
}
}

//Flags
actor PaintSplashBoost_P1 : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInTargetInventory("LightTeamFlag",1,"FireB")
TNT1 A 0 A_JumpIfInTargetInventory("WilyTeamFlag",1,"FireR")
TNT1 A 0 A_JumpIfInTargetInventory("CossackTeamFlag",1,"FireO")
TNT1 A 0 A_JumpIfInTargetInventory("KingTeamFlag",1,"FireP")
TNT1 A 0
goto Done
FireB:
TNT1 A 0 A_RadiusGive("PaintSplashBoost_P2B",48,RGF_PLAYERS|RGF_NOSIGHT)
stop
FireR:
TNT1 A 0 A_RadiusGive("PaintSplashBoost_P2R",48,RGF_PLAYERS|RGF_NOSIGHT)
stop
FireO:
TNT1 A 0 A_RadiusGive("PaintSplashBoost_P2O",48,RGF_PLAYERS|RGF_NOSIGHT)
stop
FireP:
TNT1 A 0 A_RadiusGive("PaintSplashBoost_P2P",48,RGF_PLAYERS|RGF_NOSIGHT)
stop
Done:
TNT1 A 0
stop
}
}

actor PaintSplashBoost_P2 : CustomInventory
{
States
{
Pickup:
Pickup2:
TNT1 A 0 A_GiveInventory("PaintSplashBoost",1)
stop
}
}

actor PaintSplashBoost_P2B : PaintSplashBoost_P2{States{Pickup:TNT1 A 0 A_JumpIfInventory("LightTeamFlag",1,"Pickup2")stop}}
actor PaintSplashBoost_P2R : PaintSplashBoost_P2{States{Pickup:TNT1 A 0 A_JumpIfInventory("WilyTeamFlag",1,"Pickup2")stop}}
actor PaintSplashBoost_P2O : PaintSplashBoost_P2{States{Pickup:TNT1 A 0 A_JumpIfInventory("CossackTeamFlag",1,"Pickup2")stop}}
actor PaintSplashBoost_P2P : PaintSplashBoost_P2{States{Pickup:TNT1 A 0 A_JumpIfInventory("KingTeamFlag",1,"Pickup2")stop}}

actor PaintSplashBoost : PowerSpeed {Powerup.Duration 18 Speed 1.5}