Skip to content

Commit

Permalink
95%test (#794)
Browse files Browse the repository at this point in the history
* 95%test

* Update roguetownprocs.dm

* Update code/datums/components/crafting/crafting.dm

Co-authored-by: DimmaDunk <[email protected]>

---------

Co-authored-by: DimmaDunk <[email protected]>
  • Loading branch information
NPC1314 and ThePainkiller authored Sep 30, 2024
1 parent d7f041c commit cafa089
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
22 changes: 13 additions & 9 deletions code/datums/components/crafting/crafting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<span class='danger'>MISTAKE! I've failed to craft [R.name]!</span>")
continue
if(!prob(prob2craft))
if(user.client?.prefs.showrolls)
to_chat(user, "<span class='danger'>I've failed to craft [R.name]... [prob2craft]%</span>")
if(prob2craft < 1)
to_chat(user, "<span class='danger'>I lack the skills for this...</span>")
return
else
prob2craft = CLAMP(prob2craft, 5, 99)
if(prob(prob2fail))
to_chat(user, "<span class='danger'>MISTAKE! I've failed to craft [R.name]!</span>")
continue
if(!prob(prob2craft))
if(user.client?.prefs.showrolls)
to_chat(user, "<span class='danger'>I've failed to craft [R.name]. (Success chance: [prob2craft]%)</span>")
continue
to_chat(user, "<span class='danger'>I've failed to craft [R.name].</span>")
continue
to_chat(user, "<span class='danger'>I've failed to craft [R.name].</span>")
continue
var/list/parts = del_reqs(R, user)
if(islist(R.result))
var/list/L = R.result
Expand Down
10 changes: 7 additions & 3 deletions code/modules/mob/living/roguetownprocs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.8
prob2defend = clamp(prob2defend, 5, 95)
if(src.client?.prefs.showrolls)
to_chat(src, "<span class='info'>Roll to parry... [prob2defend]%</span>")

Expand Down Expand Up @@ -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.8
prob2defend = clamp(prob2defend, 5, 95)
if(client?.prefs.showrolls)
to_chat(src, "<span class='info'>Roll to dodge... [prob2defend]%</span>")
if(!prob(prob2defend))
Expand All @@ -419,7 +423,7 @@
else //we are a non human
if(client?.prefs.showrolls)
to_chat(src, "<span class='info'>Roll to dodge... [prob2defend]%</span>")
prob2defend = clamp(prob2defend, 5, 99)
prob2defend = clamp(prob2defend, 5, 95)
if(!prob(prob2defend))
return FALSE
dodgecd = TRUE
Expand Down

0 comments on commit cafa089

Please sign in to comment.