mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Since people complained at me about not being able to shoot people in the face anymore due to my revolver nerf (also that point-blank shooting at people on the ground accomplishes fuckall since the bullet passes over them), I have made bullets and lasers and the like able to be aimed at places other than the chest. Much like in melee combat, aiming for a bodypart other than the chest is NOT a guarantee that you will hit said bodypart. Helmets protect against shots to the head, and armor protects against shots to whatever body parts the armor is coded to cover.
Also I made the revolver point-blank shot work on people on the ground. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1350 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
/datum/organ/external
|
||||
name = "external"
|
||||
var/icon_name = null
|
||||
var/body_part = null
|
||||
|
||||
var/damage_state = "00"
|
||||
var/brute_dam = 0
|
||||
@@ -18,56 +19,67 @@
|
||||
name = "chest"
|
||||
icon_name = "chest"
|
||||
max_damage = 150
|
||||
body_part = UPPER_TORSO
|
||||
|
||||
/datum/organ/external/groin
|
||||
name = "groin"
|
||||
icon_name = "groin"
|
||||
max_damage = 115
|
||||
body_part = LOWER_TORSO
|
||||
|
||||
/datum/organ/external/head
|
||||
name = "head"
|
||||
icon_name = "head"
|
||||
max_damage = 125
|
||||
body_part = HEAD
|
||||
|
||||
/datum/organ/external/l_arm
|
||||
name = "l arm"
|
||||
icon_name = "l_arm"
|
||||
max_damage = 75
|
||||
body_part = ARMS
|
||||
|
||||
/datum/organ/external/l_foot
|
||||
name = "l foot"
|
||||
icon_name = "l_foot"
|
||||
max_damage = 40
|
||||
body_part = FEET
|
||||
|
||||
/datum/organ/external/l_hand
|
||||
name = "l hand"
|
||||
icon_name = "l_hand"
|
||||
max_damage = 40
|
||||
body_part = HANDS
|
||||
|
||||
/datum/organ/external/l_leg
|
||||
name = "l leg"
|
||||
icon_name = "l_leg"
|
||||
max_damage = 75
|
||||
body_part = LEGS
|
||||
|
||||
/datum/organ/external/r_arm
|
||||
name = "r arm"
|
||||
icon_name = "r_arm"
|
||||
max_damage = 75
|
||||
body_part = ARMS
|
||||
|
||||
/datum/organ/external/r_foot
|
||||
name = "r foot"
|
||||
icon_name = "r_foot"
|
||||
max_damage = 40
|
||||
body_part = FEET
|
||||
|
||||
/datum/organ/external/r_hand
|
||||
name = "r hand"
|
||||
icon_name = "r_hand"
|
||||
max_damage = 40
|
||||
body_part = HANDS
|
||||
|
||||
/datum/organ/external/r_leg
|
||||
name = "r leg"
|
||||
icon_name = "r_leg"
|
||||
max_damage = 75
|
||||
body_part = LEGS
|
||||
|
||||
/datum/organ/internal
|
||||
name = "internal"
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
/obj/beam
|
||||
name = "beam"
|
||||
unacidable = 1//Just to be sure.
|
||||
var/def_zone
|
||||
|
||||
/obj/beam/a_laser
|
||||
name = "a laser"
|
||||
@@ -95,6 +96,7 @@
|
||||
anchored = 1.0
|
||||
flags = TABLEPASS
|
||||
|
||||
|
||||
/obj/bedsheetbin
|
||||
name = "linen bin"
|
||||
desc = "A bin for containing bedsheets."
|
||||
@@ -122,6 +124,7 @@
|
||||
var/current = null
|
||||
anchored = 1.0
|
||||
flags = TABLEPASS
|
||||
var/def_zone
|
||||
|
||||
/obj/bullet/weakbullet
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
life = 20
|
||||
|
||||
Bump(atom/A)
|
||||
A.bullet_act(PROJECTILE_PULSE)
|
||||
A.bullet_act(PROJECTILE_PULSE, src, def_zone)
|
||||
src.life -= 10
|
||||
return
|
||||
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
Bump(atom/A)
|
||||
spawn()
|
||||
if(A)
|
||||
A.bullet_act(PROJECTILE_PULSE)
|
||||
A.bullet_act(PROJECTILE_PULSE, src, def_zone)
|
||||
del(src)
|
||||
@@ -56,11 +56,12 @@ TELEPORT GUN
|
||||
if (!targloc || !istype(targloc, /turf) || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
user.bullet_act(PROJECTILE_PULSE)
|
||||
user.bullet_act(PROJECTILE_PULSE, src, user.get_organ_target())
|
||||
return
|
||||
|
||||
var/obj/beam/a_laser/A = new /obj/beam/a_laser/pulse_laser(user.loc)
|
||||
playsound(user, 'pulse.ogg', 50, 1)
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
@@ -152,7 +153,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/revolver/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag, pbs)
|
||||
/obj/item/weapon/gun/revolver/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
|
||||
if (flag)
|
||||
return
|
||||
if ((istype(user, /mob/living/carbon/monkey)) && ticker.mode != "monkey")
|
||||
@@ -164,12 +165,8 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
return
|
||||
playsound(user, 'Gunshot.ogg', 100, 1)
|
||||
src.bullets--
|
||||
if(!pbs)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red <B>[] fires a revolver at []!</B>", user, target), 1, "\red You hear a gunshot", 2)
|
||||
else
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red <B>[] has been shot point-blank by []!</B>", target, user), 1, "\red You hear a gunshot", 2)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red <B>[] fires a revolver at []!</B>", user, target), 1, "\red You hear a gunshot", 2)
|
||||
var/turf/T = user.loc
|
||||
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
|
||||
if ((!( U ) || !( T )))
|
||||
@@ -179,12 +176,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
if (U == T)
|
||||
user.bullet_act(PROJECTILE_BULLET)
|
||||
user.bullet_act(PROJECTILE_BULLET, src, user.get_organ_target())
|
||||
return
|
||||
var/obj/bullet/A = new /obj/bullet( user.loc )
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -195,41 +193,14 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/revolver/attack(mob/M as mob, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
// var/mob/living/carbon/human/H = M
|
||||
|
||||
// ******* Check
|
||||
|
||||
// if ((istype(H, /mob/living/carbon/human) && istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80)))
|
||||
// M << "\blue The helmet protects you from being hit hard in the head!"
|
||||
// return
|
||||
if ((user.a_intent == "hurt" && src.bullets > 0))
|
||||
// if (prob(20))
|
||||
// if (M.paralysis < 10)
|
||||
// M.paralysis = 10
|
||||
// else
|
||||
// if (M.weakened < 10)
|
||||
// M.weakened = 10
|
||||
// src.bullets--
|
||||
// src.force = 90
|
||||
// ..()
|
||||
// src.force = 24
|
||||
// if(M.stat != 2) M.stat = 1
|
||||
// for(var/mob/O in viewers(M, null))
|
||||
// if(O.client) O.show_message(text("\red <B>[] has been shot point-blank by []!</B>", M, user), 1, "\red You hear someone fall", 2)
|
||||
src.afterattack(M, user, 0, 1)
|
||||
playsound(user, 'Gunshot.ogg', 100, 1)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if(O.client) O.show_message(text("\red <B>[] has been shot point-blank by []!</B>", M, user), 1, "\red You hear a gunshot", 2)
|
||||
M.bullet_act(PROJECTILE_BULLET, src, user.get_organ_target())
|
||||
src.bullets--
|
||||
else
|
||||
// if (prob(50))
|
||||
// if (M.paralysis < 60)
|
||||
// M.paralysis = 60
|
||||
// else
|
||||
// if (M.weakened < 60)
|
||||
// M.weakened = 60
|
||||
// src.force = 24
|
||||
..()
|
||||
// if(M.stat != 2) M.stat = 1
|
||||
// for(var/mob/O in viewers(M, null))
|
||||
// if (O.client) O.show_message(text("\red <B>[] has been pistol whipped by []!</B>", M, user), 1, "\red You hear someone fall", 2)
|
||||
return
|
||||
|
||||
|
||||
@@ -334,16 +305,17 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
return
|
||||
if (U == T)
|
||||
if (src.shells[index] == 1 || shellsunlimited == 1)
|
||||
user.bullet_act(PROJECTILE_WEAKBULLET)
|
||||
user.bullet_act(PROJECTILE_WEAKBULLET, src, user.get_organ_target())
|
||||
else if (src.shells[index] == 2 || shellsunlimited == 2)
|
||||
user.bullet_act(PROJECTILE_BULLET)
|
||||
user.bullet_act(PROJECTILE_BULLET, src, user.get_organ_target())
|
||||
else if (src.shells[index] == 4 || shellsunlimited == 4)
|
||||
user.bullet_act(PROJECTILE_BOLT)
|
||||
user.bullet_act(PROJECTILE_BOLT, src, user.get_organ_target())
|
||||
return
|
||||
switch(shellsunlimited)
|
||||
if (1)
|
||||
var/obj/bullet/A = new /obj/bullet/weakbullet( user.loc )
|
||||
src.pumped = 0
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -356,6 +328,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if (2)
|
||||
var/obj/bullet/A = new /obj/bullet( user.loc )
|
||||
src.pumped = 0
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -372,6 +345,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if (4)
|
||||
var/obj/bullet/A = new /obj/bullet/cbbolt( user.loc )
|
||||
src.pumped = 0
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -387,6 +361,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
src.pumped = 0
|
||||
src.shells[index] = 0
|
||||
index--
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -401,6 +376,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
src.pumped = 0
|
||||
src.shells[index] = 0
|
||||
index--
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -421,6 +397,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
src.pumped = 0
|
||||
src.shells[index] = 0
|
||||
index--
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -493,12 +470,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
if (U == T)
|
||||
user.bullet_act(PROJECTILE_WEAKBULLET)
|
||||
user.bullet_act(PROJECTILE_WEAKBULLET, src, user.get_organ_target())
|
||||
return
|
||||
var/obj/bullet/weakbullet/A = new /obj/bullet/weakbullet( user.loc )
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -510,6 +488,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
|
||||
/obj/item/weapon/gun/detectiverevolver/attack(mob/M as mob, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
// var/mob/living/carbon/human/H = M
|
||||
var/detective = (istype(user:w_uniform, /obj/item/clothing/under/det) && istype(user:head, /obj/item/clothing/head/det_hat) && istype(user:wear_suit, /obj/item/clothing/suit/det_suit))
|
||||
|
||||
// ******* Check
|
||||
@@ -625,12 +604,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if(!istype(T, /turf))
|
||||
return
|
||||
if(U == T)
|
||||
user.bullet_act(PROJECTILE_LASER)
|
||||
user.bullet_act(PROJECTILE_LASER, src, user.get_organ_target())
|
||||
return
|
||||
if(!istype(U, /turf))
|
||||
return
|
||||
|
||||
var/obj/beam/a_laser/A = new /obj/beam/a_laser( user.loc )
|
||||
A.def_zone = user.get_organ_target()
|
||||
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
@@ -702,13 +682,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if(!istype(T, /turf))
|
||||
return
|
||||
if (U == T)
|
||||
user.bullet_act(PROJECTILE_TASER)
|
||||
user.bullet_act(PROJECTILE_TASER, src, user.get_organ_target())
|
||||
return
|
||||
if(!istype(U, /turf))
|
||||
return
|
||||
|
||||
var/obj/bullet/electrode/A = new /obj/bullet/electrode(user.loc)
|
||||
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -830,13 +810,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if(!istype(T, /turf))
|
||||
return
|
||||
if (U == T)
|
||||
user.bullet_act(PROJECTILE_BOLT)
|
||||
user.bullet_act(PROJECTILE_BOLT, src, user.get_organ_target())
|
||||
return
|
||||
if(!istype(U, /turf))
|
||||
return
|
||||
|
||||
var/obj/bullet/cbbolt/A = new /obj/bullet/cbbolt(user.loc)
|
||||
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -906,6 +886,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
return
|
||||
|
||||
var/obj/bullet/teleshot/A = new /obj/bullet/teleshot(user.loc)
|
||||
A.def_zone = user.get_organ_target()
|
||||
|
||||
A.target = src.target
|
||||
A.current = U
|
||||
@@ -1100,15 +1081,16 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
|
||||
if(mode == 1)
|
||||
if (targloc == curloc)
|
||||
user.bullet_act(PROJECTILE_LASER)
|
||||
user.bullet_act(PROJECTILE_LASER, src, user.get_organ_target())
|
||||
return
|
||||
else if(mode == 2)
|
||||
if (targloc == curloc)
|
||||
user.bullet_act(PROJECTILE_TASER)
|
||||
user.bullet_act(PROJECTILE_TASER, src, user.get_organ_target())
|
||||
return
|
||||
|
||||
if(mode == 1)
|
||||
var/obj/beam/a_laser/A = new /obj/beam/a_laser(user.loc)
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
@@ -1118,6 +1100,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
|
||||
else if(mode == 2)
|
||||
var/obj/bullet/electrode/A = new /obj/bullet/electrode(user.loc)
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
@@ -1239,12 +1222,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
if (U == T)
|
||||
user.bullet_act(PROJECTILE_BULLET)
|
||||
user.bullet_act(PROJECTILE_BULLET, src, user.get_organ_target())
|
||||
return
|
||||
var/obj/bullet/weakbullet/A = new /obj/bullet/weakbullet( user.loc )
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -1331,12 +1315,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
if (U == T)
|
||||
user.bullet_act(PROJECTILE_BULLET)
|
||||
user.bullet_act(PROJECTILE_BULLET, src, user.get_organ_target())
|
||||
return
|
||||
var/obj/bullet/weakbullet/A = new /obj/bullet/weakbullet( user.loc )
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -1428,12 +1413,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
if (U == T)
|
||||
user.bullet_act(PROJECTILE_WEAKBULLET)
|
||||
user.bullet_act(PROJECTILE_WEAKBULLET, src, user.get_organ_target())
|
||||
return
|
||||
var/obj/bullet/weakbullet/A = new /obj/bullet/weakbullet( user.loc )
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -1509,12 +1495,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
if (U == T)
|
||||
user.bullet_act(PROJECTILE_BULLET)
|
||||
user.bullet_act(PROJECTILE_BULLET, src, user.get_organ_target())
|
||||
return
|
||||
var/obj/bullet/A = new /obj/bullet( user.loc )
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -1592,12 +1579,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
if (U == T)
|
||||
user.bullet_act(PROJECTILE_WEAKBULLET)
|
||||
user.bullet_act(PROJECTILE_WEAKBULLET, src, user.get_organ_target())
|
||||
return
|
||||
var/obj/bullet/weakbullet/A = new /obj/bullet/weakbullet( user.loc )
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
@@ -1676,12 +1664,13 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
if (U == T)
|
||||
user.bullet_act(PROJECTILE_BULLET)
|
||||
user.bullet_act(PROJECTILE_BULLET, src, user.get_organ_target())
|
||||
return
|
||||
var/obj/bullet/A = new /obj/bullet( user.loc )
|
||||
if (!istype(U, /turf))
|
||||
del(A)
|
||||
return
|
||||
A.def_zone = user.get_organ_target()
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
|
||||
@@ -976,10 +976,10 @@
|
||||
/obj/bullet/Bump(atom/A as mob|obj|turf|area)
|
||||
spawn(0)
|
||||
if(A)
|
||||
A.bullet_act(PROJECTILE_BULLET, src)
|
||||
A.bullet_act(PROJECTILE_BULLET, src, def_zone)
|
||||
if(istype(A,/turf))
|
||||
for(var/obj/O in A)
|
||||
O.bullet_act(PROJECTILE_BULLET, src)
|
||||
O.bullet_act(PROJECTILE_BULLET, src, def_zone)
|
||||
|
||||
del(src)
|
||||
return
|
||||
@@ -998,7 +998,7 @@
|
||||
A.bullet_act(PROJECTILE_WEAKBULLET, src)
|
||||
if(istype(A,/turf))
|
||||
for(var/obj/O in A)
|
||||
O.bullet_act(PROJECTILE_WEAKBULLET, src)
|
||||
O.bullet_act(PROJECTILE_WEAKBULLET, src, def_zone)
|
||||
|
||||
del(src)
|
||||
return
|
||||
@@ -1009,7 +1009,7 @@
|
||||
A.bullet_act(PROJECTILE_TASER)
|
||||
if(istype(A,/turf))
|
||||
for(var/obj/O in A)
|
||||
O.bullet_act(PROJECTILE_TASER, src)
|
||||
O.bullet_act(PROJECTILE_TASER, src, def_zone)
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -1019,7 +1019,7 @@
|
||||
A.bullet_act(PROJECTILE_BOLT)
|
||||
if(istype(A,/turf))
|
||||
for(var/obj/O in A)
|
||||
O.bullet_act(PROJECTILE_BOLT, src)
|
||||
O.bullet_act(PROJECTILE_BOLT, src, def_zone)
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -1029,7 +1029,7 @@
|
||||
A.bullet_act(PROJECTILE_DART)
|
||||
if(istype(A,/turf))
|
||||
for(var/obj/O in A)
|
||||
O.bullet_act(PROJECTILE_DART, src)
|
||||
O.bullet_act(PROJECTILE_DART, src, def_zone)
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -1079,7 +1079,7 @@
|
||||
/obj/beam/a_laser/Bump(atom/A as mob|obj|turf)
|
||||
spawn(0)
|
||||
if(A)
|
||||
A.bullet_act(PROJECTILE_LASER, src)
|
||||
A.bullet_act(PROJECTILE_LASER, src, def_zone)
|
||||
del(src)
|
||||
|
||||
/obj/beam/a_laser/proc/process()
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
if(!istype(T, /turf))
|
||||
return
|
||||
if (U == T)
|
||||
usr.bullet_act(PROJECTILE_DART)
|
||||
usr.bullet_act(PROJECTILE_DART, src, src.get_organ_target())
|
||||
return
|
||||
if(!istype(U, /turf))
|
||||
return
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
stat("Chemical Storage", src.chem_charges)
|
||||
|
||||
|
||||
/mob/living/carbon/human/bullet_act(flag, A as obj)
|
||||
/mob/living/carbon/human/bullet_act(flag, A as obj, var/datum/organ/external/def_zone)
|
||||
var/shielded = 0
|
||||
for(var/obj/item/device/shield/S in src)
|
||||
if (S.active)
|
||||
@@ -202,6 +202,18 @@
|
||||
src << "\blue Your shield was disturbed by a laser!"
|
||||
if(src.paralysis <= 120) src.paralysis = 120
|
||||
src.updatehealth()
|
||||
|
||||
var/datum/organ/external/affecting
|
||||
if(!def_zone)
|
||||
var/organ = src.organs[ran_zone("chest")]
|
||||
if (istype(organ, /datum/organ/external))
|
||||
affecting = organ
|
||||
else
|
||||
affecting = src.organs["[def_zone]"]
|
||||
|
||||
if(!affecting)
|
||||
return
|
||||
|
||||
if (locate(/obj/item/weapon/grab, src))
|
||||
var/mob/safe = null
|
||||
if (istype(src.l_hand, /obj/item/weapon/grab))
|
||||
@@ -214,9 +226,19 @@
|
||||
safe = G.affecting
|
||||
if (safe)
|
||||
return safe.bullet_act(flag, A)
|
||||
|
||||
var/armored = 0
|
||||
if(affecting.name == "head")
|
||||
if(src.head && istype(src.head,/obj/item/clothing/head/helmet))
|
||||
armored = 1
|
||||
else
|
||||
if(src.wear_suit)
|
||||
if(affecting.body_part & src.wear_suit.body_parts_covered)
|
||||
armored = 1
|
||||
|
||||
if (flag == PROJECTILE_BULLET)
|
||||
var/d = 51
|
||||
if (istype(src.wear_suit, /obj/item/clothing/suit/armor))
|
||||
if (armored)
|
||||
if (prob(70))
|
||||
show_message("\red Your armor absorbs the hit!", 4)
|
||||
return
|
||||
@@ -260,17 +282,14 @@
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
if (src.stat != 2)
|
||||
var/organ = src.organs[ran_zone("chest")]
|
||||
if (istype(organ, /datum/organ/external))
|
||||
var/datum/organ/external/temp = organ
|
||||
temp.take_damage(d, 0)
|
||||
affecting.take_damage(d, 0)
|
||||
src.UpdateDamageIcon()
|
||||
src.updatehealth()
|
||||
if (prob(50))
|
||||
if(src.weakened <= 5) src.weakened = 5
|
||||
return
|
||||
else if (flag == PROJECTILE_TASER)
|
||||
if (istype(src.wear_suit, /obj/item/clothing/suit/armor))
|
||||
if (armored)
|
||||
if (prob(5))
|
||||
show_message("\red Your armor absorbs the hit!", 4)
|
||||
return
|
||||
@@ -294,7 +313,7 @@
|
||||
src.toxloss += 10
|
||||
else if(flag == PROJECTILE_LASER)
|
||||
var/d = 20
|
||||
if (istype(src.wear_suit, /obj/item/clothing/suit/armor))
|
||||
if (armored)
|
||||
if (prob(40))
|
||||
show_message("\red Your armor absorbs the hit!", 4)
|
||||
return
|
||||
@@ -320,10 +339,7 @@
|
||||
if (prob(25)) src.stunned++
|
||||
|
||||
if (src.stat != 2)
|
||||
var/organ = src.organs[ran_zone("chest")]
|
||||
if (istype(organ, /datum/organ/external))
|
||||
var/datum/organ/external/temp = organ
|
||||
temp.take_damage(d, 0)
|
||||
affecting.take_damage(0, d)
|
||||
src.UpdateDamageIcon()
|
||||
src.updatehealth()
|
||||
if (prob(25))
|
||||
@@ -352,10 +368,7 @@
|
||||
d = d / 2
|
||||
d = d / 2*/
|
||||
if (src.stat != 2)
|
||||
var/organ = src.organs[ran_zone("chest")]
|
||||
if (istype(organ, /datum/organ/external))
|
||||
var/datum/organ/external/temp = organ
|
||||
temp.take_damage(d, 0)
|
||||
affecting.take_damage(0, d)
|
||||
src.UpdateDamageIcon()
|
||||
src.updatehealth()
|
||||
if (prob(50))
|
||||
@@ -368,7 +381,7 @@
|
||||
src.drowsyness += 5
|
||||
else if(flag == PROJECTILE_WEAKBULLET)
|
||||
var/d = 14
|
||||
if (istype(src.wear_suit, /obj/item/clothing/suit/armor))
|
||||
if (armored)
|
||||
if (prob(70))
|
||||
show_message("\red Your armor absorbs the hit!", 4)
|
||||
return
|
||||
@@ -411,10 +424,7 @@
|
||||
d = d / 2
|
||||
d = d / 5
|
||||
if (src.stat != 2)
|
||||
var/organ = src.organs[ran_zone("chest")]
|
||||
if (istype(organ, /datum/organ/external))
|
||||
var/datum/organ/external/temp = organ
|
||||
temp.take_damage(d, 0)
|
||||
affecting.take_damage(d, 0)
|
||||
src.UpdateDamageIcon()
|
||||
src.updatehealth()
|
||||
if(src.weakened <= 5) src.weakened = 5
|
||||
|
||||
+10
-1
@@ -1694,7 +1694,8 @@
|
||||
return
|
||||
|
||||
/client/Northwest()
|
||||
src.mob.drop_item_v()
|
||||
if(!isrobot(src))
|
||||
src.mob.drop_item_v()
|
||||
return
|
||||
|
||||
/client/Center()
|
||||
@@ -2230,6 +2231,14 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
/mob/proc/get_organ_target()
|
||||
var/mob/shooter = src
|
||||
var/t = shooter:zone_sel.selecting
|
||||
if ((t in list( "eyes", "mouth" )))
|
||||
t = "head"
|
||||
var/datum/organ/external/def_zone = ran_zone(t)
|
||||
return def_zone
|
||||
|
||||
/mob/proc/heal_organ_damage(var/brute, var/burn)
|
||||
var/list/parts = list()
|
||||
for(var/A in src.organs)
|
||||
|
||||
+1
-1
@@ -4,6 +4,7 @@ sillazi - Game Master
|
||||
herpa - Game Master
|
||||
scaredofshadows - Game Master
|
||||
chicagoted - Game Master
|
||||
neofite - Game Master
|
||||
|
||||
mport2004 - Game Admin
|
||||
lj82 - Game Admin
|
||||
@@ -16,7 +17,6 @@ lastwish - Game Admin
|
||||
tashdurandel - Game Admin
|
||||
mario90900 - Game Admin
|
||||
atomictroop - Game Admin
|
||||
neofite - Game Admin
|
||||
fateweaver - Game Admin
|
||||
agouri - Game Admin
|
||||
errorage - Game Admin
|
||||
|
||||
Reference in New Issue
Block a user