Merge pull request #2655 from Anewbe/disarm_spam

Disarm spam is less effective
This commit is contained in:
Neerti
2016-10-24 19:34:07 -04:00
committed by GitHub
3 changed files with 42 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
var/list/hud_list[10]
var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us.
var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
var/last_push_time //For human_attackhand.dm, keeps track of the last use of disarm
/mob/living/carbon/human/New(var/new_loc, var/new_species = null)

View File

@@ -260,7 +260,12 @@
visible_message("<span class='danger'>[src]'s [W] goes off during the struggle!</span>")
return W.afterattack(target,src)
if(last_push_time + 30 > world.time)
visible_message("<span class='warning'>[M] has weakly pushed [src]!</span>")
return
var/randn = rand(1, 100)
last_push_time = world.time
if(!(species.flags & NO_SLIP) && randn <= 25)
var/armor_check = run_armor_check(affecting, "melee")
apply_effect(3, WEAKEN, armor_check)