mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Added shrapnel from projectile wounds and altered scanner readout.
This commit is contained in:
@@ -223,13 +223,20 @@
|
||||
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
|
||||
updatehealth()
|
||||
|
||||
//Embedded projectile code.
|
||||
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
|
||||
if(istype(used_weapon,/obj/item/weapon))
|
||||
var/obj/item/weapon/W = used_weapon
|
||||
if(damage > 20 && (prob(damage/W.w_class) || sharp)) //The larger it is, the harder it needs to hit to stick.
|
||||
W.loc = organ
|
||||
organ.implants += W
|
||||
visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
|
||||
W.add_blood(src)
|
||||
else if(istype(used_weapon,/obj/item/projectile)) //We don't want to use the actual projectile item, so we spawn some shrapnel.
|
||||
if(prob(50) && damagetype == BRUTE)
|
||||
var/obj/item/weapon/shard/shrapnel/S = new()
|
||||
S.loc = organ
|
||||
organ.implants += S
|
||||
visible_message("<span class='danger'>The projectile sticks in the wound!</span>")
|
||||
S.add_blood(src)
|
||||
return 1
|
||||
@@ -57,7 +57,7 @@
|
||||
P.on_hit(src,2)
|
||||
return 2
|
||||
if(!P.nodamage)
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, used_weapon = "Projectile([P.name])")
|
||||
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, absorb, 0, P)
|
||||
P.on_hit(src, absorb)
|
||||
return absorb
|
||||
|
||||
|
||||
Reference in New Issue
Block a user