mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Implements projectile point blank damage multipliers for targets being grabbed.
This commit is contained in:
@@ -530,7 +530,7 @@
|
||||
del(G)
|
||||
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 (((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>")
|
||||
del(G)
|
||||
if(resisting)
|
||||
|
||||
@@ -197,9 +197,22 @@
|
||||
x_offset = rand(-1,1)
|
||||
|
||||
//Point blank bonus
|
||||
if(pointblank) P.damage *= 1.3
|
||||
|
||||
//TODO: accuracy modifiers
|
||||
if(pointblank)
|
||||
var/damage_mult = 1.3 //default point blank multiplier
|
||||
|
||||
//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)
|
||||
P.set_clickpoint(params)
|
||||
|
||||
Reference in New Issue
Block a user