- Joined
- Jul 19, 2021
- Messages
- 219
- Reaction score
- 327
- First Language
- ----
- Primarily Uses
- N/A
Here is the original method:
When this runs and the result is of everyone being dead, you'll see a message that the party was defeated, yadda yadda, and then the screen fades and the game is closed(in the case of battle testing).
However when it's aliased, the process is sped up and you don't even see the defeat message before the game is closed. It doesn't matter if nothing else is added in the function body and just allow the game to run the original code:
I want to know how to have it end the battle at its original pace(if that makes sense) and yes I need to change the behavior of that method, preferably not having to rewrite the method.
JavaScript:
BattleManager.checkBattleEnd = function() {
if (this._phase) {
if (this.checkAbort()) {
return true;
} else if ($gameParty.isAllDead()) {
this.processDefeat();
return true;
} else if ($gameTroop.isAllDead()) {
this.processVictory();
return true;
}
}
return false;
};
However when it's aliased, the process is sped up and you don't even see the defeat message before the game is closed. It doesn't matter if nothing else is added in the function body and just allow the game to run the original code:
JavaScript:
(function(alias) {
BattleManager.checkBattleEnd = function() {
alias.apply(this);
};
})(BattleManager.checkBattleEnd);
I want to know how to have it end the battle at its original pace(if that makes sense) and yes I need to change the behavior of that method, preferably not having to rewrite the method.