mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Implements projectile point blank damage multipliers for targets being grabbed.
This commit is contained in:
@@ -530,7 +530,7 @@
|
|||||||
del(G)
|
del(G)
|
||||||
if(GRAB_NECK)
|
if(GRAB_NECK)
|
||||||
//If the you move when grabbing someone then it's easier for them to break free. Same if the affected mob is immune to stun.
|
//If the you move when grabbing someone then it's easier for them to break free. Same if the affected mob is immune to stun.
|
||||||
if (((world.time - G.assailant.l_move_time < 20 || !L.stunned) && prob(15)) || prob(3))
|
if (((world.time - G.assailant.l_move_time < 30 || !L.stunned) && prob(15)) || prob(3))
|
||||||
L.visible_message("<span class='warning'>[L] has broken free of [G.assailant]'s headlock!</span>")
|
L.visible_message("<span class='warning'>[L] has broken free of [G.assailant]'s headlock!</span>")
|
||||||
del(G)
|
del(G)
|
||||||
if(resisting)
|
if(resisting)
|
||||||
|
|||||||
@@ -197,9 +197,22 @@
|
|||||||
x_offset = rand(-1,1)
|
x_offset = rand(-1,1)
|
||||||
|
|
||||||
//Point blank bonus
|
//Point blank bonus
|
||||||
if(pointblank) P.damage *= 1.3
|
if(pointblank)
|
||||||
|
var/damage_mult = 1.3 //default point blank multiplier
|
||||||
|
|
||||||
//TODO: accuracy modifiers
|
//determine multiplier due to the target being grabbed
|
||||||
|
if(ismob(target))
|
||||||
|
var/mob/M = target
|
||||||
|
if(M.grabbed_by.len)
|
||||||
|
var/grabstate = 0
|
||||||
|
for(var/obj/item/weapon/grab/G in M.grabbed_by)
|
||||||
|
grabstate = max(grabstate, G.state)
|
||||||
|
if(grabstate >= GRAB_NECK)
|
||||||
|
damage_mult = 1.5
|
||||||
|
else if (grabstate >= GRAB_AGGRESSIVE)
|
||||||
|
damage_mult = 3.0
|
||||||
|
|
||||||
|
P.damage *= damage_mult
|
||||||
|
|
||||||
if(params)
|
if(params)
|
||||||
P.set_clickpoint(params)
|
P.set_clickpoint(params)
|
||||||
|
|||||||
Reference in New Issue
Block a user