There's this piece of code in the battle manager that handles event checking and battle end checking.
In fact this is pretty much where all the action takes place:
BattleManager.updateEventMain = function() { $gameTroop.updateInterpreter(); $gameParty.requestMotionRefresh(); if ($gameTroop.isEventRunning() || this.checkBattleEnd()) { return true; } $gameTroop.setupBattleEvent(); if ($gameTroop.isEventRunning() || SceneManager.isSceneChanging()) { return true; } return false;};My understanding of the code is that these are the priorities1. Whether an event is already running
2. Whether the battle can be ended now (victory, defeat, escape, etc)
3. Whether there's an event to run
The first one makes sense: you probably don't want two events running at the same time in battle.
But then the second one is a bit strange. Is there a good reason why event checking should be done AFTER we've determined that the battle will still go on?
This is pretty much the reason why events that should run when the last enemy dies, do not run.
In fact this is pretty much where all the action takes place:
BattleManager.updateEventMain = function() { $gameTroop.updateInterpreter(); $gameParty.requestMotionRefresh(); if ($gameTroop.isEventRunning() || this.checkBattleEnd()) { return true; } $gameTroop.setupBattleEvent(); if ($gameTroop.isEventRunning() || SceneManager.isSceneChanging()) { return true; } return false;};My understanding of the code is that these are the priorities1. Whether an event is already running
2. Whether the battle can be ended now (victory, defeat, escape, etc)
3. Whether there's an event to run
The first one makes sense: you probably don't want two events running at the same time in battle.
But then the second one is a bit strange. Is there a good reason why event checking should be done AFTER we've determined that the battle will still go on?
This is pretty much the reason why events that should run when the last enemy dies, do not run.