Skip to content

Conversation

@UmeboshiXI
Copy link
Contributor

@UmeboshiXI UmeboshiXI commented Oct 8, 2025

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?

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.

@UmeboshiXI UmeboshiXI force-pushed the Mobskills_Magical_Oct25 branch from cb9a7a9 to 9284999 Compare October 8, 2025 21:00
params.mnd_wSC = { 0, 0, 0 }
params.chr_wSC = { 0, 0, 0 }

params.ignoreResist = false
Copy link
Contributor

Choose a reason for hiding this comment

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

Other than non-elemental actions, I cannot think of a single action that bypasses resist states

Copy link
Contributor

Choose a reason for hiding this comment

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

The only edge case im aware of is that some skills can only be full duration or full resist, such as Leech attack down

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should only be TDMA then that gets bypassed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Full duration or Full resist is enfeebling magic territory, and comes with a feature that already exists, called "resist states"

As for what should be bypassed and what shouldnt...

In the end we will have parameters to bypass every single step.
However, the default state of this bypasses should be "false"

What this means is that an action that does not bypass an step should not have the parameter defined at all, is my point.

Copy link
Contributor Author

@UmeboshiXI UmeboshiXI Oct 8, 2025

Choose a reason for hiding this comment

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

I just put everything in here for testing. By default, it returns false if the param is missing from the script.

Edit: On note for above. Would it be preferable to have a param to skip each individual check (sdt, TMDA, etc)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update: Added individual params for toggling SDT/Resist/Damage Adjustment.

params.resistStat = xi.mod.INT
params.dStatMultiplier = 1.5
params.dStatAttackerMod = xi.mod.INT
params.dStatDefenderMod = xi.mod.INT
Copy link
Contributor

Choose a reason for hiding this comment

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

Other than with Blind spell, I cant think of a single case of attacker and defender "stat" being different.
Which ok, that is an example.

However, resist stat?

Copy link
Contributor

Choose a reason for hiding this comment

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

leaden salute is your AGI vs their INT, i wouldn't completely rule it out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are a few weaponskills that have different stat attribute checks like Leaden Salute and Primal Rend and some that have no stat comparisons at all. I imagine there are possible cases like this with mobskills too.

For magical resist calculations, is it always only INT checks for MACC?

Copy link
Contributor

Choose a reason for hiding this comment

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

iirc, it uses whatever stat you feed to it
and to my knowledge, it happens to be the same as the dStat... stat.
In this case, it would be the dStatAttackerMod

TLDR; to my knowledge, resistStat will always be the same as dStatAttackerMod

Copy link
Contributor Author

@UmeboshiXI UmeboshiXI Oct 8, 2025

Choose a reason for hiding this comment

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

Okay, so we can delete resistStat and use the dStatMods instead to consolidate.

Do we just want to assume the comparison uses the same stat type(How it currently is now) or do we want to split it so that we can enter the attacker/defender's stats separately?

Mind you, I don't have current proof of mobskills that currently use separate stats like how some player weaponskills do. We could do it later if such a case comes up and just stick with current setup.

Copy link
Contributor

Choose a reason for hiding this comment

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

using diferent variables for the attacker and the defender dStats is fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update: Removed param.resiststat

@almuth150
Copy link

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.

@UmeboshiXI
Copy link
Contributor Author

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

@UmeboshiXI UmeboshiXI force-pushed the Mobskills_Magical_Oct25 branch from 9284999 to e28436a Compare October 9, 2025 00:14
@Frankie-hz
Copy link
Contributor

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.

@UmeboshiXI UmeboshiXI force-pushed the Mobskills_Magical_Oct25 branch from e28436a to 2a7c498 Compare October 9, 2025 15:50
@UmeboshiXI
Copy link
Contributor Author

UmeboshiXI commented Oct 9, 2025

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?

@UmeboshiXI UmeboshiXI force-pushed the Mobskills_Magical_Oct25 branch 2 times, most recently from fa4f421 to 7fef004 Compare October 21, 2025 11:32
@UmeboshiXI UmeboshiXI force-pushed the Mobskills_Magical_Oct25 branch 2 times, most recently from 3e8319f to 84c1b98 Compare October 30, 2025 14:12
@UmeboshiXI UmeboshiXI changed the title [lua] Mobskill Rework: Magical Skills [lua, sql] Mobskill Rework: Magical Skills Oct 30, 2025
@sruon sruon added the needs tests Issue or PR is a good candidate for dedicated tests in xi_test label Oct 30, 2025
@UmeboshiXI UmeboshiXI force-pushed the Mobskills_Magical_Oct25 branch from 84c1b98 to 0ab3475 Compare October 30, 2025 16:13
@sruon
Copy link
Contributor

sruon commented Oct 30, 2025

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.

@UmeboshiXI UmeboshiXI force-pushed the Mobskills_Magical_Oct25 branch 3 times, most recently from ab6acc1 to f1887c3 Compare October 30, 2025 20:02
Comment on lines +323 to +410
local strWSC = skillParams.str_wSC
local dexWSC = skillParams.dex_wSC
local vitWSC = skillParams.vit_wSC
local agiWSC = skillParams.agi_wSC
local intWSC = skillParams.int_wSC
local mndWSC = skillParams.mnd_wSC
local chrWSC = skillParams.chr_wSC
Copy link
Contributor

Choose a reason for hiding this comment

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

Where did you get that mobskills have weapon modifiers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will be there to be used for avatars whenever we rewrite those.

Comment on lines +415 to +545
-- Force a resist tier if defined.
if skillParams.resistTierOverride then
resistTier = resistTierOverride
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have an example of where this is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://docs.google.com/spreadsheets/d/1YBoveP-weMdidrirY-vPDzHyxbEI2ryECINlfCnFkLI/edit?pli=1&gid=57955395#gid=57955395&range=A1102

Jimmayus spreadsheet said it was a guaranteed 1/4 resist when it backfires on the moblin.

@UmeboshiXI
Copy link
Contributor Author

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.

@github-actions
Copy link

This PR has been automatically marked as stale because
it has not had recent activity. It will be closed if no
further activity occurs.

@github-actions github-actions bot added the stale label Nov 24, 2025
@UmeboshiXI UmeboshiXI force-pushed the Mobskills_Magical_Oct25 branch from f1887c3 to 958563a Compare December 8, 2025 23:39
@github-actions github-actions bot removed the stale label Dec 10, 2025
@github-actions
Copy link

This PR has been automatically marked as stale because
it has not had recent activity. It will be closed if no
further activity occurs.

@github-actions github-actions bot added the stale label Dec 25, 2025
@UmeboshiXI UmeboshiXI force-pushed the Mobskills_Magical_Oct25 branch from ca0067d to a0685fe Compare January 24, 2026 22:38
@github-actions github-actions bot removed the stale label Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs tests Issue or PR is a good candidate for dedicated tests in xi_test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants