Compatibility patch for HIME Battle Action EXP with Yanfly Victory Aftermath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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