do-disciplinary-committee-m.../www/js/plugins/MW_StatesLog.js
2025-05-08 10:05:03 -05:00

40 lines
No EOL
1.5 KiB
JavaScript

//=============================================================================
// MW_StatesLog.js
//=============================================================================
/*:
* @plugindesc YEP_BattleEngineCoreの不具合を修正します。
* @author 銀河
* @help
* 敵を倒した際に、戦闘不能のメッセージ2が正常に再生されない不具合を修正。
* 攻撃時に解除されるステートが設定されたまま敵を倒すと、倒れた時に解除メッセージが流れる不具合を修正
*
* @param characterName
* @text キャラクター名
* @desc 表示するキャラクター名を設定します。
* @default 彩羽
*/
(function() {
var parameters = PluginManager.parameters('MW_StatesLog');
var characterName = String(parameters['characterName'] || '彩羽');
var _Window_BattleLog_prototype_displayAffectedStatus = Window_BattleLog.prototype.displayAffectedStatus;
Window_BattleLog.prototype.displayAffectedStatus = function(target) {
if(target.hp <= 0){
this.push('popBaseLine');
this.push('pushBaseLine');
if(target._actorId > 0){
this.push('addText', "\\I[2537]\\C[18]"+ target.name() + $dataStates[1].message1);
}else{
this.push('addText', "\\I[2537]\\C[2]" + target.name() + $dataStates[1].message2);
}
}else if (target.result().isStatusAffected()) {
this.push('pushBaseLine');
this.displayChangedStates(target);
this.displayChangedBuffs(target);
this.push('waitForNewLine');
this.push('popBaseLine');
}
};
})();