Merge pull request #12390 from KorPhaeron/AP2

Another slight tweak to armour penetration
This commit is contained in:
Razharas
2015-10-16 20:09:02 +03:00
2 changed files with 44 additions and 5 deletions
@@ -82,17 +82,20 @@ emp_act
/mob/living/carbon/human/proc/check_shields(damage = 0, attack_text = "the attack", atom/movable/AM, thrown_proj = 0, armour_penetration = 0)
var/block_chance = 50 + 30*thrown_proj - round(damage / 3) //thrown things are easier to block
block_chance -= armour_penetration
if(AM)
if(AM.flags & NOSHIELD) //weapon ignores shields altogether
return 0
var/blocker
if(l_hand)
if(l_hand.IsShield() && prob(block_chance))
blocker = l_hand
if(l_hand.IsShield())
block_chance -= Clamp((armour_penetration-l_hand.armour_penetration)/2,0,100) //So armour piercing blades can still be parried by other blades, for example
if(prob(block_chance))
blocker = l_hand
if(r_hand)
if(r_hand.IsShield() && prob(block_chance))
blocker = r_hand
if(r_hand.IsShield())
block_chance -= Clamp((armour_penetration-r_hand.armour_penetration)/2,0,100)
if(prob(block_chance))
blocker = r_hand
if(blocker)
visible_message("<span class='danger'>[src] blocks [attack_text] with [blocker]!</span>", \
"<span class='userdanger'>[src] blocks [attack_text] with [blocker]!</span>")
+36
View File
@@ -0,0 +1,36 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# spellcheck (typo fixes)
# experiment
# tgs (TG-ported fixes?)
#################################
# Your name.
author: Kor
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- tweak: "Weapons and projectiles that are armour piercing now have an increased chance to bypass riot shields."