mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Added embedded weapons and adjusted implant removal surgery to work with non-implants in organs.
This commit is contained in:
@@ -190,7 +190,9 @@
|
||||
zone = "head"
|
||||
return organs_by_name[zone]
|
||||
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
|
||||
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/obj/used_weapon = null)
|
||||
|
||||
//visible_message("Hit debug. [damage] | [damagetype] | [def_zone] | [blocked] | [sharp] | [used_weapon]")
|
||||
if((damagetype != BRUTE) && (damagetype != BURN))
|
||||
..(damage, damagetype, def_zone, blocked)
|
||||
return 1
|
||||
@@ -219,6 +221,15 @@
|
||||
UpdateDamageIcon()
|
||||
|
||||
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
|
||||
|
||||
updatehealth()
|
||||
|
||||
if(!organ) return
|
||||
if(!istype(used_weapon,/obj/item/weapon)) return
|
||||
|
||||
var/obj/item/weapon/W = used_weapon
|
||||
if(damage > 20 && (prob(damage/W.w_class) || sharp))
|
||||
W.loc = organ
|
||||
organ.implants += W
|
||||
visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
|
||||
W.add_blood(src)
|
||||
return 1
|
||||
|
||||
@@ -170,7 +170,7 @@ emp_act
|
||||
if(armor >= 2) return 0
|
||||
if(!I.force) return 0
|
||||
|
||||
apply_damage(I.force, I.damtype, affecting, armor , is_sharp(I), I.name)
|
||||
apply_damage(I.force, I.damtype, affecting, armor , is_sharp(I), I)
|
||||
|
||||
var/bloody = 0
|
||||
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
src.visible_message("\red [src] has been hit by [O].")
|
||||
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
|
||||
if(armor < 2)
|
||||
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, O)
|
||||
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, O.sharp, O)
|
||||
if(!O.fingerprintslast)
|
||||
return
|
||||
var/client/assailant = directory[ckey(O.fingerprintslast)]
|
||||
|
||||
@@ -163,19 +163,29 @@
|
||||
var/datum/organ/external/chest/affected = target.get_organ(target_zone)
|
||||
|
||||
var/find_prob = 0
|
||||
|
||||
if (affected.implants.len)
|
||||
var/obj/item/weapon/implant/imp = affected.implants[1]
|
||||
if (imp.islegal())
|
||||
find_prob +=60
|
||||
|
||||
var/obj/item/weapon/obj = affected.implants[1]
|
||||
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
if (imp.islegal())
|
||||
find_prob +=60
|
||||
else
|
||||
find_prob +=40
|
||||
else
|
||||
find_prob +=40
|
||||
find_prob +=50
|
||||
|
||||
if (prob(find_prob))
|
||||
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
|
||||
"\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." )
|
||||
affected.implants -= imp
|
||||
imp.loc = get_turf(target)
|
||||
imp.imp_in = null
|
||||
imp.implanted = 0
|
||||
affected.implants -= obj
|
||||
obj.loc = get_turf(target)
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
imp.imp_in = null
|
||||
imp.implanted = 0
|
||||
else if (affected.hidden)
|
||||
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
|
||||
"\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." )
|
||||
|
||||
Reference in New Issue
Block a user