Skip to content

Commit

Permalink
Merge pull request #111 from FreezePhoenix/patch-14
Browse files Browse the repository at this point in the history
Implement Fire Resistance Changes
  • Loading branch information
kaansoral authored Feb 29, 2024
2 parents 12db104 + cb755f5 commit 2f6b148
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions node/server_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2698,19 +2698,23 @@ function add_condition(target, condition, args) {
disappearing_text(target.socket, target, "FREEZE!", { xy: 1, size: "huge", color: "freeze", nv: 1 });
}
if (condition == "burned") {
let scale = 1.0 - (target.firesistance || 0) / 100.0;
duration = 5000;
if (!args.attack) {
args.attack = 1000;
}
if (args.divider == 3 && target.s.burned && target.s.burned.ms) {
duration = min(
12000,
max(duration + 400, min(8000, parseInt(duration / 4 + (50 * args.attack) / (target.s.burned.intensity + 200)))),
duration = parseInt(
scale *
min(
12000,
max(duration + 400, min(8000, duration / 4 + (50 * args.attack) / (target.s.burned.intensity + 200))),
),
);
}
C.intensity = max(
(target.s.burned && target.s.burned.intensity) || 1,
parseInt(((target.s.burned && target.s.burned.intensity) || 0) / (args.divider || 3) + args.attack),
parseInt((scale * ((target.s.burned && target.s.burned.intensity) || 0)) / (args.divider || 3) + args.attack),
);
C.fid = args.fid;
disappearing_text({}, target, "BURN!", { xy: 1, size: "huge", color: "burn", nv: 1 }); //target.is_player&&"huge"||undefined
Expand Down

0 comments on commit 2f6b148

Please sign in to comment.