Yogstation icon indicating copy to clipboard operation
Yogstation copied to clipboard

Adds K-41s DMR for nukies, adds alternative 7.62 ammunition, overhauls atom penetration code for projectiles

Open Skrem7 opened this issue 2 years ago • 1 comments

Document the changes in your pull request

The purpose of this PR is twofold. The first is to add a DMR similar to the LWT-650 for Nuclear Operatives.

The K-41s DMR is an 11-round rifle that fires 7.62 rounds (the same as the mosin). It fires slightly faster than the LWT-650 and comes with a short-range scope to see somewhat better over longer distances. It is normal-sized with a medium weight, meaning you can have something in your off-hand, but it can't be dual-wielded. It costs 12 TC by default, with an additional 7.62 magazine costing 3 TC.

The K-41s has the following new, alternative ammos available:

  • Baseline 7.62 (for reference): Deals 60 damage, travels at speed 0.3 instead of 0.4 (faster), wound bonus of -35, and 0 wound dropoff per tile (as opposed to the default -5, meaning a default bullet's wound bonus decreases by 5 every tile it travels)
  • 7.62 Raze: Deals 40 damage and 300 irradiate against bullet armor. Deals 15 Clone damage as true damage. Costs 4 TC.
  • 7.62 anti-material: Deals 52 damage with 40 AP. Passes through a maximum of 2 objects before hitting a mob, another object, or reaching its maximum range. Costs 5 TC.
  • 7.62 Vulcan: Deals 47 damage. Guaranteed hotspot on the target hit, then has a 50% chance on every non-space, non-blocked turf within 2 tiles of the impact point to spawn another hotspot. These hotspots are the fiery turf that incendiary ammo leaves behind for a second. The way this calculation is handled, the fire can appear on the other side of a wall from where the impact zone is. Costs 4 TC.

A minor change that should still be documented is how the LWT-650 is being made a weapon weight of medium, rather than heavy, as I thought it felt too restrictive when the Boarder rifle and Tommy Gun can be dual-wielded, as well as several other automatic weapons that are highly lethal for ERT/Nukies.

The second purpose of the PR is to revamp the way penetrating projectiles are handled by adding three new variables for projectiles, which are:

  • penetrating: Whether the projectile has penetrating behavior (default FALSE)
  • penetrations: The number of mobs/objects/atoms the projectile can pass through without stopping (default INFINITY)
  • penetration_type: The type of atoms the projectile can penetrate. A value of 0 indicates it will penetrate mobs, a value of 1 indicates it will penetrate objects, a value of 2 indicates it will penetrate both (default 0)

This was primarily done to make it far easier to code in projectiles that can penetrate and damage several targets at once, as there was a particularly snowflake line that was beginning to build in living_defense with bullets that were meant to pass through mobs. The following projectiles have had their code adjusted to account for these new properties:

  • Depleted Uranium Slugs (Behavior unchanged)
  • .357 Heartpiercer (Behavior unchanged)
  • .308 penetrator (Behavior unchanged)
  • .50 Penetrator (Now damages all people and objects passed through)

This PR also adds the sprites for the DMR and all of its ammunition types, as seen below. In-hand sprites for the rifle itself courtesy of Orca.

Spriting

K-41s DMR with magazine loaded image

No magazine, but one bullet remaining: image

Gif of ammo progression: dmr

Standard magazine: image

7.62 Raze: image image

7.62 anti-material: image image

7.62 Vulcan: image image

In-hand sprites (only pictured left-hand): image image image image

Default Hardsuit: image image image image

Wiki Documentation

DMR and ammo types to be added to Syndicate items and Guide to Combat .50 Penetrator could maybe use a description update

Changelog

:cl: Skrem_7, @KillerOrcaCora rscadd: Adds K-41s DMR to nukie uplink for 12 TC. It's an 11-round rifle that fires 7.62 and possesses a short-range scope. Additional magazine costs 3 TC rscadd: Adds 7.62 Raze, a weaker 7.62 round that deals moderate irradiation and clone damage. 4 TC rscadd: Adds 7.62 anti-material, an AP round that can pass through two objects/structures before hitting another object, mob, or reaching the end of its reach. 5 TC rscadd: Adds 7.62 Vulcan, a weaker round that creates an explosion of exclusively fire upon impact, with no throwing of objects or actual explosion damage. 4 TC tweak: Overhauls and standardizes projectile penetration code to be more integrated into the base on_hit checks as well as making it far easier to create or adjust penetrating projectile types. As a consequence, .50 Penetrator now damages EVERYTHING it passes through. X-ray projectiles remain unaffected tweak: You now don't need both hands to fire the LWT-650 DMR imageadd: Adds new sprites for the K-41s, its magazines, and the new bullets /:cl:

Skrem7 avatar Oct 17 '22 21:10 Skrem7

@KillerOrcaCora had to add the magazine part to the sprite, based it off what the sniper did

Skrem7 avatar Oct 19 '22 04:10 Skrem7