mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 05:52:17 +00:00
Some work on aliens. I'll finish this up soon.
Gave riot shields a 99% chance of blocking pushers from pushing their wielders (given their wielder is not on the help intent). Added a projectile reflection mechanic. Ablative Armor will often, when the groin or torso is struck, deflect projectiles back to the tile they came from (not back the original shooter). Deflected projectiles aren't 100% accurate, so ablative armor can result in friendly fire. Hopefully stopped humans from waking up 1 second after they fall asleep. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3286 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -178,7 +178,7 @@ I kind of like the right click only--the window version can get a little confusi
|
||||
spawn(round(travel_time/2))//give sound warning to anyone near the target vent
|
||||
if(!target_vent.welded)
|
||||
for(var/mob/O in hearers(target_vent, null))
|
||||
O.show_message("You hear something crawling trough the ventilation pipes.",2)
|
||||
O.show_message("You hear something crawling through the ventilation pipes.",2)
|
||||
|
||||
spawn(travel_time)
|
||||
if(target_vent.welded)//the vent can be welded while alien scrolled through the list or travelled.
|
||||
|
||||
@@ -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!"
|
||||
|
||||
@@ -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!"
|
||||
|
||||
@@ -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!"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -148,6 +148,14 @@
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
|
||||
if(prob(99))
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
|
||||
if(prob(99))
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
@@ -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 = 80 - round(P.damage/3)
|
||||
if(!(def_zone in list("chest", "groin")))
|
||||
reflectchance /= 2
|
||||
if(prob(reflectchance))
|
||||
visible_message("\red <B>The [P.name] gets reflected by [src]'s [wear_suit.name]!</B>")
|
||||
|
||||
// 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
|
||||
@@ -49,12 +74,12 @@ emp_act
|
||||
/mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack")
|
||||
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))))
|
||||
if(I.IsShield() && (prob(70 - round(damage / 3))))
|
||||
visible_message("\red <B>[src] blocks [attack_text] with the [l_hand.name]!</B>")
|
||||
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))))
|
||||
if(I.IsShield() && (prob(70 - round(damage / 3))))
|
||||
visible_message("\red <B>[src] blocks [attack_text] with the [r_hand.name]!</B>")
|
||||
return 1
|
||||
if(wear_suit && istype(wear_suit, /obj/item/))
|
||||
@@ -88,10 +113,11 @@ emp_act
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
|
||||
var/hit_area = parse_zone(affecting.name)
|
||||
|
||||
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
|
||||
|
||||
if((user != src) && check_shields(I.force, "the [I.name]"))
|
||||
return 0
|
||||
|
||||
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
|
||||
|
||||
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
|
||||
|
||||
@@ -697,12 +697,14 @@
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
|
||||
if(sleeping)
|
||||
Paralyse(3)
|
||||
if(paralysis <= 0)
|
||||
Paralyse(2)
|
||||
if (prob(10) && health && !hal_crit) spawn(0) emote("snore")
|
||||
sleeping--
|
||||
//sleeping--
|
||||
|
||||
if(resting)
|
||||
Weaken(3)
|
||||
if(weakened <= 0)
|
||||
Weaken(2)
|
||||
|
||||
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
|
||||
death()
|
||||
|
||||
@@ -90,6 +90,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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user