Skip to content

Commit

Permalink
tweak(combat): guns are more dangerous
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmolitskiyCarpoeb committed Oct 17, 2023
1 parent 97014d8 commit 5dcc77b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ meteor_act

//Internal damage
var/penetrating_damage = ((P.damage + P.armor_penetration) * P.penetration_modifier) - blocked
var/internal_damage_prob = 70 + max(penetrating_damage, -30) // The minimal chance to deal internal damage is 40%, armor is more about blocking damage itself
var/internal_damage_prob = 110 + max(penetrating_damage, -20) // The minimal chance to deal internal damage is 40%, armor is more about blocking damage itself

var/overkill_value = 1
if(organ.damage > organ.max_damage) // Overkill stuff; if our bodypart is a pile of shredded meat then it doesn't protect organs well
Expand All @@ -52,13 +52,13 @@ meteor_act
if(blocked >= P.damage) // Armor has absorbed the penetrational power
damage_amt = sqrt(damage_amt)
if(organ.encased && !(organ.status & ORGAN_BROKEN)) //ribs and skulls somewhat protect
overkill_value *= 0.75
overkill_value *= 0.85
damage_amt *= overkill_value
if(damage_amt > 0)
var/list/victims = list()
var/list/possible_victims = shuffle(organ.internal_organs.Copy())
for(var/obj/item/organ/internal/I in possible_victims)
if(I.damage < I.max_damage && (prob((sqrt(I.relative_size) * 10) * (1 / max(1, victims.len)))))
if(I.damage < I.max_damage && (prob((sqrt(I.relative_size) * 20) * (2 / max(2, victims.len)))))
victims += I
if(victims.len)
for(var/obj/item/organ/internal/victim in victims)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/organs/external/_external_damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ obj/item/organ/external/take_general_damage(amount, silent = FALSE)
cur_damage += burn_dam
var/organ_damage_threshold = 5
if(sharp)
organ_damage_threshold *= 0.5
organ_damage_threshold *= 0.75
var/organ_damage_prob = 6.25 * damage_amt/organ_damage_threshold //more damage, higher chance to damage
if(sharp)
organ_damage_prob *= 1.5
if(cur_damage >= 15)
organ_damage_prob *= cur_damage/15
if(encased && !(status & ORGAN_BROKEN)) //ribs and skulls protect
organ_damage_prob *= 0.5
organ_damage_prob *= 0.75
if(internal_organs && internal_organs.len && (cur_damage + damage_amt >= max_damage || damage_amt >= organ_damage_threshold) && prob(organ_damage_prob))
// Damage an internal organ
var/list/victims = list()
Expand All @@ -123,7 +123,7 @@ obj/item/organ/external/take_general_damage(amount, silent = FALSE)
brute /= 2
if(laser)
burn /= 3
damage_amt /= 2
damage_amt /= 1.5
victim.take_internal_damage(damage_amt)

if(status & ORGAN_BROKEN && brute)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/organs/external/head.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
icon_name = "head"
name = "head"
slot_flags = SLOT_BELT
max_damage = 75
max_damage = 60
min_broken_damage = 40
w_class = ITEM_SIZE_NORMAL
body_part = HEAD
Expand All @@ -16,7 +16,7 @@
cavity_name = "cranial"
limb_flags = ORGAN_FLAG_CAN_AMPUTATE | ORGAN_FLAG_GENDERED_ICON | ORGAN_FLAG_HEALS_OVERKILL | ORGAN_FLAG_CAN_BREAK

internal_organs_size = 3
internal_organs_size = 4

var/can_intake_reagents = 1

Expand Down
2 changes: 1 addition & 1 deletion code/modules/organs/external/standard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
name = "upper body"
organ_tag = BP_CHEST
icon_name = "torso"
max_damage = 110
max_damage = 115
min_broken_damage = 45
w_class = ITEM_SIZE_HUGE //Used for dismembering thresholds, in addition to storage. Humans are w_class 6, so it makes sense that chest is w_class 5.
body_part = UPPER_TORSO
Expand Down
2 changes: 1 addition & 1 deletion code/modules/organs/internal/brain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

max_damage = isnull(holder?.species) ? 100 : species.total_health
min_bruised_damage = max_damage * 0.25
min_broken_damage = max_damage * 0.75
min_broken_damage = max_damage * 0.50

damage_threshold_value = round(max_damage / BRAIN_DAMAGE_THRESHOLD)

Expand Down

0 comments on commit 5dcc77b

Please sign in to comment.