From ca9456e522e754df43ab6cdf196bd64540d9bf4d Mon Sep 17 00:00:00 2001 From: NPC1314 Date: Wed, 25 Sep 2024 20:28:23 +0200 Subject: [PATCH 1/3] 95%test --- code/datums/components/crafting/crafting.dm | 22 ++++++++++++--------- code/modules/mob/living/roguetownprocs.dm | 10 +++++++--- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index 747e54714..d004b37bf 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -248,16 +248,20 @@ prob2fail += (10-L.STALUC) if(L.STAINT > 10) prob2craft += ((10-L.STAINT)*-1)*2 - prob2craft = CLAMP(prob2craft, 0, 99) - if(prob(prob2fail)) - to_chat(user, "MISTAKE! I've failed to craft [R.name]!") - continue - if(!prob(prob2craft)) - if(user.client?.prefs.showrolls) - to_chat(user, "I've failed to craft [R.name]... [prob2craft]%") + if(prob2craft < 1) + to_chat(user, "I lack the skills for this...") + return + else + prob2craft = CLAMP(prob2craft, 5, 99) + if(prob(prob2fail)) + to_chat(user, "MISTAKE! I've failed to craft [R.name]!") + continue + if(!prob(prob2craft)) + if(user.client?.prefs.showrolls) + to_chat(user, "I've failed to craft [R.name]... [prob2craft]%") + continue + to_chat(user, "I've failed to craft [R.name].") continue - to_chat(user, "I've failed to craft [R.name].") - continue var/list/parts = del_reqs(R, user) if(islist(R.result)) var/list/L = R.result diff --git a/code/modules/mob/living/roguetownprocs.dm b/code/modules/mob/living/roguetownprocs.dm index d1542df64..64c52479e 100644 --- a/code/modules/mob/living/roguetownprocs.dm +++ b/code/modules/mob/living/roguetownprocs.dm @@ -184,7 +184,9 @@ attacker_skill = U.mind.get_skill_level(/datum/skill/combat/unarmed) prob2defend -= (attacker_skill * 20) - prob2defend = clamp(prob2defend, 5, 99) + if(!(mobility_flags & MOBILITY_STAND)) // checks if laying down and applies 50% defense malus if so + prob2defend *= 0.5 + prob2defend = clamp(prob2defend, 5, 95) if(src.client?.prefs.showrolls) to_chat(src, "Roll to parry... [prob2defend]%") @@ -408,7 +410,9 @@ prob2defend = prob2defend - (UH.mind.get_skill_level(/datum/skill/combat/unarmed) * 10) if(H.mind) prob2defend = prob2defend + (H.mind.get_skill_level(/datum/skill/combat/unarmed) * 10) - prob2defend = clamp(prob2defend, 5, 99) + if(!(L.mobility_flags & MOBILITY_STAND)) // checks if laying down and applies 50% defense malus if so + prob2defend *= 0.5 + prob2defend = clamp(prob2defend, 5, 95) if(client?.prefs.showrolls) to_chat(src, "Roll to dodge... [prob2defend]%") if(!prob(prob2defend)) @@ -419,7 +423,7 @@ else //we are a non human if(client?.prefs.showrolls) to_chat(src, "Roll to dodge... [prob2defend]%") - prob2defend = clamp(prob2defend, 5, 99) + prob2defend = clamp(prob2defend, 5, 95) if(!prob(prob2defend)) return FALSE dodgecd = TRUE From cb71ad6213b783c8547f8970e14f44fbe6eeccb5 Mon Sep 17 00:00:00 2001 From: NPC1314 Date: Thu, 26 Sep 2024 09:12:23 +0200 Subject: [PATCH 2/3] Update roguetownprocs.dm --- code/modules/mob/living/roguetownprocs.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/roguetownprocs.dm b/code/modules/mob/living/roguetownprocs.dm index 64c52479e..9bbc38332 100644 --- a/code/modules/mob/living/roguetownprocs.dm +++ b/code/modules/mob/living/roguetownprocs.dm @@ -185,7 +185,7 @@ prob2defend -= (attacker_skill * 20) if(!(mobility_flags & MOBILITY_STAND)) // checks if laying down and applies 50% defense malus if so - prob2defend *= 0.5 + prob2defend *= 0.8 prob2defend = clamp(prob2defend, 5, 95) if(src.client?.prefs.showrolls) to_chat(src, "Roll to parry... [prob2defend]%") @@ -411,7 +411,7 @@ if(H.mind) prob2defend = prob2defend + (H.mind.get_skill_level(/datum/skill/combat/unarmed) * 10) if(!(L.mobility_flags & MOBILITY_STAND)) // checks if laying down and applies 50% defense malus if so - prob2defend *= 0.5 + prob2defend *= 0.8 prob2defend = clamp(prob2defend, 5, 95) if(client?.prefs.showrolls) to_chat(src, "Roll to dodge... [prob2defend]%") From 73a5cc697633e04f6a76cec6ec8936b9cf3deea8 Mon Sep 17 00:00:00 2001 From: NPC1314 <110836368+NPC1314@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:40:29 +0200 Subject: [PATCH 3/3] Update code/datums/components/crafting/crafting.dm Co-authored-by: DimmaDunk --- code/datums/components/crafting/crafting.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index d004b37bf..571b7c42e 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -258,7 +258,7 @@ continue if(!prob(prob2craft)) if(user.client?.prefs.showrolls) - to_chat(user, "I've failed to craft [R.name]... [prob2craft]%") + to_chat(user, "I've failed to craft [R.name]. (Success chance: [prob2craft]%)") continue to_chat(user, "I've failed to craft [R.name].") continue