-
Notifications
You must be signed in to change notification settings - Fork 221
Add Pinecone Bomb
blue magic spell.
#346
Add Pinecone Bomb
blue magic spell.
#346
Conversation
Now that the order of operations has been cleaned up for spells, Pinecone Bomb can be properly implemented. It does damage to the mob (which may wake it up from a previous slept state), but then can reapply sleep as described here: https://ffxiclopedia.fandom.com/wiki/Pinecone_Bomb
Hello, @mrhappyasthma! Thank you for contributing to Project Topaz! So that we don't use our parent project's brand, we've changed some function and table names to reflect adopting a new brand. I remember seeing that this PR was started prior to Topaz and originally submitted to our parent project - I took the liberty of updating these references for you; you don't need to sweat over them! Although, I realize after I submitted the push that I should have asked first to make sure I didn't step on your toes. I'm sorry if I did! My intent was to make your contribution experience as painless as possible! 😅 That said, I haven't had the chance to take a look at the code yet. We try to be relatively swift with reviews though, so I look forward to working with you soon! |
No worries. I look forward to your review. |
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 tested this out and it does seem to work!
There a few questions over fTP values, and how the sleep duration is supposed to work. Tagging @Wiggo32 in case he's played with the spell beyond the one capture I could find.
if (resist > 0.5) then -- Apply the sleep | ||
local power = 2 | ||
local tick = 0 | ||
local duration = 90 * resist |
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.
Looking at the description for the spell, it claims that duration is supposed to vary depending on TP. At the moment, this is basing the duration off of attacker INT versus target resistance.
- Is it supposed to always be affected by TP?
- Is TP -> duration effect only applicable when under Chain Affinity?
- What's the base duration of this type of sleep? With or without Chain Affinity?
- What's the sleep duration at certain TP values? Minimum, maximum?
@Wiggo32 I looked at your capture of you learning Pinecone Bomb and testing it out, but there was no explicit duration testing (the sapling was auto-attacked awake, and the draugar was unaffected)
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.
This was my first time adding a BLU spell, so I'm open to any improvements.
I just copied how sleep was applied in other spells, so it may not be 100% accurate. If you have a reference for how this should be applied, please point me in the right direciton!
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.
What we'll probably have to do is find some information - or get a capture - on the basic duration of the effect. Even if we can't fully pick apart how TP affects the duration for this (or other) Blue spells, we can at least apply the bare minimum duration for now and add a note in the script (and create a new Issue) that it's still missing duration bonuses from TP.
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.
Sounds good.
Should I wait on someone to do a "capture"? Or should I go forward with a TODO note and reference a github issue to update the TP modification of the sleep duration?
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.
We have some captures. I'll check them out and see what I can determine. Then hopefully someone more experienced can double check me.
function onSpellCast(caster,target,spell) | ||
local params = {} | ||
-- This data should match information on http://wiki.ffxiclopedia.org/wiki/Calculating_Blue_Magic_Damage | ||
params.tpmod = TPMOD_CRITICAL |
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 was going to say that the TP mod for this spell doesn't seem to be critical hit chance, but then I looked at the blue magic global and it doesn't look like tpmod params are used at all.
I did some searches and found a definition for params.tpmod = TPMOD_DURATION
for Battle Dance, which seems like what we should be using here (again, this param is never checked), but that specific global value doesn't seem to be defined anyway.
I'm not going to expect you to fix that fact that these mods don't seem to do anything, but could you change this to at least claim it's supposed to effect duration?
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.
A lot of these BLU enums seems to be in bad shape. I'm happy to clean them up as needed, but need some guidance.
Would you prefer which/any of the following:
- Remove the TPMOD param since it's unused
- Add TPMOD_DURATION value since it's missing, and then reference it here
- Add usage of
params.tpmod
in the global bluemagic.lua (if so, where)
I think the bottom two are probably the right approach, assuming this value is supposed to be used somewhere. But if we felt this value is obsolete or unnecessary, perhaps removing it until it's implemented would be less ambiguous?
Also we should probably file an issue for this problem to track these changes, which can be applied ahead of this PR as needed.
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.
Filed #354 to track.
Let me know what your preferences are. I'm happy to do an audit or cleanup based on what is preferred. (Although if we want to use the parameters, I could use some pointers since I'm not that familiar with the code and have no retail FFXI)
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.
Yeah, the bottom two are the more time consuming, but overall the best choice. It will require a bit of rework for the Blue Magic global, which desperately needs it.
For the purpose of this PR though, go ahead and add TPMOD_DURATION to both the global and this script (matching the one for Battle Dance), and then after a separate PR hooking up the params to be used, we can work on having spells being able to make use of the mods.
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.
Sounds like a plan. Will update this in a commit.
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.
Commit added. Please take a look.
Tagging #269 |
Question: Do you want me squashing these commits? Or do the mergers handle that for this repo? |
We can go ahead and squash for you~! |
Awesome. Just wanted to verify! :) |
This is needed after b4ed738
Now that the order of operations has been cleaned up for spells, Pinecone Bomb can be properly implemented. It does damage to the mob (which may wake it up from a previous slept state), but then can reapply sleep as described here: https://ffxiclopedia.fandom.com/wiki/Pinecone_Bomb
Rebased and closed out some of the outstanding comments. This PR is still waiting on a more accurate TP-based sleep duration. |
Corrected the attackType to be Still need to do a bit of research for the TP-based sleep. Been crazy with work and will be having more travel over the coming weeks. Whenever I can find some downtime I can plot some of the values from the captures and find a reasonable equation. |
Compiled a spreadsheet from the two captures in which Chain Affinity was used: |
BTW I still haven't forgotten about this. Just a crazy time we live in these days... Whenever I get some time I'll dig into those spreadsheets and compile any other data that is needed. |
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.
Pushed a commit based on added findings from Wiggo's most recent "base" capture:
https://docs.google.com/spreadsheets/d/1lJafURoeyiZ6NAz6A8NpdSk9VMjD0JLqjtxIa190RWs/
As strange as it seems, it's looking like it's close to a simple inverse bell curve between 15 and 60 seconds. This is based on the Qufim and Yuhtunga testing, where Wiggo is way over the cap of the mobs, so resists aren't coming into play. And when the spell fails, it fails outright - no damage at all. I'm relying on the damage check here.
It may seem weird, but an inverse bell fits the duration data well - and I'm fairly confident in the accuracy of this determination - so that's what I'm going with absent evidence to the contrary. I broke it out into it's own function in case we come across similar data later and end up needing to copy-paste the function into the blue global.
How TP affects duration can be determined at a later date; the blue magic global doesn't utilize TP modifications for any blue spells at the moment anyway.
Approved. Sorry for the wait, mrhappyasthma.
Wow thanks for digging so deeply into this. I know my contributions have been sporadic and irregular. So I really appreciate you doing all this work on behalf of this PR. |
Now that the order of operations has been cleaned up for spells,
Pinecone Bomb can be properly implemented. It does damage to the mob
(which may wake it up from a previous slept state), but then can reapply
sleep as described here: https://ffxiclopedia.fandom.com/wiki/Pinecone_Bomb