mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 10:34:10 +01:00
refactors most spans
This commit is contained in:
@@ -84,7 +84,7 @@ var/global/list/ashtray_cache = list()
|
||||
if (health > 0)
|
||||
health = max(0,health - 3)
|
||||
if (contents.len)
|
||||
src.visible_message("<span class='danger'>\The [src] slams into [hit_atom], spilling its contents!</span>")
|
||||
src.visible_message(span_danger("\The [src] slams into [hit_atom], spilling its contents!"))
|
||||
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
|
||||
O.loc = src.loc
|
||||
if (health < 1)
|
||||
|
||||
@@ -87,16 +87,16 @@
|
||||
else if(istype(A,/obj/machinery/portable_atmospherics/hydroponics))
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/Hyd = A
|
||||
if(Hyd.seed && !Hyd.dead)
|
||||
to_chat(user, "<span class='notice'>You shred the plant.</span>")
|
||||
to_chat(user, span_notice("You shred the plant."))
|
||||
Hyd.die()
|
||||
if (istype(A, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,A) <= 1)
|
||||
to_chat(user, "<span class='notice'>You begin filling the tank on the chainsaw.</span>")
|
||||
to_chat(user, span_notice("You begin filling the tank on the chainsaw."))
|
||||
if(do_after(usr, 15))
|
||||
A.reagents.trans_to_obj(src, max_fuel)
|
||||
playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
to_chat(user, "<span class='notice'>Chainsaw succesfully refueled.</span>")
|
||||
to_chat(user, span_notice("Chainsaw succesfully refueled."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Don't move while you're refilling the chainsaw.</span>")
|
||||
to_chat(user, span_notice("Don't move while you're refilling the chainsaw."))
|
||||
|
||||
/obj/item/chainsaw/process()
|
||||
if(!on) return
|
||||
|
||||
@@ -62,17 +62,17 @@
|
||||
return 0
|
||||
|
||||
if(locate(/obj/structure/gravemarker, user.loc))
|
||||
to_chat(user, "<span class='warning'>There's already something there.</span>")
|
||||
to_chat(user, span_warning("There's already something there."))
|
||||
return 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You begin to place \the [src.name].</span>")
|
||||
to_chat(user, span_notice("You begin to place \the [src.name]."))
|
||||
if(!do_after(usr, 10))
|
||||
return 0
|
||||
var/obj/structure/gravemarker/G = new /obj/structure/gravemarker/(user.loc, src.get_material())
|
||||
to_chat(user, "<span class='notice'>You place \the [src.name].</span>")
|
||||
to_chat(user, span_notice("You place \the [src.name]."))
|
||||
G.grave_name = grave_name
|
||||
G.epitaph = epitaph
|
||||
G.add_fingerprint(usr)
|
||||
G.dir = user.dir
|
||||
QDEL_NULL(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
if(food_inserted_micros)
|
||||
food_inserted_micros -= M
|
||||
M.forceMove(get_turf(src))
|
||||
to_chat(M, "<span class='warning'>You climb off of \the [src].</span>")
|
||||
to_chat(M, span_warning("You climb off of \the [src]."))
|
||||
|
||||
/obj/item/material/kitchen/utensil/fork
|
||||
name = "fork"
|
||||
@@ -184,7 +184,7 @@
|
||||
/* From the time of Clowns. Commented out for posterity, and sanity.
|
||||
/obj/item/material/knife/attack(target as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with \the [src].</span>")
|
||||
to_chat(user, span_warning("You accidentally cut yourself with \the [src]."))
|
||||
user.take_organ_damage(20)
|
||||
return
|
||||
return ..()
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
/obj/item/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "<span class='warning'>\The [src] slips out of your hand and hits your head.</span>")
|
||||
to_chat(user, span_warning("\The [src] slips out of your hand and hits your head."))
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(2)
|
||||
return
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
|
||||
if(user)
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>You flip out \the [src].</span>")
|
||||
to_chat(user, span_notice("You flip out \the [src]."))
|
||||
playsound(src, 'sound/weapons/flipblade.ogg', 15, 1)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src] can now be concealed.</span>")
|
||||
to_chat(user, span_notice("\The [src] can now be concealed."))
|
||||
add_fingerprint(user)
|
||||
|
||||
/*
|
||||
|
||||
@@ -91,7 +91,7 @@ Protectiveness | Armor %
|
||||
if(!material)
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
|
||||
T.visible_message(span_danger("\The [src] [material.destruction_desc]!"))
|
||||
if(istype(loc, /mob/living))
|
||||
var/mob/living/M = loc
|
||||
M.drop_from_inventory(src)
|
||||
@@ -108,11 +108,11 @@ Protectiveness | Armor %
|
||||
return ..()
|
||||
|
||||
if(material.negation && prob(material.negation)) // Strange and Alien materials, or just really strong materials.
|
||||
user.visible_message("<span class='danger'>\The [src] completely absorbs [attack_text]!</span>")
|
||||
user.visible_message(span_danger("\The [src] completely absorbs [attack_text]!"))
|
||||
return TRUE
|
||||
|
||||
if(material.spatial_instability && prob(material.spatial_instability))
|
||||
user.visible_message("<span class='danger'>\The [src] flashes [user] clear of [attack_text]!</span>")
|
||||
user.visible_message(span_danger("\The [src] flashes [user] clear of [attack_text]!"))
|
||||
var/list/turfs = new/list()
|
||||
for(var/turf/T in orange(round(material.spatial_instability / 10) + 1, user))
|
||||
if(istype(T,/turf/space)) continue
|
||||
@@ -144,7 +144,7 @@ Protectiveness | Armor %
|
||||
if(!(def_zone in list(BP_TORSO, BP_GROIN)))
|
||||
reflectchance /= 2
|
||||
if(P.starting && prob(reflectchance))
|
||||
visible_message("<span class='danger'>\The [user]'s [src.name] reflects [attack_text]!</span>")
|
||||
visible_message(span_danger("\The [user]'s [src.name] reflects [attack_text]!"))
|
||||
|
||||
// Find a turf near or on the original location to bounce to
|
||||
var/new_x = P.starting.x + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
@@ -296,23 +296,23 @@ Protectiveness | Armor %
|
||||
if(istype(O, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/S = O
|
||||
if(wired)
|
||||
to_chat(user, "<span class='warning'>This already has enough wires on it.</span>")
|
||||
to_chat(user, span_warning("This already has enough wires on it."))
|
||||
return
|
||||
if(S.use(20))
|
||||
to_chat(user, "<span class='notice'>You attach several wires to \the [src]. Now it needs another plate.</span>")
|
||||
to_chat(user, span_notice("You attach several wires to \the [src]. Now it needs another plate."))
|
||||
wired = TRUE
|
||||
icon_state = "[initial(icon_state)]_wired"
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more wire for that.</span>")
|
||||
to_chat(user, span_notice("You need more wire for that."))
|
||||
return
|
||||
if(istype(O, /obj/item/material/armor_plating))
|
||||
var/obj/item/material/armor_plating/second_plate = O
|
||||
if(!wired && !second_plate.wired)
|
||||
to_chat(user, "<span class='warning'>You need something to hold the two pieces of plating together.</span>")
|
||||
to_chat(user, span_warning("You need something to hold the two pieces of plating together."))
|
||||
return
|
||||
if(second_plate.material != src.material)
|
||||
to_chat(user, "<span class='warning'>Both plates need to be the same type of material.</span>")
|
||||
to_chat(user, span_warning("Both plates need to be the same type of material."))
|
||||
return
|
||||
user.drop_from_inventory(src)
|
||||
user.drop_from_inventory(second_plate)
|
||||
@@ -332,7 +332,7 @@ Protectiveness | Armor %
|
||||
var /obj/item/weldingtool/S = O.get_welder()
|
||||
if(S.remove_fuel(0,user))
|
||||
if(!src || !S.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You trim down the edges to size.</span>")
|
||||
to_chat(user, span_notice("You trim down the edges to size."))
|
||||
user.drop_from_inventory(src)
|
||||
var/obj/item/clothing/accessory/material/makeshift/light/new_armor = new(null, src.material.name)
|
||||
user.put_in_hands(new_armor)
|
||||
@@ -342,9 +342,9 @@ Protectiveness | Armor %
|
||||
if(istype(O, /obj/item/material/armor_plating/insert))
|
||||
var/obj/item/material/armor_plating/insert/second_plate = O
|
||||
if(second_plate.material != src.material)
|
||||
to_chat(user, "<span class='warning'>Both plates need to be the same type of material.</span>")
|
||||
to_chat(user, span_warning("Both plates need to be the same type of material."))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You bond the two plates together.</span>")
|
||||
to_chat(user, span_notice("You bond the two plates together."))
|
||||
user.drop_from_inventory(src)
|
||||
user.drop_from_inventory(second_plate)
|
||||
var/obj/item/clothing/accessory/material/makeshift/heavy/new_armor = new(null, src.material.name)
|
||||
@@ -354,7 +354,7 @@ Protectiveness | Armor %
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/tool/wirecutters))
|
||||
to_chat(user, "<span class='notice'>You split the plate down the middle, and joint it at the elbow.</span>")
|
||||
to_chat(user, span_notice("You split the plate down the middle, and joint it at the elbow."))
|
||||
user.drop_from_inventory(src)
|
||||
var/obj/item/clothing/accessory/material/makeshift/armguards/new_armor = new(null, src.material.name)
|
||||
user.put_in_hands(new_armor)
|
||||
@@ -365,7 +365,7 @@ Protectiveness | Armor %
|
||||
var/obj/item/stack/material/S = O
|
||||
if(S.material == get_material_by_name("leather"))
|
||||
if(S.use(2))
|
||||
to_chat(user, "<span class='notice'>You curve the plate inwards, and add a strap for adjustment.</span>")
|
||||
to_chat(user, span_notice("You curve the plate inwards, and add a strap for adjustment."))
|
||||
user.drop_from_inventory(src)
|
||||
var/obj/item/clothing/accessory/material/makeshift/legguards/new_armor = new(null, src.material.name)
|
||||
user.put_in_hands(new_armor)
|
||||
@@ -388,14 +388,14 @@ Protectiveness | Armor %
|
||||
if(istype(O, /obj/item/stack/material))
|
||||
var/obj/item/stack/material/S = O
|
||||
if(S.use(2))
|
||||
to_chat(user, "<span class='notice'>You apply some [S.material.use_name] to \the [src]. Hopefully it'll make the makeshift helmet stronger.</span>")
|
||||
to_chat(user, span_notice("You apply some [S.material.use_name] to \the [src]. Hopefully it'll make the makeshift helmet stronger."))
|
||||
var/obj/item/clothing/head/helmet/material/makeshift/helmet = new(null, S.material.name)
|
||||
user.put_in_hands(helmet)
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't have enough material to build a helmet!</span>")
|
||||
to_chat(user, span_warning("You don't have enough material to build a helmet!"))
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
/obj/item/material/proc/shatter(var/consumed)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
|
||||
T.visible_message(span_danger("\The [src] [material.destruction_desc]!"))
|
||||
if(istype(loc, /mob/living))
|
||||
var/mob/living/M = loc
|
||||
M.drop_from_inventory(src)
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
/obj/item/material/proc/dull()
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] goes dull!</span>")
|
||||
T.visible_message(span_danger("\The [src] goes dull!"))
|
||||
playsound(src, "shatter", 70, 1)
|
||||
dulled = 1
|
||||
if(is_sharp() || has_edge())
|
||||
@@ -134,9 +134,9 @@
|
||||
sharp = initial(sharp)
|
||||
edge = initial(edge)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] doesn't need repairs.</span>")
|
||||
to_chat(user, span_notice("[src] doesn't need repairs."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't repair \the [src].</span>")
|
||||
to_chat(user, span_warning("You can't repair \the [src]."))
|
||||
return
|
||||
|
||||
/obj/item/material/proc/sharpen(var/material, var/sharpen_time, var/kit, mob/living/M)
|
||||
|
||||
@@ -138,17 +138,17 @@
|
||||
if(istype(A, /atom/movable))
|
||||
var/atom/movable/AM = A
|
||||
if(AM.anchored)
|
||||
to_chat(user, "<span class='notice'>\The [AM] won't budge.</span>")
|
||||
to_chat(user, span_notice("\The [AM] won't budge."))
|
||||
return
|
||||
|
||||
else
|
||||
if(!istype(AM, /obj/item))
|
||||
user.visible_message("<span class='warning'>\The [AM] is pulled along by \the [src]!</span>")
|
||||
user.visible_message(span_warning("\The [AM] is pulled along by \the [src]!"))
|
||||
AM.Move(get_step(AM, get_dir(AM, src)))
|
||||
return
|
||||
|
||||
else
|
||||
user.visible_message("<span class='warning'>\The [AM] is snatched by \the [src]!</span>")
|
||||
user.visible_message(span_warning("\The [AM] is snatched by \the [src]!"))
|
||||
AM.throw_at(user, reach, 0.1, user)
|
||||
|
||||
/obj/item/material/whip/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
@@ -156,19 +156,19 @@
|
||||
switch(user.a_intent)
|
||||
if(I_HURT)
|
||||
if(prob(10) && istype(target, /mob/living/carbon/human) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND)))
|
||||
to_chat(target, "<span class='warning'>\The [src] rips at your hands!</span>")
|
||||
to_chat(target, span_warning("\The [src] rips at your hands!"))
|
||||
ranged_disarm(target)
|
||||
if(I_DISARM)
|
||||
if(prob(min(90, force * 3)) && istype(target, /mob/living/carbon/human) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND)))
|
||||
ranged_disarm(target)
|
||||
else
|
||||
target.visible_message("<span class='danger'>\The [src] sends \the [target] stumbling away.</span>")
|
||||
target.visible_message(span_danger("\The [src] sends \the [target] stumbling away."))
|
||||
target.Move(get_step(target,get_dir(user,target)))
|
||||
if(I_GRAB)
|
||||
var/turf/STurf = get_turf(target)
|
||||
spawn(2)
|
||||
playsound(STurf, 'sound/effects/snap.ogg', 60, 1)
|
||||
target.visible_message("<span class='critical'>\The [src] yanks \the [target] towards \the [user]!</span>")
|
||||
target.visible_message(span_critical("\The [src] yanks \the [target] towards \the [user]!"))
|
||||
target.throw_at(get_turf(get_step(user,get_dir(user,target))), 2, 1, src)
|
||||
|
||||
..()
|
||||
@@ -185,7 +185,7 @@
|
||||
turfs += T
|
||||
if(turfs.len)
|
||||
var/turf/target = pick(turfs)
|
||||
visible_message("<span class='danger'>[H]'s [W] goes off due to \the [src]!</span>")
|
||||
visible_message(span_danger("[H]'s [W] goes off due to \the [src]!"))
|
||||
return W.afterattack(target,H)
|
||||
|
||||
if(!(H.species.flags & NO_SLIP) && prob(10) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)))
|
||||
@@ -193,9 +193,9 @@
|
||||
H.apply_effect(3, WEAKEN, armor_check)
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
if(armor_check < 60)
|
||||
visible_message("<span class='danger'>\The [src] has tripped [H]!</span>")
|
||||
visible_message(span_danger("\The [src] has tripped [H]!"))
|
||||
else
|
||||
visible_message("<span class='warning'>\The [src] attempted to trip [H]!</span>")
|
||||
visible_message(span_warning("\The [src] attempted to trip [H]!"))
|
||||
return
|
||||
|
||||
else
|
||||
@@ -207,12 +207,12 @@
|
||||
for(var/obj/item/I in holding)
|
||||
if(I && prob(holding[I]))
|
||||
H.drop_from_inventory(I)
|
||||
visible_message("<span class='danger'>\The [src] has disarmed [H]!</span>")
|
||||
visible_message(span_danger("\The [src] has disarmed [H]!"))
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
/obj/item/material/whip/attack_self(mob/user)
|
||||
user.visible_message("<span class='warning'>\The [user] cracks \the [src]!</span>")
|
||||
user.visible_message(span_warning("\The [user] cracks \the [src]!"))
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, 1)
|
||||
|
||||
/obj/item/material/knife/machete/hatchet/stone
|
||||
|
||||
@@ -89,15 +89,15 @@
|
||||
break
|
||||
|
||||
if(user.gloves && !protected_hands)
|
||||
to_chat(user, "<span class='warning'>\The [src] partially cuts into your hand through your gloves as you hit \the [target]!</span>")
|
||||
to_chat(user, span_warning("\The [src] partially cuts into your hand through your gloves as you hit \the [target]!"))
|
||||
user.apply_damage(light_glove_d + will_break ? break_damage : 0, BRUTE, active_hand, 0, 0, src, src.sharp, src.edge) // Ternary to include break damage
|
||||
|
||||
else if(!user.gloves)
|
||||
to_chat(user, "<span class='warning'>\The [src] cuts into your hand as you hit \the [target]!</span>")
|
||||
to_chat(user, span_warning("\The [src] cuts into your hand as you hit \the [target]!"))
|
||||
user.apply_damage(no_glove_d + will_break ? break_damage : 0, BRUTE, active_hand, 0, 0, src, src.sharp, src.edge)
|
||||
|
||||
if(will_break && src.loc == user) // If it's not in our hand anymore
|
||||
user.visible_message("<span class='danger'>[user] hit \the [target] with \the [src], shattering it!</span>", "<span class='warning'>You shatter \the [src] in your hand!</span>")
|
||||
user.visible_message(span_danger("[user] hit \the [target] with \the [src], shattering it!"), span_warning("You shatter \the [src] in your hand!"))
|
||||
playsound(src, pick('sound/effects/Glassbr1.ogg', 'sound/effects/Glassbr2.ogg', 'sound/effects/Glassbr3.ogg'), 30, 1)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -125,7 +125,7 @@
|
||||
if(H.species.flags & NO_MINOR_CUT)
|
||||
return
|
||||
|
||||
to_chat(H, "<span class='danger'>You step on \the [src]!</span>")
|
||||
to_chat(H, span_danger("You step on \the [src]!"))
|
||||
|
||||
var/list/check = list("l_foot", "r_foot")
|
||||
while(check.len)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
/obj/item/material/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(unique_parry_check(user, attacker, damage_source) && prob(50))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
user.visible_message(span_danger("\The [user] parries [attack_text] with \the [src]!"))
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
/obj/item/material/sword/battleaxe/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(unique_parry_check(user, attacker, damage_source) && prob(10))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
user.visible_message(span_danger("\The [user] parries [attack_text] with \the [src]!"))
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
//Allow a small chance of parrying melee attacks when wielded - maybe generalize this to other weapons someday
|
||||
/obj/item/material/twohanded/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(wielded && default_parry_check(user, attacker, damage_source) && prob(15))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
user.visible_message(span_danger("\The [user] parries [attack_text] with \the [src]!"))
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
@@ -190,4 +190,4 @@
|
||||
attack_verb = list("cropped","spanked","swatted","smacked","peppered")
|
||||
|
||||
/obj/item/material/twohanded/spear/flint
|
||||
default_material = MAT_FLINT
|
||||
default_material = MAT_FLINT
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
/obj/item/material/twohanded/saber/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if (src.wielded == 1)
|
||||
if(unique_parry_check(user, attacker, damage_source) && prob(50))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
user.visible_message(span_danger("\The [user] parries [attack_text] with \the [src]!"))
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
@@ -69,7 +69,7 @@
|
||||
else
|
||||
parry_chance = base_parry_chance
|
||||
if(unique_parry_check(user, attacker, damage_source) && prob(parry_chance))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
user.visible_message(span_danger("\The [user] parries [attack_text] with \the [src]!"))
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
@@ -78,4 +78,4 @@
|
||||
. = ..()
|
||||
if(src.wielded == 1 && user.a_intent == I_DISARM && prob(stun_chance))
|
||||
target.Weaken(stun_duration)
|
||||
user.visible_message("<span class='danger'>\The [user] trips [target] with \the [src]!</span>")
|
||||
user.visible_message(span_danger("\The [user] trips [target] with \the [src]!"))
|
||||
|
||||
Reference in New Issue
Block a user