Reducing overall lethality and nerfing lasers a bit. (#9691)

This commit is contained in:
Matt Atlas
2020-08-19 10:22:44 +02:00
committed by GitHub
parent 201e0fb694
commit 574ba1eb9b
9 changed files with 62 additions and 30 deletions

View File

@@ -296,7 +296,7 @@
if(prob(50))
emote("gasp")
else
emote("chokes!")
emote("choke")
message = "[prefix][jointext(words," ")]"

View File

@@ -19,25 +19,17 @@
var/armor = getarmor(def_zone, attack_flag)
if(armor_pen >= armor)
return 0 //effective_armor is going to be 0, fullblock is going to be 0, blocked is going to 0, let's save ourselves the trouble
return 0 //effective_armor is going to be 0
var/effective_armor = (armor - armor_pen)/100
var/fullblock = (effective_armor*effective_armor) * ARMOR_BLOCK_CHANCE_MULT
var/blocked = (armor - armor_pen)
if(fullblock >= 1 || prob(fullblock*100))
if(blocked >= 100)
if(absorb_text)
show_message("<span class='warning'>[absorb_text]</span>")
else
show_message("<span class='warning'>Your armor absorbs the blow!</span>")
return 100
//this makes it so that X armor blocks X% damage, when including the chance of hard block.
//I double checked and this formula will also ensure that a higher effective_armor
//will always result in higher (non-fullblock) damage absorption too, which is also a nice property
//In particular, blocked will increase from 0 to 50 as effective_armor increases from 0 to 0.999 (if it is 1 then we never get here because ofc)
//and the average damage absorption = (blocked/100)*(1-fullblock) + 1.0*(fullblock) = effective_armor
var/blocked = (effective_armor - fullblock)/(1 - fullblock)*100
if(blocked > 20)
//Should we show this every single time?
if(soften_text)