speedUp replay 24x

This commit is contained in:
oc 2019-06-04 20:55:38 +08:00
parent d0b8c2088f
commit ed15a703b0
4 changed files with 21 additions and 7 deletions

View File

@ -1858,6 +1858,11 @@ actions.prototype._keyUpSL = function (keycode) {
this._clickSL(this.LAST, this.LAST); this._clickSL(this.LAST, this.LAST);
return; return;
} }
if (keycode >= 48 && keycode <= 57) {
if (keycode == 48) keycode = 58;
core.ui.drawSLPanel((keycode - 49) * 1000 + 1);
return;
}
if (keycode == 13 || keycode == 32 || keycode == 67) { if (keycode == 13 || keycode == 32 || keycode == 67) {
if (offset == 0) if (offset == 0)
core.doSL("autoSave", core.status.event.id); core.doSL("autoSave", core.status.event.id);

View File

@ -570,6 +570,12 @@ control.prototype.setAutoHeroMove = function (steps) {
////// 设置行走的效果动画 ////// ////// 设置行走的效果动画 //////
control.prototype.setHeroMoveInterval = function (callback) { control.prototype.setHeroMoveInterval = function (callback) {
if (core.status.heroMoving > 0) return; if (core.status.heroMoving > 0) return;
if (core.status.replay.speed == 24) {
core.moveOneStep(core.nextX(), core.nextY());
if (callback) callback();
return;
}
core.status.heroMoving=1; core.status.heroMoving=1;
var toAdd = 1; var toAdd = 1;
@ -1346,6 +1352,7 @@ control.prototype._replay_error = function (action) {
} }
control.prototype.__replay_getTimeout = function () { control.prototype.__replay_getTimeout = function () {
if (core.status.replay.speed == 24) return 0;
return 750 / Math.max(1, core.status.replay.speed); return 750 / Math.max(1, core.status.replay.speed);
} }

View File

@ -434,7 +434,7 @@ events.prototype._openDoor_animate = function (id, x, y, callback) {
return; return;
} }
core.drawImage('event', core.material.images.animates, 32 * state, 32 * door, 32, 32, 32 * x, 32 * y, 32, 32); core.drawImage('event', core.material.images.animates, 32 * state, 32 * door, 32, 32, 32 * x, 32 * y, 32, 32);
}, speed / Math.max(core.status.replay.speed, 1)); }, core.status.replay.speed == 24 ? 1 : speed / Math.max(core.status.replay.speed, 1));
core.animateFrame.asyncId[animate] = true; core.animateFrame.asyncId[animate] = true;
} }
@ -1395,7 +1395,7 @@ events.prototype._action_choices = function (data, x, y, prefix) {
core.status.route.push("choices:" + index); core.status.route.push("choices:" + index);
core.insertAction(data.choices[index].action); core.insertAction(data.choices[index].action);
core.doAction(); core.doAction();
}, 750 / Math.max(1, core.status.replay.speed)) }, core.status.replay.speed == 24 ? 1 : 750 / Math.max(1, core.status.replay.speed))
} }
else { else {
core.control._replay_error(action); core.control._replay_error(action);
@ -1418,7 +1418,7 @@ events.prototype._action_confirm = function (data, x, y, prefix) {
if (index == 0) core.insertAction(data.yes); if (index == 0) core.insertAction(data.yes);
else core.insertAction(data.no); else core.insertAction(data.no);
core.doAction(); core.doAction();
}, 750 / Math.max(1, core.status.replay.speed)) }, core.status.replay.speed == 24 ? 1 : 750 / Math.max(1, core.status.replay.speed))
} }
else { else {
core.control._replay_error(action); core.control._replay_error(action);
@ -1986,7 +1986,7 @@ events.prototype.closeDoor = function (x, y, id, callback) {
} }
core.clearMap('event', 32 * x, 32 * y, 32, 32); core.clearMap('event', 32 * x, 32 * y, 32, 32);
core.drawImage('event', core.material.images.animates, 32 * (4-state), 32 * door, 32, 32, 32 * x, 32 * y, 32, 32); core.drawImage('event', core.material.images.animates, 32 * (4-state), 32 * door, 32, 32, 32 * x, 32 * y, 32, 32);
}, speed / Math.max(core.status.replay.speed, 1)); }, core.status.replay.speed == 24 ? 1 : speed / Math.max(core.status.replay.speed, 1));
core.animateFrame.asyncId[animate] = true; core.animateFrame.asyncId[animate] = true;
} }
@ -2194,7 +2194,7 @@ events.prototype.eventMoveHero = function(steps, time, callback) {
if (core.events._eventMoveHero_moving(++step, moveSteps)) if (core.events._eventMoveHero_moving(++step, moveSteps))
step = 0; step = 0;
} }
}, time / 8 / core.status.replay.speed); }, core.status.replay.speed == 24 ? 1 : time / 8 / core.status.replay.speed);
core.animateFrame.asyncId[animate] = true; core.animateFrame.asyncId[animate] = true;
} }

View File

@ -1229,8 +1229,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
if (enemyDamage != null && enemyDamage < value) if (enemyDamage != null && enemyDamage < value)
value = enemyDamage; value = enemyDamage;
} }
damage[loc] = (damage[loc] || 0) + value; if (value > 0) {
type[loc] = "夹击伤害"; damage[loc] = (damage[loc] || 0) + value;
type[loc] = "夹击伤害";
}
} }
} }
} }