Merge pull request #81 from FreezePhoenix/patch-8

Introduce tags for some debuffs
This commit is contained in:
Kaan Soral
2024-02-21 16:01:09 +03:00
committed by GitHub
4 changed files with 40 additions and 34 deletions
+4 -13
View File
@@ -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");