dead-bunny/js/plugins/Nore_BattleLog.js
2025-01-12 01:21:39 -06:00

63 lines
1.7 KiB
JavaScript

var Nore;
(function (Nore) {
Window_BattleLog.prototype.startAction = function (subject, action, targets) {
$gameTemp.actionExecuted = true;
var item = action.item();
this.push("performActionStart", subject, action);
this.push("waitForMovement");
this.push("performAction", subject, action);
this.push("showAnimation", subject, targets.clone(), item.animationId);
this.displayAction(subject, item);
};
Window_BattleLog.prototype.updateWaitCount = function () {
if (this._waitCount > 0) {
this._waitCount -= this.isFastForward() ? 5 : 2;
if ($gameTemp.isAutoBattle()) {
this._waitCount -= 2;
}
if (this._waitCount < 0) {
this._waitCount = 0;
}
return true;
}
return false;
};
Window_BattleLog.prototype.messageSpeed = function () {
if (this.isFastForward()) {
return 0;
}
return 4;
};
Window_BattleLog.prototype.waitForEffect = function () {
if (this.isFastForward()) {
return;
}
this.setWaitMode("effect");
};
Window_BattleLog.prototype.showNormalAnimation = function (
targets,
animationId,
mirror
) {
if (this.isFastForward()) {
return;
}
var animation = $dataAnimations[animationId];
if (animation) {
$gameTemp.requestAnimation(targets, animationId, mirror);
}
};
Scene_Battle.prototype.updateBattleProcess = function () {
$gameTemp.actionExecuted = false;
var speed = 10;
if (this._logWindow && this._logWindow.isFastForward()) {
speed = 30;
}
for (var i = 0; i < speed; i++) {
BattleManager.update(this.isTimeActive());
if ($gameTemp.actionExecuted) {
break;
}
}
};
})(Nore || (Nore = {}));