| 105 | } |
| 106 | |
| 107 | bool RemoveAll(StateVec& states, const PermanentStates& ps) { |
| 108 | bool any_removed = false; |
| 109 | for (int i = 0; i < (int)states.size(); ++i) { |
| 110 | auto state_id = i + 1; |
| 111 | if (Has(state_id, states)) { |
| 112 | any_removed |= Remove(state_id, states, ps); |
| 113 | } |
| 114 | } |
| 115 | return any_removed; |
| 116 | } |
| 117 | |
| 118 | lcf::rpg::State::Restriction GetSignificantRestriction(const StateVec& states) { |
| 119 | // Priority is nomove > attack enemy > attack ally > normal |
no test coverage detected