Implements projectile point blank damage multipliers for targets being grabbed.

This commit is contained in:
mwerezak
2015-03-14 00:41:55 -04:00
parent 6a5dd6c89e
commit 812ff9869d
2 changed files with 17 additions and 4 deletions

View File

@@ -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)

View File

@@ -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)