MCPcopy Create free account
hub / github.com/EasyRPG/Player / BattleStateHeal

Method BattleStateHeal

src/game_battler.cpp:616–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614}
615
616std::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
636bool Game_Battler::HasReflectState() const {
637 for (int16_t i : GetInflictedStates()) {

Callers 2

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected