Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions js/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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');
Expand Down Expand Up @@ -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;
Expand Down