ACTOR ChasmMineWeapon : Weapon
{
Inventory.PickupMessage "Picked up a Mine."
Inventory.PickupSound "Ammo/Pickup"
Weapon.AmmoType1 "MineAmmo"
Weapon.AmmoUse1 1
Weapon.AmmoType2 "MineAmmo"
Weapon.AmmoUse2 1
Weapon.AmmoGive1 0
Weapon.AmmoGive2 0
Weapon.UpSound "Mine/Up"
Weapon.SlotNumber 9
Weapon.SelectionOrder 5
Weapon.KickBack 1
Weapon.BobStyle Alpha
Weapon.BobRangeX 0.06
Weapon.BobRangeY 0.40
Weapon.BobSpeed 1.95
Inventory.Icon "HUMIN1"
Scale 1
+WEAPON.NOALERT
States
{
Spawn:
TNT1 A 0 NoDelay
MINX N -1
Stop
Ready:
MINX N 1 A_WeaponReady
Loop
Select:
TNT1 A 0 SetPlayerProperty(0,1,2)
MINX EFGHIJKLM 1
Goto Ready
Deselect:
MINX N 1 A_Lower
Loop
Fire:
TNT1 A 0
MINX ABCD 2
TNT1 A 0 A_PlaySound("ChasmMine/Fire",1)
MINX E 4 BRIGHT A_FireCustomMissile("ChasmMine",0,1)
MINX FGHIJKLM 1
Goto Ready
AltFire:
TNT1 A 0
MINX ABCD 2
TNT1 A 0 A_PlaySound("ChasmMine/Fire",1)
MINX E 8 BRIGHT A_FireCustomMissile("ChasmMine2",0,1)
MINX FGHIJKLM 1
Goto Ready
}
}

actor MineAmmo : Ammo
{
Inventory.Amount 2
Inventory.MaxAmount 12
ammo.backpackamount 3
ammo.backpackmaxamount 24
Inventory.PickupSound "Ammo/Pickup"
Inventory.PickupMessage "Picked up a Mine."
states
{
Spawn:
LMIX A -1
stop
}
}

actor ChasmMinePickup : CustomInventory
{
Inventory.PickupSound "Ammo/Pickup"
Inventory.PickupMessage "Picked up some Mines."
states
{
Spawn:
LMIX A -1
stop
Pickup:
TNT1 A 0 A_GiveInventory("MineAmmo", 3)
TNT1 A 0 A_GiveInventory("ChasmMineWeapon", 1)
stop
}
}

//

Actor ChasmMine
{
Radius 8
Height 5
Mass 1000000
Health 25
Damage 0
SeeSound "ChasmMine/Land"
DONTHURTSHOOTER
Speed 2
+NOBLOOD
-SHOOTABLE
+MISSILE
+DOOMBOUNCE
+THRUGHOST
BounceCount 4
DamageType "Explosive"
States
{
Spawn:
	MINX Z 0 A_Gravity
	MINX ZZZZZZ 4
	Loop
Death:
    TNT1 A 0 A_PlaySound("ChasmMine/Beep", 3)
	MINX Z 0 A_SpawnItem("ChasmMineBase")
	Stop
}
}
Actor ChasmMineBase
{
Radius 20
Height 5
Mass 1000000
Health 25
Damage 1
SeeSound ""
DONTHURTSHOOTER
Speed 0
+NOBLOOD
+SHOOTABLE
+MISSILE
+THRUGHOST
+DEHEXPLOSION
+FORCERADIUSDMG
DamageType "Explosive"
States
{
Spawn:
	MINX Z 0 A_Gravity
	MINX ZZZZZZ 4
	Loop
Death:
    TNT1 A 0 A_PlaySound("ChasmMine/Activate", 3)
	MINX ZZZZZZZZZZZZ 2 BRIGHT
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_PlaySound("ChasmMine/Explode", 1)
	TNT1 A 0 A_PlaySound("Distant/Explosion", 7)
	TNT1 A 0 A_PlaySound("Midway/Explosion", 6)
	TNT1 A 0 A_Spawnitem ("Explosion3") //Md2 Explosion
	TNT1 AAAAAAAA 0 A_CustomMissile("BoomFlare", 4, 0, random (0, 360), 2, random (0, 160))
	TNT1 AAAAAAAAAA 0 A_CustomMissile("ExplosionFlare", random(1,8), random(18,-18), random (0, 360), 2, random (0, 160))
	TNT1 AAAAAAAAAA 0 A_SpawnParticle ("Orange", SPF_FULLBRIGHT | SPF_RELATIVE, random(30,60), random(2,5), frandom(0,360), 0,0,0, frandom(0.2,12.0),frandom(-0.2,0.2),frandom(-6.0,6.0), 0,0,-0.1, 0.98, -1)
	TNT1 AAAA 0 A_CustomMissile("ExplosionFX", random(1,11), random(15,-15), random (0, 360), 2, random (0, 160))
	TNT1 AAAA 0 A_CustomMissile("ExplosionFX", random(1,-11), random(15,-15), random (0, 360), 2, random (0, 160))
	TNT1 A 0 A_CustomMissile("ExplosionSparkSpawner", random(1,8), random(15,-15), random (0, 360), 2, random (0, 160))
    TNT1 AAA 0 A_CustomMissile("ExplosionSmokeSpawner", random(1,11), random(15,-15), random (0, 360), 2, random (0, 160))
	TNT1 AAA 0 A_CustomMissile("ExplosionSmokeSpawner", random(1,-11), random(15,-15), random (0, 360), 2, random (0, 160))
	TNT1 A 0 A_CustomMissile("BigExplosionSmokeSpawner", random(1,-12), random(15,-15), random (0, 360), 2, random (0, 160))
	TNT1 A 0 A_CustomMissile("BigExplosionSmokeSpawner", random(1,12), random(1,-1), random (0, 360), 2, random (0, 160))
	TNT1 A 0 A_Explode(356,156)
	TNT1 A 0 A_SetTranslucent(0.97, 1)
	TNT1 A 0 A_SpawnItemEx("ExplosionWave")
	MIS3 AB 2 BRIGHT
	MIS3 CD 2 BRIGHT
	MIS3 EFG 1 BRIGHT A_FadeOut
	TNT1 A 0 A_SetScale(0.80)
	MIS3 GGG 1 BRIGHT A_FadeOut
	Stop
}
}
Actor ChasmMine2 : ChasmMine
{
Speed 15
}