Skip to content

Instantly share code, notes, and snippets.

@HimeWorks
Created February 25, 2016 20:32
Show Gist options
  • Save HimeWorks/f1d0597829ddf7b7c855 to your computer and use it in GitHub Desktop.
Save HimeWorks/f1d0597829ddf7b7c855 to your computer and use it in GitHub Desktop.
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