Paladin use bubble heal strategy (#2244)

<!--
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 -->

Added support for bubble heal strategy.
Adjusted emergency action order

## 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.
-->

- invite paladin bot to party
- check that bot dont have `healer dps` strategy
- start combat (with for example dummy)
- use `.damage 20000` where 20000 is near max health of bot
- use `.unaura 25771` until bot use Divine Shield
- bot should heal himself 

## 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?
    - - [ ] No
    - - [x] Yes (**explain why**)

Paladin bot heal himself without `healer dps` while Divine Shield


- Does this change add new decision branches or increase maintenance
complexity?
    - - [x] No
    - - [ ] Yes (**explain below**)



## Messages to Translate
<!--
Bot messages have to be translatable, but you don't need to do the
translations here. You only need to make sure
the message is in a translatable format, and list in the table the
message_key and the default English message.
Search for GetBotTextOrDefault in the codebase for examples.
-->
- Does this change add bot messages to translate?
    - - [x] No
    - - [ ] Yes (**list messages in the table**)

| Message key  | Default message |
| --------------- | ------------------ |
|			 |			      |
|			 |			      |

## 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?
    - - [x] No
    - - [ ] 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.
-->



## Final Checklist

- - [x] Stability is not compromised.
- - [x] Performance impact is understood, tested, and acceptable.
- - [x] Added logic complexity is justified and explained.
- - [x] Documentation updated if needed (Conf comments, WiKi commands).

## Notes for Reviewers
<!-- Anything else that's helpful to review or test your pull request.
-->

<img width="297" height="142" alt="obraz"
src="https://github.com/user-attachments/assets/5e35341b-2b23-4d34-b0c6-dc228823850f"
/>
This commit is contained in:
kadeshar 2026-04-04 07:31:17 +02:00 committed by GitHub
parent c0390a24fd
commit d07ddb14d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 9 deletions

View File

@ -134,6 +134,7 @@ public:
&PaladinTriggerFactoryInternal::hammer_of_justice_on_snare_target; &PaladinTriggerFactoryInternal::hammer_of_justice_on_snare_target;
creators["not sensing undead"] = &PaladinTriggerFactoryInternal::not_sensing_undead; creators["not sensing undead"] = &PaladinTriggerFactoryInternal::not_sensing_undead;
creators["divine favor"] = &PaladinTriggerFactoryInternal::divine_favor; creators["divine favor"] = &PaladinTriggerFactoryInternal::divine_favor;
creators["divine shield low health"] = &PaladinTriggerFactoryInternal::divine_shield_low_health;
creators["turn undead"] = &PaladinTriggerFactoryInternal::turn_undead; creators["turn undead"] = &PaladinTriggerFactoryInternal::turn_undead;
creators["avenger's shield"] = &PaladinTriggerFactoryInternal::avenger_shield; creators["avenger's shield"] = &PaladinTriggerFactoryInternal::avenger_shield;
creators["consecration"] = &PaladinTriggerFactoryInternal::consecration; creators["consecration"] = &PaladinTriggerFactoryInternal::consecration;
@ -156,6 +157,7 @@ private:
static Trigger* not_sensing_undead(PlayerbotAI* botAI) { return new NotSensingUndeadTrigger(botAI); } static Trigger* not_sensing_undead(PlayerbotAI* botAI) { return new NotSensingUndeadTrigger(botAI); }
static Trigger* turn_undead(PlayerbotAI* botAI) { return new TurnUndeadTrigger(botAI); } static Trigger* turn_undead(PlayerbotAI* botAI) { return new TurnUndeadTrigger(botAI); }
static Trigger* divine_favor(PlayerbotAI* botAI) { return new DivineFavorTrigger(botAI); } static Trigger* divine_favor(PlayerbotAI* botAI) { return new DivineFavorTrigger(botAI); }
static Trigger* divine_shield_low_health(PlayerbotAI* botAI) { return new DivineShieldLowHealthTrigger(botAI); }
static Trigger* holy_shield(PlayerbotAI* botAI) { return new HolyShieldTrigger(botAI); } static Trigger* holy_shield(PlayerbotAI* botAI) { return new HolyShieldTrigger(botAI); }
static Trigger* righteous_fury(PlayerbotAI* botAI) { return new RighteousFuryTrigger(botAI); } static Trigger* righteous_fury(PlayerbotAI* botAI) { return new RighteousFuryTrigger(botAI); }
static Trigger* judgement(PlayerbotAI* botAI) { return new JudgementTrigger(botAI); } static Trigger* judgement(PlayerbotAI* botAI) { return new JudgementTrigger(botAI); }

View File

@ -16,17 +16,21 @@ void GenericPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{ {
CombatStrategy::InitTriggers(triggers); CombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("critical health", { NextAction("divine shield", triggers.push_back(new TriggerNode("hammer of justice interrupt",
ACTION_HIGH + 5) }));
triggers.push_back(
new TriggerNode("hammer of justice interrupt",
{ NextAction("hammer of justice", ACTION_INTERRUPT) })); { NextAction("hammer of justice", ACTION_INTERRUPT) }));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode("hammer of justice on enemy healer",
"hammer of justice on enemy healer",
{ NextAction("hammer of justice on enemy healer", ACTION_INTERRUPT) })); { NextAction("hammer of justice on enemy healer", ACTION_INTERRUPT) }));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode("hammer of justice on snare target",
"hammer of justice on snare target",
{ NextAction("hammer of justice on snare target", ACTION_INTERRUPT) })); { NextAction("hammer of justice on snare target", ACTION_INTERRUPT) }));
triggers.push_back(new TriggerNode("critical health", { NextAction("divine shield", ACTION_EMERGENCY) }));
triggers.push_back(new TriggerNode("critical health", { NextAction("lay on hands", ACTION_EMERGENCY + 1) }));
triggers.push_back(new TriggerNode("party member critical health",
{ NextAction("lay on hands on party", ACTION_EMERGENCY + 2) }));
triggers.push_back(new TriggerNode("divine shield low health",
{ NextAction("flash of light", ACTION_EMERGENCY + 3), NextAction("holy light", ACTION_EMERGENCY + 2)}));
triggers.push_back(new TriggerNode("protect party member",
{ NextAction("blessing of protection on party", ACTION_EMERGENCY + 3) }));
triggers.push_back(new TriggerNode("high mana", { NextAction("divine plea", ACTION_HIGH) }));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"critical health", { NextAction("lay on hands", ACTION_EMERGENCY) })); "critical health", { NextAction("lay on hands", ACTION_EMERGENCY) }));
triggers.push_back( triggers.push_back(

View File

@ -32,6 +32,11 @@ bool BlessingTrigger::IsActive()
"blessing of kings", "blessing of sanctuary", nullptr); "blessing of kings", "blessing of sanctuary", nullptr);
} }
bool DivineShieldLowHealthTrigger::IsActive()
{
return botAI->HasAura("divine shield", bot) && AI_VALUE2(uint8, "health", "self target") < 80;
}
Unit* HandOfFreedomOnPartyTrigger::GetTarget() Unit* HandOfFreedomOnPartyTrigger::GetTarget()
{ {
bool const selfImpaired = botAI->IsMovementImpaired(bot); bool const selfImpaired = botAI->IsMovementImpaired(bot);

View File

@ -185,6 +185,14 @@ public:
DivineFavorTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "divine favor") {} DivineFavorTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "divine favor") {}
}; };
class DivineShieldLowHealthTrigger : public Trigger
{
public:
DivineShieldLowHealthTrigger(PlayerbotAI* botAI) : Trigger(botAI, "divine shield low health") {}
bool IsActive() override;
};
class NotSensingUndeadTrigger : public BuffTrigger class NotSensingUndeadTrigger : public BuffTrigger
{ {
public: public: