actor DocBusterC : BaseMM8BDMWep
{
dropitem "CarryDropped"
Weapon.AmmoUse 1
Weapon.AmmoGive 3
Weapon.SlotNumber 1
Obituary "$OB_DOCBUSTER"
weapon.ammotype "DocVirusAmmo"
States
{
Spawn:
C_03 I 1
loop
Ready:
CBUS A 0 A_JumpIfInventory("Once",1,"Ready2")
BUST B 0 ACS_ExecuteAlways(981,0,0)
BUST B 0 ACS_ExecuteAlways(423,0,2,3)
BUST B 0 ACS_ExecuteAlways(648,0,8)
BUST B 0 A_SpawnItemEX("DocAmmoGiver")
PROC J 0 A_GiveInventory("Once",1)
Goto Ready2
Ready2:
DOCR A 0 ACS_ExecuteAlways(998,0,768)
DOCR A 1 A_WeaponReady
Goto Ready2+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
DOCR A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
DOCR A 1 A_Raise
Loop
Fire:
DOCR A 0 A_PlaySoundEx("weapon/pshot","weapon")
DOCR A 0 A_GiveInventory("DocRobotMain_CI",1)
DOCR BCA 5
DOCR A 0 A_Refire
Goto Ready2+1
Altfire:
CKIC C 0
Goto Ready2+1
NoAmmo:
DOCR A 1 ACS_Execute(979,0)
Goto Ready2+1
}
}

actor DocVirusAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 3
+INVENTORY.IGNORESKILL
}

actor DocShotB
{
Translation "204:204=215:215"
PROJECTILE
Radius 6
Height 6
scale 2.5
Obituary "$OB_DOCBUSTER"
damagetype "Buster"
damage (12)
speed 45
States
{
Spawn:
BASB T 1
loop
}
}

actor DocShotBB : DocShotB{translation "204:204=205:205"}
actor DocShotBR : DocShotB{translation "204:204=171:171"}
actor DocShotBO : DocShotB{translation "204:204=104:104"}
actor DocShotBP : DocShotB{translation "204:204=229:229"}

actor DocAmmoGiver : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("DocBusterC",1,1)
goto Death
TNT1 A 0 A_GiveInventory("CutterFlag",1)
TNT1 A 0 A_JumpIfInventory("CutterFlag",106,"DocAmmo2")
goto Spawn+1
DocAmmo2:
TNT1 A 0 A_GiveToTarget("DocAmmo22",1)
TNT1 A 0 //A_JumpIfInTargetInventory("EnergyBalancerActive",1,2)
TNT1 A 0 A_TakeInventory("CutterFlag",999)
goto Spawn+1
TNT1 A 0 A_TakeInventory("CutterFlag",53)
goto Spawn+1
}
}

actor DocAmmoGiver2 : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("DocBusterC",1,1)
goto Death
TNT1 A 0 A_GiveInventory("CutterFlag",1)
TNT1 A 0 A_JumpIfInventory("CutterFlag",127,2)
TNT1 A 0 A_JumpIfInventory("CutterFlag",126,"DocAmmo2")
TNT1 A 0 A_JumpIfInventory("CutterFlag",169,2)
TNT1 A 0 A_JumpIfInventory("CutterFlag",168,"DocAmmo1p5")
TNT1 A 0 A_JumpIfInventory("CutterFlag",253,2)
TNT1 A 0 A_JumpIfInventory("CutterFlag",252,"DocAmmo0and2")
TNT1 A 0 A_JumpIfInventory("CutterFlag",337,2)
TNT1 A 0 A_JumpIfInventory("CutterFlag",336,"DocAmmo1p5")
TNT1 A 0 A_JumpIfInventory("CutterFlag",379,2)
TNT1 A 0 A_JumpIfInventory("CutterFlag",378,"DocAmmo2")
TNT1 A 0 A_JumpIfInventory("CutterFlag",504,"DocAmmo0and1p5and2")
goto Spawn+1
DocAmmo0and2:
TNT1 A 0 A_GiveToTarget("DocAmmo0",1)
TNT1 A 0 A_GiveToTarget("DocAmmo2",1)
goto Spawn+1
DocAmmo1p5:
TNT1 A 0 A_GiveToTarget("DocAmmo1p5",1)
goto Spawn+1
DocAmmo2:
TNT1 A 0 A_GiveToTarget("DocAmmo2",1)
goto Spawn+1
DocAmmo0and1p5and2:
TNT1 A 0 A_GiveToTarget("DocAmmo0",1)
TNT1 A 0 A_GiveToTarget("DocAmmo1p5",1)
TNT1 A 0 A_GiveToTarget("DocAmmo2",1)
TNT1 A 0 A_TakeInventory("CutterFlag",999)
goto Spawn+1
Death:
TNT1 A 0
stop
}
}

/*
actor NormalDocArmor : BasicArmorPickup
{
Armor.Savepercent 16
Armor.Saveamount 999
}
actor SturdyDocArmor : NormalDocArmor
{
//Armor.Savepercent 35
Armor.Savepercent 34
}
actor ToadDocArmor  : NormalDocArmor
{
Armor.Savepercent 47
}
*/

actor DocSpeed100 : OnceC {}
actor DocSpeed090 : OnceC {}
actor DocSpeed105 : OnceC {}
actor DocSpeed110 : OnceC {}
actor DocSpeed115 : OnceC {}
actor DocSpeed120 : OnceC {}

actor DocJump100 : OnceC {}
actor DocJump110 : OnceC {}
actor DocJump120 : OnceC {}
actor DocJump130 : OnceC {}

actor DocAmmo0 : CustomInventory
{
States
{
Pickup:
EBAL E 0 ACS_ExecuteAlways(424, 0, 2)
stop
}
}

actor DocAmmo1p5 : CustomInventory
{
States
{
Pickup:
EBAL E 0 ACS_ExecuteAlways(424, 0, 3/* *0.5 */)
stop
}
}

actor DocAmmo2 : CustomInventory
{
States
{
Pickup:
EBAL E 0 ACS_ExecuteAlways(424, 0, 4 /* *0.5 */)
stop
}
}

actor DocAmmo22 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 //A_PlaySound("item/energyup",3,1.0)
TNT1 A 0 ACS_ExecuteAlways(424,0,8)
stop
}
}

actor DocRobotMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("DocShotB",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("DocShotBB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("DocShotBR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("DocShotBO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("DocShotBP",0,0,8,0)
goto Done
}
}