Skip to content

Commit

Permalink
"3.14: RM2000 + RM2003: After a battle is over, heal all the states t…
Browse files Browse the repository at this point in the history
…hat despite being "Persist after battle", still have more than 0% chance of recovery (turns and physical recovery don't matter)."

Solution: Put that condition in RemoveBattleStates, which removes states when the battle is over.
  • Loading branch information
Albeleon authored and mateofio committed Nov 6, 2018
1 parent 6c3a01c commit eb8a6ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/game_battler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,11 @@ void Game_Battler::RemoveBattleStates() {
// If death is non-permanent change HP to 1
if (IsDead() &&
non_permanent(1)) {
ChangeHp(1);
RemoveState(1);
}

for (size_t i = 0; i < states.size(); ++i) {
if (non_permanent(i + 1)) {
for (size_t i = 1; i < states.size(); ++i) {
if (non_permanent(i + 1) || ReaderUtil::GetElement(Data::states, i + 1)->auto_release_prob > 0) {
states[i] = 0;
}
}
Expand Down

0 comments on commit eb8a6ec

Please sign in to comment.