Guns

> "What are you gonna do with a gun???? Shoot people?????"
>
> - travelingsalesman,

Guns are essential means of defense in DDS. You can purchase them through Apartment shop or loot them from dead bodies and/or turrets. Guns are randomized, having always random name, stats, shape and color - the latter two attributes can be changed in Wardrobe.

## Stats

Guns possesses many stats, as other things in DDS, and they might be a bit confusing for first-time players.

* **Level** - Ranges from 1 to 10 and determines the ceiling values for other stats. The maximum level that you can upgrade your Gun to is 9. Level 10 weapons can only be obtained from Black Knights.

* **Damage (DMG)** - The base damage of one singular projectile fired from the gun, damage (DMG) stat reduces armor (ARM) stat, when armor (ARM) hits 0, the target is destroyed. Higher values are more desirable.

* **Duration (DUR)** - Some weapons inflict status effect instead of DMG, duration (DUR) stat is the duration of the inflicted effect. Higher values are more desirable.

* **Inaccuracy (IAC)** - How inaccurate your gun is. Larger number results in a bigger stray of your projectiles, you can easily recognize different IAC values by looking at the guns 'cone' where you are currently aiming. Lower values are more desirable.

* **Recoil (RCL)** - Recoil of your gun. When gun is fired the aim is shifted by random value between 0 and your guns RCL value. Lower values are more desirable.

* **Projectiles Count (CT#)** - Count of projectiles fired from your gun on mouse click. If CT# is larger then the guns magazine size, the number of projectiles left in the magazine is fired instead, e.g. if a gun has CT# 5 and only 2 bullets are left in the magazine, the 2 bullets will be fired at once.

* **Rotation Difficulty (RTD)** - Rotation Difficulty (or just Rotation) is how "fast" you can aim with your gun. Lower values are more desirable.

* **Speed (SPD)** - Speed of a projectile after leaving the gun.

* **Mag Size (MS)** - A current magazine size of your gun, if this value hits 0 you need to reload.

* **Spare Mags (SPR)** - Determines how many times you can fully reload your guns MS. Higher values are more desirable. Can be refilled at Ammo Stations.

* **Fire Rate (FRT)** - Fire rate determines how fast a weapon fires when holding down the trigger. Your gun panel displays this as cooldown (CD).

* **Cooldown (CD)** - Cooldown is the inverse of fire rate, and measures the distance in time between shots when holding the trigger.

* **Reload Time (RT)** - Time needed to reload your gun in seconds. Lower values are more desirable.

* **Noise (NOI)** - How far your gunshot is "heard", this stat is measured in line-of-sight distance, 1 line-of-sight distance is equal to the size of the vision circle around your agent.

* **Luck (LCK)** - Luck is a hidden stat and you should really worry about it.

## Ammo types

Ammo types change how the gun behaves as well as altering the gun stats in some way.

* **Bullet** - Default ammo type.

* **Barb** - Applies a stacking slowing effect, depending on the target's missing health, on hit for 5 seconds. Guns with this type usually have lower **DMG**.

* **Ricochet** - Bounces from walls directly back at you (you're going to die) up to 10 times.

* **Rokkett** - Explodes on contact, dealing AOE damage.

* **Bolt** - Can penetrate through walls and enemies as well as impale them. Guns with this type usually have slower **SPR**.

* **Seeker** - Slowly chases after the target closest to your cursor. Guns with this type usually have slower **SPD**.

* **Chonk** - Like a **Bullet**, but thicc. Guns with this type usually have slower **SPD**.

* **Orb** - After a brief delay, changes it's trajectory to the enemy closest to your cursor, allowing shooting enemies behind cover or walls.

* **Sleep** - Puts an enemy to sleep for the duration equal to gun's **DMG**. Non-lethal.

## Stats generation

Whenever a gun is created the game runs the following algorithm:

1. Decide whether or not the gun has multiple projectiles (**1 in 5 chance**).
2. Generate **10** (**11** if multiple projectiles) numbers (n1, n2, n3...), each ranging from **0.001** to **10.0**.
3. **Each** number is then **divided** by the **sum** of all numbers, **multiplied** by **0.5** and then **multiplied** by **10** (**11** if multiple projectiles). Therefore the lowest possible number it can generate is **0.00005555493** while the highest is **4.99550404636** for single projectile guns and **0.00005499945** and **5.49450549451** for multiple projectiles
4. Those numbers are then used to generate each stat using linear Interpolation (**a** + (**b** — **a**) \* **t**) . The formulas are as follows:
	1. **DMG** = **level** + (**level \* 4** - **level**) \* **n1**
	2. **NOI** = **1.5** + (**0.5** - **1.5**) \* **n2**
	3. **SPD** = **25** + ((**40** + **level** \* **3**) - **25**) \* **n3,** if it's more than **90**, then: **SPD** = 90
	4. **RCL** = **1.5** + (**0** - **1.5**) \* **n4**
	5. **IAC** = **0.4** + (**0** - **0.4**) \* **n5**
	6. **FRT** = **FRT*p*** , where **FRT** = **1** + ((**2.5** + **level** / **2**) - **1**) \* **n6** and ***p*** = **0.4** + (**1.2** - **0.4**) \* **n6**
	7. **RTD** = **1** + (**0.1** - **1**) \* **n7**
	8. **SPR** = **1** + ((**level** + **4**) - **1**) \* **n8**, then runs a **while** **loop** with (**SPR** \* **MS** < 13) adding **1** spare magazine for each successful iteration.
	9. **MS** = **CT#** + (*max*(**6**, **3** + **level** \* **2**) - **CT#**) \* **n9,** if it's less than **1**, then: **MS** = 1
	10. **RT** = **3** + (**0.25** - **3**) \* **n10**
5. The other stats are calculated without the use of generated numbers:
	1. **CT#**:
		* If a gun doesn't have multiple projectiles: **CT#** = **1**.
		* If it does, then: **CT#** = **1** + ((**level** + **2**) - **1**) \* **1**, in this case **DMG** = **DMG** / **CT#** / **2**
	2. **CD**: **1** / **FRT**, if it's less than 1 / 99, then: **CD** = 1/99, if a gun has multiple projectiles then: **CD** = **CD** \* **√CT# \*** **random number ranging from 0.5 to 1**.
	3. **DUR**: Depends on the ammo type.
	4. **LCK**: [REDACTED]

## Legendary guns

Legendary guns are unique and have fixed stats and appearance, they are always level 9.

1. ↑ *travelingsalesman*
2. ↑ After completing her mission and befriending bitchlovenuts, she will leave her weapon behind the elevator, making this the only unique weapon obtainable without a fight.