【解決済み】ダメージ0の際ポップアップを非表示にしたい
Posted: 2023年9月27日(水) 11:33
以下はダメージ0の場合ポップアップ表記がmissになるというコードなのですが、これをmissではなく非表示にすることは可能でしょうか?
(() => {
const _Game_Action_executeDamage = Game_Action.prototype.executeDamage;
Game_Action.prototype.executeDamage = function(target, value) {
if (value === 0) {
target.result().missed = true;
}
_Game_Action_executeDamage.call(this, target, value);
};
})();
複数のトピ立て申し訳ありません。
追記
一応解決できましたので、閉めさせていただきます。
以下のコードで通常は表記を非表示にできるようです。
(() => {
const _startDamagePopup = Game_Battler.prototype.startDamagePopup;
Game_Battler.prototype.startDamagePopup = function() {
const result = this._result;
if (result.hpAffected && result.hpDamage === 0) {
return;
}
_startDamagePopup.call(this);
};
})();
(() => {
const _Game_Action_executeDamage = Game_Action.prototype.executeDamage;
Game_Action.prototype.executeDamage = function(target, value) {
if (value === 0) {
target.result().missed = true;
}
_Game_Action_executeDamage.call(this, target, value);
};
})();
複数のトピ立て申し訳ありません。
追記
一応解決できましたので、閉めさせていただきます。
以下のコードで通常は表記を非表示にできるようです。
(() => {
const _startDamagePopup = Game_Battler.prototype.startDamagePopup;
Game_Battler.prototype.startDamagePopup = function() {
const result = this._result;
if (result.hpAffected && result.hpDamage === 0) {
return;
}
_startDamagePopup.call(this);
};
})();