From 4eb302b95e60e8cd11817dbbee0a0e47f523e835 Mon Sep 17 00:00:00 2001 From: avirar Date: Sat, 4 Jan 2025 18:16:24 +1100 Subject: [PATCH] Prayer of Fortitude --- src/strategy/priest/PriestActions.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/strategy/priest/PriestActions.cpp b/src/strategy/priest/PriestActions.cpp index 2364a5e2..33b3842a 100644 --- a/src/strategy/priest/PriestActions.cpp +++ b/src/strategy/priest/PriestActions.cpp @@ -105,4 +105,21 @@ Unit* CastPowerWordShieldOnNotFullAction::GetTarget() bool CastPowerWordShieldOnNotFullAction::isUseful() { return GetTarget(); -} \ No newline at end of file +} + +bool CastPowerWordFortitudeAction::Execute(Event event) +{ + Unit* target = GetTarget(); + if (!target) + return false; + + // If in a group, try Prayer first + Group* group = botAI->GetBot()->GetGroup(); + if (group && botAI->CanCastSpell("prayer of fortitude", target)) + { + return botAI->CastSpell("prayer of fortitude", target); + } + + // Otherwise do normal single-target + return botAI->CastSpell("power word: fortitude", target); +}