The bug: using YEP_BattleSysAtb skills are charging a chargeGauge before they are used. If that charge gauge is filled exactly when someone else casts an instant skill, the skill is cancelled(but still costs mana and full atbgauge), because the rpg maker engine can not process 2 actors/enemies attacking at the same time.
here is the fix
Yep_X_BattleSysATB line 6:
Yep_X_BattleSysATB line 1230:
YEP_InstantCast line 355:
YEP_InstantCast line 385:
here is the fix
Yep_X_BattleSysATB line 6:
Code:
var Imported = Imported || {};
Imported.YEP_X_BattleSysATB = true;
var Yanfly = Yanfly || {};
Yanfly.ATB = Yanfly.ATB || {};
Yanfly.ATB.version = 1.28;
var stopChargeSkill = false; // i did this i created this
Yep_X_BattleSysATB line 1230:
Code:
BattleManager.getChargedATBBattler = function() {
if ($gameParty.aliveMembers() <= 0 || $gameTroop.aliveMembers() <= 0) {
return false;
}
var fastest = false;
for (var i = 0; i < this.allBattleMembers().length; ++i) {
var battler = this.allBattleMembers()[i];
if (!battler) continue;
if (!this.isBattlerATBCharged(battler)) continue;
if (!fastest) {
fastest = battler;
} else if (battler.atbCharge() > fastest.atbCharge()) {
fastest = battler;
}
}
stopChargeSkill = false; //i did this i created this
return fastest;
};
BattleManager.isBattlerATBCharged = function(battler) {
if (stopChargeSkill) return false; // i did this i created this
if (!battler.isATBCharging()) return false;
if (battler.atbChargeRate() < 1) return false;
if (battler.isConfused()) {
battler.makeActions();
if (battler.isActor()) battler.makeConfusionActions();
}
return battler.currentAction() && battler.currentAction().item();
};
YEP_InstantCast line 355:
Code:
BattleManager.endActorInstantCast = function() {
if (Imported.YEP_BattleEngineCore && BattleManager.isDTB()) {
this._ignoreTurnOrderFirstIndex = false;
}
var user = this._subject;
user._selfTurnCount -= 1; // i did this i changed this
stopChargeSkill = true; //i did this i created this
if (Imported.YEP_BattleEngineCore) {
if (this._processingForcedAction) this._phase = this._preForcePhase;
this._processingForcedAction = false;
}
if (this.updateEventMain()) return;
Yanfly.Instant.BattleManager_endAction.call(this);
this._subject = user;
this._instantCasting = undefined;
user.makeActions();
if (this.checkBattleEnd()) return;
this._phase = 'input';
if (user.canMove() && user.canInput()) {
user.endInstantCast();
} else {
user.makeActions();
this.selectNextCommand();
}
this.refreshStatus();
if (Imported.YEP_BattleEngineCore && BattleManager.isDTB()) {
this._subject = undefined;
}
};
YEP_InstantCast line 385:
Code:
BattleManager.endEnemyInstantCastAction = function() {
var battler = this._subject;
if (!battler) return;
if (battler.isActor()) return;
var action = this._action;
if (!action) return;
var item = action.item();
if (!item) return;
if (battler.isInstantCast(item)) {
this.addInstantCastAction(battler);
battler._selfTurnCount -= 1; // i did this i changed this
stopChargeSkill = true; // i did this i created this
}
};