Files
Bubberstation/code/game/objects/items/kitchen.dm
necromanceranne 690bfc04b4 Rebalances wound determination values, wounding escalation and wound armor to hopefully be less explosive (#91099)
This is a big one so please bear with me, wounds are complicated

We've decreased the max contributed damage to wound rolls from 35 to 25.
This results, after the exponent, a max possible wound roll of 1 to 91
before any modifiers (assuming the attack, after armor, is 25 or above).

The minimum value to wound is still 5.

Most wounds were contributing significant numbers per wound type to the
potential for a new wound to occur. Getting wounded once meant you were
getting wound a lot, but actually getting past that first wounding may
be the tricky part.

We have significantly reigned in the wound penalty that having a wound
contributes, and instead utilize the series wound penalty to allow same
type wounds to escalate themselves faster as a priority. Having wounds
still makes you more wound vulnerable, just not to such an extreme
degree.

The priority here for what wounds matter most for contributing to
overall wounding vulnerability is ``Infected BURNS > BURNS >
SLASH|PIERCE > BLUNT.``

Wound armor, unlike all other kinds of armor, was used as a additive
value to the wound roll modifiers rather than a multiplicative value.

We have reworked how wound armor is determined by changing how wound
modifiers are calculated.

Firstly, we're passing our entire injury roll into the
``check_woundings_mod()`` proc, as we're not treating this as a proc
that just adds values anymore.

Secondly, bare wound bonus only applies if there is no potential wound
protection from any source, as expected. But it comes last in the
calculations.

Thirdly, wound protection is applied to the injury roll last, after
wound bonuses from the attack, wound bonuses from other wounds and wound
bonuses from a disabled limb are applied. This does not include serial
wound bonuses, which are determined outside of this proc.

Wound protection comes from two sources. Clothing and limb wound
resistance. Your chest and head have an amount of wound resistance so
long as they are not mangled in any fashion. Being mangled means having
either a hairline fracture or a weeping avulsion wound.

Wound protection reduces the final injury roll by a percentage. Say our
roll is 50, and we have effectively 50% wound protection. The final roll
would be 25.

~~Most clothing have had their wound armor values changed. As a loose
rule, I used the highest of melee or bomb armor, except where that value
was 100, in which case I used the lowest instead. I'm basing this
decision on how embeds are calculated, which is attack type agnostic.~~

~~Some armor have inconsistent values because they are alternative
armors to an existing armor type or are hyperspecialized armor.
Ablative, bulletproof and security vests all share a value of 35,
despite the former two not having decent melee or bomb armor.~~

~~Some clothing missing wound armor that should have had them now have
wound armor.~~

~~This may need a bit of scrutiny in case one or two seem weirdly high.
Some have maybe become too low. Its a bit hard to say.~~

I changed it to ``exposed_wound_bonus`` to better represent when it
applies. You can be naked and still not be affected by this bonus if the
limb has wound resistance.

I'm not promising anything with this PR, but this is an attempt to
sanity check the values on wounds so that we're not seeing what the data
that determined the removal of beheading presented. An extreme
over-representation of tier 3 wounds. ~~And, from that, maybe I can
argue for beheadings coming back. That's my goal. I think beheadings
happened so much because the numbers were in need of work.~~ Well okay I
just wanna make wounds a bit more workable actually more than I want
beheadings.

Why is it that tier 3 wounds were so over-represented? Because wounds
will often force more severe wounds of other types by merit of any
wounds existing at all on a limb. Having **_a_** wound makes you more
wound prone for any kind of wound, and not just making you more likely
to suffer a more severe type of the same wound.

The threshold mechanic was intended to simulate making a wound worse,
but oddly just made a limb broadly more prone to getting worse from any
kind of attack to such a degree that future wound rolls of different
types were often going to start at the threshold necessary to be a tier
3 wound.

Dismemberment, mind you, requires you to suffer a flesh wound while you
have a bone wound of tier 2 or higher (with tier 3 giving a bonus to
this). You can do this readily via just a sharp weapon, because having a
mangled limb causes the wound to turn into a bone wound. Technically,
this is meant to be less likely as the effective damage for this wound
is halved. But the wound bonus from having a flesh wound was almost
always significant enough to kick your new bone wound up to a tier 3.

In other words; its not surprising that you saw so many beheadings,
because the system wanted to behead you as fast as it possibly can
thanks to all these escalating values.

Wound armor was only applied as a flat reduction on the roll. The
average for wound armor was 10. After receiving a single wound, you can
expect wound rolls to reach upwards of 100, even if the actual damage
roll was not particularly high, due to wound stacking bonuses form being
wounded.

This meant that wounds, if they happened, came thick and fast after the
first, regardless of what your protection might be to wounds. It was
just a matter of getting past the initial bump.

This is why effects that forced wounds were so powerful. They basically
made a given limb more prone to taking a wound without having to deal
with the protection problem first.

Finally, this is just a broad flaw with the system that is not its
fault. It is actually a problem that isn't a problem. Most people in the
game are not wearing helmets that protect their head. So most people are
going to suffer from a higher proclivity of being wounded if people are
aiming for the head. There is this...kind of cargo cult belief that
aiming for the head means you do more damage, or can stun someone if
you're lucky or what have you. It's entirely nonsense, but it has a
grain of truth in that people rarely wear, or even have access too,
headwear that provides wound protection or any protection at all. People
have jumpsuits, which are universally wound protected, but that isn't
true of the head. Look, the point is, they're not aiming at the head
because it is usually less armored, its for other reasons but it just so
happens to become true due to wounds and how wounds roll their type.

To soften this issue, I've decided to treat wound resistance as armor
until the limb suffers a tier 3 wound. This way, hits to the head MAY
not necessarily escalate to tier 3 instantly as they would on live even
from relatively low power weapons. Some weapons have very low force, but
have extreme bare wound bonuses. This should be less likely after this
change. I doubt this will necessarily make high damage high wound
weapons like energy swords any less prone to cutting you clean open, but
it might thanks to the reduction to contributed damage to the injury
roll. The system is now _a bit more random_.

🆑
balance: Wounds do not make you as vulnerable to suffering wounds of all
types as before. Instead, wounds make you more vulnerable to suffering
worse versions of themselves as a priority.
balance: Wound armor is now more impactful when protecting you from
wounds when you have already been wounded.
balance: Your head and chest are more difficult to wound until they have
been mangled; either from suffering from a weeping avulsion or a
hairline fracture.
code: Changed the variable for bare_wound_bonus to exposed_wound_bonus
to better explain what that variable is doing.
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2025-06-21 22:32:18 -04:00

342 lines
12 KiB
Plaintext

/* Kitchen tools
* Contains:
* Fork
* Kitchen knives
* Rolling Pins
* Plastic Utensils
*/
#define PLASTIC_BREAK_PROBABILITY 25
/obj/item/kitchen
icon = 'icons/obj/service/kitchen.dmi'
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
worn_icon_state = "kitchen_tool"
/obj/item/kitchen/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_APC_SHOCKING, INNATE_TRAIT)
/obj/item/kitchen/fork
name = "fork"
desc = "Pointy."
icon_state = "fork"
icon_angle = -90
force = 4
w_class = WEIGHT_CLASS_TINY
throwforce = 0
throw_speed = 3
throw_range = 5
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.8)
obj_flags = CONDUCTS_ELECTRICITY
attack_verb_continuous = list("attacks", "stabs", "pokes")
attack_verb_simple = list("attack", "stab", "poke")
hitsound = 'sound/items/weapons/bladeslice.ogg'
armor_type = /datum/armor/kitchen_fork
sharpness = SHARP_POINTY
var/datum/reagent/forkload //used to eat omelette
custom_price = PAYCHECK_LOWER
/datum/armor/kitchen_fork
fire = 50
acid = 30
/obj/item/kitchen/fork/Initialize(mapload)
. = ..()
AddElement(/datum/element/eyestab)
/obj/item/kitchen/fork/suicide_act(mob/living/carbon/user)
user.visible_message(span_suicide("[user] stabs \the [src] into [user.p_their()] chest! It looks like [user.p_theyre()] trying to take a bite out of [user.p_them()]self!"))
playsound(src, 'sound/items/eatfood.ogg', 50, TRUE)
return BRUTELOSS
/obj/item/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M))
return ..()
if(forkload)
if(M == user)
M.visible_message(span_notice("[user] eats a delicious forkful of omelette!"))
M.reagents.add_reagent(forkload.type, 1)
else
M.visible_message(span_notice("[user] feeds [M] a delicious forkful of omelette!"))
M.reagents.add_reagent(forkload.type, 1)
icon_state = "fork"
forkload = null
else
return ..()
/obj/item/kitchen/fork/plastic
name = "plastic fork"
desc = "Really takes you back to highschool lunch."
icon_state = "plastic_fork"
force = 0
w_class = WEIGHT_CLASS_TINY
throwforce = 0
custom_materials = list(/datum/material/plastic = SMALL_MATERIAL_AMOUNT * 0.8)
custom_price = PAYCHECK_LOWER * 1
/obj/item/kitchen/fork/plastic/Initialize(mapload)
. = ..()
AddElement(/datum/element/easily_fragmented, PLASTIC_BREAK_PROBABILITY)
/obj/item/knife/kitchen
name = "kitchen knife"
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
/obj/item/knife/plastic
name = "plastic knife"
icon_state = "plastic_knife"
inhand_icon_state = "knife"
desc = "A very safe, barely sharp knife made of plastic. Good for cutting food and not much else."
force = 0
w_class = WEIGHT_CLASS_TINY
throwforce = 0
throw_range = 5
custom_materials = list(/datum/material/plastic = SMALL_MATERIAL_AMOUNT)
attack_verb_continuous = list("prods", "whiffs", "scratches", "pokes")
attack_verb_simple = list("prod", "whiff", "scratch", "poke")
sharpness = SHARP_EDGED
custom_price = PAYCHECK_LOWER * 2
/obj/item/knife/plastic/Initialize(mapload)
. = ..()
AddElement(/datum/element/easily_fragmented, PLASTIC_BREAK_PROBABILITY)
/obj/item/knife/kitchen/silicon
name = "Kitchen Toolset"
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "sili_knife"
icon_angle = 0
desc = "A breakthrough in synthetic engineering, this tool is a knife programmed to dull when not used for cooking purposes, and can exchange the blade for a rolling pin"
force = 0
throwforce = 0
sharpness = SHARP_EDGED
hitsound = 'sound/items/weapons/bladeslice.ogg'
attack_verb_continuous = list("prods", "whiffs", "scratches", "pokes")
attack_verb_simple = list("prod", "whiff", "scratch", "poke")
tool_behaviour = TOOL_KNIFE
/obj/item/knife/kitchen/silicon/get_all_tool_behaviours()
return list(TOOL_ROLLINGPIN, TOOL_KNIFE)
/obj/item/knife/kitchen/silicon/examine()
. = ..()
. += " It's fitted with a [tool_behaviour] head."
/obj/item/knife/kitchen/silicon/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/tools/change_drill.ogg', 50, TRUE)
if(tool_behaviour != TOOL_ROLLINGPIN)
tool_behaviour = TOOL_ROLLINGPIN
to_chat(user, span_notice("You attach the rolling pin bit to the [src]."))
icon_state = "sili_rolling_pin"
force = 8
sharpness = NONE
hitsound = SFX_SWING_HIT
attack_verb_continuous = list("bashes", "batters", "bludgeons", "thrashes", "whacks")
attack_verb_simple = list("bash", "batter", "bludgeon", "thrash", "whack")
else
tool_behaviour = TOOL_KNIFE
to_chat(user, span_notice("You attach the knife bit to the [src]."))
icon_state = "sili_knife"
force = 0
sharpness = SHARP_EDGED
hitsound = 'sound/items/weapons/bladeslice.ogg'
attack_verb_continuous = list("prods", "whiffs", "scratches", "pokes")
attack_verb_simple = list("prod", "whiff", "scratch", "poke")
/obj/item/kitchen/rollingpin
name = "rolling pin"
desc = "Used to knock out the Bartender."
icon = 'icons/obj/service/kitchen.dmi'
icon_state = "rolling_pin"
worn_icon_state = "rolling_pin"
inhand_icon_state = "rolling_pin"
icon_angle = -45
force = 8
throwforce = 5
throw_speed = 3
throw_range = 7
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 1.5)
resistance_flags = FLAMMABLE
w_class = WEIGHT_CLASS_NORMAL
attack_verb_continuous = list("bashes", "batters", "bludgeons", "thrashes", "whacks")
attack_verb_simple = list("bash", "batter", "bludgeon", "thrash", "whack")
custom_price = PAYCHECK_CREW * 1.5
tool_behaviour = TOOL_ROLLINGPIN
/obj/item/kitchen/rollingpin/illegal
name = "metal rolling pin"
desc = "A heavy metallic rolling pin used to bash in those annoying ingredients."
icon_state = "metal_rolling_pin"
inhand_icon_state = "metal_rolling_pin"
force = 12
obj_flags = CONDUCTS_ELECTRICITY
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.5, /datum/material/plastic = SHEET_MATERIAL_AMOUNT * 1.5)
custom_price = PAYCHECK_CREW * 2
exposed_wound_bonus = 14
/obj/item/kitchen/rollingpin/suicide_act(mob/living/carbon/user)
user.visible_message(span_suicide("[user] begins flattening [user.p_their()] head with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
return BRUTELOSS
/* Trays moved to /obj/item/storage/bag */
/obj/item/kitchen/spoon
name = "spoon"
desc = "Just be careful your food doesn't melt the spoon first."
icon_state = "spoon"
base_icon_state = "spoon"
icon_angle = -90
w_class = WEIGHT_CLASS_TINY
obj_flags = CONDUCTS_ELECTRICITY
force = 2
throw_speed = 3
throw_range = 5
attack_verb_simple = list("whack", "spoon", "tap")
attack_verb_continuous = list("whacks", "spoons", "taps")
armor_type = /datum/armor/kitchen_spoon
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 1.2)
custom_price = PAYCHECK_LOWER * 2
tool_behaviour = TOOL_MINING
toolspeed = 25 // Literally 25 times worse than the base pickaxe
var/spoon_sip_size = 5
/obj/item/kitchen/spoon/Initialize(mapload)
. = ..()
create_reagents(5, INJECTABLE|OPENCONTAINER|DUNKABLE)
register_item_context()
/obj/item/kitchen/spoon/create_reagents(max_vol, flags)
. = ..()
RegisterSignal(reagents, COMSIG_REAGENTS_HOLDER_UPDATED, PROC_REF(on_reagent_change))
/obj/item/kitchen/spoon/proc/on_reagent_change(datum/reagents/reagents)
SIGNAL_HANDLER
update_appearance(UPDATE_OVERLAYS)
/obj/item/kitchen/spoon/add_item_context(obj/item/source, list/context, atom/target, mob/living/user)
if(target.is_open_container())
context[SCREENTIP_CONTEXT_LMB] = "Empty spoonful"
context[SCREENTIP_CONTEXT_RMB] = "Grab spoonful"
return CONTEXTUAL_SCREENTIP_SET
if(isliving(target))
context[SCREENTIP_CONTEXT_LMB] = target == user ? "[spoon_sip_size >= reagents.maximum_volume ? "Swallow" : "Taste"] spoonful" : "Give spoonful"
return CONTEXTUAL_SCREENTIP_SET
return NONE
/obj/item/kitchen/spoon/update_overlays()
. = ..()
if(reagents.total_volume <= 0)
return
var/mutable_appearance/filled_overlay = mutable_appearance(icon, "[base_icon_state]_filled")
filled_overlay.color = mix_color_from_reagents(reagents.reagent_list)
. += filled_overlay
/obj/item/kitchen/spoon/attack(mob/living/target_mob, mob/living/user, list/modifiers, list/attack_modifiers)
if(!target_mob.reagents || reagents.total_volume <= 0)
return ..()
if(target_mob.is_mouth_covered(ITEM_SLOT_HEAD) || target_mob.is_mouth_covered(ITEM_SLOT_MASK))
if(target_mob == user)
target_mob.balloon_alert(user, "can't eat with mouth covered!")
else
target_mob.balloon_alert(user, "[target_mob.p_their()] mouth is covered!")
return TRUE
if(target_mob == user)
user.visible_message(
span_notice("[user] scoops a spoonful into [user.p_their()] mouth."),
span_notice("You scoop a spoonful into your mouth.")
)
else
to_chat(target_mob, span_userdanger("[target_mob.is_blind() ? "Someone" : "[user]"] forces a spoon into your face!"))
target_mob.balloon_alert(user, "feeding spoonful...")
if(!do_after(user, 3 SECONDS, target_mob))
target_mob.balloon_alert(user, "interrupted!")
return TRUE
to_chat(target_mob, span_userdanger("[target_mob.is_blind() ? "You are forced to" : "[user] forces you to"] swallow a spoonful of something!"))
user.visible_message(
span_danger("[user] scoops a spoonful into [target_mob]'s mouth."),
span_notice("You scoop a spoonful into [target_mob]'s mouth.")
)
playsound(target_mob, 'sound/items/drink.ogg', rand(10,50), vary = TRUE)
reagents.trans_to(target_mob, spoon_sip_size, methods = INGEST)
return TRUE
/obj/item/kitchen/spoon/pre_attack(atom/attacked_atom, mob/living/user, list/modifiers, list/attack_modifiers)
. = ..()
if(.)
return
if(isliving(attacked_atom))
return
if(!attacked_atom.is_open_container())
return
if(reagents.total_volume <= 0)
return
var/amount_given = reagents.trans_to(attacked_atom, reagents.maximum_volume)
if(amount_given >= reagents.total_volume)
attacked_atom.balloon_alert(user, "spoon emptied")
else if(amount_given > 0)
attacked_atom.balloon_alert(user, "spoon partially emptied")
else
attacked_atom.balloon_alert(user, "it's full!")
return TRUE
/obj/item/kitchen/spoon/pre_attack_secondary(atom/attacked_atom, mob/living/user, list/modifiers, list/attack_modifiers)
. = ..()
if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN)
return
if(isliving(attacked_atom))
return SECONDARY_ATTACK_CALL_NORMAL
if(!attacked_atom.is_open_container())
return SECONDARY_ATTACK_CALL_NORMAL
if(reagents.total_volume >= reagents.maximum_volume || attacked_atom.reagents.total_volume <= 0)
return SECONDARY_ATTACK_CALL_NORMAL
if(attacked_atom.reagents.trans_to(src, reagents.maximum_volume))
attacked_atom.balloon_alert(user, "grabbed spoonful")
else
attacked_atom.balloon_alert(user, "spoon is full!")
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
/obj/item/kitchen/spoon/plastic
name = "plastic spoon"
icon_state = "plastic_spoon"
force = 0
custom_materials = list(/datum/material/plastic = SMALL_MATERIAL_AMOUNT * 1.2)
toolspeed = 75 // The plastic spoon takes 5 minutes to dig through a single mineral turf... It's one, continuous, breakable, do_after...
custom_price = PAYCHECK_LOWER * 1
/datum/armor/kitchen_spoon
fire = 50
acid = 30
/obj/item/kitchen/spoon/plastic/Initialize(mapload)
. = ..()
AddElement(/datum/element/easily_fragmented, PLASTIC_BREAK_PROBABILITY)
/obj/item/kitchen/spoon/soup_ladle
name = "ladle"
desc = "What is a ladle but a comically large spoon?"
icon_state = "ladle"
base_icon_state = "ladle"
inhand_icon_state = "spoon"
icon_angle = 90
custom_price = PAYCHECK_LOWER * 4
spoon_sip_size = 3 // just a taste
/obj/item/kitchen/spoon/soup_ladle/Initialize(mapload)
. = ..()
create_reagents(SOUP_SERVING_SIZE + 5, INJECTABLE|OPENCONTAINER)
#undef PLASTIC_BREAK_PROBABILITY