I wouldn't have thought this would matter, but I was able to get that sets.midcast.Enmity to work by moving your set.midcast.Enmity = {...} to a line above sets.midcast.Cure
https://pastebin.com/v2z63Sdb
===================
Aside - the deal w/ Mote's includes is the automatic event for "midcast" is handled by the include, so anything you want to do other than that should be a different function, job_midcast
Code:
function midcast(spell)
handle_actions(spell, 'midcast')
end
The handle actions function looks like, in essence:
Code:
function handle_actions(spell, action)
Do some things to prepare and get spell info
if exists, run User_midcast(spell, action, spellMap, eventArgs) --Defined in a personal include? I don't use any of these to say for sure
if exists, run Job_midcast(spell, action, spellMap, eventArgs) --Defined in your own job lua for specific actions to that job that you want to happen before the default swaps - for example, deciding which elemental obi is the best one for this spell
run default_midcast(spell, spellMap) --action defined by mote's includes - equip the set defined as midcast for this spell or action. Some fancy things to see exactly which set that is, but all boils down to 'equip this set'
if exists, run User_Post_midcast(spell, action, spellMap, eventArgs) --actions to take after the set is equipped on the user level. Again, haven't used this
if exists, run Job_Post_midcast(spell, action, spellMap, eventArgs) --Defined by job lua, things that should happen after other rules - ie, equip sch hands over top of default for bonus duration if perpetuance is active
end