mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-25 14:40:14 -05:00
Update server.js to use condition tags
This commit is contained in:
+4
-13
@@ -3413,12 +3413,7 @@ function complete_attack(attacker, target, info) {
|
|||||||
o_attack = attack = ceil(attack);
|
o_attack = attack = ceil(attack);
|
||||||
|
|
||||||
if (info.conditions.includes("frozen") && !target.immune && target.hp > attack) {
|
if (info.conditions.includes("frozen") && !target.immune && target.hp > attack) {
|
||||||
if (Math.random() < target.fzresistance / 100.0) {
|
add_condition(target, "frozen");
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.conditions.includes("burned") && !target.immune && target.hp > attack) {
|
if (info.conditions.includes("burned") && !target.immune && target.hp > attack) {
|
||||||
@@ -3434,13 +3429,9 @@ function complete_attack(attacker, target, info) {
|
|||||||
add_condition(target, "woven");
|
add_condition(target, "woven");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (info.conditions.includes("stunned") && target.hp > attack) {
|
||||||
info.conditions.includes("stunned") &&
|
add_condition(target, "stunned", { duration: 2000 });
|
||||||
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.procs && target.a.putrid) {
|
if (info.procs && target.a.putrid) {
|
||||||
add_condition(attacker, "poisoned");
|
add_condition(attacker, "poisoned");
|
||||||
|
|||||||
Reference in New Issue
Block a user