diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm
index 3f8984ce1f0..dc85a82d195 100644
--- a/code/game/gamemodes/changeling/powers/mutations.dm
+++ b/code/game/gamemodes/changeling/powers/mutations.dm
@@ -230,9 +230,6 @@
remaining_uses--
return 1
-/obj/item/weapon/shield/changeling/IsReflect()
- return 0
-
/***************************************\
|*********SPACE SUIT + HELMET***********|
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 2121cae8c43..bd8064e8697 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -35,7 +35,6 @@
var/permeability_coefficient = 1 // for chemicals/diseases
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
- var/reflect_chance = 0 //This var dictates what % of a time an object will reflect an energy based weapon's shot
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/allowed = null //suit storage stuff.
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
@@ -537,8 +536,7 @@
return 0
/obj/item/proc/IsReflect(var/def_zone) //This proc determines if and at what% an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit
- if(prob(reflect_chance))
- return 1
+ return 0
/obj/item/proc/get_loc_turf()
var/atom/L = loc
diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm
index df5e78ebf5f..ed67d4f1634 100644
--- a/code/game/objects/items/weapons/twohanded.dm
+++ b/code/game/objects/items/weapons/twohanded.dm
@@ -225,10 +225,8 @@ obj/item/weapon/twohanded/
/obj/item/weapon/twohanded/dualsaber/update_icon()
if(wielded)
icon_state = "dualsaber[blade_color][wielded]"
- reflect_chance = 100
else
icon_state = "dualsaber0"
- reflect_chance = 0
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
..()
@@ -268,6 +266,10 @@ obj/item/weapon/twohanded/
..()
hitsound = "swing_hit"
+/obj/item/weapon/twohanded/dualsaber/IsReflect()
+ if(wielded)
+ return 1
+
/obj/item/weapon/twohanded/dualsaber/wield()
..()
hitsound = 'sound/weapons/blade1.ogg'
diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm
index 9c911e040b9..cc74c0f18a3 100644
--- a/code/modules/clothing/suits/armor.dm
+++ b/code/modules/clothing/suits/armor.dm
@@ -135,12 +135,11 @@
icon_state = "armor_reflec"
item_state = "armor_reflec"
blood_overlay_type = "armor"
- reflect_chance = 40
+ var/hit_reflect_chance = 40
armor = list(melee = 10, bullet = 10, laser = 80, energy = 50, bomb = 0, bio = 0, rad = 0)
siemens_coefficient = 0
/obj/item/clothing/suit/armor/laserproof/IsReflect(var/def_zone)
- var/hit_reflect_chance = reflect_chance
if(!(def_zone in list("chest", "groin"))) //If not shot where ablative is covering you, you don't get the reflection bonus!
hit_reflect_chance = 0
if (prob(hit_reflect_chance))
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 76941f757db..29714a01ee1 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -410,6 +410,8 @@
M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])")
src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
+ if(check_shields(damage, "the [M.name]"))
+ return 0
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor = run_armor_check(affecting, "melee")
@@ -417,7 +419,7 @@
var/obj/item/organ/external/affected = src.get_organ(dam_zone)
affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data
apply_damage(damage, BRUTE, affecting, armor, M.name)
- if(armor >= 2) return
+ updatehealth()
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob)
@@ -463,6 +465,8 @@
else
damage = rand(5, 25)
+ if(check_shields(damage, "the [M.name]"))
+ return 0
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 4d4c20e8d5c..5a09f4d2c69 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -32,8 +32,8 @@ emp_act
return -1 // complete projectile permutation
//Shields
- if(check_shields(P.damage, "the [P.name]"))
- P.on_hit(src, 2, def_zone)
+ if(check_shields(P.damage, "the [P.name]", P))
+ P.on_hit(src, 100, def_zone)
return 2
@@ -145,7 +145,7 @@ emp_act
return 1
return 0
-/mob/living/carbon/human/proc/check_reflect(var/def_zone) //Reflection checks for anything in your l_hand, r_hand, or wear_suit based on reflect_chance var of the object
+/mob/living/carbon/human/proc/check_reflect(var/def_zone) //Reflection checks for anything in your l_hand, r_hand, or wear_suit based on the reflection chance var of the object
if(wear_suit && istype(wear_suit, /obj/item/))
var/obj/item/I = wear_suit
if(I.IsReflect(def_zone) == 1)
@@ -160,21 +160,30 @@ emp_act
return 1
return 0
-/mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack")
+
+//End Here
+
+/mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack", var/obj/item/O)
+ if(O)
+ if(O.flags & NOSHIELD) //weapon ignores shields altogether
+ return 0
if(l_hand && istype(l_hand, /obj/item/weapon))//Current base is the prob(50-d/3)
var/obj/item/weapon/I = l_hand
if(I.IsShield() && (prob(50 - round(damage / 3))))
- visible_message("\red [src] blocks [attack_text] with the [l_hand.name]!")
+ visible_message("[src] blocks [attack_text] with [l_hand]!", \
+ "[src] blocks [attack_text] with [l_hand]!")
return 1
if(r_hand && istype(r_hand, /obj/item/weapon))
var/obj/item/weapon/I = r_hand
if(I.IsShield() && (prob(50 - round(damage / 3))))
- visible_message("\red [src] blocks [attack_text] with the [r_hand.name]!")
+ visible_message("[src] blocks [attack_text] with [r_hand]!", \
+ "[src] blocks [attack_text] with [r_hand]!")
return 1
if(wear_suit && istype(wear_suit, /obj/item/))
var/obj/item/I = wear_suit
if(I.IsShield() && (prob(50)))
- visible_message("\red The reactive teleport system flings [src] clear of [attack_text]!")
+ visible_message("The reactive teleport system flings [src] clear of [attack_text]!", \
+ "The reactive teleport system flings [src] clear of [attack_text]!")
var/list/turfs = new/list()
for(var/turf/T in orange(6, src))
if(istype(T,/turf/space)) continue
@@ -248,7 +257,7 @@ emp_act
if(user != src)
user.do_attack_animation(src)
- if(check_shields(I.force, "the [I.name]"))
+ if(check_shields(I.force, "the [I.name]", I))
return 0
if(istype(I,/obj/item/weapon/card/emag))
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 9dfe7d8d725..d6c4a282aea 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -40,10 +40,10 @@
/mob/living/proc/updatehealth()
if(status_flags & GODMODE)
- health = 100
+ health = maxHealth
stat = CONSCIOUS
- else
- health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss
+ return
+ health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss
//This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually