Hodir tactics (#977)

* - Added tactic for Hodir Biting Cold ability

* - Added tactic for Hodir Flash Freeze
- Modified tactic for Hodir Biting Cold
This commit is contained in:
kadeshar
2025-02-17 15:22:46 +01:00
committed by GitHub
parent 58a596a40e
commit 050cc24e9c
7 changed files with 90 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ public:
creators["razorscale grounded"] = &RaidUlduarActionContext::razorscale_grounded;
creators["razorscale harpoon action"] = &RaidUlduarActionContext::razorscale_harpoon_action;
creators["razorscale fuse armor action"] = &RaidUlduarActionContext::razorscale_fuse_armor_action;
creators["hodir move snowpacked icicle"] = &RaidUlduarActionContext::hodir_move_snowpacked_icicle;
}
private:
@@ -36,6 +37,7 @@ private:
static Action* razorscale_grounded(PlayerbotAI* ai) { return new RazorscaleGroundedAction(ai); }
static Action* razorscale_harpoon_action(PlayerbotAI* ai) { return new RazorscaleHarpoonAction(ai); }
static Action* razorscale_fuse_armor_action(PlayerbotAI* ai) { return new RazorscaleFuseArmorAction(ai); }
static Action* hodir_move_snowpacked_icicle(PlayerbotAI* ai) { return new HodirMoveSnowpackedIcicleAction(ai); }
};
#endif

View File

@@ -1154,3 +1154,34 @@ bool RazorscaleFuseArmorAction::Execute(Event event)
bossHelper.AssignRolesBasedOnHealth();
return true;
}
bool HodirMoveSnowpackedIcicleAction::isUseful()
{
// Check boss and it is alive
Unit* boss = AI_VALUE2(Unit*, "find target", "hodir");
if (!boss || !boss->IsAlive())
{
return false;
}
// Find the nearest Snowpacked Icicle Target
Creature* target = bot->FindNearestCreature(33174, 100.0f);
if (!target)
return false;
// Check that boss is stacked on Snowpacked Icicle
if (bot->GetDistance2d(target->GetPositionX(), target->GetPositionY()) <= 3.0f)
{
return false;
}
}
bool HodirMoveSnowpackedIcicleAction::Execute(Event event)
{
Creature* target = bot->FindNearestCreature(33174, 100.0f);
if (!target)
return false;
return MoveTo(target->GetMapId(), target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), false,
false, false, true, MovementPriority::MOVEMENT_NORMAL);
}

View File

@@ -106,4 +106,12 @@ public:
bool isUseful() override;
};
class HodirMoveSnowpackedIcicleAction : public MovementAction
{
public:
HodirMoveSnowpackedIcicleAction(PlayerbotAI* botAI) : MovementAction(botAI, "hodir move snowpacked icicle") {}
bool Execute(Event event) override;
bool isUseful() override;
};
#endif

View File

@@ -46,6 +46,15 @@ void RaidUlduarStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
"razorscale fuse armor trigger",
NextAction::array(0, new NextAction("razorscale fuse armor action", ACTION_RAID + 2), nullptr)));
//
// Hodir
//
triggers.push_back(new TriggerNode(
"hodir near snowpacked icicle",
NextAction::array(0, new NextAction("hodir move snowpacked icicle", ACTION_RAID + 5), nullptr)));
triggers.push_back(new TriggerNode(
"hodir biting cold", NextAction::array(0, new NextAction("intense cold jump", ACTION_RAID + 4), nullptr)));
}
void RaidUlduarStrategy::InitMultipliers(std::vector<Multiplier*>& multipliers)

View File

@@ -24,6 +24,8 @@ public:
creators["razorscale grounded"] = &RaidUlduarTriggerContext::razorscale_grounded;
creators["razorscale harpoon trigger"] = &RaidUlduarTriggerContext::razorscale_harpoon_trigger;
creators["razorscale fuse armor trigger"] = &RaidUlduarTriggerContext::razorscale_fuse_armor_trigger;
creators["hodir biting cold"] = &RaidUlduarTriggerContext::hodir_biting_cold;
creators["hodir near snowpacked icicle"] = &RaidUlduarTriggerContext::hodir_near_snowpacked_icicle;
}
private:
@@ -36,6 +38,8 @@ private:
static Trigger* razorscale_grounded(PlayerbotAI* ai) { return new RazorscaleGroundedTrigger(ai); }
static Trigger* razorscale_harpoon_trigger(PlayerbotAI* ai) { return new RazorscaleHarpoonAvailableTrigger(ai); }
static Trigger* razorscale_fuse_armor_trigger(PlayerbotAI* ai) { return new RazorscaleFuseArmorTrigger(ai); }
static Trigger* hodir_biting_cold(PlayerbotAI* ai) { return new HodirBitingColdTrigger(ai); }
static Trigger* hodir_near_snowpacked_icicle(PlayerbotAI* ai) { return new HodirNearSnowpackedIcicleTrigger(ai); }
};
#endif

View File

@@ -241,3 +241,25 @@ bool RazorscaleFuseArmorTrigger::IsActive()
return false;
}
bool HodirBitingColdTrigger::IsActive()
{
Unit* boss = AI_VALUE2(Unit*, "find target", "hodir");
return boss && botAI->GetAura("biting cold", bot, false, false);
}
//Snowpacked Icicle Target
bool HodirNearSnowpackedIcicleTrigger::IsActive()
{
// Check boss and it is alive
Unit* boss = AI_VALUE2(Unit*, "find target", "hodir");
if (!boss || !boss->IsAlive())
{
return false;
}
// Find the nearest Snowpacked Icicle Target
Creature* target = bot->FindNearestCreature(33174, 100.0f);
if (!target)
return false;
}

View File

@@ -76,4 +76,18 @@ public:
bool IsActive() override;
};
class HodirBitingColdTrigger : public Trigger
{
public:
HodirBitingColdTrigger(PlayerbotAI* ai) : Trigger(ai, "hodir biting cold") {}
bool IsActive() override;
};
class HodirNearSnowpackedIcicleTrigger : public Trigger
{
public:
HodirNearSnowpackedIcicleTrigger(PlayerbotAI* ai) : Trigger(ai, "hodir near snowpacked icicle") {}
bool IsActive() override;
};
#endif