Implements replacement attack when an attack can't be used anymore, adds clearer exception handling.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -14,7 +14,14 @@ void TurnHandler::RunTurn(ArbUt::BorrowedPtr<ChoiceQueue> queue) {
|
||||
}
|
||||
while (queue->HasNext()) {
|
||||
auto item = queue->Dequeue();
|
||||
ExecuteChoice(item.get());
|
||||
try {
|
||||
ExecuteChoice(item.get());
|
||||
} catch (const std::exception& e) {
|
||||
THROW_CREATURE("Executing choice failed for choice by mon on side "
|
||||
<< item.get()->GetUser()->GetBattleSide()->GetSideIndex() << " and index "
|
||||
<< item.get()->GetUser()->GetBattleSide()->GetCreatureIndex(item->GetUser())
|
||||
<< " with message '" << e.what() << "'.");
|
||||
}
|
||||
}
|
||||
queue->HasCompletedQueue = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user