Ports baystation armor system (#2954)

Ports Baystation12/Baystation12#12658

Changing how the calculation of armor works , instead of just being a check if it is protected fully, half or nothing. Making armor more reliable and less rng dependant.

Also, uranium meteors will irradiate nearby people when they explode.
This commit is contained in:
Alberyk
2017-07-15 10:24:03 -03:00
committed by skull132
parent 41e39f52d1
commit 2f949ecb45
52 changed files with 274 additions and 248 deletions
@@ -14,7 +14,7 @@
reagents.my_atom = src
/obj/item/projectile/bullet/chemdart/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null)
if(blocked < 2 && isliving(target))
if(blocked < 100 && isliving(target))
var/mob/living/L = target
if(L.can_inject(target_zone=def_zone))
reagents.trans_to_mob(L, reagent_amount, CHEM_BLOOD)
+5 -2
View File
@@ -75,7 +75,7 @@
//TODO: make it so this is called more reliably, instead of sometimes by bullet_act() and sometimes not
/obj/item/projectile/proc/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null)
if(blocked >= 2) return 0//Full block
if(blocked >= 100) return 0//Full block
if(!isliving(target)) return 0
if(isanimal(target)) return 0
var/mob/living/L = target
@@ -84,7 +84,10 @@
var/obj/item/organ/external/organ = H.get_organ(def_zone)
var/armor = H.getarmor_organ(organ, check_armour)
agony = max(0, agony - armor)
L.apply_effects(stun, weaken, paralyze, irradiate, stutter, eyeblur, drowsy, agony, incinerate, blocked) // add in AGONY!
L.apply_effects(stun, weaken, paralyze, 0, stutter, eyeblur, drowsy, agony, incinerate, blocked) // add in AGONY!
//radiation protection is handled separately from other armour types.
L.apply_effect(irradiate, IRRADIATE, L.getarmor(null, "rad"))
return 1
//called when the projectile stops flying because it collided with something
@@ -100,7 +100,7 @@
var/mob/living/carbon/human/H = M
if((H.species.flags & IS_PLANT) && (M.nutrition < 500))
if(prob(15))
M.apply_effect((rand(30,80)),IRRADIATE)
H.apply_effect((rand(30,80)),IRRADIATE,blocked = H.getarmor(null, "rad"))
M.Weaken(5)
for (var/mob/V in viewers(src))
V.show_message("<span class='warning'>[M] writhes in pain as \his vacuoles boil.</span>", 3, "<span class='warning'>You hear the crunching of leaves.</span>", 2)
@@ -185,17 +185,17 @@
check_armour = "energy"
embed = 0
damage_type = HALLOSS
/obj/item/projectile/magic/fireball
name = "fireball"
icon_state = "fireball"
damage = 20
damage_type = BURN
/obj/item/projectile/magic/fireball/on_impact(var/atom/A)
explosion(A, 0, 0, 4)
..()
/obj/item/projectile/magic/teleport //literaly bluespace crystal code, because i am lazy and it seems to work
name = "bolt of teleportation"
icon = 'icons/obj/projectiles.dmi'
@@ -209,6 +209,6 @@
if(isliving(hit_atom))
blink_mob(hit_atom)
return ..()
/obj/item/projectile/magic/teleport/proc/blink_mob(mob/living/L)
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')