Skip to content

Commit

Permalink
Add assertion that call_move is not used on a Pokemon with no remai…
Browse files Browse the repository at this point in the history
…ning HP.
  • Loading branch information
davidstone committed May 13, 2024
1 parent c2c36fa commit 690f05d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/tm/move/call_move_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ auto try_use_move(UserTeam & user, UsedMove<UserTeam> const move, OtherTeam<User

template<any_team UserTeam>
auto call_move(UserTeam & user, UsedMove<UserTeam> const move, OtherTeam<UserTeam> & other, OtherAction const other_action, Environment & environment, bool const clear_status, ActualDamage const actual_damage, bool const is_fully_paralyzed) -> void {
BOUNDED_ASSERT(user.pokemon().hp().current() != 0_bi);
try_use_move(user, move, other, other_action, environment, clear_status, actual_damage, is_fully_paralyzed);
end_of_attack(user.pokemon(), other.pokemon(), environment);
}
Expand Down

0 comments on commit 690f05d

Please sign in to comment.