Add "hyperfast" speed option to replays

This option is honestly a bit too fast to follow, but I guess it's
useful for people to preview how fast Blitz is.
This commit is contained in:
Guangcong Luo
2019-07-16 07:10:21 -04:00
parent 458a630426
commit 213dcbcc1f
3 changed files with 5 additions and 2 deletions

View File

@@ -81,7 +81,7 @@ $panels->start();
<div class="replay-controls-2">
<div class="chooser leftchooser speedchooser">
<em>Speed:</em>
<div><button value="fast">Fast</button><button value="normal" class="sel">Normal</button><button value="slow">Slow</button><button value="reallyslow">Really Slow</button></div>
<div><button value="hyperfast">Hyperfast</button> <button value="fast">Fast</button><button value="normal" class="sel">Normal</button><button value="slow">Slow</button><button value="reallyslow">Really Slow</button></div>
</div>
<div class="chooser colorchooser">
<em>Color&nbsp;scheme:</em>

View File

@@ -115,12 +115,14 @@ var ReplayPanel = Panels.StaticPanel.extend({
case 'speed':
var fadeTable = {
hyperfast: 40,
fast: 50,
normal: 300,
slow: 500,
reallyslow: 1000
};
var delayTable = {
hyperfast: 1,
fast: 1,
normal: 1,
slow: 1000,
@@ -128,6 +130,7 @@ var ReplayPanel = Panels.StaticPanel.extend({
};
this.battle.messageShownTime = delayTable[value];
this.battle.messageFadeTime = fadeTable[value];
this.battle.scene.updateAcceleration();
break;
}
},

View File

@@ -517,7 +517,7 @@ class BattleScene {
runMoveAnim(moveid: ID, participants: Pokemon[]) {
if (!this.animating) return;
let animEntry = BattleOtherAnims[moveid];
let animEntry = BattleMoveAnims[moveid];
if (this.acceleration >= 3) {
const targetsSelf = !participants[1] || participants[0] === participants[1];
const isSpecial = !targetsSelf && this.battle.dex.getMove(moveid).category === 'Special';