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 Nov 4, 2018
1 parent b7ab8d3 commit 8424c49
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 @@ -645,7 +645,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 8424c49

Please sign in to comment.