/*

FBD introduces the following changes by replacing the Purist class with the Classic Guns class:
- fire axe, dragonslayer, mg 42 (the nazi super machinegun), nuke launcher, revenant launcher, mancubus flame cannon, bfg 10k will appear as is but only if they were placed via map editor (meaning EDAY only) or dropped by specific monsters. 
- railgun will apear as a classic railgun (no zoom, no reloads) and only if placed in the editor or dropped by a chaos marine
- mp 40 and pistol will be just reskinned ammo pickups 
- smg will be a classic smg
- assault shotgun appears as super shotgun, like before.
- grenade launcher appears as rocket launcher, like before. 
- machinegun will appear as a chaingun (rather than a classic smg as in original BD21).
- flamethrower will appear as normal (a small chance to replace the night vision powerup)



ChainsawSpawner: CustomInventory Replaces Chainsaw
	Purist -> ClassicSaw
	-> Chain_Saw
	
BrutalAxe : BrutalWeapon 17715	
	
DragonslayerSpawner: CustomInventory 17676
	-> DSweap (to purist as well)

RifleSpawner: CustomInventory Replaces Pistol 17718
	Purist -> Clip2
	-> Rifle
	-> DualRifles
	
PistolSpawner: CustomInventory 17707	
	Purist -> Clip2
	-> BrutalPistol
	-> DualPistol (DOESNT WORK, INVESTIGATE WHY)
	
MP40Spawner: CustomInventory 17706
	Purist -> Clip2
	-> MP40
	-> DualMP40
	
ShotgunSpawner: CustomInventory Replaces Shotgun
	Purist -> ClassicShotgun
	-> Shot_Gun
	
ShotgunSpawnerDroped: ShotgunSpawner (gives 2 shells instead of 8)
	Purist -> ClassicShotgun
	-> Shot_Gun	
	
SSGSpawner: CustomInventory 17705
	Purist -> ClassicSSG
	-> SSG
	
SSGSpawnerReplacer: BasicWeaponPickup Replaces  SuperShotgun
	48 -> AssaultShotgunSpawner
	-> SSGSpawner
	
AssaultShotgunSpawner: CustomInventory 17714	
	Purist -> ClassicSSG
	AssaultShotgun	
	
ChaingunSpawner: CustomInventory 17704
	Purist -> ClassicChaingun
	Minigun
	
DropedChaingunSpawner: ChaingunSpawner (gives 10 ammo instead 50)
	Purist -> ClassicChaingun
	-> Minigun	
	
SMGSpawner: CustomInventory 17703	
	Purist -> ClassicSMG
	-> BrutalSMG
	-> DualSMG
	
MachinegunSpawner: CustomInventory 17702
	Purist -> ClassicChaingun
	-> Machinegun
	
ChaingunSpawnerReplacer : BasicWeaponPickup Replaces Chaingun
	32 -> MachinegunSpawne
	-> ChaingunSpawner
	
MG42Spawner: CustomInventory 17563
	-> HitlersBuzzsaw (to purist as well)	
	
RocketLauncherSpawner : CustomInventory 17701
	Purist -> ClassicRocketLauncher
	-> Rocket_Launcher

GrenadeLauncherSpawner: CustomInventory 2551
	Purist -> ClassicRocketLauncher
	-> GrenadeLauncher
	(if has no RL, additianally) -> Rocket_Launcher
	
RLSpawnerReplacer  : BasicWeaponPickup Replaces RocketLauncher
	48 -> GrenadeLauncherSpawner
	-> RocketLauncherSpawner
	
NukeLauncher : BrutalWeapon 7452	
	
PLasmagunSpawner: CustomInventory 17700
	Purist -> ClassicPlasmaRifle
	-> Plasma_Gun
	-> DUalPlasmaRifles
	
DropedPlasmaGun: PlasmagunSpawner // gives no extra ammo	
	Purist -> ClassicPlasmaRifle
	-> Plasma_Gun
	-> DUalPlasmaRifles
	
PlasmagunReplacer : BasicWeaponPickup Replaces PLasmaRifle
	48 -> RandomRailgunSpawner
	PLasmagunSpawner
	
RandomRailgunSpawner: CustomInventory
	Purist -> ClassicPlasmaRifle
	-> Railgun
	
RailgunSpawner: RandomRailgunSpawner 2552
	Purist -> ClassicRailgun
	Railgun

BFGReplacer : BasicWeaponPickup Replaces BFG9000
	Nazi verification -> MG42Spawner
	48 -> RandomBFG10KSpawner
	4 -> RandomUnmakerSpawner
	-> BFG9000Spawner

BFG9000Spawner: CustomInventory 17699
	Purist -> VanillaBFG9000
	-> BIG_FUCKING_GUN
	
RandomBFG10KSpawner: CustomInventory
	Purist -> VanillaBFG9000
	-> BFG10K
	
BFG10KSpawner: RandomBFG10KSpawner 2553
	-> BFG10K (to purist as well)

RandomUnmakerSpawner: CustomInventory
	Purist -> VanillaBFG9000
	-> Unmaker

UnmakerSpawner: RandomUnmakerSpawner 8845
	-> Unmaker (to purist as well)
	
HellishMissileLauncher : BrutalWeapon 17719	
	
FlameCannon : BrutalWeapon 17716

Flamethrower2 : BrutalWeapon 17717

	


WEAPON CLASSES: -------------------------------------------------------

(spread means *full* arc in degrees, from side to side - so max deviation from the centerline is half that)

=== Unarmed =================================================

?

=== Pistol ==================================================

?

=== Submachinegun ===========================================

?

=== MP-40 ===================================================

?

=== Assault rifle === (slot 4) ==============================

	Ammo: standard (5.56, presumably)
	Damage per bullet: 20
	Fire rate: every 4 tics (8.75 per second, 525 per minute)
	DPS 175
	Spread (1.5, 1.5)

Aiming down iron sights:

	Zoom 2.0
	Spread (1.0, 1.0)


Tactical class (firing from the hip only):
	Fire rate: every 2 tics (17.5 per second, 1050 per minute)
	DPS: 350
	Muzzle climb per shot: +2.0


Dual wield (unavailable to tactical class):

	Spread (8.0, 3.0)
	Muzzle climb per shot: +0.4
	
	FIXED IN BETA 06/01/2025:
	Damage per bullet: 20
	Fire rate: every two tics (17.5 per second, 1050 per minute)
	DPS: 350
	
	(old: Damage per bullet: 25
	Fire rate: two every 7 tics (10 per second, 600 per minute)
	DPS 250	)

=== Minigun === (slot 4) ====================================
	
	Ammo: standard (5.56, presumably)
	Fire rate: every 2 tics (17.5 per second, 1050 per minute)
	DPS 280
	Spread (5.0, 5.0)
	
=== Machinegun === (slot 8) =================================

	Ammo: high caliber 7.92 UAC / rockets
	Damage per bullet: 50
	Fire rate: every 3 tics (11.67 per second, 700 per minute)
	DPS 583
	Spread (4.0, 4.0)
	
	Alt fire: grenade, the same sa grenade launcher's primary fire. Direct hit: 150 "Explosive", AOE 100 "ExplosiveImpact" in a radius of 300 - so total 250 to a single target. Fire rate and DPS: laughable, reloading takes forever and a half. Only useful - but VERY useful - if you suddenly encounter a horde of weaklings.
	
=== MG-42 === (slot 8) ======================================
	
	Ammo: high caliber 7.92 UAC
	Damage per bullet: 55 (half the bullets inflict "Saw" damage type, like chainsaw, resulting in a reliable stunlock and especially splattery deaths) 
	Fire rate: every 2 tics (17.5 per second, 1050 per minute)
	DPS: 962

=== Gewehr 98 === (slot 8) ==================================

	Ammo: high caliber 7.92 UAC
	Damage per bullet: 70 (some monsters have vulnerability: imps and commandoes die in one shot, pinkes die in 3).
	Fire rate: every 36 tics (0.97 per second, 58 per minute) - with a caveat it can only hold 5 bullets and requires insanely long reloading.
	DPS 68
	Spread (1.0, 1.0)
	
When zoomed:
	Zoom 6.0
	Damage x2 to heads (70 x2 x2 = 280 damage to monster)
	Spread: none (0.0, 0.0)


=== Shotgun =================================================

Fires a spread of hitscan grapeshot, up to 5 degrees horizontal, up to 2.5 degrees vertical, dealing up to 9x13 = 117 "Shotgun" damage (up to 14x13 = 182 for the Tactical class).

The perfect bodyshot damage:
	Zombieman, Shotgun guy, Axe-crazy labguy - 234 (200%), meaning they're toast
	Imp - 175 (150%), goes splat 
	Mancubus, Volcabus - 93 (80%)
	all other monsters - 117
	
The pefrect headshot damage (140% received by the head x 2x done to the monster) is 327 -- meaning it offs a knight or a mancubus in two well-placed headshots.

Fire rate is 0.95 shots per second (dps 111)

Alt fire is aiming through iron sights -- not only do you get zoom, it also increases the rate of fire rather dramatically, up to 2.5 shots per second (dps 292)! 

P.S. Buffed it to inflict +12 "SSG" damage limited to 150 map units range. Thus cacodemons receive +79.8 damage per shot and die in 3 shots. Zombies, sergeants and chaingun guys take super damage BUT they are already have 200% vulnerability to shotgun so they go spat anyway


=== Super shotgun ===========================================

Fires a spread of hitscan grapeshot, up to 11 degrees horizontal, up to 3 degrees vertical, damage up to 18x13 = 234 (or up to 28x13 = 364 for the Tactical class), damage type "Shotgun".

What you must know, the super shotgun also fires a *single* hitscan straight center, with range capped at 300 map units, that inflicts 40 "SSG" damage. And it is this single hitscan that makes this weapon so devastating at close range. Some monsters are immune (barons only receive 20%, meaning 8) but others have horrible vulnerabilities making it super effective. Zombiemen receive 50000%, cacodemons receive 10000% -- meaning it is a guaranteed one-hit-kill against those -- while heads receive 150%, meaning 60, meaning the monster receives 120. From this hitscan alone.

The maximum damage received by the head is 327 + 60 = 387, which means the monster receives full 2x capped at 600 "HeadStun" damage from a well-aimed headshot (one-hit-killing knights, and mancubi or killing barons in two hits).

The perfect bodyshot damage: 
	Zombieman, Shotgun guy, Imp, Cacodemon, Axe-crazy labguy, Nazi -- go splat.
	P.S. Scratch cacodemon, I am buffing him so that one-shotting him requires aiming skillz!
	Cacodemon - 500 (he has 400 health)
	Revenant - 394 (he has 300 health)
	Knight - 254
	Baron, Duke - 242
	Mancubus, Volcabus - 191 (20% damage resistance to grapeshot, near immunity to the blast)
	all other demons - 274
	
Alt fire (single barrel at a time) fires hitscan in 5 degrees horizontal, 3 degrees vertical, up to  9x13 = 117 "Shotgun" damage -- meaning almost no difference compared to the shotgun except a bit higher spread.


=== Assault shotgun =========================================

Primary fire: 9x11=99 "Minigun" damage 5x5 spread 

Tactical class: + 5x13=65 "Shotgun" damage 12x4 spread (increasing total to 164)

Fire rate = 35/5 tics = 7.0, dps = 99 = 693 - *very* respectable... Except it does *no* special damage to weak monsters, only 60% damage to barons, only 70% to chaos marines (considering they dodge-roll after the first pellet, they barely take *scratch* damage) and absolutely papercut 1 damage per pellet to vehicles.

Alt fire only adds zoom. Damage composition, spread and fire rate stay absolutely the saame.


=== Shotolver (shotgun ammo) ================================

Very powerful up close because it fires the same central limited-range hitscal as super shotgun (20 "SSG" damage, splatters anything less than a knight)

On top of that, fires a spread of hitscan 5x12 "ExplosiveImpact" damage 20x14 degrees + 5x12 "Shotgun" damage 7x7 degrees, + 20 "SSG" = 140 total at range closer than 120 map units

The tactical class adds + 5x12 "ExplosiveImpact" damage 12x3 spread (+60 = 220)


This weapon *murders* flying monsters because it inflicts the same type damage as rocket splash and they take 300% damage from that - even if they are out of the instakill range of the central hitscan. 

Fire rate 35/20 tics = 1.75 , dps = 259 (tactical 364) - below that of the regular shotgun's alt fire

Has no alt fire (you cannot aim down iron sights)

P.S. re-balanced it to have ROF of 35/16 = 3.18 and the damege to 5x12 "ExplosiveImpact" spread 20x7 + 4x12 "Shotgun" spread 3x3


=== Shotolver (rifle ammo) ==================================

Fires *one* hitscan with 1x1 spread, 1x100 "Shotgun" damage. This, again, murders humanoid enemies including chaos marines (200 damage in one shot) for the cost of *one* rifle bullet. Otherwise, this is nothing special (Mancubi apply their 20% shotgun resistance) 

Fire rate 35/20 tics = 1.75 , dps = 175

Has no alt fire

Conclusion: shotolver in both its incarnations is Awesome But Impractical. You have other weapons that do the same job better using the same ammo. You can call it super shotgun's little brother.

=== Railgun =================================================

Pierces through all except the invulnerable inflicting 400 "Railgun" damage

When hits a wall or someone invulnerable, produces an explosion that inflicts 100 "ExplosiveImpact" damage in a radius of 150. Moreover, it pierces *through* that wall if it is less than 50 map units thick resulting in a 120-degree cone of shrapnel (not uniform, focused more in the center) that can inflict up to 30x12 = 360 "MonsterShotgunBullet" damage. Mind that most monsters behind that door would only be hit by a marginal part of this spalling.

When hitting the floor or ceiling at a shallow angle, also produces a small amount of shrapnel scattered in the direction the shot was traveling. 

Note: Zandronum is buggy! If the railgun shot passes through many monsters, no more than 10 of them would receive the damage. Even worse with heads. No such limitation in GZDoom. For this reason, use GZDoom to play slaughtermaps! (and yes, this is a game engine bug, not a BD bug)


=== BFG 9000 =================================================


Damage type "Desintegrate" (do not mistake for the native "Disintegrate" type), the same as Unmaker -- many bosses have resistance to this, the most notorious example is the spider mastermind with 60% resist!

While traveling, the BFG ball fires one ray per tic (35 rays per second or 875 distance traveled)

One ray (a fast seeker missile) 86..146 damage (plain 86 to bosses, higher to thick non-bosses)
	- direct hit damage 80
	- reach 250 (in 5 tics)
	- spawns 3 rippers
	One ripper (a fast seeker ripper missile)
		- reach 96 (practical ~64 because it only starts homing after its first tic) in 3 tics
		- only 2 damage to bosses (has +NOBOSSRIP flag)
		- 16..22 damage to monsters of regular radius (player, imp, baron), up to 48 to very thick monsters

Direct hit inflicts 1500 + 200 AOE in a radius of 400 + ..
	- if hit point blank: classic BFG spray with damage of up to 2700
	- if traveled at least some distance: 20 rays (reach 350), 1720..2920 (1720 to bosses)
	I.e. 3420 damage to bosses, 3420..4620 damage to regular monsters, may be even higher for thick non-bosses  	


=== BFG 10k ==================================================
 
Consumes flat 5 cells per shot (making is *twice* as economical as the railgun!)

Fire rate: the first shot takes exactly one second to charge, then fires every 8 tics (4.37 shots per second), DPS 1750 (1300 against cyberdemons)

Damage composition: 300 direct hit "Bfg10k" + 100 "ExplosiveImpact" in a radius of 150.

The hit is *near* instaneous, a fast projectle with a speed of 200 per tic (7000 map units per second).



=== Mancubus flame cannon ====================================

?

=== Flamethrower ============================================= 


Damage type "Fire"

Consumes 5 Gas per shot, thus 999 ammo -> 199 shots

One flame particle: 
	on hit, direct 12 + AOE 32 in a radius of 128 
	+ while in flight, AOE decaying from 16 down to 4.8 per tic with radius growing from 32 to 196
	when hitting a wall or an actor, spawns FlamethrowerBurningStuff
	Thus, one particle 44..250 (realistically, 44..76 becsue of radius faloff and the particle passing by or dying)
	
FlamethrowerBurningStuff
	- is a DOT source
	- has a random duration (12.5% not to spawn at all, then 2 seconds, then 2 more seconds with 12.5% chance to extinguish 2 times per second). May be roughly summarized as 128..256 AOE in a radius of 64 spread over 2..4 seconds
	- inflicts 16 AOE "Fire", radius 64, 2 times per second

Fire rate: 1 per 2 tics, 17.5 per second, DPS ~ 1000 + 3300 AOE against stationary targets (except cyberdemons who are immune to *any* AOE)


=== Unmaker ================================================== 

Damage type "Desintegrate" (the same as BFG 9000), with masterminds having the same 60% resistance.

Consumes 2 ammo per shot, thus 999 ammo -> 499 shots (one zombie gives 10 ammo so 999 is actually 99.9 souls, maxes for 100 killed zombies). Damage 35+ per ammo unit or 350+ per soul!

Fires a fast projectile with the speed of 500 per tic (meaning it hits near instaneously at realistic distances) that inflicts 50 direct + 20 AOE in a radius of 100 = 70. Plus every second shot spawns FlamethrowerBurningStuff (see Flamethrower)

Fire rate 35/1 tic = 35.0 + DOT flames on hit (17.5 per second), DPS 2450 + ~ 3300 AOE against stationary targets

This thing SHREDS. Nearly 6K DPS!



=== Nuke launcher ============================================

WARNING: this was pure Invasion weapon in the original BD while I re-designed it into an anti-final-boss weapon for Chebskies-EDAY
(Invasion is a Zandronum-only game mode (single or coop) where player(s) fight waves of monsters -- need special maps designed for it)

In a nutshell, you only have one shot (P.S. buffed ammo limit to 3) but it inflicts ~50K damage.

The nuclear rocket flies *in a straight line*, unlike the original BD! On hit: 1K direct Plasma + 24K AOE Plasma (radius 1000, full damage radius 900) + 90 AOE Plasma (radius 1500, full damage radius 1400) + 100 AOE fire (radius 5000) + 33x secondary DOT sources seeded in a radius of 600 (cuboid shape), each inflicts 512 AOE Fire (radius 800) over 7 seconds.

Tested it on REDACTED (a humongous titan with a humongous hitbox), got consistent 49..51K damage.

REDACTED






*/