Implement Seasons Greetings KSNM 30#7453
Conversation
| balgasID.mob.GILAGOGE_TLUGVI + 1, | ||
| balgasID.mob.GILAGOGE_TLUGVI + 6, | ||
| balgasID.mob.GILAGOGE_TLUGVI + 11, |
There was a problem hiding this comment.
If you already have the IDs you want, you can use GetMobByID() to look each one up. This just grabs the mob out of the entity array without any sort of iteration.
There was a problem hiding this comment.
The trick with this scenario is that although I know the IDs of the mob I'm looking for, I don't know which version of the mob I need at runtime because the mob lua is battlefield agnostic. For example, if three groups are fighting in Seasons Greetings at the same time, and the WHM (Gilagoge) from group two uses Benediction, I need to make sure that I'm only interacting with battlefield two's version of the MNK (Goga).
The looping ensures that I'm only ever interacting with the appropriate battlefield's version of the mob.
Possible Gogas:
- 17375408 (Battlefield 1)
17375413 (Battlefield 2)- 17375418 (Battlefield 3)
Group Two Mobs: (only this set would be checked in the example above)
- 17375412 (Gilagoge)
17375413 (Goga)- 17375414 (Ulagohvsdi)
- 17375415 (Gola)
Let me know if I'm misunderstanding your comment!
There was a problem hiding this comment.
I think I understand what you're suggesting now. I think you're recommending that I grab the ID of the mob performing the 2HR and offset (+1) from that to get the next mob (with some special modulo handling to loop back around to the beginning if needed). I think that would work.
Is there value in keeping getSpecificMob for similar cases in other BCNMs like Requiem of Sin, etc.?
There was a problem hiding this comment.
If you wanted to work off of a specific base offset for a given battlefield, we have battlefield:getArea(), which give you (I think) 1-3, depending on which version of the battlefield you've been placed in. You can then use that to calculate which mob and offset you need.
There's some useful examples hanging around:
local baseID = ID.mob.ZEID_BCNM_OFFSET + (mob:getBattlefield():getArea() - 1) * 4
...
local inst = mob:getBattlefield():getArea()
local instOffset = ID.mob.WARLORD_ROJGNOJ + (14 * (inst - 1))
...
local promathia = ID.mob.PROMATHIA + (mob:getBattlefield():getArea() - 1) * 2|
|
||
| SILENCE_GAS_1 = 314, | ||
| DARK_SPORE_1 = 315, | ||
| DRILL_BRANCH = 328, |
There was a problem hiding this comment.
Leave a blank line when between dark spore and drill branch pls
| DARK_SPORE_1 = 315, | ||
| DRILL_BRANCH = 328, | ||
| PINECONE_BOMB = 329, | ||
| LEAFSTORM = 331, |
There was a problem hiding this comment.
And between this 2 aswell. And down bellow theres a few other cases.
If the enums dont follow a direct progression, separate them
|
Do you have any preferences for how I handle the cyclomatic complexity in Update: I separated each scenario into their own function. They separate pretty cleanly. |
0b919cd to
fb3e1ea
Compare
I affirm:
What does this pull request do?
Implements a largely fleshed out (but still experimental) version of the KSNM 30 Seasons Greetings.
Details and capture info can be found here:
https://docs.google.com/spreadsheets/d/1t0BYUAtGJ6mYiEIRNCpNfTz9hC2gJdTX42LNGdeNVM0/edit?usp=sharing
High Level Battle Notes:
Additional Battle Notes:
Notable Code Changes:
Steps to test these changes