Files
Bubberstation/code/game/objects/items/sharpener.dm
SkyratBot d355e433d7 [MIRROR] Execution/gunpoint shots work properly with pellet clouds, buffs piercing wounds a bit (#541)
* Execution/gunpoint shots work properly with pellet clouds, buffs piercing wounds a bit (#52995)

Made a few changes to gunpoints and some related mechanics while tidying up and adding docs. Here's a quick list

-Execution (point blank help intent shot aimed at the mouth) and gunpoint shots now apply their bonuses to every pellet fired rather than only the first, generally making them gushier. They also buff wound power as well as damage
-You can no longer punch yourself while holding someone up to trigger the charged shot
-You can no longer purposely fail executions and gunpoints with pax or whatever to endlessly spike the damage in a loaded round
-Attacks with extremely high wounding power can now outright dismember limbs regardless of mangled status. The threshold is high enough that it mostly applies for admin edited weapons or execution shots with shotguns (or people with the frail quirk!)
-Piercing wounds make further wounds a bit easier to apply to give them a bit more power
-Hellguns now cost 2250 credits instead of 2000 to make them a bit harder for random crew to get
-Adds special bouncy L6 rounds for admins to use to bounce off anything and everything en-masse

Also as a minor note

Projectiles with no trajectory (meaning they were likely spawned in manually) now qdel themselves on bumping something, rather than runtiming helplessly

* Execution/gunpoint shots work properly with pellet clouds, buffs piercing wounds a bit

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2020-08-27 03:14:47 +02:00

58 lines
2.3 KiB
Plaintext

/obj/item/sharpener
name = "whetstone"
icon = 'icons/obj/kitchen.dmi'
icon_state = "sharpener"
desc = "A block that makes things sharp."
force = 5
var/used = 0
var/increment = 4
var/max = 30
var/prefix = "sharpened"
var/requires_sharpness = 1
/obj/item/sharpener/attackby(obj/item/I, mob/user, params)
if(used)
to_chat(user, "<span class='warning'>The sharpening block is too worn to use again!</span>")
return
if(I.force >= max || I.throwforce >= max)//no esword sharpening
to_chat(user, "<span class='warning'>[I] is much too powerful to sharpen further!</span>")
return
if(requires_sharpness && !I.get_sharpness())
to_chat(user, "<span class='warning'>You can only sharpen items that are already sharp, such as knives!</span>")
return
if(is_type_in_list(I, list(/obj/item/melee/transforming/energy, /obj/item/dualsaber)))
to_chat(user, "<span class='warning'>You don't think \the [I] will be the thing getting modified if you use it on \the [src]!</span>")
return
var/signal_out = SEND_SIGNAL(I, COMSIG_ITEM_SHARPEN_ACT, increment, max)
if(signal_out & COMPONENT_BLOCK_SHARPEN_MAXED)
to_chat(user, "<span class='warning'>[I] is much too powerful to sharpen further!</span>")
return
if(signal_out & COMPONENT_BLOCK_SHARPEN_BLOCKED)
to_chat(user, "<span class='warning'>[I] is not able to be sharpened right now!</span>")
return
if((signal_out & COMPONENT_BLOCK_SHARPEN_ALREADY) || (I.force > initial(I.force) && !signal_out))
to_chat(user, "<span class='warning'>[I] has already been refined before. It cannot be sharpened further!</span>")
return
if(!(signal_out & COMPONENT_BLOCK_SHARPEN_APPLIED))
I.force = clamp(I.force + increment, 0, max)
I.wound_bonus = I.wound_bonus + increment
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
playsound(src, 'sound/items/unsheath.ogg', 25, TRUE)
I.sharpness = SHARP_EDGED
I.throwforce = clamp(I.throwforce + increment, 0, max)
I.name = "[prefix] [I.name]"
name = "worn out [name]"
desc = "[desc] At least, it used to."
used = 1
update_icon()
/obj/item/sharpener/super
name = "super whetstone"
desc = "A block that will make your weapon sharper than Einstein on adderall."
increment = 200
max = 200
prefix = "super-sharpened"
requires_sharpness = 0