Skip to content

Commit

Permalink
v9.5.2 (#134)
Browse files Browse the repository at this point in the history
* Adding workflows files

* Automated commit to update trust

* Re-adding README.md

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Update weapon_skill.lua

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Update README.md

* Automated commit to update trust

* Automated commit to update trust

* Update README.md

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Automated commit to update trust

* Removing duplicate Trust/commands folder (#112)

* Updating .gitignore to ignore player specific settings (#113)

* Removing duplicate Trust/commands folder

* Updating .gitignore to ignore player specific settings

* Updating .gitignore

* Updating .gitignore

* Updating .gitignore

* Bumping Trust version to 9.2.2

* Update to use the new target distance logic

This should be way more robust for large targets and max melee range.
The calc is now:
```
target.distance:sqrt() > self.melee_distance + self_mob.model_size + target.model_size - 0.1
```
The 0.1 is a correction for distance for smaller model enemies.

This calc is based on the calc in distanceplus, so it should now match
those calculations

* Adding icons for spell picker views

* Changing sizes of editors and integrating icons

* Moving vertical scroll bar over background

* More UI migrations

* Adding job abilities icon

* Updating size of FFXITextInputView and adding section header

* Fixing issue removing buffs

* Hiding jobs picker on self buffs

* Refactoring several more screens to use new design language

* Fixing issue with SongSettingsEditor

* Migrating BloodPact UI

* Adding Geomancy icons

* Adding songs picker item

* Fixing bugs

* Increasing width of SkillchainAbilityPickerView

* Adding editor to configure logger settings

* Adding menu to edit follow distance

* Adding icons for blood pacts

* Updating settings view

* Fixing crashes

* Bumping Trust version to 9.3.0

* Fixing issue where DRK trust pull settings would be ignored

* Adding Absorb and Drain spells to self buffs

* Adding Light Arts and Dark Arts to UI

* Fixing scroll issue on status ailment blacklist picker view

* Copy update

* Updating copy

* Adding auto cancel of copy image when casting Utsusemi

* Adding temporary fix for Utsusemi: Ichi and Ni

* Adding support for Utsusemi

* Fixing shadows on sub job

* PR feedback

* Fixing edge case with Buff where you do not know any tier of the spell

* Reverting change that causes buffs not to save

* Workaround for garbled sender message (#107)

* Added validator to prevent the same roll from being used for Roll1 and Roll2

* Adding skillchain builder to Trust UI

* Adding ability to save skillchain from builder

* Fixing scroll delta in JobAbilityPickerView

* Fixing issues with skillchain builder and JP client

* Bumping Trust version to 9.4.0

* Fixing merge issue

* PR feedback

* Adding ability to combine multiple combat skill types in the skillchain builder

* Adding Marksmanship and Archery to skillchain builder

* Adding Reset button to skillchain builder

* Adding paging to skillchain builder results

* Adding IpcMessage to sync main and ranged weapons for party members

* Adding ability to choose party members for each step of the skillchain

* Broadcasting main and ranged weapon id when a new IpcConnection is established

* Updating version update notes

* Streamlining skillchain builder menu items

* PR feedback

* Fixing edge cases with shadows

* Fixing edge case with send commands for party skillchain builder

* Bumping Trust version to 9.4.1

* Adding Prime weapon skills to skillchainer

* Updating text from Confirm to Search in skillchain builder

* Fixing typo

* Adding Distance to PullSettings as well as config editor

* Increasing approach pull distance to 35

* Adding Distance to PullSettings for all jobs

* Adding Nuker, MagicBurster and Debuffer roles to Ninja trust

* Updating default Ninja trust settings

* Adding Puller role to Ninja trust

* Updating release notes

* Fixing typo

* Adding AlterEgoSettingsMenuItem

* Bumping Trust version to 9.5.0

* PR feedback

* Fixing issue where Status > Debuffs would show for jobs without Debuffer role

* Setting text in info bar when selecting a mode

* Removing debug text

* Sorting debuffs and buffs in picker view alphabetically

* Adding Once and Repeat to path menu item

* Adding path renaming

* Fixing spacing in job/load settings views

* Adding condition settings editor to self and party spell buffs

* Adding weapon skill id on on_weapon_skill_finish event

* Adding editor for has_buff_condition

* Adding conditions editor to job abilities

* Updating release notes

* Adding conditions to pull abilities

* Updating editor size for pull target editor

* Adding ability to click trust status widget action marquee to toggle Trust on and off

* Adding ability to toggle the menu by clicking on the main/sub job name in trust status widget

* PR feedback

* Automatically clearing assist target when setting AutoTargetMode to anything but Off

* Adding Nuker and MagicBurster roles to Paladin and updating default job settings file

* Disengaging when targeting self but engaged

---------

Co-authored-by: cyritegamestudios <>
Co-authored-by: Sean Pryor <[email protected]>
Co-authored-by: furiex-ffxi <[email protected]>
  • Loading branch information
3 people authored Jul 13, 2024
1 parent 8c40b54 commit f62ad4f
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Trust.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_addon.author = 'Cyrite'
_addon.commands = {'Trust','trust'}
_addon.name = 'Trust'
_addon.version = '9.5.1'
_addon.version = '9.5.2'
_addon.release_notes = [[
This update features improvements to the Ninja trust, additional
settings for pulling and the ability to choose Alter Egos to summon
Expand Down
65 changes: 65 additions & 0 deletions cylibs/actions/disengage.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---------------------------
-- Disengages from the current target.
-- @class module
-- @name DisengageAction


local packets = require('packets')

local Action = require('cylibs/actions/action')
local DisengageAction = setmetatable({}, {__index = Action })
DisengageAction.__index = DisengageAction

function DisengageAction.new()
local conditions = L{
InBattleCondition.new(),
}
local self = setmetatable(Action.new(0, 0, 0, nil, conditions), DisengageAction)

self:debug_log_create(self:gettype())

return self
end

function DisengageAction:destroy()
self:debug_log_destroy(self:gettype())

Action.destroy(self)
end

function DisengageAction:perform()
local p = packets.new('outgoing', 0x01A)

p['Target'] = windower.ffxi.get_player().id
p['Target Index'] = windower.ffxi.get_player().index
p['Category'] = 0x04 -- Disengage
p['Param'] = 0
p['X Offset'] = 0
p['Z Offset'] = 0
p['Y Offset'] = 0

packets.inject(p)
end

function DisengageAction:gettype()
return "disengageaction"
end

function DisengageAction:getrawdata()
local res = {}
return res
end

function DisengageAction:tostring()
local target = windower.ffxi.get_mob_by_index(self.target_index)
return 'Disengaging'
end

function DisengageAction:debug_string()
return "DisengageAction"
end

return DisengageAction



24 changes: 21 additions & 3 deletions cylibs/trust/roles/attacker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ local battle_util = require('cylibs/util/battle_util')
local party_util = require('cylibs/util/party_util')
local BlockAction = require('cylibs/actions/block')
local CommandAction = require('cylibs/actions/command')
local DisengageAction = require('cylibs/actions/disengage')

local Attacker = setmetatable({}, {__index = Role })
Attacker.__index = Attacker
Expand Down Expand Up @@ -86,10 +87,27 @@ function Attacker:check_engage()
end

function Attacker:attack_mob(target)
local attack_action = BlockAction.new(function() battle_util.target_mob(target.index) end, "attacker_engage")
attack_action.priority = ActionPriority.high
if player.status == 'Engaged' and self:is_targeting_self() then
local disengage_action = DisengageAction.new()
disengage_action.priority = ActionPriority.high

self.action_queue:push_action(attack_action, true)
self.action_queue:push_action(disengage_action, true)
else
local attack_action = BlockAction.new(function() battle_util.target_mob(target.index) end, "attacker_engage")
attack_action.priority = ActionPriority.high

self.action_queue:push_action(attack_action, true)
end
end

function Attacker:is_targeting_self()
local current_target_index = windower.ffxi.get_player().target_index
if current_target_index then
if current_target_index == windower.ffxi.get_player().index then
return true
end
end
return false
end

function Attacker:allows_duplicates()
Expand Down
2 changes: 1 addition & 1 deletion cylibs/util/battle_util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function battle_util.is_valid_monster_target(target_id)
if target_id == nil then return false end

local target = windower.ffxi.get_mob_by_id(target_id)
if target and target.hpp > 0 and target.valid_target and target.spawn_type == 16 then
if target and target.id ~= windower.ffxi.get_player().id and target.hpp > 0 and target.valid_target and target.spawn_type == 16 then
return true
end
return false
Expand Down

0 comments on commit f62ad4f

Please sign in to comment.