| 1878 | } |
| 1879 | |
| 1880 | bool Game_Interpreter::CommandChangeCondition(lcf::rpg::EventCommand const& com) { // Code 10480 |
| 1881 | bool remove = com.parameters[2] != 0; |
| 1882 | int state_id = com.parameters[3]; |
| 1883 | |
| 1884 | for (const auto& actor : GetActors(com.parameters[0], com.parameters[1])) { |
| 1885 | if (remove) { |
| 1886 | // RPG_RT: On the map, will remove battle states even if actor has |
| 1887 | // state inflicted by equipment. |
| 1888 | actor->RemoveState(state_id, !Game_Battle::IsBattleRunning()); |
| 1889 | } else { |
| 1890 | // RPG_RT always adds states from event commands, even battle states. |
| 1891 | actor->AddState(state_id, true); |
| 1892 | } |
| 1893 | if (actor->GetActorBattleSprite()) { |
| 1894 | actor->GetActorBattleSprite()->DetectStateChange(); |
| 1895 | } |
| 1896 | } |
| 1897 | |
| 1898 | CheckGameOver(); |
| 1899 | return true; |
| 1900 | } |
| 1901 | |
| 1902 | bool Game_Interpreter::CommandFullHeal(lcf::rpg::EventCommand const& com) { // Code 10490 |
| 1903 | for (const auto& actor : GetActors(com.parameters[0], com.parameters[1])) { |
nothing calls this directly
no test coverage detected