LandSandBoat / server

:sailboat: LandSandBoat - a server emulator for Final Fantasy XI. Just an X-34 landspeeder out for a drive.

Home Page:https://landsandboat.github.io/server/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Trust cure logic

noisiver opened this issue Β· comments

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my issue will be ignored.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated.

Describe the feature

Healer-specific trusts, such as Mihli Aliapoh, should use their cures with some logic to it. Instead of always using the highest possible tier of cure it should be based on missing health of whoever they're casting it on. If the one they deem the most viable isn't ready I'm not sure what the logic would be but a guess would be to go up in ranks.

To show a little bit of what I mean, check out how Mihli Aliapoh does her heals during the fight with Dynamis Lord - the video is not mine but it illustrates my point.

https://www.youtube.com/watch?v=_HrgdeqRLYg

During the entire fight, looking only at the spells Mihli is using, it goes Cure IV -> IV -> V -> VI.

I can't be certain but I imagine most, if not all, trusts who cast cures should use this kind of logic when doing so.

I'm honestly not sure if this should be a feature request or a bug report, the trusts work but could use some AI additions, but since it's essentially a "they're not working as they should" I changed it to a bug report.

So, the way these were implemented was "by feel", rather than by comparing to exactly how each trust acts on retail.

mob:addSimpleGambit(ai.t.PARTY, ai.c.HPP_LT, 75, ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.CURE)

It's a difficult problem to solve, because the spells that are available for a trust to use change as they level, and as their MP changes. Interestingly, "by how much health is missing" is how Monberaux operates with his special healing skill/items:

mob:addSimpleGambit(ai.t.CASTER, ai.c.MPP_LT, 25, ai.r.MS, ai.s.SPECIFIC, 4254, healingMoveCooldown) -- Mix: Dry Ether Concoction
mob:addSimpleGambit(ai.t.PARTY, ai.c.HPP_LT, 90, ai.r.MS, ai.s.SPECIFIC, 4236, healingMoveCooldown) -- Max Potion (500 HP)
mob:addSimpleGambit(ai.t.PARTY, ai.c.HPP_LT, 75, ai.r.MS, ai.s.SPECIFIC, 4237, healingMoveCooldown) -- Mix: Max Potion (700 HP)
mob:addSimpleGambit(ai.t.PARTY, ai.c.STATUS, xi.effect.POISON, ai.r.MS, ai.s.SPECIFIC, 4238, healingMoveCooldown) -- Mix: Antidote

I think it HAS been observed that certain trusts demonstrate an awareness of being MP-efficient and not heal-bombing their targets, but we don't have that sort of thing programmed in yet.

I assumed the current system makes it hard to implement this kind of thing, at least easily.

I couldn't find anyone mentioning this as an issue so I figured I'd bring up anyway. It's not a major issue, more like a suggestion for improvements on the current way they function. They just waste a whole load of mana but it's not hard to plan accordingly for the time being. Sacrifice some damage output for extra refresh and ballad.

I did look into implementing it myself, hopefully to be able to submit a PR for it, but I hit a brick wall. I don't fully understand how it all works yet and my skill in C++ isn't good enough to easily learn it.

I was playing around with multiple gambits for percentages of health too, like with monberaux, but the major downside to that is that it won't work with cures on cooldown and could also have other issues. It would also have to be tested if it's percentage or actual health that determines the spell used. A Galka PLD would obviously be missing a bunch more health at 75% than say a Tarutaru BLM.

I assumed the current system makes it hard to implement this kind of thing, at least easily.

I couldn't find anyone mentioning this as an issue so I figured I'd bring up anyway. It's not a major issue, more like a suggestion for improvements on the current way they function. They just waste a whole load of mana but it's not hard to plan accordingly for the time being. Sacrifice some damage output for extra refresh and ballad.

I did look into implementing it myself, hopefully to be able to submit a PR for it, but I hit a brick wall. I don't fully understand how it all works yet and my skill in C++ isn't good enough to easily learn it.

I was playing around with multiple gambits for percentages of health too, like with monberaux, but the major downside to that is that it won't work with cures on cooldown and could also have other issues. It would also have to be tested if it's percentage or actual health that determines the spell used. A Galka PLD would obviously be missing a bunch more health at 75% than say a Tarutaru BLM.

So, I put this together. at 99 mihli was started curing around 75-80% hp.
at level 1 she cured around 70% so its pretty average to the 75% HP_LT thats in there now.
put this into a module for your WHMs and they will use more efficient midrange cures.

This is a band-aid until someone grabs this and reworks the core for similar gains.

Basically, at 99 they won't use a cure 6 unless the total Hp loss is more than 798.

Tried to hit the middle of the HP floor in the Cure formula.

https://www.bg-wiki.com/ffxi/Cure_Formula

image

    local mLvl    = mob:getMainLvl()
    local cureMod = mLvl * 2
    mob:addSimpleGambit(ai.t.PARTY, ai.c.HP_MISSING, 600 + cureMod, ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.CURE_VI)
    mob:addSimpleGambit(ai.t.PARTY, ai.c.HP_MISSING, 450 + cureMod, ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.CURE_V)
    mob:addSimpleGambit(ai.t.PARTY, ai.c.HP_MISSING, 270 + cureMod, ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.CURE_IV)
    mob:addSimpleGambit(ai.t.PARTY, ai.c.HP_MISSING, 130 + cureMod, ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.CURE_III)
    mob:addSimpleGambit(ai.t.PARTY, ai.c.HP_MISSING, 60 + cureMod, ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.CURE_II)
    mob:addSimpleGambit(ai.t.PARTY, ai.c.HP_MISSING, 10 + cureMod, ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.CURE)
    --mob:addSimpleGambit(ai.t.PARTY, ai.c.HPP_LT, 50, ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.CURE)