Set data for executing attacks.
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:
@@ -62,8 +62,12 @@ void TurnHandler::ExecuteAttackChoice(AttackTurnChoice *choice) {
|
||||
//TODO: Change attack
|
||||
}
|
||||
|
||||
// FIXME: Resolve all targets
|
||||
auto target = choice->GetUser()->GetBattle()->GetTarget(choice->GetTarget());
|
||||
std::vector<Creature*> targets = {target};
|
||||
|
||||
//TODO: Set ExecutingAttack data
|
||||
auto attack = new ExecutingAttack();
|
||||
auto attack = new ExecutingAttack(targets, 1, choice->GetUser(), choice->GetAttack(), choice->GetAttackScript());
|
||||
bool prevented = false;
|
||||
HOOK(PreventAttack, attack, attack, prevented);
|
||||
if (prevented){
|
||||
|
||||
Reference in New Issue
Block a user