actor ProtoChargeWep : BaseMM8BDMWep
{
//$Category RNC-Weapons
//$Title Proto Charge
Weapon.AmmoUse 1
Weapon.AmmoGive 28
Weapon.SlotNumber 5
Tag "$TAG_PROTOCHARGE"
Obituary "$OB_PROTOCHARGE"
Inventory.Pickupmessage "$PU_PROTOCHARGE"
weapon.ammotype "ProtoChargeAmmo"
inventory.icon "RNCWP3"
States
{
SpawnLoop:
RNCW C -1
loop
Ready:
NCH1 R 0 ACS_ExecuteAlways(998,0,COL_PROTOCHARGE)
NCH1 R 1 A_WeaponReady
Goto Ready+1
Deselect:
NCH1 R 0 A_StopSoundEx("Weapon")
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
NCH1 R 1
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
NCH1 R 1
Loop
Altfire:
NCH1 R 0 A_JumpIfNoAmmo("NoAmmo")
NCH1 R 4
Goto Fire1
Fire:
NCH1 R 0 A_JumpIfNoAmmo("NoAmmo")
NCH1 R 1
goto Hold
Hold:
NCH1 R 0 A_JumpIfNoAmmo("NoAmmo")
NCH1 R 0 A_JumpIfInventory("WeaponCharge",1,"Hold2")
NCH1 R 2 A_GiveInventory("WeaponCharge",1)
NCH1 R 0 A_GunFlash
NCH1 R 0 A_Refire
Goto Fire1
Hold2:
NCH1 R 0
NCH1 R 0 A_JumpIfInventory("WeaponCharge",20,"Hold3")
NCH1 R 0 A_PlaySoundEx("weapon/heat1","Weapon",1,0)
NCH1 R 2 A_GiveInventory("WeaponCharge",1)
NCH1 R 0 A_ReFire
Goto Fire1
Hold3:
NCH1 R 0
NCH1 R 0 A_PlaySoundEx("weapon/heat3","Weapon",1,0)
NCH1 RR 1 A_JumpIfInventory("IsBot",1,"BotFire")
NCH1 R 0 A_ReFire
Goto Fire2
BotFire:
NCH1 R 0 A_Jump(16,"Fire2")
NCH1 R 0 A_Refire
Goto Fire2
Fire1:
NCH1 R 0
NCH1 R 0 A_TakeInventory("WeaponCharge",99)
NCH1 R 0 A_ClearRefire
NCH1 R 0 A_PlaySoundEx("misc/metdie","Weapon")
NCH1 R 0 A_TakeInventory("ProtoChargeAmmo",1)
NCH1 R 0 A_FireCustomMissile("ProtoCharge",0,0,8,0)
NCH1 ST 2
NCH1 R 1
Goto Ready+1
Fire2:
NCH1 R 0
NCH1 R 0 A_TakeInventory("WeaponCharge",99)
NCH1 R 0 A_ClearRefire
NCH1 R 0 A_PlaySoundEx("misc/metdie","Weapon")
NCH1 R 0 A_JumpIfInventory("ProtoChargeAmmo",5,"Fire2r")
NCH1 R 0 A_TakeInventory("ProtoChargeAmmo",5)
NCH1 R 0 A_FireCustomMissile("ProtoCharge",0,0,8,0)
NCH1 ST 2
NCH1 R 1
Goto Ready+1
Fire2r:
NCH1 R 0 A_TakeInventory("ProtoChargeAmmo",5)
NCH1 R 0 A_FireCustomMissile("ProtoCharged",0,0,8,0)
NCH1 STRRR 2
Goto Ready+1
Flash:
NCH1 U 0
NCH1 U 1 ACS_ExecuteAlways(991,0,COL_PROTOCHARGEC1)
NCH1 U 0 A_JumpIfInventory("WeaponCharge",20,"Flash2")
NCH1 U 0 A_JumpIfInventory("WeaponCharge",1,1)
Goto NoFlash
NCH1 U 1
NCH1 U 0 A_JumpIfInventory("WeaponCharge",20,"Flash2")
NCH1 U 0 A_JumpIfInventory("WeaponCharge",1,1)
Goto NoFlash
NCH1 R 1 ACS_ExecuteAlways(991,0,COL_PROTOCHARGE)
NCH1 R 0 A_JumpIfInventory("WeaponCharge",20,"Flash2")
NCH1 R 0 A_JumpIfInventory("WeaponCharge",1,1)
Goto NoFlash
NCH1 R 1
NCH1 R 0 A_JumpIfInventory("WeaponCharge",20,"Flash2")
NCH1 R 0 A_JumpIfInventory("WeaponCharge",1,"Flash")
Goto NoFlash
Flash2:
NCH1 V 0
NCH1 V 1 ACS_ExecuteAlways(991,0,COL_PROTOCHARGEC2)
NCH1 V 0 A_JumpIfInventory("WeaponCharge",20,1)
Goto NoFlash
NCH1 V 1
NCH1 V 0 A_JumpIfInventory("WeaponCharge",20,1)
Goto NoFlash
NCH1 R 1 ACS_ExecuteAlways(991,0,COL_PROTOCHARGE)
NCH1 R 0 A_JumpIfInventory("WeaponCharge",20,1)
Goto NoFlash
NCH1 R 1
NCH1 R 0 A_JumpIfInventory("WeaponCharge",20,"Flash2")
Goto NoFlash
NoFlash:
TNT1 A 0 ACS_ExecuteAlways(991,0,COL_PROTOCHARGE)
stop
NoAmmo:
NCH1 R 1 ACS_Execute(979,0)
NCH1 R 0 A_Refire
Goto Ready+1
}
}
actor ProtoChargeWepSH : ProtoChargeWep replaces ProtoChargeWep
{+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans}


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

actor ProtoCharge
{
PROJECTILE
+DONTBLAST
+BRIGHT
damagetype "ProtoCharge"
Obituary "$OB_PROTOCHARGE"
Radius 7
Height 7
scale 3.0
Damage (15)
Speed 36
States
{
Spawn:
RNCP GH 3
loop
Death:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,8)
stop
}
}

actor ProtoCharged : ProtoCharge
{
damagetype "ProtoCharged"
+LOOKALLAROUND
+SKYEXPLODE
+RIPPER
+BRIGHT

Speed 44
Damage (36)
radius 25
height 25
States
{
Spawn:
RNCP IJ 2
loop
}
}