mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:27 -05:00
Merge pull request #111 from FreezePhoenix/patch-14
Implement Fire Resistance Changes
This commit is contained in:
@@ -2698,19 +2698,23 @@ function add_condition(target, condition, args) {
|
|||||||
disappearing_text(target.socket, target, "FREEZE!", { xy: 1, size: "huge", color: "freeze", nv: 1 });
|
disappearing_text(target.socket, target, "FREEZE!", { xy: 1, size: "huge", color: "freeze", nv: 1 });
|
||||||
}
|
}
|
||||||
if (condition == "burned") {
|
if (condition == "burned") {
|
||||||
|
let scale = 1.0 - (target.firesistance || 0) / 100.0;
|
||||||
duration = 5000;
|
duration = 5000;
|
||||||
if (!args.attack) {
|
if (!args.attack) {
|
||||||
args.attack = 1000;
|
args.attack = 1000;
|
||||||
}
|
}
|
||||||
if (args.divider == 3 && target.s.burned && target.s.burned.ms) {
|
if (args.divider == 3 && target.s.burned && target.s.burned.ms) {
|
||||||
duration = min(
|
duration = parseInt(
|
||||||
12000,
|
scale *
|
||||||
max(duration + 400, min(8000, parseInt(duration / 4 + (50 * args.attack) / (target.s.burned.intensity + 200)))),
|
min(
|
||||||
|
12000,
|
||||||
|
max(duration + 400, min(8000, duration / 4 + (50 * args.attack) / (target.s.burned.intensity + 200))),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
C.intensity = max(
|
C.intensity = max(
|
||||||
(target.s.burned && target.s.burned.intensity) || 1,
|
(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;
|
C.fid = args.fid;
|
||||||
disappearing_text({}, target, "BURN!", { xy: 1, size: "huge", color: "burn", nv: 1 }); //target.is_player&&"huge"||undefined
|
disappearing_text({}, target, "BURN!", { xy: 1, size: "huge", color: "burn", nv: 1 }); //target.is_player&&"huge"||undefined
|
||||||
|
|||||||
Reference in New Issue
Block a user