@Moogle_X
By the way. If someone is using this plugin, along with Equipment Learning plugin, they need to make sure this plugin is BELOW Equipment Learning.
Otherwise this function:
Moogle_X.TEB.Game_Actor_onBattleStart = Game_Actor.prototype.onBattleStart;
Game_Actor.prototype.onBattleStart = function() {
Moogle_X.TEB.Game_Actor_onBattleStart.call(this);
this.tebApplyInitBattleStateParty();
};
will cause issues with reported AP gains.
I am really still learning JS, but I think its because onBattleStart is normally a Game_Battler function. The Game_Actor version should invoke the derived class function normally, but for some reason it isn't.
This function... (from equipment learning)
Moogle_X.EQL.Game_Battler_onBattleStart = Game_Battler.prototype.onBattleStart;
Game_Battler.prototype.onBattleStart = function() {
Moogle_X.EQL.Game_Battler_onBattleStart.call(this);
this._eqlBattleAp = 0;
this._eqlNewSkill = [];
console.log("Moogle_X.EQL.Game_Battler_onBattleStart: " + this._eqlBattleAp);
};
Is being called as it should be.
But these functions... (from equipment learning)
Game_Actor.prototype.eqlGainAp = function(value) {
var total = value * this.eqlApBoost();
total = Math.round(total);
if ($gameParty.inBattle()) {
this._eqlBattleAp += total;
}
this.equips().forEach(function(eq) {
if (eq) {
eq.eqlSkill.forEach(function(skillId) {
if (!this._eqlAp[skillId]) this._eqlAp[skillId] = 0;
// Danger Zone (START)
if (!this.eqlCantLearnSkill($dataSkills[skillId])) {
this._eqlAp[skillId] += total; // Original code.
this.eqlCheckMastery(skillId); // Original code.
eval($dataSkills[skillId].eqlApGainEval);
}
// Danger Zone (END)
}, this);
}
}, this);
};
Game_Actor.prototype.eqlBattleAp = function() {
return this._eqlBattleAp;
};
Are iterating a the Game_Actor scope. Rather than the Game_Battler one. Which normally isn't an issue... Until Game_Actor gets its own onBattleStart function. For some reason, it breaks the aliasing...
Again... my best guess. 🙂
By the way. If someone is using this plugin, along with Equipment Learning plugin, they need to make sure this plugin is BELOW Equipment Learning.
Otherwise this function:
Moogle_X.TEB.Game_Actor_onBattleStart = Game_Actor.prototype.onBattleStart;
Game_Actor.prototype.onBattleStart = function() {
Moogle_X.TEB.Game_Actor_onBattleStart.call(this);
this.tebApplyInitBattleStateParty();
};
will cause issues with reported AP gains.
I am really still learning JS, but I think its because onBattleStart is normally a Game_Battler function. The Game_Actor version should invoke the derived class function normally, but for some reason it isn't.
This function... (from equipment learning)
Moogle_X.EQL.Game_Battler_onBattleStart = Game_Battler.prototype.onBattleStart;
Game_Battler.prototype.onBattleStart = function() {
Moogle_X.EQL.Game_Battler_onBattleStart.call(this);
this._eqlBattleAp = 0;
this._eqlNewSkill = [];
console.log("Moogle_X.EQL.Game_Battler_onBattleStart: " + this._eqlBattleAp);
};
Is being called as it should be.
But these functions... (from equipment learning)
Game_Actor.prototype.eqlGainAp = function(value) {
var total = value * this.eqlApBoost();
total = Math.round(total);
if ($gameParty.inBattle()) {
this._eqlBattleAp += total;
}
this.equips().forEach(function(eq) {
if (eq) {
eq.eqlSkill.forEach(function(skillId) {
if (!this._eqlAp[skillId]) this._eqlAp[skillId] = 0;
// Danger Zone (START)
if (!this.eqlCantLearnSkill($dataSkills[skillId])) {
this._eqlAp[skillId] += total; // Original code.
this.eqlCheckMastery(skillId); // Original code.
eval($dataSkills[skillId].eqlApGainEval);
}
// Danger Zone (END)
}, this);
}
}, this);
};
Game_Actor.prototype.eqlBattleAp = function() {
return this._eqlBattleAp;
};
Are iterating a the Game_Actor scope. Rather than the Game_Battler one. Which normally isn't an issue... Until Game_Actor gets its own onBattleStart function. For some reason, it breaks the aliasing...
Again... my best guess. 🙂