Skip to content

Commit

Permalink
Update combatmode to work better with the new AutoTargetMode
Browse files Browse the repository at this point in the history
With this change, using AutoTargetMode to engage you can also
now run in if combatmode is set to melee. This significantly
enhances utility in things like Odyssey Sheol farms.
  • Loading branch information
aldros-ffxi committed Jan 7, 2025
1 parent 215d27f commit 13851a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cylibs/trust/roles/combat_mode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function CombatMode:check_distance()
local self_mob = windower.ffxi.get_mob_by_target('me')
if target == nil or not battle_util.is_valid_target(target.id) then return end

if party_util.party_claimed(target.id) then
if party_util.party_claimed(target.id) or (state.AutoTargetMode.value == "Auto" and Condition.check_conditions(L{InBattleCondition.new()}, windower.ffxi.get_player().index)) then
if L{'Ranged'}:contains(state.CombatMode.value) then
if target.distance:sqrt() < self.range_distance then
self.action_queue:push_action(RunAwayAction.new(target.index, self.range_distance), true)
Expand Down

0 comments on commit 13851a1

Please sign in to comment.