From a27aafd90cf20c37b3076257a0291ba6b184dc7e Mon Sep 17 00:00:00 2001 From: homexp13 Date: Thu, 18 Jul 2024 19:08:10 +0300 Subject: [PATCH 1/4] penetration --- code/modules/codex/entries/ammunition_codex.dm | 3 +++ code/modules/codex/entries/magazine_codex.dm | 3 +++ code/modules/projectiles/ammo_datums.dm | 2 ++ code/modules/projectiles/projectile.dm | 13 +++++-------- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/code/modules/codex/entries/ammunition_codex.dm b/code/modules/codex/entries/ammunition_codex.dm index 5fcea857473..9f68ff7e330 100644 --- a/code/modules/codex/entries/ammunition_codex.dm +++ b/code/modules/codex/entries/ammunition_codex.dm @@ -35,6 +35,9 @@ if(ammo.penetration) entry.mechanics_text += "Armor penetration: [ammo.penetration]
" + if(ammo.additional_xeno_penetration) + entry.mechanics_text += "Xenomorph additional armor penetration: [ammo.penetration]
" + if(ammo.armor_type) entry.mechanics_text += "Armor type: [ammo.armor_type]
" diff --git a/code/modules/codex/entries/magazine_codex.dm b/code/modules/codex/entries/magazine_codex.dm index 0d44f7803f7..18bdd2b58d8 100644 --- a/code/modules/codex/entries/magazine_codex.dm +++ b/code/modules/codex/entries/magazine_codex.dm @@ -42,6 +42,9 @@ if(default_ammo.penetration) traits += "Armor penetration: [default_ammo.penetration]
" + if(default_ammo.additional_xeno_penetration) + traits += "Xenomorph additional armor penetration: [ammo.penetration]
" + if(default_ammo.sundering) traits += "Sundering amount: [default_ammo.sundering]
" diff --git a/code/modules/projectiles/ammo_datums.dm b/code/modules/projectiles/ammo_datums.dm index 63958c4131f..ad19f085ab8 100644 --- a/code/modules/projectiles/ammo_datums.dm +++ b/code/modules/projectiles/ammo_datums.dm @@ -47,6 +47,8 @@ GLOBAL_LIST_INIT(no_sticky_resin, typecacheof(list(/obj/item/clothing/mask/faceh var/damage_type = BRUTE ///How much armor it ignores before calculations take place var/penetration = 0 + ///How much extra penetration applies to xeno + var/additional_xeno_penetration = 0 ///The % chance it will imbed in a human var/shrapnel_chance = 0 ///How fast the projectile moves diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 5b648820838..513749cb7ce 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -68,6 +68,8 @@ var/damage = 0 ///ammo sundering value var/sundering = 0 + ///How much extra penetration applies to xeno + var/additional_xeno_penetration = 0 var/accuracy = 90 //Base projectile accuracy. Can maybe be later taken from the mob if desired. ///how many damage points the projectile loses per tiles travelled @@ -154,6 +156,7 @@ icon_state = ammo.icon_state damage = ammo.damage + bonus_damage //Mainly for emitters. penetration = ammo.penetration + additional_xeno_penetration = ammo.additional_xeno_penetration sundering = ammo.sundering scatter = ammo.scatter airburst_multiplier = ammo.airburst_multiplier @@ -902,12 +905,7 @@ So if we are on the 32th absolute pixel coordinate we are on tile 1, but if we a damage *= STAGGER_DAMAGE_MULTIPLIER //Since we hate RNG, stagger reduces damage by a % instead of reducing accuracy; consider it a 'glancing' hit due to being disoriented. var/original_damage = damage - //// RUTGMC EDIT - var/sunder_to_penetration = 0 - if(isxeno(src)) - sunder_to_penetration = log(proj.sundering + 1) * 10 - - damage = modify_by_armor(damage, proj.armor_type, proj.sundering >= 20 ? proj.penetration : (proj.penetration + sunder_to_penetration), proj.def_zone)// RUTGMC EDIT + damage = modify_by_armor(damage, proj.armor_type, isxeno(src) ? proj.penetration + proj.additional_xeno_penetration : proj.penetration, proj.def_zone)// RUTGMC EDIT if(damage == original_damage) feedback_flags |= BULLET_FEEDBACK_PEN else if(!damage) @@ -919,8 +917,7 @@ So if we are on the 32th absolute pixel coordinate we are on tile 1, but if we a if(IgniteMob()) feedback_flags |= (BULLET_FEEDBACK_FIRE) - - if((proj.ammo.flags_ammo_behavior & AMMO_SUNDERING) && proj.sundering >= 20) // RUTGMC EDIT + if(proj.ammo.flags_ammo_behavior & AMMO_SUNDERING) // RUTGMC EDIT adjust_sunder(proj.sundering) // RUTGMC EDIT if(stat != DEAD && ismob(proj.firer)) From 14014029c9e383043747efccab4ff62b9924b1a8 Mon Sep 17 00:00:00 2001 From: homexp13 Date: Thu, 18 Jul 2024 19:32:13 +0300 Subject: [PATCH 2/4] bruh --- code/modules/codex/entries/magazine_codex.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/codex/entries/magazine_codex.dm b/code/modules/codex/entries/magazine_codex.dm index 18bdd2b58d8..2695daf0b38 100644 --- a/code/modules/codex/entries/magazine_codex.dm +++ b/code/modules/codex/entries/magazine_codex.dm @@ -43,7 +43,7 @@ traits += "Armor penetration: [default_ammo.penetration]
" if(default_ammo.additional_xeno_penetration) - traits += "Xenomorph additional armor penetration: [ammo.penetration]
" + traits += "Xenomorph additional armor penetration: [default_ammo.penetration]
" if(default_ammo.sundering) traits += "Sundering amount: [default_ammo.sundering]
" From 63a4713b4f4b5607f0ff665622ce0e13089b1994 Mon Sep 17 00:00:00 2001 From: homexp13 Date: Thu, 18 Jul 2024 19:33:01 +0300 Subject: [PATCH 3/4] aaaaaaaaa --- code/modules/codex/entries/magazine_codex.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/codex/entries/magazine_codex.dm b/code/modules/codex/entries/magazine_codex.dm index 2695daf0b38..8b9570dead7 100644 --- a/code/modules/codex/entries/magazine_codex.dm +++ b/code/modules/codex/entries/magazine_codex.dm @@ -43,7 +43,7 @@ traits += "Armor penetration: [default_ammo.penetration]
" if(default_ammo.additional_xeno_penetration) - traits += "Xenomorph additional armor penetration: [default_ammo.penetration]
" + traits += "Xenomorph additional armor penetration: [default_ammo.additional_xeno_penetration]
" if(default_ammo.sundering) traits += "Sundering amount: [default_ammo.sundering]
" From 5f28603c7faeec6649542583b65656050f0bd0d6 Mon Sep 17 00:00:00 2001 From: homexp13 Date: Thu, 18 Jul 2024 20:03:37 +0300 Subject: [PATCH 4/4] rutgmc --- code/modules/projectiles/projectile.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 513749cb7ce..fee282c1b04 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -905,7 +905,7 @@ So if we are on the 32th absolute pixel coordinate we are on tile 1, but if we a damage *= STAGGER_DAMAGE_MULTIPLIER //Since we hate RNG, stagger reduces damage by a % instead of reducing accuracy; consider it a 'glancing' hit due to being disoriented. var/original_damage = damage - damage = modify_by_armor(damage, proj.armor_type, isxeno(src) ? proj.penetration + proj.additional_xeno_penetration : proj.penetration, proj.def_zone)// RUTGMC EDIT + damage = modify_by_armor(damage, proj.armor_type, isxeno(src) ? proj.penetration + proj.additional_xeno_penetration : proj.penetration, proj.def_zone) if(damage == original_damage) feedback_flags |= BULLET_FEEDBACK_PEN else if(!damage) @@ -917,7 +917,7 @@ So if we are on the 32th absolute pixel coordinate we are on tile 1, but if we a if(IgniteMob()) feedback_flags |= (BULLET_FEEDBACK_FIRE) - if(proj.ammo.flags_ammo_behavior & AMMO_SUNDERING) // RUTGMC EDIT + if(proj.ammo.flags_ammo_behavior & AMMO_SUNDERING) adjust_sunder(proj.sundering) // RUTGMC EDIT if(stat != DEAD && ismob(proj.firer))