actor ChargeKickWep : BaseMM8BDMWep 10055
{
//$Category MM8BDM-Weapons
//$Title Charge Kick
//$Sprite WEA2E0
Weapon.AmmoUse 2
Weapon.AmmoGive 28
Weapon.SlotNumber 4
Inventory.Pickupmessage "$PU_CHARGEKICK"
Obituary "$OB_CHARGEKICK"
Tag "$TAG_CHARGEKICK"
weapon.ammotype "ChargeKickAmmo"
inventory.icon "CHARSI"
States
{
SpawnLoop:
WEA2 E -1
loop
Ready:
CKIC C 0 ACS_ExecuteAlways(998,0,24)
CKIC C 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
CKIC C 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
CKIC C 1 A_Raise
Loop
Fire:
CKIC C 0 A_JumpIfNoAmmo("NoAmmo")
CKIC C 0 A_PlaySoundEx("weapon/chargekick","Weapon")
CKIC C 0 SetPlayerProperty(0,1,0)
CKIC C 0 A_ChangeVelocity(Cos(pitch)*25, 0, momz,CVF_RELATIVE|CVF_REPLACE)
CKIC C 0 A_JumpIf(-sin(pitch)*12 <= 0 && momz < 0, "ForceDown")
CKIC C 2 A_ChangeVelocity(0, 0, -sin(pitch)*12,CVF_RELATIVE)
Goto End
ForceDown:
CKIC C 2 A_ChangeVelocity(momx, momy, -sin(pitch)*12,CVF_REPLACE)
Goto End
End:
CKIC B 2 A_FireCustomMissile("ChargeKickHF",0,1,0,0)
CKIC A 8 SetPlayerProperty(0,0,0)
CKIC B 5
CKIC C 5
CKIC C 0 A_Refire
Goto Ready+1
NoAmmo:
CKIC C 1 ACS_Execute(979,0)
Goto Ready+1
}
}

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

actor ChargeKick
{
PROJECTILE
Radius 14
Height 25
scale 2.5
damage (47)
damagetype "ChargeKick"
Obituary "$OB_CHARGEKICK"
speed 40
States
{
Spawn:
CKIC D 0
CKIC D 0 //A_RadiusThrust(500,64,0)
CKIC DEF 2
stop
Death:
TNT1 A 1
stop
}
}

actor ChargeKickHF
{
PROJECTILE
Radius 14
Height 25
scale 2.5
damage (47)
damagetype "ChargeKick"
Obituary "$OB_CHARGEKICK"
speed 40
States
{
Spawn:
CKIC D 0
CKIC D 0 //A_RadiusThrust(500,64,0)
CKIC DEF 2
stop
XDeath:
CKIC F 0 A_GiveToTarget("ChargeKickBack", 1)
Goto Death
Death:
TNT1 A 1
stop
}
}

actor ChargeKickBack : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
+INVENTORY.AUTOACTIVATE
states
{
Spawn:
TNT1 A 1
loop
Pickup:
TNT1 A 0 A_ChangeVelocity(-Cos(pitch)*7, 0, sin(pitch+30)*11,CVF_RELATIVE|CVF_REPLACE)
stop
Nope:
TNT1 A 0
stop
}
}