As I recently discovered, if you and enemy both die in process of skill usage, game counts that as player loss. Is there a way to make it other way around?
How to make game assign victory to player, if both player and enemy falls to 0 HP?
RPG Maker MZ SupportBefore anyone else comes by, I just want to make sure you are intending to restore player HP after fights in a case like this. Because not accounting for this could lead to unintended outcomes.
Aside from that, it does make more sense the way the engine handles it from a logical perspective. You can't really say you won a fight if you died in the attempt too.
Aside from that, it does make more sense the way the engine handles it from a logical perspective. You can't really say you won a fight if you died in the attempt too.
I make game about utilizing self-damage, so in my case it seems straigh unfair. Also yeah, after and before every battle your HP refills to Max, so that's not an issue.
Does it work if you just change (with plugin) the 'checkBattleEnd' function by swapping the else if $gameParty.isAllDead() and else if $gameTroop.isAllDead() segments? (And remember to also remove death/add hp to your actors.)
Remove death would make player immortal, isn't it?
I mean before you transfer to the map scene, when your battlers are at 0hp at the battle end.
Yup, that worked. And it was not even that hard to make it work, thanks
BattleManager.checkBattleEnd = function() {
if (this._phase) {
if ($gameParty.isEscaped()) {
this.processPartyEscape();
return true;
} else if ($gameTroop.isAllDead()) {
$gameParty.members()[0].removeState(1);
$gameParty.members()[1].removeState(1);
this.processVictory();
return true;
} else if ($gameParty.isAllDead()) {
this.processDefeat();
return true;
}
}
return false;
};
BattleManager.checkBattleEnd = function() {
if (this._phase) {
if ($gameParty.isEscaped()) {
this.processPartyEscape();
return true;
} else if ($gameTroop.isAllDead()) {
$gameParty.members()[0].removeState(1);
$gameParty.members()[1].removeState(1);
this.processVictory();
return true;
} else if ($gameParty.isAllDead()) {
this.processDefeat();
return true;
}
}
return false;
};
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-game-assign-victory-to-player-if-both-player-and-enemy-falls-to-0-hp.164913/