mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
<!--
Thank you for contributing to mod-playerbots, please make sure that
you...
1. Submit your PR to the test-staging branch, not master.
2. Read the guidelines below before submitting.
3. Don't delete parts of this template.
DESIGN PHILOSOPHY: We prioritize STABILITY, PERFORMANCE, AND
PREDICTABILITY over behavioral realism.
Every action and decision executes PER BOT AND PER TRIGGER. Small
increases in logic complexity scale
poorly across thousands of bots and negatively affect all. We prioritize
a stable system over a smarter
one. Bots don't need to behave perfectly; believable behavior is the
goal, not human simulation.
Default behavior must be cheap in processing; expensive behavior must be
opt-in.
Before submitting, make sure your changes aligns with these principles.
-->
## Pull Request Description
<!-- Describe what this change does and why it is needed -->
This is designed to significantly shorten the overall path while
maintaining the more detailed structure. I tried to follow the principle
of removing any folder that had 1 or 2 files in it, shortenining
dungeon/raid names to acronyms, and removing instances when the base
name was in the file name (Like Raid) etc.
## Feature Evaluation
<!--
If your PR is very minimal (comment typo, wrong ID reference, etc), and
it is very obvious it will not have
any impact on performance, you may skip these question. If necessary, a
maintainer may ask you for them later.
-->
<!-- Please answer the following: -->
- Describe the **minimum logic** required to achieve the intended
behavior.
- Describe the **processing cost** when this logic executes across many
bots.
## How to Test the Changes
<!--
- Step-by-step instructions to test the change.
- Any required setup (e.g. multiple players, number of bots, specific
configuration).
- Expected behavior and how to verify it.
-->
## Impact Assessment
<!-- As a generic test, before and after measure of pmon (playerbot pmon
tick) can help you here. -->
- Does this change increase per-bot/per-tick processing or risk scaling
poorly with thousands of bots?
- - [x] No, not at all
- - [ ] Minimal impact (**explain below**)
- - [ ] Moderate impact (**explain below**)
- Does this change modify default bot behavior?
- - [x] No
- - [ ] Yes (**explain why**)
- Does this change add new decision branches or increase maintenance
complexity?
- - [x] No
- - [ ] Yes (**explain below**)
## AI Assistance
<!--
AI assistance is allowed, but all submitted code must be fully
understood, reviewed, and owned by the contributor.
We expect contributors to be honest about what they do and do not
understand.
-->
Was AI assistance used while working on this change?
- - [ ] No
- - [x] Yes (**explain below**)
<!--
If yes, please specify:
- Purpose of usage (e.g. brainstorming, refactoring, documentation, code
generation).
- Which parts of the change were influenced or generated, and whether it
was thoroughly reviewed.
-->
Plan and execute
<!--
TRANSLATIONS:
Anything new that the bots say in chat must be in a translatable format.
This is done using GetBotTextOrDefault,
which you can search for in the codebase to find examples. Your code
needs to have English as the default fallback,
while the full translations need to be in an SQL update file. The
languages in the file are the nine language
options supported by AzerothCore: English, Korean, French, German,
Chinese, Taiwanese, Spanish, Spanish Mexico, and
Russian. See
data/sql/playerbots/updates/2025_12_27_ai_playerbot_fishing_text.sql as
an example of a translation SQL
update, whose content are called within the codebase at
src/strategy/actions/FishingAction.cpp
-->
## Final Checklist
- - [ ] Stability is not compromised.
- - [ ] Performance impact is understood, tested, and acceptable.
- - [ ] Added logic complexity is justified and explained.
- - [ ] Any new bot dialogue lines are translated.
- - [ ] Documentation updated if needed (Conf comments, WiKi commands).
## Notes for Reviewers
<!-- Anything else that's helpful to review or test your pull request.
-->
351 lines
9.6 KiB
C++
351 lines
9.6 KiB
C++
/*
|
|
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
|
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
|
*/
|
|
|
|
#ifndef _PLAYERBOT_DKACTIONS_H
|
|
#define _PLAYERBOT_DKACTIONS_H
|
|
|
|
#include "Event.h"
|
|
#include "GenericSpellActions.h"
|
|
|
|
class PlayerbotAI;
|
|
|
|
class CastBloodPresenceAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastBloodPresenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blood presence") {}
|
|
};
|
|
|
|
class CastFrostPresenceAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastFrostPresenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "frost presence") {}
|
|
};
|
|
|
|
class CastUnholyPresenceAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastUnholyPresenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "unholy presence") {}
|
|
};
|
|
|
|
class CastDeathchillAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastDeathchillAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "deathchill") {}
|
|
|
|
std::vector<NextAction> getPrerequisites() override;
|
|
};
|
|
|
|
class CastDarkCommandAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastDarkCommandAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "dark command") {}
|
|
};
|
|
|
|
BEGIN_RANGED_SPELL_ACTION(CastDeathGripAction, "death grip")
|
|
END_SPELL_ACTION()
|
|
|
|
// Unholy presence
|
|
class CastUnholyMeleeSpellAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastUnholyMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) {}
|
|
|
|
std::vector<NextAction> getPrerequisites() override;
|
|
};
|
|
|
|
// Frost presence
|
|
class CastFrostMeleeSpellAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastFrostMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) {}
|
|
|
|
std::vector<NextAction> getPrerequisites() override;
|
|
};
|
|
|
|
// Blood presence
|
|
class CastBloodMeleeSpellAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastBloodMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) {}
|
|
|
|
std::vector<NextAction> getPrerequisites() override;
|
|
};
|
|
|
|
class CastRuneStrikeAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastRuneStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "rune strike") {}
|
|
};
|
|
|
|
class CastPestilenceAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastPestilenceAction(PlayerbotAI* ai) : CastSpellAction(ai, "pestilence") {}
|
|
ActionThreatType getThreatType() override { return ActionThreatType::None; }
|
|
};
|
|
|
|
class CastHowlingBlastAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastHowlingBlastAction(PlayerbotAI* ai) : CastSpellAction(ai, "howling blast") {}
|
|
};
|
|
|
|
class CastIcyTouchAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastIcyTouchAction(PlayerbotAI* ai) : CastSpellAction(ai, "icy touch") {}
|
|
};
|
|
|
|
class CastIcyTouchOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
|
{
|
|
public:
|
|
CastIcyTouchOnAttackerAction(PlayerbotAI* botAI)
|
|
: CastDebuffSpellOnAttackerAction(botAI, "icy touch", true, .0f)
|
|
{
|
|
}
|
|
};
|
|
|
|
// debuff ps
|
|
|
|
class CastPlagueStrikeAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastPlagueStrikeAction(PlayerbotAI* ai) : CastSpellAction(ai, "plague strike") {}
|
|
};
|
|
|
|
class CastPlagueStrikeOnAttackerAction : public CastDebuffSpellOnMeleeAttackerAction
|
|
{
|
|
public:
|
|
CastPlagueStrikeOnAttackerAction(PlayerbotAI* botAI)
|
|
: CastDebuffSpellOnMeleeAttackerAction(botAI, "plague strike", true, .0f)
|
|
{
|
|
}
|
|
};
|
|
|
|
// debuff
|
|
BEGIN_DEBUFF_ACTION(CastMarkOfBloodAction, "mark of blood")
|
|
END_SPELL_ACTION()
|
|
|
|
class CastMarkOfBloodOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
|
{
|
|
public:
|
|
CastMarkOfBloodOnAttackerAction(PlayerbotAI* botAI) : CastDebuffSpellOnAttackerAction(botAI, "mark of blood", true)
|
|
{
|
|
}
|
|
};
|
|
|
|
class CastUnholyBlightAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastUnholyBlightAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "unholy blight") {}
|
|
};
|
|
|
|
class CastSummonGargoyleAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastSummonGargoyleAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "summon gargoyle") {}
|
|
};
|
|
|
|
class CastGhoulFrenzyAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastGhoulFrenzyAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "ghoul frenzy", false, 5000) {}
|
|
std::string const GetTargetName() override { return "pet target"; }
|
|
};
|
|
|
|
BEGIN_MELEE_SPELL_ACTION(CastCorpseExplosionAction, "corpse explosion")
|
|
END_SPELL_ACTION()
|
|
|
|
BEGIN_MELEE_SPELL_ACTION(CastAntiMagicShellAction, "anti magic shell")
|
|
END_SPELL_ACTION()
|
|
|
|
BEGIN_MELEE_SPELL_ACTION(CastAntiMagicZoneAction, "anti magic zone")
|
|
END_SPELL_ACTION()
|
|
|
|
class CastChainsOfIceAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastChainsOfIceAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "chains of ice") {}
|
|
};
|
|
|
|
class CastHungeringColdAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastHungeringColdAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "hungering cold") {}
|
|
};
|
|
|
|
class CastHeartStrikeAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastHeartStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "heart strike") {}
|
|
};
|
|
|
|
class CastBloodStrikeAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastBloodStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "blood strike") {}
|
|
};
|
|
|
|
class CastFrostStrikeAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastFrostStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "frost strike") {}
|
|
};
|
|
|
|
class CastObliterateAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastObliterateAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "obliterate") {}
|
|
};
|
|
|
|
class CastDeathStrikeAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastDeathStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "death strike") {}
|
|
};
|
|
|
|
class CastScourgeStrikeAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastScourgeStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "scourge strike") {}
|
|
};
|
|
|
|
class CastDeathCoilAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastDeathCoilAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "death coil") {}
|
|
};
|
|
|
|
class CastBloodBoilAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastBloodBoilAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "blood boil") {}
|
|
};
|
|
|
|
class CastDeathAndDecayAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastDeathAndDecayAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "death and decay") {}
|
|
// ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
|
};
|
|
|
|
class CastHornOfWinterAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastHornOfWinterAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "horn of winter") {}
|
|
};
|
|
|
|
class CastImprovedIcyTalonsAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastImprovedIcyTalonsAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "improved icy talons") {}
|
|
};
|
|
|
|
class CastBoneShieldAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastBoneShieldAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "bone shield") {}
|
|
};
|
|
|
|
class CastDeathPactAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastDeathPactAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "death pact") {}
|
|
};
|
|
|
|
class CastDeathRuneMasteryAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastDeathRuneMasteryAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "death rune mastery") {}
|
|
};
|
|
|
|
class CastDancingRuneWeaponAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastDancingRuneWeaponAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "dancing rune weapon") {}
|
|
};
|
|
|
|
class CastEmpowerRuneWeaponAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastEmpowerRuneWeaponAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "empower rune weapon") {}
|
|
};
|
|
|
|
class CastArmyOfTheDeadAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastArmyOfTheDeadAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "army of the dead") {}
|
|
};
|
|
|
|
class CastRaiseDeadAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastRaiseDeadAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "raise dead") {}
|
|
virtual bool Execute(Event event) override;
|
|
};
|
|
|
|
class CastKillingMachineAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastKillingMachineAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "killing machine") {}
|
|
};
|
|
|
|
class CastIceboundFortitudeAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastIceboundFortitudeAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "icebound fortitude") {}
|
|
};
|
|
|
|
class CastUnbreakableArmorAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastUnbreakableArmorAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "unbreakable armor") {}
|
|
};
|
|
|
|
class CastVampiricBloodAction : public CastBuffSpellAction
|
|
{
|
|
public:
|
|
CastVampiricBloodAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "vampiric blood") {}
|
|
};
|
|
|
|
class CastMindFreezeAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastMindFreezeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "mind freeze") {}
|
|
};
|
|
|
|
class CastStrangulateAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastStrangulateAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "strangulate") {}
|
|
};
|
|
|
|
class CastMindFreezeOnEnemyHealerAction : public CastSpellOnEnemyHealerAction
|
|
{
|
|
public:
|
|
CastMindFreezeOnEnemyHealerAction(PlayerbotAI* botAI) : CastSpellOnEnemyHealerAction(botAI, "mind freeze") {}
|
|
};
|
|
|
|
class CastRuneTapAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastRuneTapAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "rune tap") {}
|
|
};
|
|
|
|
class CastBloodTapAction : public CastMeleeSpellAction
|
|
{
|
|
public:
|
|
CastBloodTapAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "blood tap") {}
|
|
};
|
|
|
|
class CastHysteriaAction : public CastSpellAction
|
|
{
|
|
public:
|
|
CastHysteriaAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "hysteria") {}
|
|
Unit* GetTarget() override;
|
|
};
|
|
|
|
#endif
|