function update_melee_groups()
classes.CustomMeleeGroups:clear()
if player.equipment.main == "Ryunohige" and state.Buff['Aftermath: Lv.3'] then
classes.CustomMeleeGroups:append('AM')
end
-- Spirit Surge modifies the custom melee groups
if state.Buff['Spirit Surge'] then
classes.CustomMeleeGroups:append('SS')
end
if buffactive['Samurai Roll'] then
classes.CustomMeleeGroups:append('SAMRoll')
end
if not is_dual_wielding() then
local haste = 0 -- Lili was here
haste = haste + (buffactive[33] and (lasthaste == 2 and 30 or 15) or 0) -- Haste II or Haste
haste = haste + (buffactive[580] and 35.5 or 0) -- Indi/Geo-Haste, 30% at 900 skill, 35.5 with Dunna, 41 with Idris
haste = haste + (buffactive[370] and 5 or 0) -- Haste Samba, assuming minimum strength of 5%
haste = haste + (buffactive[604] and 15 or 0) -- Mighty Guard
haste = haste + (buffactive[228] and 26 or 0) -- Embrava, assuming maximum potency of 26%
if buffactive.March then
-- March potencies makes some assumptions:
-- Honor March: 16.99 - Victory March: 28.61 - Advancing March: 18.95
haste = haste + (buffactive.March >= 3 and 16.99+28.61+18.95 or 0) -- Assumes max potency marches
haste = haste + (buffactive.March == 2 and 16.99+28.61 or 0) -- Assumes max potency Honor March + Victory March.
haste = haste + (buffactive.March == 1 and 16.99 or 0) -- Assumes max potency Honor March
end
if haste > 40 and pet.isvalid and buffactive.Hasso then
add_to_chat(8, '----Max-Haste Mode Enabled----')
classes.CustomMeleeGroups:append('MaxHaste')
end
end
if is_dual_wielding() then
local haste = 0 -- Lili was here
haste = haste + (buffactive[33] and (lasthaste == 2 and 30 or 15) or 0) -- Haste II or Haste
haste = haste + (buffactive[580] and 35.5 or 0) -- Indi/Geo-Haste, 30% at 900 skill, 35.5 with Dunna, 41 with Idris
haste = haste + (buffactive[370] and 5 or 0) -- Haste Samba, assuming minimum strength of 5%
haste = haste + (buffactive[604] and 15 or 0) -- Mighty Guard
haste = haste + (buffactive[228] and 26 or 0) -- Embrava, assuming maximum potency of 26%
if buffactive.March then
-- March potencies makes some assumptions:
-- Honor March: 16.99 - Victory March: 28.61 - Advancing March: 18.95
haste = haste + (buffactive.March >= 3 and 16.99+28.61+18.95 or 0) -- Assumes max potency marches
haste = haste + (buffactive.March == 2 and 16.99+28.61 or 0) -- Assumes max potency Honor March + Victory March.
haste = haste + (buffactive.March == 1 and 16.99 or 0) -- Assumes max potency Honor March
end
if haste > 40 then
add_to_chat(8, '----Max-Haste Mode Enabled----')
classes.CustomMeleeGroups:append('MaxHaste')
elseif haste >= 35 then
add_to_chat(8, '---Haste 35%---')
classes.CustomMeleeGroups:append('Haste_35')
elseif haste >= 30 then
add_to_chat(8, '---Haste 30%---')
classes.CustomMeleeGroups:append('Haste_30')
elseif haste >= 15 then
add_to_chat(8, '---Haste 15%---')
classes.CustomMeleeGroups:append('Haste_15')
end
end
end