From a48869e44f743de314da0ae3a71b293ddc456383 Mon Sep 17 00:00:00 2001 From: Lawgikill Date: Tue, 6 Jan 2026 22:41:40 -0500 Subject: [PATCH] Fix flying items freeze/slow display: halve duration at application instead of 2x countdown speed --- js/Item.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/js/Item.js b/js/Item.js index 74f0331..a4cae80 100644 --- a/js/Item.js +++ b/js/Item.js @@ -743,6 +743,10 @@ export class Item { } applySlow(duration) { + // Flying items are affected by Slow for half as long + if(this.flying) { + duration = duration / 2; + } this.slowTimeRemaining += duration * 1000; this.isSlowed = 1; this.board.hasSlowedItem = 1; @@ -805,7 +809,7 @@ export class Item { { if (this.slowTimeRemaining > 0) { if(!this.hasteTimeRemaining>0)effectiveTimeDiff *= 0.5; // slow multiplier - this.slowTimeRemaining -= timeDiff * (this.flying?2:1); + this.slowTimeRemaining -= timeDiff; if(this.slowTimeRemaining <= 0) { this.slowTimeRemaining = 0; this.isSlowed = 0; @@ -822,7 +826,7 @@ export class Item { updateBattle(timeDiff) { if(this.freezeTimeRemaining > 0) { - this.freezeTimeRemaining -= timeDiff * (this.flying?2:1); + this.freezeTimeRemaining -= timeDiff; if(this.freezeTimeRemaining > 0) { this.element.classList.add('frozen'); this.freezeElement.classList.remove('hidden'); @@ -995,6 +999,10 @@ export class Item { if(source!=null) { return source.applyFreezeTo(this,duration);} if(this.enchant=='Radiant') return; if(this.isDestroyed) return; + // Flying items are affected by Freeze for half as long + if(this.flying) { + duration = duration / 2; + } this.freezeTimeRemaining += duration*1000; this.board.hasFrozenItem = 1; this.isFrozen = 1;