Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduces new shrapnel types to OT #7224

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions code/__DEFINES/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,15 @@

/// Amount of phosphorus that equals 1 radius of white phosphorus smoke
#define CHEM_FIRE_PHOSPHORUS_PER_RADIUS 10
/// The minimum amount of phoron required to turn shrapnel into incendiary shrapnel
/// The minimum amount of chems required to turn shrapnel into a special type
#define EXPLOSION_PHORON_THRESHOLD 10
#define EXPLOSION_ACID_THRESHOLD 10
#define EXPLOSION_NEURO_THRESHOLD 30

#define EXPLOSION_MIN_FALLOFF 25
#define EXPLOSION_BASE_SHARDS 4

/// The maximum amount of shards is divided by this number if the shards are incendiary
#define INCENDIARY_SHARDS_MAX_REDUCTION 4
/// The maximum amount of shards is divided by this number if the shards are of special type
#define INCENDIARY_SHARDS_MAX_REDUCTION 2
#define HORNET_SHARDS_MAX_REDUCTION 2
#define NEURO_SHARDS_MAX_REDUCTION 2
15 changes: 14 additions & 1 deletion code/datums/ammo/shrapnel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
shell_speed = AMMO_SPEED_TIER_3//she fast af boi
penetration = ARMOR_PENETRATION_TIER_5
/// inflicts this many holo stacks per bullet hit
var/holo_stacks = 10
var/holo_stacks = 20
/// modifies the default cap limit of 100 by this amount
var/bonus_damage_cap_increase = 0
/// multiplies the default drain of 5 holo stacks per second by this amount
Expand All @@ -70,6 +70,19 @@
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_incendiary)
))

/datum/ammo/bullet/shrapnel/neuro
name = "neurotoxin coated shrapnel"
icon_state = "neurotoxin"
flags_ammo_behavior = AMMO_STOPPED_BY_COVER

shell_speed = AMMO_SPEED_TIER_1
damage = 30
penetration = ARMOR_PENETRATION_TIER_4

/datum/ammo/bullet/shrapnel/neuro/on_hit_mob(mob/living/M, obj/projectile/P)
GoldenDarkness55 marked this conversation as resolved.
Show resolved Hide resolved
if(M.slowed < 6)
M.adjust_effect(0.8, SLOW)

/datum/ammo/bullet/shrapnel/metal
name = "metal shrapnel"
icon_state = "shrapnelshot_bit"
Expand Down
8 changes: 8 additions & 0 deletions code/modules/reagents/Chemistry-Holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -633,12 +633,20 @@
shards += floor(R.volume)
else if(R.id == "phoron" && R.volume >= EXPLOSION_PHORON_THRESHOLD)
shard_type = /datum/ammo/bullet/shrapnel/incendiary
else if(R.id == "sulphuric acid" && R.volume >= EXPLOSION_ACID_THRESHOLD)
shard_type = /datum/ammo/bullet/shrapnel/hornet_rounds
else if(R.id == "neurotoxinplasma" && R.volume >= EXPLOSION_NEURO_THRESHOLD)
shard_type = /datum/ammo/bullet/shrapnel/neuro

// some upper limits
if(shards > max_ex_shards)
shards = max_ex_shards
if(istype(shard_type, /datum/ammo/bullet/shrapnel/incendiary) && shards > max_ex_shards / INCENDIARY_SHARDS_MAX_REDUCTION) // less max incendiary shards
shards = max_ex_shards / INCENDIARY_SHARDS_MAX_REDUCTION
if(istype(shard_type, /datum/ammo/bullet/shrapnel/hornet_rounds) && shards > max_ex_shards / HORNET_SHARDS_MAX_REDUCTION)
shards = max_ex_shards / HORNET_SHARDS_MAX_REDUCTION
if(istype(shard_type, /datum/ammo/bullet/shrapnel/neuro) && shards > max_ex_shards / NEURO_SHARDS_MAX_REDUCTION)
shards = max_ex_shards / NEURO_SHARDS_MAX_REDUCTION
if(ex_power > max_ex_power)
ex_power = max_ex_power
if(ex_falloff < EXPLOSION_MIN_FALLOFF)
Expand Down
Loading