Rewrites shield handling

Rewrites shield handling to be less hardcoded.
Shields now take into account the damage source and direction when blocking.
Riot shields no longer block most bullets, but are better at blocking melee and thrown items than they were previously.
Energy shields block projectiles with a similar probability as they did before, and block melee and thrown as well as riot shields do.
Shields no longer block from directly behind the player.
Weapons now only block melee attacks.
Cool effects when blocking with an energy shield or energy sword (including holoswords).
This commit is contained in:
mwerezak
2015-07-11 18:14:16 -04:00
parent 3cf542e5f1
commit 0a751322e3
10 changed files with 180 additions and 102 deletions

View File

@@ -237,7 +237,7 @@
var/hit_area = affecting.name
if((user != target) && H.check_shields(7, "the [src.name]"))
if((user != target) && H.check_shields(7, src, user, "\the [src]"))
return
if (target != user && H.getarmor(target_zone, "melee") > 5 && prob(50))