diff --git a/code/defines/mob/living/carbon/alien_humanoid.dm b/code/defines/mob/living/carbon/alien_humanoid.dm
index 4c6ae07fbe3..87722cdbeac 100644
--- a/code/defines/mob/living/carbon/alien_humanoid.dm
+++ b/code/defines/mob/living/carbon/alien_humanoid.dm
@@ -9,6 +9,7 @@
var/icon/stand_icon = null
var/icon/lying_icon = null
+ var/icon/resting_icon = null
var/last_b_state = 1.0
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
index a812626b651..446f0686321 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
@@ -10,6 +10,7 @@
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers
src.stand_icon = new /icon('alien.dmi', "aliend_s")
src.lying_icon = new /icon('alien.dmi', "aliend_l")
+ src.resting_icon = new /icon('alien.dmi', "aliend_sleep")
src.icon = src.stand_icon
update_clothing()
src << "\blue Your icons have been generated!"
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
index 1f6ae9bead7..7c7e5eaedf6 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
@@ -9,6 +9,7 @@
src.verbs -= /mob/living/carbon/alien/humanoid/verb/corrode
src.stand_icon = new /icon('alien.dmi', "alienh_s")
src.lying_icon = new /icon('alien.dmi', "alienh_l")
+ src.resting_icon = new /icon('alien.dmi', "alienh_sleep")
src.icon = src.stand_icon
update_clothing()
src << "\blue Your icons have been generated!"
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
index 7bd9b41b9b5..ecc3b459e68 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
@@ -9,6 +9,7 @@
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
src.stand_icon = new /icon('alien.dmi', "aliens_s")
src.lying_icon = new /icon('alien.dmi', "aliens_l")
+ src.resting_icon = new /icon('alien.dmi', "aliens_sleep")
src.icon = src.stand_icon
update_clothing()
src << "\blue Your icons have been generated!"
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 8b261940cec..52e422c6285 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -10,6 +10,7 @@
if(!istype(src, /mob/living/carbon/alien/humanoid/queen))
stand_icon = new /icon('alien.dmi', "alien_s")
lying_icon = new /icon('alien.dmi', "alien_l")
+ resting_icon = new /icon('alien.dmi', "alienh_sleep")
icon = stand_icon
update_clothing()
src << "\blue Your icons have been generated!"
@@ -330,7 +331,10 @@
if (lying)
if(update_icon)
- icon = lying_icon
+ if(!resting)
+ icon = lying_icon
+ else
+ icon = resting_icon
overlays += body_lying
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 26b1d586016..add68fd664d 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -9,6 +9,31 @@ emp_act
*/
/mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone)
+
+ if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/armor/laserproof))
+ if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
+ var/reflectchance = 40 - round(P.damage/3)
+ if(!(def_zone in list("chest", "groin")))
+ reflectchance /= 2
+ if(prob(reflectchance))
+ visible_message("\red The [P.name] gets reflected by [src]'s [wear_suit.name]!")
+
+ // Find a turf near or on the original location to bounce to
+ if(P.starting)
+ var/new_x = P.starting.x + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
+ var/new_y = P.starting.y + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
+ var/turf/curloc = get_turf(src)
+
+ // redirect the projectile
+ P.original = locate(new_x, new_y, P.z)
+ P.starting = curloc
+ P.current = curloc
+ P.firer = src
+ P.yo = new_y - curloc.y
+ P.xo = new_x - curloc.x
+
+ return -1 // complete projectile permutation
+
if(check_shields(P.damage, "the [P.name]"))
P.on_hit(src, 2)
return 2
@@ -96,14 +121,17 @@ emp_act
var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
var/hit_area = affecting.display_name
+
+
+ if((user != src) && check_shields(I.force, "the [I.name]"))
+ return 0
+
if(!affecting.destroyed)
visible_message("\red [src] has been attacked in the [hit_area] with [I.name] by [user]!")
else
user << "What [affecting]?"
return
- if((user != src) && check_shields(I.force, "the [I.name]"))
- return 0
var/armor = run_armor_check(affecting, "melee", "Your armor has protected you from a hit to the [hit_area].", "Your armor has softened hit to your [hit_area].")
if(armor >= 2) return 0
if(!I.force) return 0
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 665012518a4..42fa63090f2 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -189,6 +189,7 @@
in_chamber.original = targloc
in_chamber.loc = get_turf(user)
+ in_chamber.starting = get_turf(user)
user.next_move = world.time + 4
in_chamber.silenced = silenced
in_chamber.current = curloc
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index 46f415ac515..ebfd27c4858 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -27,7 +27,8 @@
yo = null
xo = null
current = null
- turf/original = null
+ turf/original = null // the original turf clicked
+ turf/starting = null // the projectile's starting turf
p_x = 16
p_y = 16 // the pixel location of the tile that the player clicked. Default is the center
diff --git a/icons/mob/alien.dmi b/icons/mob/alien.dmi
index d3de781e6c7..1efa862fdc3 100644
Binary files a/icons/mob/alien.dmi and b/icons/mob/alien.dmi differ