ACTOR MechMorph : PowerupGiver 6969
{
 Inventory.PickupMessage "Illegali stolen from zdoom wiki"  
 Inventory.PickupSound "world/thunder"
 Powerup.Type PowerGoMech
 Powerup.Duration 42000
 +COUNTITEM
 +FLOATBOB
 +INVENTORY.AUTOACTIVATE
 -INVENTORY.ALWAYSPICKUP
 scale 0.5
 States
 {
  Spawn:
   PLAY Q 1
    Goto Spawn
 }
}

ACTOR PowerGoMech : PowerMorph
{
 PowerMorph.PlayerClass "MONSTEREDITED_MechPlayer"
 PowerMorph.MorphStyle (MRF_FULLHEALTH|MRF_ADDSTAMINA)
}







//--------------------------------------------------------------------------------------------------------------------

ACTOR MechWalk : Ammo //ammo.. I am noob xD
{
  Inventory.PickupMessage "you picked the fact you made left leg step with your lovely cute awesome looking mech :D"
  Inventory.Amount 1
  Inventory.MaxAmount 1
  Ammo.BackpackAmount 1
  Ammo.BackpackMaxAmount 1
  Inventory.Icon "CLIPA0" //dont want to try remove it *plays weird music*
  States
  {
  Spawn:
    TNT1 A -1
    Stop
  }
}

ACTOR MechFroze : Ammo //copy and paste one thing and change minor things
{
  Inventory.PickupMessage "you picked the fact your mech stopped moving 100% so it wont do glitches"
  Inventory.Amount 1
  Inventory.MaxAmount 1
  Ammo.BackpackAmount 1
  Ammo.BackpackMaxAmount 1
  Inventory.Icon "CLIPA0" 
  States
  {
  Spawn:
    TNT1 A -1
    Stop
  }
}


ACTOR MONSTEREDITED_MechPlayer : PlayerPawn
{
	Speed 0.7
	Radius 32
	Height 128
	Mass 100
	PainChance 255
	Player.ColorRange 112, 127
	Player.DisplayName "War Mech"
	Player.CrouchSprite "ZTNK"
	Player.ViewHeight 128
	Player.SideMove 0.5
	Player.AttackZOffset 96
	scale 0.4
	
	States
	{
	Spawn:
	    PLAY O 0
		PLAY T 0 A_JumpIfInventory("MechFroze",1,17) // sends it to hell!
		PLAY T 0 A_JumpIfInventory("MechWalk",1,5)
		
		PLAY T 1 A_GiveInventory("MechFroze",1)
		PLAY T 1 A_Stop //it stops even from falling but whatever
		
		//Loop
		PLAY T 0 A_Jump(256,10)
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 1 A_GiveInventory("MechFroze",1) 
		PLAY T 1 A_Stop
		
		PLAY T 1 A_Jump(256,20)
		
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0

		PLAY T 0 A_JumpIfInventory("MechWalk",1,5)
		PLAY T 1
		PLAY T 0 A_Jump(256,10)
		
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		
		PLAY T 1 
		PLAY T 0 A_Jump(256,10)
		
		PLAY T 1
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		PLAY T 0
		
		PLAY T 0
		Goto Spawn
	See:
	    PLAY O 0 A_TakeInventory("MechFroze",1)
	    PLAY O 0 A_JumpIfInventory("MechWalk",1,10)
		PLAY A 0 A_GiveInventory("MechWalk",1)
		PLAY O 3 A_PlaySound("vehicle/mechleg", CHAN_AUTO)
		//PLAY O 0 A_SpawnItem("MechLegDamage")
		PLAY PQRS 3// A_SpawnItem("MechLegDamage")
		PLAY T 1 //FinalFantasy* win music!
		
		goto Spawn
		
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0
		PLAY A 0

		
		PLAY A 0 A_TakeInventory("MechWalk",1)
		
		PLAY T 3 A_PlaySound("vehicle/mechleg", CHAN_AUTO)
		//PLAY O 0 A_SpawnItem("MechLegDamage")
		PLAY UVWXYZ 3// A_SpawnItem("MechLegDamage")
		PLAY O 1 
		goto Spawn
	Pain:
	    //PLAY O 0 A_SpawnItem("MechLegDamage")
		PLAY O 4 A_PlaySound("veh/tankpain")
		PLAY O 4 A_Pain
		Goto Spawn
	Death:
		PLAY U 5 A_PlayerSkinCheck("AltSkinDeath")
		PLAY A 0 A_SpawnItem("CoreExplosion") //its in frenzy_battery
		PLAY V 5 A_PlayerScream
		PLAY W 5 A_NoBlocking
		PLAY X 5
		NULL A 1
		NULL A -1
                Stop // you cant do that! It should freeze the skulltag!.. if you were that mech still
	XDeath:
		PLAY G 5 A_PlayerSkinCheck("AltSkinXDeath")
		PLAY A 0 A_SpawnItem("CoreExplosion") //its in frenzy_battery
		PLAY H 5 A_XScream
		PLAY I 5 A_NoBlocking
		NULL A 1
		NULL A -1
                Stop
	AltSkinDeath:
		PLAY A 6
		PLAY A 6 A_PlayerScream
		PLAY A 6
		PLAY A 6 A_NoBlocking
		PLAY A 6
		Stop
	AltSkinXDeath:
		PLAY A 5 A_PlayerScream
		PLAY A 5 A_NoBlocking
		PLAY A 5 A_SkullPop
		PLAY A 5
		Stop
	}
}

actor MechLegDamage
{
	DamageType MarineFire
	
	height 2
	radius 2
	
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	-SOLID
	
	donthurtshooter
	
	states
	{
		spawn:
		TNT1 AA 1 A_Explode(164,128,0)
		stop
	}
}





























































actor TankGun : Weapon
{
  radius 20 
  height 16
  inventory.pickupmessage "You got the Tank"
  weapon.selectionorder 2500
  weapon.kickback 100
  DamageType MarineFire
  +WEAPON.EXPLOSIVE
  states
  {
  Ready:
    NULL A 1 A_WeaponReady
    Goto Ready
  Deselect:
    NULL A 1 A_Lower
	NULL AA 0 A_LOWER
    Goto Deselect
  Select:
    NULL A 1 A_Raise
	NULL AA 0 A_RAISE
    Goto Select
  Fire:
    NULL A 8 A_PlaySound("NAILUP")
    NULL A 5
    NULL A 3
    NULL A 2
    NULL A 2
  Hold:
	NULL A 0 A_PlayWeaponSound("Weapons/Nailfire")
	NULL A 0 A_GunFlash
    NULL A 0 Bright A_FireCustomMissile("MiniNailShot",random(-3,3),1,13,random(-3,3),random(-3,3))
    NULL A 0 Bright A_FireCustomMissile("MiniNailShot",random(-3,3),1,-13,random(-3,3),random(-3,3))
    NULL A 2 Bright
    NULL A 0 A_JumpIfNoAmmo(11)
	NULL A 0 A_GunFlash
	NULL A 0 A_PlayWeaponSound("Weapons/Nailfire")
    NULL A 0 Bright A_FireCustomMissile("MiniNailShot",random(-3,3),1,13,random(-3,3),random(-3,3))
    NULL A 0 Bright A_FireCustomMissile("MiniNailShot",random(-3,3),1,-13,random(-3,3),random(-3,3))
    NULL A 2 Bright 
    NULL A 0 A_Light0
    NULL A 0 A_ReFire
    NULL A 2
    NULL A 3
    NULL A 4
    NULL A 6
    NULL A 8
    NULL A 0 A_CheckReload
    Goto Ready
    NULL A 2 A_Light0
    NULL A 2
    NULL A 3
    NULL A 3
    NULL A 4
    NULL A 6
    NULL A 9
    NULL A 0 A_CheckReload
    Goto Ready
  Spawn:
    NULL A -1
	Stop
  }
}

actor seekerRocket// : MageStaffFX2
{
	spawnid 169
	Radius 12
	Height 8
	Speed 35
	Damage 150
	Projectile
	Scale 1.0//0.74
	+NOTIMEFREEZE
      //+EXTREMEDEATH
	+ROCKETTRAIL
	+SEEKERMISSILE
	//-RIPPER
	DeathSound "DSQKLDTH"
        explosionradius 256
        explosiondamage 600
  DamageType MarineFire
	States
	{
	Spawn:
		QROK A 1 bright A_SeekerMissile(80,90)
		NULL A 0 A_CustomMissile("seekerRockTrail",0,0,0,0)
		QROK A 0 Bright A_LookEx(2,0,12,0,360,"See")
	QROK A 0 Bright //A_MStaffTrack
	Goto Spawn
    See:
	QROK A 0 Bright //A_MeleeAttack
	QROK A 0 Bright A_Die
	Death:
		EXP3 A 2 Bright A_Explode
		NULL A 0 A_SpawnItem("ExtraExplosion")
		NULL A 0 A_SpawnItem("Engulf")
		EXP3 BCDEFGHIJKLMNOPQRSTUVWXYZ 1 Bright
		Stop
	}
}

actor seekerRocket_ForAirstrike// : MageStaffFX2
{
	spawnid 170
	Radius 12
	Height 8
	Speed 35
	Damage 250
	Projectile
	Scale 3.0//0.74
	+NOTIMEFREEZE
      //+EXTREMEDEATH
	+ROCKETTRAIL
	+SEEKERMISSILE
	//-RIPPER
	DeathSound "DSQKLDTH"
        explosionradius 600
        explosiondamage 900
	renderstyle add
  DamageType MarineFire
	States
	{
	Spawn:
		QROK A 1 bright A_SeekerMissile(80,90)
		NULL A 0 A_CustomMissile("seekerRockTrail",0,0,0,0)
		QROK A 0 Bright A_LookEx(2,0,12,0,360,"See")
	QROK A 0 Bright //A_MStaffTrack
	Goto Spawn
    See:
	QROK A 0 Bright //A_MeleeAttack
	QROK A 0 Bright A_Die
	Death:
		EXP3 A 2 Bright A_Explode
		NULL A 0 A_SpawnItem("ExtraExplosion")
		NULL A 0 A_SpawnItem("Engulf")
		EXP3 BCDEFGHIJKLMNOPQRSTUVWXYZ 1 Bright
		Stop
	}
}

actor seekerRocket_ForCrusher// : MageStaffFX2
{
	spawnid 170
	Radius 12
	Height 8
	Speed 35
	Damage 250
	Projectile
	Scale 7.0//0.74
	+NOTIMEFREEZE
      //+EXTREMEDEATH
	+ROCKETTRAIL
	+SEEKERMISSILE
	//-RIPPER
	DeathSound "DSQKLDTH"
        explosionradius 300
        explosiondamage 1700
	renderstyle add
  DamageType MarineFire
	States
	{
	Spawn:
		QROK A 1 bright A_SeekerMissile(80,90)
		NULL A 0 A_CustomMissile("seekerRockTrail",0,0,0,0)
		QROK A 0 Bright A_LookEx(2,0,12,0,360,"See")
	QROK A 0 Bright //A_MStaffTrack
	Goto Death
    See:
	QROK A 0 Bright //A_MeleeAttack
	QROK A 0 Bright A_Die
	Death:
		EXP3 A 2 Bright A_Explode
		NULL A 0 A_SpawnItem("ExtraExplosion")
		NULL A 0 A_SpawnItem("Engulf")
		EXP3 BCDEFGHIJKLMNOPQRSTUVWXYZ 1 Bright
		Stop
	}
}

actor seekerRockTrail
{
	Radius 1
	Height 1
	Speed 0
	Damage 0
	Scale 0.8
	RenderStyle Add
	Alpha 0.5
	+NOGRAVITY
	+NOTIMEFREEZE
  DamageType MarineFire
	States
	{
	Spawn:
		SMO2 ABCDE 3
		Stop
	}
}
Actor ExtraExplosion
{
PROJECTILE
+NOCLIP
+NOTIMEFREEZE
radius 6
  height 8
  mass 1
  speed 35
  //damage 20   too powerful :P
	RenderStyle Add
  DamageType MarineFire
States
{
Spawn:
EXP2 A 2 Bright A_Explode
EXP2 A 0 Radius_Quake(10,8,0,15,0)
EXP2 ABCDEFGHIJKLMN 2 Bright A_SetTranslucent(1,1.0)
stop
}
}

Actor Engulf
{
scale 7.0
PROJECTILE
+NOCLIP
+NOTIMEFREEZE
radius 6
  height 8
  mass 1
  speed 35
  //damage 20   too powerful :P
	RenderStyle Add
  DamageType MarineFire
States
{
Spawn:
BLST A 1 A_FadeOut(0.3)
Goto Spawn
}
}


actor NailShot
{

	Radius 6
	Height 6
	Speed 30
	Damage 200
	Projectile
	Scale 0.8
	DeathSound "weapons/nailpuff"
  DamageType MarineFire
	States
	{
	Spawn:
		SPIK A 1 //A_spawnitem("MicroNailPuff")
		Goto Spawn
	Death:
		TNT1 A 0 A_SpawnItemEx("NailPuff",0,0,0,0,0,0,0,32)
		NULL AAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MiniNailShotgravity",0,0,0,random(-4,4),random(-4,4),random(-4,4),random(1,360))
		TNT1 A 0 A_Jump(128,1)
		TNT1 A 0 A_PlaySound("weapons/nailricochet")
		TNT1 A 3
		Stop
	}
}
actor MiniNailShot
{
	Radius 6
	Height 6
	Speed 30
	Damage 30
	Projectile
	Scale 0.15
	DeathSound "weapons/nailpuff"
  DamageType MarineFire
	renderstyle add
	States
	{
	Spawn:
		SPIK A 1 // A_spawnitem("MiniNailPuff")
		Goto Spawn
	Death:
		TNT1 A 0 A_SpawnItemEx("MicroNailPuff",0,0,0,0,0,0,0,32)
		TNT1 A 0 A_Jump(128,1)
		TNT1 A 0 A_PlaySound("weapons/nailricochet")
		TNT1 A 3
		Stop
	}
}
actor MiniNailShotGravity
{
Radius 0
	Height 0
	Speed 30
	Damage 2
	Projectile
	+LOWGRAVITY
	Scale 0.07
	DeathSound "weapons/nailpuff"
  DamageType MarineFire
	States
	{
	Spawn:
		SPIK A 1// A_spawnitem("MiniNailPuff")
		NULL A 0 A_GRAVITY
		SPIK A 1// A_spawnitem("MiniNailPuff")
		SPIK A 1// A_spawnitem("MiniNailPuff")
		NULL A 0 A_GRAVITY
		SPIK A 1// A_spawnitem("MiniNailPuff")
		SPIK A 1// A_spawnitem("MiniNailPuff")
		NULL A 0 A_GRAVITY
		SPIK A 1// A_spawnitem("MiniNailPuff")
		SPIK A 1// A_spawnitem("MiniNailPuff")
		NULL A 0 A_GRAVITY
		SPIK A 1// A_spawnitem("MiniNailPuff")
	Death:
		TNT1 A 0 A_SpawnItemEx("MicroNailPuff",0,0,0,0,0,0,0,32)
		Stop
	}
}
Actor NailPuff
{
	Projectile

	+NOCLIP
	Speed 0
	Damage 0
	Scale 3.2
	RenderStyle Add
  DamageType MarineFire
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128,11)
		FX57 ABCDEFGHIJ 2 Bright A_FadeOut
		Stop
		FX57 KLMNOPQRST 2 Bright A_FadeOut
		Stop
	}
}
Actor MicroNailPuff : NailPuff
{
	Scale 1
  DamageType MarineFire
}
Actor MiniNailPuff : NailPuff
{
	Scale 0.05
  DamageType MarineFire
}



actor TankGunAdvanced : Weapon
{
  radius 20 
  height 16
  inventory.pickupmessage "You got the Tank"
  weapon.selectionorder 2500
  weapon.kickback 100
  DamageType MarineFire
  +WEAPON.EXPLOSIVE
  states
  {
  Ready:
    NULL A 1 A_WeaponReady
    goto Ready
  Deselect:
    NULL A 1 A_Lower
	NULL AA 0 A_LOWER
    goto Deselect
  Select:
    NULL A 1 A_Raise
	NULL AA 0 A_RAISE
    goto Select
  Fire:
    NULL A 8 A_PlaySound("NAILUP")
    NULL A 5
    NULL A 3
    NULL A 2
    NULL A 2
  Hold:
	NULL A 0 A_PlayWeaponSound("Weapons/Nailfire")
	NULL A 0 A_GunFlash
    NULL A 0 Bright A_FireCustomMissile("MiniNailShot",random(-3,3),1,13,random(-3,3),random(-3,3))
    NULL A 0 Bright A_FireCustomMissile("MiniNailShot",random(-3,3),1,-13,random(-3,3),random(-3,3))
    NULL A 2 Bright
    NULL A 0 A_JumpIfNoAmmo(11)
	NULL A 0 A_GunFlash
	NULL A 0 A_PlayWeaponSound("Weapons/Nailfire")
    NULL A 0 Bright A_FireCustomMissile("MiniNailShot",random(-3,3),1,13,random(-3,3),random(-3,3))
    NULL A 0 Bright A_FireCustomMissile("MiniNailShot",random(-3,3),1,-13,random(-3,3),random(-3,3))
    NULL A 2 Bright 
    NULL A 0 A_Light0
    NULL A 0 A_ReFire
    NULL A 2
    NULL A 3
    NULL A 4
    NULL A 6
    NULL A 8
    NULL A 0 A_CheckReload
    Goto Ready
    NULL A 2 A_Light0
    NULL A 2
    NULL A 3
    NULL A 3
    NULL A 4
    NULL A 6
    NULL A 9
    NULL A 0 A_CheckReload
    Goto Ready
  AltFire:
    NULL A 1
	NULL A 0 A_PlayWeaponSound("SEEKLAUNCH")
    NULL A 2 bright A_FireCustomMissile ("SeekerRocket",0,1,26,-2)
    NULL A 2 bright A_FireCustomMissile ("SeekerRocket",0,1,-26,-2)
    NULL A 2 bright A_FireCustomMissile ("SeekerRocket",0,1,26,-2)
    NULL A 2 bright A_FireCustomMissile ("SeekerRocket",0,1,-26,-2)
    NULL A 2 bright A_FireCustomMissile ("SeekerRocket",0,1,26,-2)
    NULL A 2 bright A_FireCustomMissile ("SeekerRocket",0,1,-26,-2)
    NULL A 2 bright 
	NULL AAAAAAA 2
	NULL A 8
	NULL A 0 A_PlayWeaponSound("RPGOPN")
	NULL AAAAA 2
	NULL A 7
	NULL A 0 A_PlayWeaponSound("RPGLAD")
	NULL AAAA 2
	NULL A 20
	NULL A 0 A_PlayWeaponSound("RPGOCLS")
	NULL AAAAA 2
	NULL A 4
	Goto ready
  Spawn:
    NULL A -1
	Stop
  }
}













actor MechDummy 6070
{
	Radius 32
	Height 128
	scale 0.4
	
	States
	{
	Spawn:
	    PLAY Q 1
  	    Goto Spawn
	}
}
