Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Compatibility patch for HIME Battle Action EXP with Yanfly Victory Aftermath
/* Insert this code under both yanfly's victory aftermath and HimeWorks Battle Action EXP to properly show level ups.
*/
var TH_VictoryAftermath_BattleManager_startBattle = BattleManager.startBattle;
BattleManager.startBattle = function() {
TH_VictoryAftermath_BattleManager_startBattle.call(this);
this.prepareBattleStartInfo();
}
BattleManager.prepareBattleStartInfo = function() {
$gameParty.allMembers().forEach(function(actor) {
actor._preVictoryExp = actor.currentExp();
actor._preVictoryLv = actor._level;
}, this);
}
BattleManager.prepareVictoryInfo = function() {
$gameParty.allMembers().forEach(function(actor) {
ImageManager.loadFace(actor.faceName());
actor._victoryPhase = true;
actor._victorySkills = [];
}, this);
this.gainRewards();
$gameParty.allMembers().forEach(function(actor) {
actor._expGained = actor.currentExp() - actor._preVictoryExp;
actor._postVictoryLv = actor._level;
}, this);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.