Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AI] Spell Type (1024) InCombatBuff were spam casting #2030

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

noudess
Copy link
Contributor

@noudess noudess commented Mar 4, 2022

The AI code for spell casting (engaged):

  • two forms of innate/priority0 spells
  • in combat buffs
  • heals/bene
  • everything else

The first spell to get a sucess roll wins for that trip through the loop.

InCombatBuffs is 50% per spell to be chosen. Hopwever, the code did not have a CanStack check. So mobs with a spell list that included InCombatBuffs is severely compromised due to one spell getting cast over and over, on top if itself, 50% of the loops through if the spell list has no innates/priority0 spells.

Added a simple CanStack check and these mobs behave much better.

(Also changed the brace style to match the surrounding code)

@Akkadius Akkadius requested a review from KayenEQ March 7, 2022 00:43
Copy link
Member

@Akkadius Akkadius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@Akkadius Akkadius merged commit afc32af into EQEmu:master Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants