-
Notifications
You must be signed in to change notification settings - Fork 811
[lua, sql] Mobskill Rework: Magical Skills #8360
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
base: base
Are you sure you want to change the base?
Conversation
cb9a7a9 to
9284999
Compare
| params.mnd_wSC = { 0, 0, 0 } | ||
| params.chr_wSC = { 0, 0, 0 } | ||
|
|
||
| params.ignoreResist = false |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Removed param.resiststat
|
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 |
9284999 to
e28436a
Compare
|
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. |
e28436a to
2a7c498
Compare
|
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? |
fa4f421 to
7fef004
Compare
3e8319f to
84c1b98
Compare
84c1b98 to
0ab3475
Compare
|
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. |
ab6acc1 to
f1887c3
Compare
| 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
| -- Force a resist tier if defined. | ||
| if skillParams.resistTierOverride then | ||
| resistTier = resistTierOverride | ||
| end |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jimmayus spreadsheet said it was a guaranteed 1/4 resist when it backfires on the moblin.
|
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 |
f1887c3 to
958563a
Compare
|
This PR has been automatically marked as stale because |
ca0067d to
a0685fe
Compare
I affirm:
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:
Adds new parameter to
xi.spells.damage.calculateMagicBonusDiffto allow passing of bonus MATT(Similar to existing bonusMacc inxi.combat.magicHitRate.calculateResistRateEdit 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.