Thanks. I usually copy stuff from other LUAs when I just vaguely understand stuff, but I can't find anything with Aesir Neck and Dark Day despite the fact it should become better than Incanter during that. (Unless I read it wrong and the bonus isn't cumulative? I'm starting to have doubts lol)
You are correct, effects written that way are not cumulative, it's a stat replacement. So it's just +10 on darksdays, not +17. Toss it on a slip.
ok so here's my weathercheck function, you can put it at the bottom of your lua.
function mweathercheck(spell_element)
-- Function checks weather and day and equips midcast appropriate gear on top of previously called midcast equips
-- Array of opposing elements
opp_elements = {
['Fire'] = 'Water', --Fire (0) spell, weak to water (5)
['Ice'] = 'Fire', --Ice (1) spell, weak to fire (0)
['Wind'] = 'Ice', --Wind (2) spell, weak to ice (1)
['Earth'] = 'Wind', --Earth (3) spell, weak to wind (2)
['Thunder'] = 'Earth', --Thunder (4) spell, weak to earth (3)
['Water'] = 'Thunder', --Water (5) spell, weak to thunder (4)
['Light'] = 'Light', --Light (6) spell, weak to dark (7)
['Dark'] = 'Dark' --Dark (7) spell, weak to light (6)
}
-- Check for spell and weather element match, equip weather set if true
if spell_element == world.weather_element then equip(sets.weather) end
-- Check for spell and day element match, equip day set if true
if spell_element == world.day_element then equip(sets.day) end
-- Check for obi element conflict, equip rainbow obi when no conflict
if (spell_element == (world.day_element or world.weather_element))
and (spell_element ~= opp_elements[world.day_element] and spell_element ~= opp_elements[world.weather_element])
then equip(sets.obi)
end
end
You'll need to create the following sets (they can be empty)
sets.weather
sets.day
sets.obi
and put only your all weather enhancing gear in them, like obi's or rings. I actually only use the obi set at the moment on my sch and geo.
Similarly I also have a Klimaform checker
function klimacheck()
-- Klimaform Check
if buffactive.Klimaform then equip(sets.klimaform)
end
end
This requires the following sets:
sets.klimaform
Now to actually use these functions, you just call them at the end of your equip line in your midcast.
For example:
elseif spell.skill == 'Elemental Magic' then equip sets.midcast.MA.elemental mweathercheck(spell.element) klimacheck()
You can see here I have a rule for whenever an elemental magic spell is cast, an elemental magic set is equipped, and then the check functions are called right after (which will equip the additional weather gear on top of whatever was in the set you called first)
Now my actual line in my lua looks like this:
elseif spell.skill == 'Elemental Magic' then mmodecheck(magic_index) mweathercheck(spell.element) klimacheck() immcheck()
I have a separate function to check what magic mode I am currently in (high mab, high macc, magic burst, or conserve mp), equip the appropriate set, then add in weather gear if appropriate, and then add klima gear if appropriate, and then add immanence gear if appropriate.
I'll leave it to you to figure out how to do modes if you wanna get into that.