/*
CREDITS:
AHTATATATA - Kenshiro, Fist of the North Star
BSOD Punch - Dasboschitt
Sparta Kick - 300
Bicycle Kick - Mortal Kombat, Liu Kang's signature move

Punch'n'Kick sounds - LucasArts, Raven (SW JKIII:JA)
*/

ACTOR TreesFists : Weapon
{
   Tag "Melee"
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "Save the trees? Dude, they are our oppresors! Mind con-trolled jerks known as ecologists made us think that we need them! (1)"
   Obituary "%o stumbled in %k's way, just in %h's tree-beat-up time."
   Weapon.UpSound "Weapons/MartyFistUp"
   Weapon.SelectionOrder 8
   Weapon.SlotNumber 1
   Weapon.Kickback 150
   AttackSound ""
   +NOALERT
   +WEAPON.CHEATNOTWEAPON
   //+NOAUTOFIRE
   States
   {
   Spawn:
      TNT1 A -1
      Loop
   Ready:
      MFSG A 1 A_WeaponReady
      Loop
   Deselect:
      //TNT1 A 0 ACS_NamedTerminate("ComboControl")
   MEAT:
      TNT1 A 0 A_TakeInventory("MartyKickCounter",999)
      TNT1 A 0 A_TakeInventory("MartyPunchCounter",999)
      MFSG A 1 A_Lower
      MFSG A 0 A_Lower
      MFSG A 0 A_Lower
      Loop
   Select:
      TNT1 A 0 ACS_ExecuteAlways(718,0,2)
	  TNT1 A 0 ACS_ExecuteAlways(719,0,2)
   FRESH:
      TNT1 AAAAAAAAAAAAAA 0 A_Raise
      MFSU ABCDDCBA 1
      MFSG A 1 A_Raise
      Loop
   Fire:
      MFSG ABC 1
      TNT1 A 1
      Goto Hold
   Retirement:
      TNT1 A 1
      MFSG CBA 1
      Goto Ready
   Hold:
      TNT1 A 0 A_JumpIfInventory("KenshiroTrigger",1,"AHTATATA")
      TNT1 A 0 A_JumpIfInventory("KleinerTrigger",1,"CLYDE")
      TNT1 A 0 A_JumpIfInventory("ComboMode",1,"Randomness1")
	  Goto Fisting
   Randomness1:
      TNT1 A 0 A_Jump(4,"AHTATATA","CLYDE")
	  Goto Fisting
   Fisting:
      TNT1 A 0 A_Jump(255,"Punch1","Punch2","Punch3","Punch4")
	  TNT1 A 1
      TNT1 A 0 A_ReFire
      TNT1 A 1
      MFSG CBA 1
      Goto Ready
   Punch1:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      FIS1 ABCD 1
      TNT1 A 0 A_CustomPunch(17,0,0,"MartyPunchPuff",75+random(15,-15))

      FIS1 EA 1
      TNT1 A 1 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOPRIMARY)
      TNT1 A 0 A_ReFire
      Goto Retirement
   Punch2:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      FIS2 ABCD 1
      TNT1 A 0 A_CustomPunch(17,0,0,"MartyPunchPuff",75+random(15,-15))

      FIS2 EA 1
      TNT1 A 1 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOPRIMARY)
      TNT1 A 0 A_ReFire
      Goto Retirement
   Punch3:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      FIS7 ACE 1
      TNT1 A 0 A_CustomPunch(17,0,0,"MartyPunchPuff",75+random(15,-15))

      FIS7 EFGH 1
      TNT1 A 1 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOPRIMARY)
      TNT1 A 0 A_ReFire
      Goto Retirement
   Punch4:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      FIS8 ACE 1
      TNT1 A 0 A_CustomPunch(17,0,0,"MartyPunchPuff",75+random(15,-15))

      FIS8 EFGH 1
      TNT1 A 1 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOPRIMARY)
      TNT1 A 0 A_ReFire
      Goto Retirement
   CLYDE:
      TNT1 A 0 A_TakeInventory("KleinerTrigger",1)
      TNT1 A 0 A_PlaySoundEx("weapons/CLYDE","SoundSlot5",0,2)
      TNT1 A 50 Radius_Quake(5,75,0,256,0)
      FLCP ABCDEF 1
      BSOD A 7 Bright
      TNT1 A 0 A_SetBlend("Blue",1,125)
      TNT1 A 0 A_FireCustomMissile("Worldbreaker",0,0,0,0)
      TNT1 A 70
      Goto Retirement

   AHTATATA:
      TNT1 A 0 A_TakeInventory("KenshiroTrigger",1)
      TNT1 A 0 A_PlaySound("weapons/AHTATATA",5)
      TNT1 A 0 A_GiveInventory("AHTATATAPower")
      TNT1 A 0 A_GiveInventory("MartyPunchCounter",112)
   WAAAAH:
      TNT1 A 0 A_Jump(255,"TA1","TA2","TA3","TA4","TA5","TA6","TA7","TA8")
   TA1:
      TNT1 A 0 A_Jump(255,"1TA1","1TA2")
   1TA1:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT1 AB 1 ACS_Execute(851,0,+30+random(5,-10),+40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   2TA1:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT1 CD 1 ACS_Execute(851,0,+30+random(5,-10),+40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   TA2:
      TNT1 A 0 A_Jump(255,"1TA2","2TA2")
   1TA2:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT2 AB 1 ACS_Execute(851,0,+30+random(5,-10),-40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   2TA2:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT2 CD 1 ACS_Execute(851,0,+30+random(5,-10),-40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   TA3:
      TNT1 A 0 A_Jump(255,"1TA3","2TA3")
   1TA3:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT3 AB 1 Radius_Quake(4,6,0,32,0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   2TA3:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT3 CD 1 Radius_Quake(4,6,0,32,0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   TA4:
      TNT1 A 0 A_Jump(255,"1TA4","2TA4")
   1TA4:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT4 AB 1 ACS_Execute(851,0,-30+random(5,-10),-40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   2TA4:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT4 CD 1 ACS_Execute(851,0,-30+random(5,-10),-40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   TA5:
      TNT1 A 0 A_Jump(255,"1TA5","1TA5")
   1TA5:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT5 AB 1 ACS_Execute(851,0,+30+random(5,-10),+40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   2TA5:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT5 CD 1 ACS_Execute(851,0,+30+random(5,-10),+40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   TA6:
      TNT1 A 0 A_Jump(255,"1TA6","2TA6")
   1TA6:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT6 AB 1 ACS_Execute(851,0,+30+random(5,-10),-40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   2TA6:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT6 CD 1 ACS_Execute(851,0,+30+random(5,-10),-40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   TA7:
      TNT1 A 0 A_Jump(255,"1TA7","2TA7")
   1TA7:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT7 AB 1 Radius_Quake(4,6,0,32,0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   2TA7:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT7 CD 1 Radius_Quake(4,6,0,32,0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   TA8:
      TNT1 A 0 A_Jump(255,"1TA8","2TA8")
   1TA8:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT8 AB 1 ACS_Execute(851,0,-30+random(5,-10),-40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   2TA8:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      HAT8 CD 1 ACS_Execute(851,0,-30+random(5,-10),-40+random(2,-5),0)
      TNT1 A 0 A_CustomPunch(45,0,0,"MartyPunchPuff",2048+random(15,-15))
      Goto AHTATATACounter
   AHTATATACounter:
      TNT1 A 0 A_TakeInventory("MartyPunchCounter",1)
      TNT1 A 0 A_JumpIfInventory("MartyPunchCounter",1,"WAAAAH")
      TNT1 A 40
      Goto Retirement
   AltFire:
      MFSG ABC 1
      TNT1 A 1
      Goto AltHold
   AltHold:
      TNT1 A 0 A_JumpIfInventory("SpartaTrigger",1,"SPARTA")
      TNT1 A 0 A_JumpIfInventory("BicycleTrigger",1,"BICYCLE")
      TNT1 A 0 A_JumpIfInventory("ComboMode",1,"Randomness2")
	  Goto AssKickery
   Randomness2:
      TNT1 A 0 A_Jump(8,"SPARTA","BICYCLE")
   AssKickery:
      TNT1 A 0 A_Jump(224,2)
      TNT1 A 0 A_PlaySoundEx("Weapons/MartyHoowah","Voice")
      TNT1 A 0 A_Jump(48,"RThrust1","RThrust2","LThrust1","LThrust2")
      TNT1 A 0 A_Jump(64,"RKnee1","RKnee2","RKick1","RKick2","LKnee1","LKnee2")
      TNT1 A 0 A_Jump(255,"RKick1","RKick2","LKick1","LKick2")
	  TNT1 A 1
      TNT1 A 0 A_ReFire
      TNT1 A 1
      MFSG CBA 1
      Goto Ready
   RThrust1:
      TNT1 A 0 A_Recoil(-10)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      TR1R ABC 1 ACS_Execute(851,0,+40+random(5,-10),-20+random(2,-5),0)
      TR1R D 0 ThrustThingZ(0, 25, 0, 1)
      TR1R D 1 A_CustomPunch(15,0,0,"MartyKickPuff",125+random(15,-15))
      TR1R DD 0 A_CustomPunch(30,0,0,"MartyNullPuff",125+random(15,-15))
      TR1R EFGHIJ 1 ACS_Execute(851,0,-15+random(5,-10),+10+random(2,-5),0)

      TNT1 A 10 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 3 A_ReFire
      Goto Retirement
   RThrust2:
      TNT1 A 0 A_Recoil(-12)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      TR2R ABC 1 ACS_Execute(851,0,+15+random(5,-10),-40+random(2,-5),0)
      TR2R D 0 ThrustThingZ(0, 25, 0, 1)
      TR2R D 1 A_CustomPunch(15,0,0,"MartyKickPuff",125+random(15,-15))
      TR2R DD 0 A_CustomPunch(30,0,0,"MartyNullPuff",125+random(15,-15))
      TR2R EFGHIJ 1 ACS_Execute(851,0,-5+random(5,-10),+20+random(2,-5),0)

      TNT1 A 10 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 3 A_ReFire
      Goto Retirement
   RKnee1:
      TNT1 A 0 A_Recoil(-3)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      KN1R AB 1 ACS_Execute(851,0,+30+random(5,-10),-40+random(2,-5),0)
      KN1R C 0 ThrustThingZ(0, 15, 0, 1)
      KN1R C 1 A_CustomPunch(12,0,0,"MartyKickPuff",85+random(15,-15))
      KN1R CC 0 A_CustomPunch(25,0,0,"MartyNullPuff",85+random(15,-15))
      KN1R DEF 1 ACS_Execute(851,0,-15+random(5,-10),+25+random(2,-5),0)

      TNT1 A 5 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 2 A_ReFire
      Goto Retirement
   RKnee2:
      TNT1 A 0 A_Recoil(-3)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      KN2R AB 1 ACS_Execute(851,0,+40+random(5,-10),-20+random(2,-5),0)
      KN2R C 0 ThrustThingZ(0, 15, 0, 1)
      KN2R C 1 A_CustomPunch(12,0,0,"MartyKickPuff",85+random(15,-15))
      KN2R CC 0 A_CustomPunch(25,0,0,"MartyNullPuff",85+random(15,-15))
      KN2R DEF 1 ACS_Execute(851,0,-20+random(5,-10),+10+random(2,-5),0)

      TNT1 A 5 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 2 A_ReFire
      Goto Retirement
   RKick1:
      TNT1 A 0 A_Recoil(-6)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      KK1R ABC 1 ACS_Execute(851,0,+15+random(5,-5),-40+random(2,-5),0)
      KK1R D 1 A_CustomPunch(14,0,0,"MartyKickPuff",110+random(15,-15))
      KK1R DD 0 A_CustomPunch(27,0,0,"MartyNullPuff",110+random(15,-15))
      KK1R EFGH 1 ACS_Execute(851,0,-10+random(5,-5),-20+random(2,-5),0)

      TNT1 A 7 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 3 A_ReFire
      Goto Retirement
   RKick2:
      TNT1 A 0 A_Recoil(-6)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      KK2R ABC 1 ACS_Execute(851,0,+20+random(5,-5),-45+random(2,-5),0)
      KK2R D 1 A_CustomPunch(14,0,0,"MartyKickPuff",110+random(15,-15))
      KK1R DD 0 A_CustomPunch(27,0,0,"MartyNullPuff",110+random(15,-15))
      KK2R EFGH 1 ACS_Execute(851,0,-15+random(5,-5),-25+random(2,-5),0)

      TNT1 A 7 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 3 A_ReFire
      Goto Retirement

   LThrust1:
      TNT1 A 0 A_Recoil(-10)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      TR1L ABC 1 ACS_Execute(851,0,+40+random(5,-10),+15+random(2,-5),0)
      TR1L D 0 ThrustThingZ(0, 25, 0, 1)
      TR1L D 1 A_CustomPunch(15,0,0,"MartyKickPuff",125+random(15,-15))
      TR1L DD 0 A_CustomPunch(30,0,0,"MartyNullPuff",125+random(15,-15))
      TR1L EFGHIJ 1 ACS_Execute(851,0,-25+random(5,-10),-10+random(2,-5),0)

      TNT1 A 10 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 3 A_ReFire
      Goto Retirement
   LThrust2:
      TNT1 A 0 A_Recoil(-12)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      TR2L ABC 1 ACS_Execute(851,0,+15+random(5,-10),+30+random(2,-5),0)
      TR2L D 0 ThrustThingZ(0, 25, 0, 1)
      TR2L D 1 A_CustomPunch(15,0,0,"MartyKickPuff",125+random(15,-15))
      TR2L DD 0 A_CustomPunch(30,0,0,"MartyNullPuff",125+random(15,-15))
      TR2L EFGHIJ 1 ACS_Execute(851,0,-5+random(5,-10),-15+random(2,-5),0)

      TNT1 A 10 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 3 A_ReFire
      Goto Retirement
   LKnee1:
      TNT1 A 0 A_Recoil(-3)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      KN1L AB 1 ACS_Execute(851,0,+30+random(5,-10),+40+random(2,-5),0)
      KN1L C 0 ThrustThingZ(0, 15, 0, 1)
      KN1L C 1 A_CustomPunch(12,0,0,"MartyKickPuff",85+random(15,-15))
      KN1L CC 0 A_CustomPunch(25,0,0,"MartyNullPuff",85+random(15,-15))
      KN1L DEF 1 ACS_Execute(851,0,-25+random(5,-10),-25+random(2,-5),0)

      TNT1 A 5 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 2 A_ReFire
      Goto Retirement
   LKnee2:
      TNT1 A 0 A_Recoil(-3)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      KN2L AB 1 ACS_Execute(851,0,+40+random(5,-10),+25+random(2,-5),0)
      KN2L C 0 ThrustThingZ(0, 15, 0, 1)
      KN2L C 1 A_CustomPunch(13,0,0,"MartyKickPuff",85+random(15,-15))
      KN1L CC 0 A_CustomPunch(25,0,0,"MartyNullPuff",85+random(15,-15))
      KN2L DEF 1 ACS_Execute(851,0,-25+random(5,-10),-12+random(2,-5),0)

      TNT1 A 5 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 2 A_ReFire
      Goto Retirement
   LKick1:
      TNT1 A 0 A_Recoil(-6)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      KK1L ABC 1 ACS_Execute(851,0,+15+random(5,-5),+40+random(2,-5),0)
      KK1L D 1 A_CustomPunch(14,0,0,"MartyKickPuff",110+random(15,-15))
      KK1L DD 0 A_CustomPunch(27,0,0,"MartyNullPuff",110+random(15,-15))
      KK1L EFGH 1 ACS_Execute(851,0,-10+random(5,-5),+20+random(2,-5),0)

      TNT1 A 7 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 3 A_ReFire
      Goto Retirement
   LKick2:
      TNT1 A 0 A_Recoil(-6)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")

      KK2L ABC 1 ACS_Execute(851,0,+20+random(5,-5),+45+random(2,-5),0)
      KK2L D 1 A_CustomPunch(14,0,0,"MartyKickPuff",110+random(15,-15))
      KK2L DD 0 A_CustomPunch(27,0,0,"MartyNullPuff",110+random(15,-15))
      KK2L EFGH 1 ACS_Execute(851,0,-15+random(5,-5),+25+random(2,-5),0)

      TNT1 A 7 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_NOSECONDARY)
      TNT1 A 3 A_ReFire
      Goto Retirement

   SPARTA:
      TNT1 A 0 A_TakeInventory("SpartaTrigger",1)
      TNT1 A 0 A_Recoil(-20)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      TNT1 A 0 A_PlaySoundEx("weapons/SPARTA","SoundSlot5")

      TR2R ABC 1 ACS_Execute(851,0,+15+random(5,-10),-40+random(2,-5),0)
      TR2R D 0 ThrustThingZ(0, 5, 0, 1)
      TR2R DDDDD 0 A_Blast(BF_AFFECTBOSSES|BF_DONTWARN, 600, 512, 30, "MartyKickPuff", 0) 
      TR2R DDDDD 1 A_CustomPunch(900,0,0,"MartyKickPuff",2048)
      TR2R D 20
      TR2R EFGHIJ 1 ACS_Execute(851,0,-5+random(5,-10),+20+random(2,-5),0)

      TNT1 A 10
      TNT1 A 3 A_ReFire
      Goto Retirement
   BICYCLE:
      TNT1 A 0 A_TakeInventory("BicycleTrigger",1)
      TNT1 A 0 A_GiveInventory("MartyKickCounter",4)
      TNT1 A 0 A_GiveInventory("BicyclePower")
      TNT1 A 0 A_PlaySoundEx("weapons/BICYCLE","SoundSlot5")

   Looplet:
      TNT1 A 0 A_Recoil(-7)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      TR2R AC 1 ACS_Execute(851,0,+15+random(5,-10),-40+random(2,-5),0)
      TR2R D 0 ThrustThingZ(0, 18, 0, 1)
      TR2R D 1 A_CustomPunch(550,0,0,"MartyKickPuff",225+random(15,-15))
      TR2R EGI 1 ACS_Execute(851,0,-5+random(5,-10),+20+random(2,-5),0)

      TNT1 A 0 A_Recoil(-7)
      TNT1 A 0 A_PlayWeaponSound("weapons/martyswing")
      TR2L AC 1 ACS_Execute(851,0,+15+random(5,-10),+30+random(2,-5),0)
      TR2L D 0 ThrustThingZ(0, 18, 0, 1)
      TR2L D 1 A_CustomPunch(550,0,0,"MartyKickPuff",225+random(15,-15))
      TR2L EGI 1 ACS_Execute(851,0,-5+random(5,-10),-15+random(2,-5),0)

      TNT1 A 0 A_TakeInventory("MartyKickCounter",1)
      TNT1 A 0 A_JumpIfInventory("MartyKickCounter",1,"Looplet")
      TNT1 A 12
      TNT1 A 3 A_ReFire
      Goto Retirement
   }
}

ACTOR KenshiroTrigger : DatTrigger {}
ACTOR KleinerTrigger : DatTrigger {}
ACTOR SpartaTrigger : DatTrigger {}
ACTOR BicycleTrigger : DatTrigger {}

ACTOR MartyPunchCounter : Inventory
{
	Inventory.MaxAmount 999
}

ACTOR MartyKickCounter : Inventory
{
	Inventory.MaxAmount 999
}

ACTOR Worldbreaker
{
	Radius 1
	Height 1
	Speed 1
	Damage 0
	Obituary "%k broke the world and %o with most annoying sound in the world-fist."
	PROJECTILE
	+NOGRAVITY
	+EXTREMEDEATH
	+FORCERADIUSDMG
	States
	{
	Spawn:	
	 TNT1 A 0
	 TNT1 A 1 A_Explode(4000,4096,0,1)
	 Stop
	}
}

ACTOR AHTATATAInvulnerability : InvulnerabilitySphere
{
  Powerup.Color None 0.0
  Powerup.Type "Invulnerable"
  Powerup.Duration 230
}

actor AHTATATAPower : CustomInventory
{
  Inventory.Amount 1
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  states
  {
  Use:
  TNT1 A 0 A_GiveInventory("AHTATATAInvulnerability")
  stop
  Spawn:
  TNT1 A -1
  Stop
  }
}

ACTOR BicycleInvulnerability : InvulnerabilitySphere
{
  Powerup.Color None 0.0
  Powerup.Type "Invulnerable"
  Powerup.Duration 51
}

actor BicyclePower : CustomInventory
{
  Inventory.Amount 1
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  states
  {
  Use:
  TNT1 A 0 A_GiveInventory("BicycleInvulnerability")
  stop
  Spawn:
  TNT1 A -1
  Stop
  }
}

ACTOR MartyPunchPuff : PunchPuff
{ 
   SeeSound ""
   States
   {
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_PlaySoundEx("weapons/martyfisthit","Auto")
    PUFF AABBCCDD 1 A_FadeOut(0.1)
    stop
  Crash:
    TNT1 A 1 A_PlaySoundEx("weapons/martyfisthit","Auto")
    PUFF AABBCCDD 1 A_FadeOut(0.1)
    stop
  Melee:
    TNT1 A 1 A_PlaySoundEx("weapons/martyfisthit","Auto")
    stop
   }
}

ACTOR MartyKickPuff : PunchPuff
{ 
   SeeSound ""
   States
   {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_PlaySoundEx("weapons/martykickhit","Auto")
    PUFF AABBCCDD 1 A_FadeOut(0.1)
    stop
  Crash:
    TNT1 A 0 A_PlaySoundEx("weapons/martykickhit","Auto")
    PUFF AABBCCDD 1 A_FadeOut(0.1)
    stop
  Melee:
    TNT1 A 1 A_PlaySoundEx("weapons/martykickhit","Auto")
    stop
   }
}

ACTOR MartyNullPuff : PunchPuff
{ 
   SeeSound ""
   States
   {
  Spawn:
    PUFF AABBCCDD 1 A_FadeOut(0.1)
    stop
  Crash:
    PUFF AABBCCDD 1 A_FadeOut(0.1)
    stop
  Melee:
    TNT1 A 1
    stop
   }
}
