ACTOR NemesisBFG10K : Weapon
{
  Scale 0.85
  Height 20
  Weapon.PreferredSkin "BFG10K-Marine"
  Weapon.SelectionOrder 2790
  Weapon.AmmoType "NLDemonAmmo"
  Weapon.AmmoType2 "NLDemonAmmo"
  Weapon.AmmoUse1 10
  Weapon.AmmoUse2 25
  Weapon.AmmoGive 200
  Inventory.PickupMessage "You got Nemesis BFG10K you now can be happy!"
  Inventory.PickupSound "NemesisBFG10K/Upsound"
  Obituary "%o got free plasma in his face by %k's brand new Nemesis BFG10K."
  +WEAPON.NOAUTOFIRE
  +INVENTORY.UNDROPPABLE
  States
  {
  Spawn:
    a020 A -1
    Stop
  Ready:
    TNT1 A 0 A_JumpIfNoAmmo("Ready2")
    TNT1 A 0 A_PlayWeaponSound("NemesisBFG/Loop")
	TNT1 A 0 A_JumpIfInventory("VexedAction",1,"VexedCheck")
	a002 AAABBBCCCDDDCCCBBB 1 A_WeaponReady
    Loop
  Ready2:
    TNT1 A 0 A_JumpIfInventory("NLDemonAmmo",5,"Ready")
    a003 A 1 A_WeaponReady
	Loop
  Deselect:
	TNT1 A 0 A_Stopsound
  	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
    TNT1 A 0 A_JumpIfNoAmmo("Deselect2")
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	a002 A 1 A_Lower
    Goto Deselect+5	
  Deselect2:
  	TNT1 A 0 A_Stopsound
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	a003 A 1 A_Lower
    Goto Deselect2+1	
  Select:
    TNT1 A 0 A_JumpIfNoAmmo("Select2")
 	TNT1 A 0 A_TakeInventory("Vexed BFG10K Of Destruction",1)	
    TNT1 A 0 A_Playsound("NemesisBFG10K/Upsound")
    a002 A 1 A_Raise
    Goto Select+2
  Select2:
 	TNT1 A 0 A_TakeInventory("Vexed BFG10K Of Destruction",1)  
    TNT1 A 0 A_PlayWeaponSound("NemesisBFG10K/Upsound")
    a003 A 1 A_Raise
    Goto Select2+1	
  Fire:
    a002 E 25 A_PlayWeaponSound("weapons/charge15k")
    a002 F 4
    a002 GHIJ 1
    Goto Hold
  Hold:
    a001 A 1 Bright A_GunFlash
	Goto HoldReal
  HoldReal:
    a002 K 0 Bright
	TNT1 A 0 A_PlaySound("weapons/charge15k",1,5)
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	a001 B 1 Bright A_FireCustomMissile("NemesisPlayer10kProjectile",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
    a002 LM 1
    TNT1 A 0 A_ReFire
    a002 NO 7 A_PlaySound("weapons/bfg15kcooldown") 
    Goto Ready
  AltFire:
    a002 E 25 A_PlayWeaponSound ("EnragedDTech/Charge")
    a002 F 4
    a002 GHIJ 1
    Goto AltHold
  AltHold:
    a002 K 1 Bright
	TNT1 A 0 A_PlaySound("LesserCardinal/BFGFire",1)
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	a001 B 3 Bright A_FireCustomMissile("NemesisPlayerBFG15KBall",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
    a002 LM 1
    TNT1 A 0 A_ReFire
    a002 NO 14 A_PlaySound("weapons/bfg15kcooldown") 
    Goto Ready
  VexedCheck:
	TNT1 A 0 A_TakeInventory("VexedActionOff",999)
	TNT1 A 0 A_JumpIfInventory("VexedActionOff",1,"Ready")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneWorksWithWeapons",1,"VexedToggled")
	TNT1 A 0 A_TakeInventory("VexedAction",1)
	Goto Ready+6
  VexedToggled:
	a999 ABCDEFGH 1
	TNT1 A 2
	TNT1 A 0 A_TakeInventory("VexedActionOff",1)
	TNT1 A 0 A_GiveInventory("Vexed BFG10K Of Destruction",1)
	TNT1 A 0 ACS_NamedExecuteAlways("UseThisFucking10k")
	TNT1 A 0 A_TakeInventory("Nemesis BFG10K Of Destruction",1)
	TNT1 A 0 A_TakeInventory("VexedAction",1)
	Stop
  Flash:
    TNT1 A 2 Bright A_Light1
    TNT1 A 2 Bright A_Light2
	TNT1 A 2 Bright A_Light1
    Goto LightDone
  }
}

ACTOR VexedBFG10KOfDestruction : Weapon
{
  Scale 0.85
  Height 20
  Weapon.PreferredSkin "BFG10K-Marine"
  Weapon.SelectionOrder 2790
  Weapon.AmmoType "NLDemonAmmo"
  Weapon.AmmoType2 "NLDemonAmmo"
  Weapon.AmmoUse 10
  Weapon.AmmoGive 200
  Inventory.PickupMessage "You got Vexed Nemesis BFG10K you now can be happy!"
  Inventory.PickupSound "NemesisBFG10K/Upsound"
  Obituary "%o got free plasma in his face by %k's brand new Vexed Nemesis BFG10K."
  +WEAPON.NOAUTOFIRE
  +INVENTORY.UNDROPPABLE
  States
  {
  Spawn:
    a020 A -1
    Stop
  Ready:
    TNT1 A 0 A_JumpIfNoAmmo("Ready2")
	TNT1 A 0 A_JumpIfInventory("VexedActionOff",1,"VexedOffCheck")	
    TNT1 A 0 A_PlayWeaponSound("NemesisBFG/Loop")
	a011 AAABBBCCCDDDCCCBBB 1 A_WeaponReady
    Loop
  Ready2:
    TNT1 A 0 A_JumpIfInventory("VexNemDemonAmmo",5,"Ready")
	TNT1 A 0 A_JumpIfInventory("VexedActionOff",1,"VexedOffCheck")	
    a013 A 1 A_WeaponReady
	Loop
  Deselect:
  	TNT1 A 0 A_Stopsound
  	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
    TNT1 A 0 A_JumpIfNoAmmo("Deselect2")
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	a011 A 1 A_Lower
    Goto Deselect+5	
  Deselect2:
 	TNT1 A 0 A_Stopsound 
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	a013 A 1 A_Lower
    Goto Deselect2+1	
  Select:
    TNT1 A 0 A_JumpIfNoAmmo("Select2")
    TNT1 A 0 A_Playsound("NemesisBFG10K/Upsound")
    a011 A 1 A_Raise
    Goto Select+2
  Select2:
    TNT1 A 0 A_PlayWeaponSound("NemesisBFG10K/Upsound")
    a013 A 1 A_Raise
    Goto Select2+1	
  Fire:
    a011 E 25 A_PlayWeaponSound ("weapons/charge15k")
    a011 F 4
    a011 GEFG 1
    Goto Hold
  Hold:
    a010 A 1 Bright A_GunFlash
	Goto HoldReal
  HoldReal:
    a011 K 0 Bright
	TNT1 A 0 A_PlaySound("weapons/charge15k")
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	a010 B 1 Bright A_FireCustomMissile("VexedNemesisHomingPlayer10kProjectile",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
    a011 L 1
    TNT1 A 0 A_ReFire
    a011 MNO 7 A_PlaySound("weapons/bfg15kcooldown") 
    Goto Ready
  AltFire:
    a011 E 25 A_PlayWeaponSound ("EnragedDTech/Charge")
    a011 F 4
    a011 GHIJ 1
    Goto AltHold
  AltHold:
    a011 K 1 Bright
	TNT1 A 0 A_PlaySound("EnragedDTech/Charge")
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	a010 B 3 Bright A_FireCustomMissile("VexedNemesisHomingPlayerBFG15KBall",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
    a011 LM 1
    TNT1 A 0 A_ReFire
    a011 NO 14 A_PlaySound("weapons/bfg15kcooldown") 
    Goto Ready
  VexedOffCheck:
	TNT1 A 0 A_TakeInventory("VexedAction",999)
	TNT1 A 0 A_JumpIfInventory("NemesisRuneWorksWithWeapons",1,"VexedDisabled")
	TNT1 A 0 A_TakeInventory("VexedActionOff",1)
	Goto Ready+6
  VexedDisabled:
	I999 ABCDEFGHIJKL 1
	TNT1 A 2
	TNT1 A 0 A_GiveInventory("Nemesis BFG10K Of Destruction",1)
	TNT1 A 0 ACS_NamedExecuteAlways("UseThisNemesisFucking10k")
	TNT1 A 0 A_TakeInventory("Vexed BFG10K Of Destruction",1)
	TNT1 A 0 A_TakeInventory("VexedActionOff",1)
	Stop
  Flash:
    TNT1 A 2 Bright A_Light1
    TNT1 A 2 Bright A_Light2
	TNT1 A 2 Bright A_Light1
    Goto LightDone
  }
}
ACTOR NemesisCellAmmo : Ammo
{
Inventory.Amount 20
Inventory.MaxAmount 300
Ammo.BackpackAmount 20
Ammo.BackpackMaxAmount 600
Inventory.PickupSound "items/cell"
Inventory.PickupMessage "Nemesis Bonus Energy Battery"
Inventory.Icon "a004D0"
Scale 0.8
States
{
Spawn:
a004 ABCDDDCB 3
Loop
	}
}


Actor NemesisPlayer10kProjectile : Nemesis10kProjectile
{
Damage 75
DamageType "PlayerNemesisPlasma"
States
	{
	Death:
		TNT1 A 0
		TNT1 A 0 A_SetScale(0.85)
		TNT1 A 0 A_FadeOut(0.25)
		TNT1 A 0 A_SpawnItem("NemesisWhiteProjExplode")
		TNT1 A 0 A_SpawnItemEx("NemesisBFGShockwave",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
		TNT1 AA 0 A_SpawnItemEx("NemesisWhiteParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
		TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboomNoSound",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
		NFE3 A 4 Bright A_Explode(180,180,0)
		NFE3 BCDEF 4 Bright
		Stop
	}
}

Actor VexedNemesisHomingPlayer10kProjectile : NemesisPlayer10kProjectile
{
Damage 145
MissileType "WhiteNemesisKaboomNoSoundVSMini"
DamageType "PlayerNemesisPlasma"
+SEEKERMISSILE
States
	{
	Spawn:
		CLBA D 0 bright A_SeekerMissile(1,4,SMF_LOOK)
		CLBA D 1 Bright
		Loop
	Death:
		TNT1 A 0
		TNT1 A 0 A_SetScale(0.85)
		TNT1 A 0 A_FadeOut(0.25)
		TNT1 A 0 A_SpawnItem("NemesisWhiteProjExplode")
		TNT1 A 0 A_SpawnItemEx("NemesisBFGShockwave",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
		TNT1 AA 0 A_SpawnItemEx("NemesisWhiteParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
		TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboomNoSound",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
		NFE3 A 4 Bright A_Explode(180,180,0)
		NFE3 BCDEF 4 Bright
		Stop
	}
}

ACTOR WhiteNemesisKaboomNoSoundVSMini : WhiteNemesisKaboomNoSound { Scale 0.10 }
ACTOR WhiteNemesisKaboomNoSoundForAltfire : WhiteNemesisKaboomNoSound { Scale 0.20 }

ACTOR NemesisPlayerBFG15KBall : LegendaryCyberBFG15KBall
{
Decal "Scorch"
Speed 55
Seesound " " 
Damage 85
DamageType "PlayerNemesisPlasma"
Scale 0.5
ExplosionDamage 130
ExplosionRadius 175
States
{
Spawn:
    a005 AB 2 Bright A_SpawnItemEx("NemesisWhiteParticleSpawner",Random(-8,8),Random(-8,8),Random(-8,8),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
    Loop
Death:
	TNT1 A 0
	TNT1 AAA 0 A_CustomMissile("NemesisKaboom7",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisWhiteParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
	TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboomNoSound", 0, 0, random(0,360), 2, random(0,360))  
	TNT1 A 0 Bright A_SpawnItemEx("NemesisADemonTechExButLowerOpacity",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0) 
	NFE3 A 4 Bright A_Explode	
    NFE3 BCDEF 4 Bright
    Stop
    }
}

ACTOR VexedNemesisHomingPlayerBFG15KBall : NemesisPlayerBFG15KBall
{
Decal "Scorch"
Speed 75
Seesound " " 
Damage 155
MissileType "WhiteNemesisKaboomNoSoundForAltfire"
DamageType "PlayerNemesisPlasma"
Scale 0.5
ExplosionDamage 130
ExplosionRadius 175
+SEEKERMISSILE
States
{
Spawn:
	a005 A 0 bright A_SeekerMissile(1,4,SMF_LOOK)
    a005 AB 2 Bright A_SpawnItemEx("NemesisWhiteParticleSpawner",Random(-8,8),Random(-8,8),Random(-8,8),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
    Loop
Death:
	TNT1 A 0
	TNT1 AAA 0 A_CustomMissile("NemesisKaboom7",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisWhiteParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
	TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboomNoSound", 0, 0, random(0,360), 2, random(0,360))  
	TNT1 A 0 Bright A_SpawnItemEx("NemesisADemonTechExButLowerOpacity",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0) 
	NFE3 A 4 Bright A_Explode	
    NFE3 BCDEF 4 Bright
    Stop
    }
}