mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 14:37:04 +01:00
Merge pull request #9546 from SamHPurp/oh-come-on,-who-throws-a-baton,-i-mean-really
Thrown Stunbatons have a low chance to stun
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
var/status = 0
|
||||
var/obj/item/stock_parts/cell/high/bcell = null
|
||||
var/hitcost = 1000
|
||||
var/throw_hit_chance = 35
|
||||
|
||||
/obj/item/melee/baton/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
@@ -28,6 +29,11 @@
|
||||
QDEL_NULL(bcell)
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/baton/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(status && prob(throw_hit_chance))
|
||||
baton_stun(hit_atom)
|
||||
|
||||
/obj/item/melee/baton/loaded/New() //this one starts with a cell pre-installed.
|
||||
..()
|
||||
bcell = new(src)
|
||||
@@ -138,15 +144,17 @@
|
||||
if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) //No message; check_shields() handles that
|
||||
playsound(L, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
return
|
||||
user.lastattacked = L
|
||||
L.lastattacker = user
|
||||
|
||||
L.Stun(stunforce)
|
||||
L.Weaken(stunforce)
|
||||
L.apply_effect(STUTTER, stunforce)
|
||||
|
||||
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
|
||||
if(user)
|
||||
user.lastattacked = L
|
||||
L.lastattacker = user
|
||||
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
|
||||
add_attack_logs(user, L, "stunned")
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
|
||||
if(isrobot(loc))
|
||||
@@ -160,8 +168,6 @@
|
||||
var/mob/living/carbon/human/H = L
|
||||
H.forcesay(hit_appends)
|
||||
|
||||
add_attack_logs(user, L, "Stunned with [src]")
|
||||
|
||||
/obj/item/melee/baton/emp_act(severity)
|
||||
if(bcell)
|
||||
deductcharge(1000 / severity)
|
||||
@@ -193,6 +199,7 @@
|
||||
throwforce = 5
|
||||
stunforce = 5
|
||||
hitcost = 2000
|
||||
throw_hit_chance = 10
|
||||
slot_flags = SLOT_BACK
|
||||
var/obj/item/assembly/igniter/sparkler = null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user