From 2dacbefdf1022b1be5b18eb4868810ac7436d199 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Tue, 23 Apr 2024 12:41:56 -0400 Subject: [PATCH] Make pottery mould damage check work_skill --- code/modules/crafting/pottery/pottery_moulds.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/crafting/pottery/pottery_moulds.dm b/code/modules/crafting/pottery/pottery_moulds.dm index 3325957344c..07fd0155ffd 100644 --- a/code/modules/crafting/pottery/pottery_moulds.dm +++ b/code/modules/crafting/pottery/pottery_moulds.dm @@ -135,7 +135,10 @@ if(!squash_item()) physically_destroyed(src) else - take_damage(rand(10, 20)) + // At skill 1/5, damage it 3x more. At skill 2/5, damage it 1.5x more. + // At skill 3/5 deal base damage, at 4/5 deal 75% damage, and at max skill deal 60% damage. + var/damage_modifier = clamp(1 + (user.get_skill_value(work_skill) - SKILL_ADEPT) / (SKILL_MAX - SKILL_BASIC), 0.1, 3) + take_damage(rand(5, 10) / damage_modifier) /obj/item/chems/mould/proc/try_take_impression(mob/user, obj/item/thing)