Skip to content

[lua] [sql] Angra Mainyu fight behavior - #11212

Open
ThrisStraizo wants to merge 1 commit into
LandSandBoat:basefrom
ThrisStraizo:dynamisspells
Open

[lua] [sql] Angra Mainyu fight behavior#11212
ThrisStraizo wants to merge 1 commit into
LandSandBoat:basefrom
ThrisStraizo:dynamisspells

Conversation

@ThrisStraizo

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

This PR fixes Angra Mainyu's fight behavior, teleportation, and spells.

https://youtu.be/0LVWrRLOeg8
https://youtu.be/XWcoK3kv9OQ

Steps to test these changes

Spawn Angra Mainyu and watch him Graviga based on HP triggers, then teleport.
Then watch him spam Death on you after using chainspell yeah!

Comment thread scripts/zones/Dynamis-Beaucedine/mobs/Angra_Mainyu.lua
Comment thread scripts/zones/Dynamis-Beaucedine/mobs/Angra_Mainyu.lua Outdated
Comment thread scripts/zones/Dynamis-Beaucedine/mobs/Angra_Mainyu.lua Outdated
if
teleportsLeft > 0 and
mob:getHPP() <= teleportThresholds[teleportIndex] and
not xi.combat.behavior.isEntityBusy(mob)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should be an early return, higher, before checking the other stuff

Comment thread scripts/zones/Dynamis-Beaucedine/mobs/Angra_Mainyu.lua Outdated
mob:setMod(xi.mod.SPELLINTERRUPT, 100)
mob:setMobMod(xi.mobMod.MAGIC_COOL, 20)

mob:setLocalVar('[2hour]HPP', 25)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why are you storing this in a local var if it isnt going to vary? use 25 directly in the 1 place its used

if
teleportsLeft > 0 and
hpPercent <= teleportThresholds[teleportIndex] and
not xi.combat.behavior.isEntityBusy(mob)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What I meant is that this should go first so we dont havre to fetch all those vars and data if not needed.

    if xi.combat.behavior.isEntityBusy(mob) then
        return
    end

    -- Whatever else

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yeah, but then you have to remove it from here. Also, dont remove the return that was inside here

then
mob:castSpell(xi.magic.spell.GRAVIGA, target)
mob:setLocalVar('teleportsLeft', teleportsLeft - 1)
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

like i said above, dont remove the return that was here. And also, do remove the extra check. if we have gotten here, its impossible for the mob to be busy

This PR fixes Angra Mainyu's fight behavior, teleportation, and spells.
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.

2 participants