Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Balances thievery around item weight class #1372

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 36 additions & 8 deletions code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
to_chat(src, span_warning("What am I going to steal from there?"))
return
mobsbehind |= cone(V, list(turn(V.dir, 180)), list(src))
if(mobsbehind.Find(src))
if(mobsbehind.Find(src) || V.eyesclosed || V.stat >= UNCONSCIOUS)
switch(U.zone_selected)
if("chest")
if (V.get_item_by_slot(SLOT_BACK_L))
Expand All @@ -408,18 +408,46 @@
if (V.get_item_by_slot(SLOT_BELT_R))
stealpos.Add(V.get_item_by_slot(SLOT_BELT_R))
if (V.get_item_by_slot(SLOT_BELT_L))
stealpos.Add(V.get_item_by_slot(SLOT_BELT_L))
stealpos.Add(V.get_item_by_slot(SLOT_BELT_L))
if("r_hand" || "l_hand")
if (V.get_item_by_slot(SLOT_RING))
stealpos.Add(V.get_item_by_slot(SLOT_RING))
if (length(stealpos) > 0)
var/obj/item/picked = pick(stealpos)
V.dropItemToGround(picked)
put_in_active_hand(picked)
to_chat(src, span_green("I stole [picked]!"))
V.log_message("has had \the [picked] stolen by [key_name(U)]", LOG_ATTACK, color="black")
U.log_message("has stolen \the [picked] from [key_name(V)]", LOG_ATTACK, color="black")
exp_to_gain *= src.mind.get_learning_boon(thiefskill)
if(V.stat >= UNCONSCIOUS)//If your victim is unconscious, you automatically succeed
V.dropItemToGround(picked)
put_in_active_hand(picked)
to_chat(src, span_green("I stole [picked]!"))
V.log_message("has had \the [picked] stolen by [key_name(U)]", LOG_ATTACK, color="black")
U.log_message("has stolen \the [picked] from [key_name(V)]", LOG_ATTACK, color="black")
exp_to_gain *= src.mind.get_learning_boon(thiefskill)
return
if(picked.w_class >= 3)
if(stealroll > (targetperception + (picked.w_class * 2)))//Law of averages puts 6d6 at between 17 and 25. Assuming a Perception of 10, the DC to steal bulky items is now 18.
V.dropItemToGround(picked)
put_in_active_hand(picked)
to_chat(src, span_green("I stole [picked]!"))
V.log_message("has had \the [picked] stolen by [key_name(U)]", LOG_ATTACK, color="black")
U.log_message("has stolen \the [picked] from [key_name(V)]", LOG_ATTACK, color="black")
exp_to_gain *= src.mind.get_learning_boon(thiefskill)
return
else
V.log_message("[key_name(U)] tried to steal my [picked.name]!", LOG_ATTACK, color="red")
U.log_message("has attempted to pickpocket [key_name(V)]!", LOG_ATTACK, color="red")
to_chat(src, span_danger("[picked.name] was too large to remove unnoticed!"))
else
if(stealroll > targetperception)//Small and Tiny items do not have a weight penalty
V.dropItemToGround(picked)
put_in_active_hand(picked)
to_chat(src, span_green("I stole [picked]!"))
V.log_message("has had \the [picked] stolen by [key_name(U)]", LOG_ATTACK, color="black")
U.log_message("has stolen \the [picked] from [key_name(V)]", LOG_ATTACK, color="black")
exp_to_gain *= src.mind.get_learning_boon(thiefskill)
return
else
V.log_message("[key_name(U)] tried to steal my [picked.name]!", LOG_ATTACK, color="red")
U.log_message("has attempted to pickpocket [key_name(V)]!", LOG_ATTACK, color="red")
to_chat(src, span_danger("[picked.name] was too large to remove unnoticed!"))
else
exp_to_gain /= 2 // these can be removed or changed on reviewer's discretion
to_chat(src, span_warning("I didn't find anything there. Perhaps I should look elsewhere."))
Expand Down
Loading