[lua, sql] Mobskill Rework: Magical Skills
I affirm:
- [x] I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
- [x] I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
- [x] I have read and understood the Contributing Guide and the Code of Conduct.
- [x] 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?
Initial draft for mobMagicalMove rework. Only modified one mobskill(Fireball (367) until the main function and its parameters are reviewed.
Adds support to mobMagicalMove:
- Absorb/Nullification functionality.
- Base Stat Attribute modifiers.
- Bonus MACC/MATT inherent to the skill.
- Option to ignore resistances/TDMA (Nether blast and some other skills)
- dStat Multipliers. Not all skills use this but if defined then it will calculate it.
- Option to define which stat attributes are compared in resist and dStat calculations. Its usually INT but there are some outliers that use MND for example.
Adds new parameter to xi.spells.damage.calculateMagicBonusDiff to allow passing of bonus MATT(Similar to existing bonusMacc in xi.combat.magicHitRate.calculateResistRate
Edit 10/30/2025:
-
Accidentally got my stash caught up in a rebase. Will submit future blocks of reworked mobskill scripts in separate commits.
-
Removed "Fire_Arrow.lua". This is not a skill with this name in the database. Its likely a redundant file meant to be "Flame_Arrow" which is an Orc Warmachine skill that is constantly mislabeled as "Fire Arrow" in EN language wikis.
Steps to test these changes
Toggle various settings, see no errors. See various params affect related functions.
re: Nether Blast, if it's like the player version, it does breath damage rather than magic damage. So I'm not sure if it fits into the magical mob move category, even though it uses a different calculation for breath damage than others.
Fwiw, there's an open issue for the player version of Nether Blast, since it's not being handled properly either, but I'm not going to link it here since you've been working on separating player BPs from mob skills.
re: Nether Blast, if it's like the player version, it does breath damage rather than magic damage. So I'm not sure if it fits into the magical mob move category, even though it uses a different calculation for breath damage than others.
Fwiw, there's an open issue for the player version of Nether Blast, since it's not being handled properly either, but I'm not going to link it here since you've been working on separating player BPs from mob skills.
I'll wait and see if Frank can chime in, He probably knows more about avatar calcs. @Frankie-hz
Nerherblast is a fun one! It is indeed an unresisted breathe skill that has a static ftp of 5 and is effected by MAB/MDEF AND breathe damage taken. It will need a check on its own somewhere regardless because of the unresisted state.
New update: Migrated Breath damage adjustments in mobBreathMove into their own function equivalent to TMDA in damageSpell. Used said function(xi.spells.damage.calculateTBDA) in mobBreathMove.
Also using this new function in mobMagicalMove for one off abilities like Nether Blast that use magic damage calcs but deal breath damage.
Also another note, would we want to eventually move modifiers like this to combat/damage_multipliers.lua?
I realize I should have left a comment earlier. I added the tests tag mostly because of the sheer size of the PR.
You don't have to do anything at this point, I will write some tests when the PR is ready.
Sorry, taking a bit longer than anticipated. Been on retail past few days capturing data/mechanics for HP/MP/TP Drain skills. Should have the rest of the skills converted sometime this week.
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.