| 614 | } |
| 615 | |
| 616 | std::vector<int16_t> Game_Battler::BattleStateHeal() { |
| 617 | std::vector<int16_t> healed_states; |
| 618 | std::vector<int16_t>& states = GetStates(); |
| 619 | |
| 620 | for (size_t i = 0; i < states.size(); ++i) { |
| 621 | if (HasState(i + 1)) { |
| 622 | if (states[i] > lcf::Data::states[i].hold_turn |
| 623 | && Rand::ChanceOf(lcf::Data::states[i].auto_release_prob, 100) |
| 624 | && RemoveState(i + 1, false) |
| 625 | ) { |
| 626 | healed_states.push_back(i + 1); |
| 627 | } else { |
| 628 | ++states[i]; |
| 629 | } |
| 630 | } |
| 631 | } |
| 632 | |
| 633 | return healed_states; |
| 634 | } |
| 635 | |
| 636 | bool Game_Battler::HasReflectState() const { |
| 637 | for (int16_t i : GetInflictedStates()) { |
no test coverage detected