mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Armour can turn sharp attacks into blunt ones
Kind of messy, but I couldn't find another way to do it without reworking a lot of the mob defence procs.
This commit is contained in:
@@ -256,10 +256,16 @@ emp_act
|
||||
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 your [hit_area].", "Your armor has softened hit to your [hit_area].")
|
||||
var/weapon_sharp = is_sharp(I)
|
||||
var/weapon_edge = has_edge(I)
|
||||
if ((weapon_sharp || weapon_edge) && prob(getarmor(def_zone, "melee")))
|
||||
weapon_sharp = 0
|
||||
weapon_edge = 0
|
||||
|
||||
if(armor >= 2) return 0
|
||||
if(!I.force) return 0
|
||||
|
||||
apply_damage(I.force, I.damtype, affecting, armor , is_sharp(I), has_edge(I), I)
|
||||
apply_damage(I.force, I.damtype, affecting, armor , sharp=weapon_sharp, edge=weapon_edge, I)
|
||||
|
||||
var/bloody = 0
|
||||
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
|
||||
|
||||
@@ -54,8 +54,14 @@
|
||||
signaler.signal()
|
||||
*/
|
||||
var/absorb = run_armor_check(def_zone, P.flag)
|
||||
var/proj_sharp = is_sharp(P)
|
||||
var/proj_edge = has_edge(P)
|
||||
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.flag)))
|
||||
proj_sharp = 0
|
||||
proj_edge = 0
|
||||
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, 0, P, sharp=is_sharp(P), edge=has_edge(P))
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, 0, P, sharp=proj_sharp, edge=proj_edge)
|
||||
P.on_hit(src, absorb, def_zone)
|
||||
if(istype(P, /obj/item/projectile/beam/lightning))
|
||||
if(P.damage >= 200)
|
||||
|
||||
Reference in New Issue
Block a user