mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-01 15:22:35 -05:00
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:
@@ -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 scheme:</em>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user