Merge pull request #367 from Neerti/12/1/2015_armor_refactor

Refactors how armor works.
This commit is contained in:
Neerti
2015-12-01 04:32:30 -05:00
7 changed files with 114 additions and 52 deletions
+7 -8
View File
@@ -78,20 +78,19 @@
//armour
var/blocked = L.run_armor_check(target_zone, "melee")
if(blocked >= 2)
if(blocked >= 100)
return
if(!L.apply_damage(30, BRUTE, target_zone, blocked, used_weapon=src))
return 0
//trap the victim in place
if(!blocked)
set_dir(L.dir)
can_buckle = 1
buckle_mob(L)
L << "<span class='danger'>The steel jaws of \the [src] bite into you, trapping you in place!</span>"
deployed = 0
can_buckle = initial(can_buckle)
set_dir(L.dir)
can_buckle = 1
buckle_mob(L)
L << "<span class='danger'>The steel jaws of \the [src] bite into you, trapping you in place!</span>"
deployed = 0
can_buckle = initial(can_buckle)
/obj/item/weapon/beartrap/Crossed(AM as mob|obj)
if(deployed && isliving(AM))