// Redeemer

ACTOR Redeemer : IDMWeapon
{
	Radius 40
	Weapon.SelectionOrder 50
	Weapon.AmmoType "MiniNuke"
	Weapon.AmmoGive 1
	Weapon.AmmoUse 1
	//Weapon.PreferredSkin "RedeemerMarine"
	Inventory.Pickupmessage "Redeemer! (Slot 7)"
	Inventory.PickupSound "misc/w_pkup"
	Tag "Redeemer"
	+WEAPON.BFG
	+WEAPON.EXPLOSIVE
	+WEAPON.NOLMS
	States
	{
	Spawn:
	  RDMG X -1 Bright
	  Stop
	Ready:
	  RDMG A 1 A_WeaponReady
	  Loop
	Select:
	  TNT1 A 0 A_Playsound("weapons/redup",CHAN_WEAPON)
	  TNT1 A 0 A_Jump(128,"Sloop")
	  TNT1 A 0 A_Playsound("weapons/redaim",CHAN_7)
	Sloop:
	  RDMG A 2 A_Raise
	  RDMG A 1 A_Raise
	  Loop
	Deselect:
	  RDMG A 2 A_Lower
	  RDMG A 1 A_Lower
	  Loop
	Fire:
	  RDMG A 5 A_Playsound("weapons/redbeep",CHAN_WEAPON)
	  TNT1 A 0 A_GunFlash
	  RDMF A 2 Bright
	  TNT1 A 0 A_Playsound("weapons/redfir",CHAN_WEAPON)
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	  TNT1 A 0 A_JumpIfInventory("PowerIDMWeaponLevel2",1,"Level2")
	  RDMF B 2 Bright A_FireCustomMissile("RedeemerNuke",0,1)
	  RDMF CDEF 2 Bright
	  RDMG BCDEFGHIJ 3
	  TNT1 A 0 A_CheckReload
	  RDMG A 20 A_WeaponReady(WRF_NOFIRE)
	  Goto Ready
	Quad:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	  Goto Fire+5
	Level2:
	  RDMF B 3 Bright A_FireCustomMissile("RedeemerMegaNuke",0,1)
	  Goto Fire+7
	Flash:
	  TNT1 A 5 A_Light1
	  TNT1 A 5 A_Light2
	  TNT1 A 5 A_Light(3)
	  TNT1 A 5 A_Light2
	  TNT1 A 5 A_Light1
	  Goto LightDone
	}
}

ACTOR RedeemerNuke : IDMRocket
{
	Health 25
	Radius 6
	Height 3
	Scale 2.0
	Speed 16
	Seesound none
	Deathsound "weapons/redxpl"
	Obituary "%o was PULVERIZED by %k's Redeemer."
	SelfObituary "%o didn't find a bunker for cover from %p own Redeemer."
	+SHOOTABLE
	+EXTREMEDEATH
	-ROCKETTRAIL
	-DEHEXPLOSION
	+SKYEXPLODE
	-NOTELEPORT
	States
	{
	Spawn:
	  TNT1 AA 0 A_SpawnItemEx("SlowRocketSmokeTrail",0,-10,-3,frandom(0,-1),frandom(-1,1),frandom(-1,1))
	  NKMS A 6 Bright A_Playsound("weapons/redmis",CHAN_VOICE,1,1)
	  TNT1 A 0 A_ChangeFlag(NOBLOCKMAP,0)
	  Loop
	XDeath:
	Crash:
	Death:
	  TNT1 A 0
	  TNT1 A 0 A_Quake(4,24,0,1024)
	  TNT1 A 0 A_Quake(6,24,0,512)
	  TNT1 A 0 A_Quake(8,24,0,256)
	  TNT1 A 0 A_SetTranslucent(0.99)
	  BIGB A 1 Bright A_SetScale(1.0)
	  TNT1 A 0 A_SetScale(1.1)
	  // haha decorate go brrrrrrrrr!!!!!!!!!!!!!!!!!!!!!!!!!!!!!111111111111111
	  TNT1 A 0 A_Playsound("weapons/redxpl",CHAN_VOICE)
	  TNT1 A 0 A_Playsound("weapons/redxp2",CHAN_AUTO)
	  TNT1 A 0 A_Playsound("weapons/redxp3",CHAN_AUTO)
	  BIGB A 1 Bright A_Explode(1024,128)
	  TNT1 A 0 A_Mushroom("NukePyroShot",1,MSF_STANDARD|MSF_DONTHURT,frandom(0.5,1.0),2.2)
	  TNT1 A 0 A_SetScale(1.2)
	  BIGB A 1 Bright A_Explode(1024,160)
	  TNT1 A 0 A_SetScale(1.3)
	  TNT1 A 0 A_Mushroom("NukeMushroom",10,MSF_STANDARD|MSF_DONTHURT,1.2,1.2)
	  BIGB A 1 Bright A_Explode(1024,176)
	  TNT1 A 0 A_SetScale(1.4)
	  TNT1 A 0 A_Mushroom("NukeMushroom",12,MSF_STANDARD|MSF_DONTHURT,1.3,1.3)
	  BIGB A 1 Bright A_Explode(1024,192)
	  TNT1 A 0 A_SetScale(1.5)
	  TNT1 A 0 A_Mushroom("NukeMushroom",14,MSF_STANDARD|MSF_DONTHURT,1.4,1.4)
	  BIGB B 1 Bright A_Explode(1024,208)
	  TNT1 A 0 A_Mushroom("NukePyroShot",2,MSF_STANDARD|MSF_DONTHURT,frandom(0.75,1.5),2.8)
	  TNT1 A 0 A_SetScale(1.6)
	  TNT1 A 0 A_Mushroom("NukeMushroom",16,MSF_STANDARD|MSF_DONTHURT,1.5,1.5)
	  BIGB B 1 Bright A_Explode(1024,224)
	  TNT1 A 0 A_SetScale(1.7)
	  TNT1 A 0 A_Mushroom("NukeMushroom",18,MSF_STANDARD|MSF_DONTHURT,1.6,1.6)
	  BIGB B 1 Bright A_Explode(1024,240)
	  TNT1 A 0 A_SetScale(1.8)
	  TNT1 A 0 A_Mushroom("NukeMushroom",20,MSF_STANDARD|MSF_DONTHURT,1.7,1.7)
	  BIGB B 1 Bright A_Explode(1024,256)
	  TNT1 A 0 A_Mushroom("NukePyroShot",3,MSF_STANDARD|MSF_DONTHURT,frandom(1.25,2.5),4.9)
	  TNT1 A 0 A_SetScale(1.9)
	  TNT1 A 0 A_Mushroom("NukeMushroom",21,MSF_STANDARD|MSF_DONTHURT,1.8,1.8)
	  BIGB B 1 Bright A_Explode(1024,272)
	  TNT1 A 0 A_SetScale(2.0)
	  TNT1 A 0 A_Mushroom("NukeMushroom",22,MSF_STANDARD|MSF_DONTHURT,1.9,1.9)
	  BIGB C 1 Bright A_Explode(1024,288)
	  TNT1 A 0 A_SetScale(2.1)
	  TNT1 A 0 A_Mushroom("NukeMushroom",23,MSF_STANDARD|MSF_DONTHURT,2.0,2.0)
	  BIGB C 1 Bright A_Explode(1024,304)
	  TNT1 A 0 A_Mushroom("NukePyroShot2",4,MSF_STANDARD|MSF_DONTHURT,frandom(1.0,2.0),3.7)
	  TNT1 A 0 A_SetScale(2.2)
	  TNT1 A 0 A_Mushroom("NukeMushroom",24,MSF_STANDARD|MSF_DONTHURT,2.0,2.1)
	  BIGB C 1 Bright A_Explode(1024,320)
	  TNT1 A 0 A_SetScale(2.3)
	  TNT1 A 0 A_Mushroom("NukeMushroom",25,MSF_STANDARD|MSF_DONTHURT,2.0,2.2)
	  BIGB C 1 Bright A_Explode(1024,336)
	  TNT1 A 0 A_SetScale(2.4)
	  TNT1 A 0 A_Mushroom("NukeMushroom",26,MSF_STANDARD|MSF_DONTHURT,2.0,2.3)
	  BIGB C 1 Bright A_Explode(1024,352)
	  TNT1 A 0 A_SetScale(2.5)
	  TNT1 A 0 A_Mushroom("NukeMushroom",27,MSF_STANDARD|MSF_DONTHURT,2.1,2.4)
	  BIGB D 1 Bright A_Explode(1024,368)
	  TNT1 A 0 A_SetScale(2.6)
	  TNT1 A 0 A_Mushroom("NukeMushroom",28,MSF_STANDARD|MSF_DONTHURT,2.1,2.5)
	  BIGB D 1 Bright A_Explode(1024,384)
	  TNT1 A 0 A_SetScale(2.7)
	  TNT1 A 0 A_Mushroom("NukeMushroom",29,MSF_STANDARD|MSF_DONTHURT,2.1,2.5)
	  BIGB D 1 Bright A_Explode(1024,368)
	  TNT1 A 0 A_SetScale(2.8)
	  TNT1 A 0 A_Mushroom("NukeMushroom",30,MSF_STANDARD|MSF_DONTHURT,2.1,2.5)
	  BIGB D 1 Bright A_Explode(1024,352)
	  TNT1 A 0 A_SetScale(2.9)
	  TNT1 A 0 A_Mushroom("NukeMushroom",31,MSF_STANDARD|MSF_DONTHURT,2.2,2.5)
	  BIGB D 1 Bright A_Explode(1024,336)
	  TNT1 A 0 A_SetScale(3.0)
	  TNT1 A 0 A_Mushroom("NukeMushroom",32,MSF_STANDARD|MSF_DONTHURT,2.2,2.5)
	  BIGB E 1 Bright A_Explode(1024,320)
	  TNT1 A 0 A_SetScale(3.1)
	  TNT1 A 0 A_Mushroom("NukeMushroom",33,MSF_STANDARD|MSF_DONTHURT,2.2,2.5)
	  BIGB E 1 Bright A_Explode(1024,304)
	  TNT1 A 0 A_SetScale(3.2)
	  TNT1 A 0 A_Mushroom("NukeMushroom",34,MSF_STANDARD|MSF_DONTHURT,2.2,2.5)
	  BIGB E 1 Bright A_Explode(1024,288)
	  TNT1 A 0 A_SetScale(3.3)
	  TNT1 A 0 A_Mushroom("NukeMushroom",35,MSF_STANDARD|MSF_DONTHURT,2.3,2.5)
	  BIGB E 1 Bright A_Explode(1024,272)
	  TNT1 A 0 A_SetScale(3.4)
	  BIGB E 1 Bright A_Explode(1024,256)
	  TNT1 A 0 A_SetScale(3.5)
	  TNT1 A 0 A_Quake(2,20,0,1024)
	  TNT1 A 0 A_Quake(4,20,0,512)
	  TNT1 A 0 A_Quake(6,20,0,256)
	  BIGB F 1 Bright A_Explode(1024,256)
	  BIGB F 1 Bright A_Explode(992,240)
	  BIGB F 1 Bright A_Explode(960,224)
	  BIGB F 1 Bright A_Explode(928,208)
	  BIGB F 1 Bright A_Explode(896,192)
	  BIGB G 1 Bright A_Explode(864,176)
	  BIGB G 1 Bright A_Explode(832,160)
	  BIGB G 1 Bright A_Explode(800,144)
	  BIGB G 1 Bright A_Explode(768,128)
	  BIGB G 1 Bright A_Explode(736,112)
	  BIGB H 1 Bright A_Explode(704,96)
	  BIGB H 1 Bright A_Explode(672,80)
	  BIGB H 1 Bright A_Explode(640,64)
	  BIGB H 1 Bright A_Explode(608,48)
	  BIGB H 1 Bright A_Explode(576,32)
	  BIGB I 5 Bright A_Explode(544,16)
	  TNT1 A 0 A_Quake(1,28,0,1024)
	  TNT1 A 0 A_Quake(2,28,0,512)
	  TNT1 A 0 A_Quake(4,28,0,256)
	  BIGB JK 5 Bright
	  BIGB LMNOPQRSTU 9 Bright A_Fadeout(0.1)
	  Stop
	}
}

ACTOR RedeemerMegaNuke : RedeemerNuke
{
	Scale 6.0
	Speed 6
	States
	{
	Spawn:
	  TNT1 A 0
	  TNT1 A 0 A_Playsound("weapons/valkyrie",CHAN_BODY,1,1)
	  TNT1 AA 0 A_SpawnItemEx("BigRocketSmokeTrail",0,-25,-3)
	  NKMS A 6 Bright A_Playsound("weapons/redmis",CHAN_VOICE,1,1)
	  Loop
	XDeath:
	Crash:
	Death:
	  TNT1 A 0
	  TNT1 A 0 A_SetTranslucent(0.95)
	  BIGB A 2 Bright A_SetScale(1.0)
	  TNT1 A 0 A_SetScale(1.1)
	  TNT1 A 0 A_Playsound("weapons/redxpl",CHAN_BODY)
	  TNT1 A 0 A_Playsound("weapons/redxpl",CHAN_VOICE)
	  TNT1 A 0 A_Mushroom("GabenHead",6,MSF_DONTHURT,1.0,1.0)
	  TNT1 A 0 A_Mushroom("InvisExplosion",1,MSF_DONTHURT,1.0,1.0)
	  BIGB A 2 Bright A_Explode(1024,128)
	  TNT1 A 0 A_SetScale(1.2)
	  TNT1 A 0 A_Mushroom("SbaysceHead",20,MSF_DONTHURT,1.0,1.0)
	  BIGB A 2 Bright A_Explode(1024,160)
	  TNT1 A 0 A_SetScale(1.3)
	  TNT1 A 0 A_Mushroom("BoochHead",10,MSF_DONTHURT,1.0,1.0)
	  BIGB A 2 Bright A_Explode(1024,176)
	  TNT1 A 0 A_SetScale(1.4)
	  TNT1 A 0 A_Mushroom("CarreyHead",10,MSF_DONTHURT,1.0,1.0)
	  BIGB A 2 Bright A_Explode(1024,192)
	  TNT1 A 0 A_SetScale(1.5)
	  TNT1 A 0 A_Mushroom("SpartaHead",15,MSF_DONTHURT,1.0,1.0)
	  BIGB B 2 Bright A_Explode(1024,208)
	  TNT1 A 0 A_SetScale(1.6)
	  TNT1 A 0 A_Mushroom("ASDFHead",20,MSF_DONTHURT,1.0,1.0)
	  BIGB B 2 Bright A_Explode(1024,224)
	  TNT1 A 0 A_SetScale(1.7)
	  TNT1 A 0 A_Mushroom("KekWHead",30,MSF_DONTHURT,1.0,1.0)
	  BIGB B 2 Bright A_Explode(1024,240)
	  TNT1 A 0 A_SetScale(1.8)
	  TNT1 A 0 A_Mushroom("PootisHead",6,MSF_DONTHURT,1.0,1.0)
	  BIGB B 2 Bright A_Explode(1024,256)
	  TNT1 A 0 A_SetScale(1.9)
	  TNT1 A 0 A_Mushroom("PootisGrenade",6,MSF_DONTHURT,1.0,1.0)
	  BIGB B 2 Bright A_Explode(1024,272)
	  TNT1 A 0 A_SetScale(2.0)
	  TNT1 A 0 A_Mushroom("HLHead",30,MSF_DONTHURT,1.0,1.0)
	  BIGB C 2 Bright A_Explode(1024,288)
	  TNT1 A 0 A_SetScale(2.1)
	  TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("BallOfSteel",32,0,random(0,359),CMF_AIMDIRECTION,random(0,45))
	  BIGB C 2 Bright A_Explode(1024,304)
	  TNT1 A 0 A_SetScale(2.2)
	  TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("BridgeOfSteel",32,0,random(0,359),CMF_AIMDIRECTION,random(0,45))
	  BIGB C 2 Bright A_Explode(1024,320)
	  TNT1 A 0 A_SetScale(2.3)
	  TNT1 A 0 A_Mushroom("GrafHead",15,MSF_DONTHURT,1.0,1.0)
	  BIGB C 2 Bright A_Explode(1024,336)
	  TNT1 A 0 A_SetScale(2.4)
	  TNT1 A 0 A_Mushroom("SpamBFGBall",20,MSF_DONTHURT,1.0,1.0)
	  BIGB C 2 Bright A_Explode(1024,352)
	  TNT1 A 0 A_SetScale(2.5)
	  TNT1 A 0 A_Mushroom("CenaHead",60,MSF_DONTHURT,1.0,1.0)
	  BIGB D 2 Bright A_Explode(1024,368)
	  TNT1 A 0 A_SetScale(2.6)
	  TNT1 A 0 A_Mushroom("ArnoldHead2",20,MSF_DONTHURT,1.0,1.0)
	  BIGB D 2 Bright A_Explode(1024,384)
	  TNT1 A 0 A_SetScale(2.7)
	  TNT1 A 0 A_Mushroom("PingasGrenade",10,MSF_DONTHURT,1.0,1.0)
	  BIGB D 2 Bright A_Explode(1024,368)
	  TNT1 A 0 A_SetScale(2.8)
	  TNT1 A 0 A_Mushroom("Hand2",30,MSF_DONTHURT,1.0,1.0)
	  BIGB D 2 Bright A_Explode(1024,352)
	  TNT1 A 0 A_SetScale(2.9)
	  TNT1 A 0 A_Mushroom("AinsleyHead",30,MSF_DONTHURT,1.0,1.0)
	  BIGB D 2 Bright A_Explode(1024,336)
	  TNT1 A 0 A_SetScale(3.0)
	  TNT1 A 0 A_Mushroom("IDMCacoward",30,MSF_DONTHURT,1.0,1.0)
	  BIGB E 2 Bright A_Explode(1024,320)
	  TNT1 A 0 A_SetScale(3.1)
	  TNT1 A 0 A_Mushroom("AlexJonesHead",30,MSF_DONTHURT,1.0,1.0)
	  BIGB E 2 Bright A_Explode(1024,304)
	  TNT1 A 0 A_SetScale(3.2)
	  TNT1 A 0 A_Mushroom("SchutzStaffelMissile",15,MSF_DONTHURT,1.0,1.0)
	  BIGB E 2 Bright A_Explode(1024,288)
	  TNT1 A 0 A_SetScale(3.3)
	  TNT1 A 0 A_Mushroom("MeowitzerCat",80,MSF_DONTHURT,1.0,1.0)
	  BIGB E 2 Bright A_Explode(1024,272)
	  TNT1 A 0 A_SetScale(3.4)
	  BIGB E 2 Bright A_Explode(1024,256)
	  TNT1 A 0 A_SetScale(3.5)
	  BIGB F 2 Bright A_Explode(1024,256)
	  BIGB F 2 Bright A_Explode(992,240)
	  BIGB F 2 Bright A_Explode(960,224)
	  BIGB F 2 Bright A_Explode(928,208)
	  BIGB F 2 Bright A_Explode(896,192)
	  BIGB G 2 Bright A_Explode(864,176)
	  BIGB G 2 Bright A_Explode(832,160)
	  BIGB G 2 Bright A_Explode(800,144)
	  BIGB G 2 Bright A_Explode(768,128)
	  BIGB G 2 Bright A_Explode(736,112)
	  BIGB H 2 Bright A_Explode(704,96)
	  BIGB H 2 Bright A_Explode(672,80)
	  BIGB H 2 Bright A_Explode(640,64)
	  BIGB H 2 Bright A_Explode(608,48)
	  BIGB H 2 Bright A_Explode(576,32)
	  BIGB I 2 Bright A_Explode(544,16)
	  BIGB I 4 Bright
	  BIGB JK 5 Bright
	  BIGB LMNOPQRSTU 9 Bright A_Fadeout(0.1)
	  Stop
	}
}

ACTOR NukeMushroom : IDMMushroom
{
	+EXTREMEDEATH
	Speed 8
	Damage 100
	Gravity 1.0
	Scale 2.0
	Radius 5
	Height 5
	Obituary "%o was PULVERIZED by %k's Redeemer."
	SelfObituary "%o didn't find a bunker for cover from %p own Redeemer."
	States
	{
	XDeath:
	Death:
      MISL B 0 A_Scream
      MISL B 6 Bright A_Explode(192,192)
      MISL C 5 Bright
	  MISL D 4 Bright
	  Stop
	}
}

ACTOR NukePyroShot : PyroShot
{
	Radius 5
	Height 5
	Speed 30
	-NOGRAVITY
	Obituary "%o was PULVERIZED by %k's Redeemer."
	SelfObituary "%o didn't find a bunker for cover from %p own Redeemer."
	States
	{
	Death:
      PYXP AB 2 Bright
      PYXP C 2 Bright A_Explode(256, 192)
      PYXP CCCCCCCC 0 Bright A_CustomMissile("NukePyroSpawner", 0, 0, random(0,359), CMF_TRACKOWNER|CMF_AIMDIRECTION,45)
      PYXP DEFGHIJKLMNOPQRSTU 2 Bright
      Stop
    }
}

ACTOR NukePyroShot2 : NukePyroShot
{
	States
	{
	Death:
      PYXP AB 2 Bright
      PYXP C 2 Bright A_Explode(256, 192)
      PYXP CCCCCCCCCCCCCCCC 0 Bright A_CustomMissile("NukePyroSpawner", 0, 0, random(0,359), CMF_TRACKOWNER|CMF_AIMDIRECTION,60)
      PYXP C 0 Bright A_Mushroom("NukePyroFlare", 24,MSF_STANDARD|MSF_DONTHURT,1.0,0.65)
      PYXP DEFGHIJKLMNOPQRSTU 2 Bright
      Stop
	}
}

ACTOR NukePyroSpawner : PyroSpawner
{
  Radius 1
  Height 1
  Damage (0)
  Projectile
  Speed 19
  Gravity 0.75
  -NOGRAVITY
  +Ripper
  +BloodlessImpact
  States
  {
  Spawn:
    TNT1 AAAAAAAAAAAAAAAAAAAA 5 Bright A_CustomMissile("NukePyroBoom", random(-3,3), random(-3,3), 0, CMF_TRACKOWNER|CMF_AIMDIRECTION)
    Stop
  Death:
    TNT1 A 0
    TNT1 A 1 A_CustomMissile("NukePyroBoom", 0, 0, 0, CMF_TRACKOWNER|CMF_AIMDIRECTION)
    Stop
  }
}

ACTOR NukePyroFlare : PyroFlare
{
	Obituary "%o was PULVERIZED by %k's Redeemer."
	SelfObituary "%o didn't find a bunker for cover from %p own Redeemer."
	States
	{
	Death:
      FRFX HIJ 2 Bright
      FRFX J 0 A_Explode(128, 128)
      FRFX J 0 A_CustomMissile("NukeDropFire", 0, 0, 0, CMF_TRACKOWNER)
      FRFX KLMNO 2 Bright
      Stop
	}
}

ACTOR NukeDropFire : PyroDropFire
{
  Obituary "%o was PULVERIZED by %k's Redeemer."
  SelfObituary "%o didn't find a bunker for cover from %p own Redeemer."
  States
  {
  Spawn:
    TNT1 A 0 A_PlaySound("Flamethrower/Flame")
    FLME A 2 bright A_Explode(4*random(1,5), 32, 0)
    FLME BCDEFGHIJKLMN 2 bright A_Explode(4*random(1,10), 16, 0)
    TNT1 A 0 A_PlaySound("Flamethrower/Flame")
    FLME A 2 bright A_Explode(4*random(1,5), 32, 0)
    FLME BCDEFGHIJKLMN 2 bright A_Explode(4*random(1,5), 16, 0)
    TNT1 A 0 A_Jump(192, "Death")
    Loop
  }
}

ACTOR NukePyroBoom : PyroBoom
{
	Obituary "%o was PULVERIZED by %k's Redeemer."
	SelfObituary "%o didn't find a bunker for cover from %p own Redeemer."
	Damagetype "Fire"
}

ACTOR SlowRocketSmokeTrail : RocketSmokeTrail
{
	States
	{
	Spawn:
		RSMK ABCDE 10
		Stop
	}
}

ACTOR BigRocketSmokeTrail : SlowRocketSmokeTrail
{
	Scale 3.0
}