Skip to content

Commit

Permalink
Make an "All enemy" attack not affect hidden enemies.
Browse files Browse the repository at this point in the history
Problem: Attack that hit all enemies also hits a hidden character.

Solution: In IsTargetValid(), include aside of !IsDead the condition !IsHidden().
  • Loading branch information
Albeleon authored and mateofio committed Oct 15, 2018
1 parent feccd18 commit 87324b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game_battlealgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ bool Game_BattleAlgorithm::AlgorithmBase::IsTargetValid() const {
return false;
}

return (!GetTarget()->IsDead());
return (!GetTarget()->IsDead() && !GetTarget()->IsHidden());
}

int Game_BattleAlgorithm::AlgorithmBase::GetSourceAnimationState() const {
Expand Down

0 comments on commit 87324b3

Please sign in to comment.