This commit is contained in:
2020-04-22 21:20:07 +02:00
parent d2cf26e950
commit 75baf19ebd
4 changed files with 32 additions and 30 deletions

View File

@@ -19,9 +19,7 @@ void TurnHandler::RunTurn(ChoiceQueue* queue) {
}
void TurnHandler::ExecuteChoice(BaseTurnChoice* choice) {
if (choice == nullptr) {
return;
}
AssertNotNull(choice);
auto choiceKind = choice->GetKind();
if (choiceKind == TurnChoiceKind::Pass) {
return;
@@ -116,7 +114,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, Creature* targe
return;
}
bool invulnerable = fail;
bool invulnerable = false;
HOOK(IsInvulnerable, targetSource, attack, target, &invulnerable);
if (invulnerable) {
// TODO: We should probably do something when a target is invulnerable.
@@ -140,7 +138,6 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, Creature* targe
break;
}
if (target->IsFainted()) {
// STOP, STOP! HE'S ALREADY DEAD ;_;
break;
}
auto hit = targetData->GetHit(hitIndex);