From 265b14849394d07b2b0f3a8135046950a0e12b9d Mon Sep 17 00:00:00 2001 From: FreezePhoenix <24441367+FreezePhoenix@users.noreply.github.com> Date: Sun, 10 Dec 2023 15:05:26 -0500 Subject: [PATCH] Update server.js to use condition tags --- node/server.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/node/server.js b/node/server.js index dbd3838..1a4f3a4 100644 --- a/node/server.js +++ b/node/server.js @@ -3413,12 +3413,7 @@ function complete_attack(attacker, target, info) { o_attack = attack = ceil(attack); if (info.conditions.includes("frozen") && !target.immune && target.hp > attack) { - if (Math.random() < target.fzresistance / 100.0) { - xy_emit(target, "ui", { type: "freeze_resist", id: target.id }); - } else { - add_condition(target, "frozen"); - disappearing_text(target.socket, target, "FREEZE!", { xy: 1, size: "huge", color: "freeze", nv: 1 }); //target.is_player&&"huge"||undefined - } + add_condition(target, "frozen"); } if (info.conditions.includes("burned") && !target.immune && target.hp > attack) { @@ -3434,13 +3429,9 @@ function complete_attack(attacker, target, info) { add_condition(target, "woven"); } - if ( - info.conditions.includes("stunned") && - target.hp > attack && - add_condition(target, "stunned", { duration: 2000 }) - ) { - disappearing_text(target.socket, target, "STUN!", { xy: 1, size: "huge", color: "stun", nv: 1 }); - } //target.is_player&&"huge"||undefined + if (info.conditions.includes("stunned") && target.hp > attack) { + add_condition(target, "stunned", { duration: 2000 }); + } if (info.procs && target.a.putrid) { add_condition(attacker, "poisoned");