Skip to content

Commit

Permalink
v8.5.2 (#84)
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

---------

Co-authored-by: cyritegamestudios <>
  • Loading branch information
cyrite authored Jan 29, 2024
1 parent 1f6cd7b commit bb298b9
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 13 deletions.
3 changes: 2 additions & 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 = '8.5.1'
_addon.version = '8.5.2'
_addon.release_notes = [[
Trusts now come fully equipped with a skillchain calculator and can
make powerful skillchains of their own without any configuration!
Expand Down Expand Up @@ -56,6 +56,7 @@ default.hud = {}
default.hud.position = {}
default.hud.position.x = 0
default.hud.position.y = 0
default.hud.auto_hide = true
default.logging = {}
default.logging.enabled = false
default.logging.logtofile = false
Expand Down
2 changes: 1 addition & 1 deletion cylibs/actions/action_queue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function ActionQueue:perform_next_action()
end
self.current_action = next_action
if self.verbose then
self:on_action_start():trigger(self, next_action:tostring())
self:on_action_start():trigger(self, next_action)
end
--print(tostring(self.identifier)..' '..next_action:gettype()..' '..(next_action:getidentifier() or 'nil')..' start')

Expand Down
6 changes: 5 additions & 1 deletion cylibs/actions/spell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ function SpellAction:perform()
local target = windower.ffxi.get_mob_by_index(self.target_index)
local spell = res.spells[self.spell_id]

windower.chat.input("/ma %s ":format(spell.en)..target.id)
if windower.ffxi.get_info().language:lower() == 'japanese' then
windower.chat.input("/ma %s ":format(spell.en)..target.id)
else
windower.chat.input('/ma "%s"':format(spell.en)..target.id)
end
end

function SpellAction:getspellid()
Expand Down
2 changes: 1 addition & 1 deletion cylibs/actions/ui/action_hud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function ActionHud.new(actionQueue, hideBackground)
self.actionQueue = actionQueue

self:getDisposeBag():add(actionQueue:on_action_start():addAction(function(_, s)
self:setTitle(s or '')
self:setTitle(s:tostring() or '')
end), actionQueue:on_action_start())
self:getDisposeBag():add(actionQueue:on_action_end():addAction(function(_, s)
self:setTitle('')
Expand Down
9 changes: 5 additions & 4 deletions cylibs/battle/aura_tracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require('logger')

local AuraTracker = {}
AuraTracker.__index = AuraTracker
AuraTracker.__class = "AuraTracker"

-------
-- Default initializer for a new damage memory tracker.
Expand Down Expand Up @@ -42,7 +43,7 @@ end
function AuraTracker:tic(_, _)
for target_id, target_record in pairs(self.status_effect_history) do
for debuff_id, _ in pairs(target_record) do
print('checking '..debuff_id..' on '..target_id)
logger.notice(self.__class, 'tic', debuff_id, target_id)
local party_member = self.party:get_party_member(target_id)
if party_member and party_member:has_debuff(debuff_id) then
self:increment_aura_probability(debuff_id)
Expand Down Expand Up @@ -87,7 +88,7 @@ function AuraTracker:record_status_effect_removal(spell_id, target_id, debuff_id

self.status_effect_history[target_id] = target_record

print('recording '..debuff_id..' on '..target_id)
logger.notice(self.__class, 'record_status_effect_removal', debuff_id, target_id)
end
end

Expand All @@ -99,7 +100,7 @@ function AuraTracker:increment_aura_probability(debuff_id)

self.aura_probabilities[debuff_id] = math.min(current_probabilty + 25, 100)

print('current aura chance of '..debuff_id.. ' is '..self.aura_probabilities[debuff_id])
logger.notice(self.__class, 'increment_aura_probability', debuff_id, self.aura_probabilities[debuff_id])
end

-------
Expand All @@ -110,7 +111,7 @@ function AuraTracker:decrement_aura_probability(debuff_id)

self.aura_probabilities[debuff_id] = math.max(current_probabilty - 25, 0)

print('current aura chance of '..debuff_id.. ' is '..self.aura_probabilities[debuff_id])
logger.notice(self.__class, 'decrement_aura_probability', debuff_id, self.aura_probabilities[debuff_id])
end

-------
Expand Down
2 changes: 2 additions & 0 deletions cylibs/res/skills.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ skills.weapon_skills = {
[44] = {en='Death Blossom',skillchain={'Fragmentation','Distortion'}},
[45] = {en='Atonement',skillchain={'Fusion','Reverberation'}},
[46] = {en='Expiacion',skillchain={'Distortion','Scission'}},
[47] = {en="Sanguine Blade",skillchain={}},
[48] = {en='Hard Slash',skillchain={'Scission'}},
[49] = {en='Power Slash',skillchain={'Transfixion'}},
[50] = {en='Frostbite',skillchain={'Induration'}},
Expand Down Expand Up @@ -163,6 +164,7 @@ skills.weapon_skills = {
[180] = {en='Sunburst',skillchain={'Compression','Reverberation'}},
[181] = {en='Shell Crusher',skillchain={'Detonation'}},
[182] = {en='Full Swing',skillchain={'Liquefaction','Impaction'}},
[183] = {en="Spirit Taker",skillchain={}},
[184] = {en='Retribution',skillchain={'Gravitation','Reverberation'}},
[185] = {en='Gate of Tartarus',skillchain={'Darkness','Distortion'}},
[186] = {en='Vidohunir',skillchain={'Fragmentation','Distortion'}},
Expand Down
18 changes: 16 additions & 2 deletions cylibs/trust/roles/skillchainer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ function Skillchainer:on_add()

self:update_abilities()

self.dispose_bag:add(self.action_queue:on_action_start():addAction(function(_, a)
if a:getidentifier() == self.action_identifier then
self.is_performing_ability = true
end
end), self.action_queue:on_action_start())

self.dispose_bag:add(self.action_queue:on_action_end():addAction(function(a, success)
if a:getidentifier() == self.action_identifier then
self.is_performing_ability = false
Expand Down Expand Up @@ -184,6 +190,12 @@ function Skillchainer:on_skillchain_mode_changed(_, new_value)
end
end

function Skillchainer:target_change(target_index)
Role.target_change(self, target_index)

self.is_performing_ability = false
end

function Skillchainer:check_skillchain()
if state.AutoSkillchainMode.value == 'Off' or self.is_performing_ability or not self.enabled or not self:get_player():is_engaged()
or os.time() - self.last_check_skillchain_time < 1 then
Expand All @@ -193,6 +205,7 @@ function Skillchainer:check_skillchain()

local target = self:get_target()
if target == nil then
logger.notice(self.__class, 'check_skillchain', 'target is nil')
return
end

Expand Down Expand Up @@ -291,17 +304,18 @@ end
function Skillchainer:perform_ability(ability)
local target = self:get_target()
if not self.action_queue.is_enabled or target == nil then
logger.notice(self.__class, 'perform_ability', ability:get_name(), not self.action_queue.is_enabled, target ~= nil)
return false
end

local ability_action = ability:to_action(target:get_mob().index, self:get_player())
if ability_action then
self.is_performing_ability = true

ability_action.identifier = self.action_identifier
ability_action.max_duration = 10
ability_action.priority = ActionPriority.highest

logger.notice(self.__class, 'perform_ability', ability:get_name(), 'push_action')

self.action_queue:push_action(ability_action, true)
end
end
Expand Down
2 changes: 1 addition & 1 deletion cylibs/trust/trust.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function Trust:init()
-- TODO: prune invalid actions instead of clear
--self.action_queue:clear()
self.target_index = new_target_index
self:job_target_change(new_target_index)
self:job_target_change(new_target_index, old_target_index)
end)
end

Expand Down
3 changes: 2 additions & 1 deletion settings/skillchains/CombatSkillSettings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function CombatSkillSettings.new(combatSkillName, blacklist, defaultWeaponSkillN
self.combatSkillName = combatSkillName
self.combatSkillId = res.skills:with('en', self.combatSkillName).id
self.blacklist = blacklist
self.defaultWeaponSkillName = defaultWeaponSkillName
self.defaultWeaponSkillId = job_util.weapon_skill_id(defaultWeaponSkillName)
return self
end
Expand Down Expand Up @@ -65,7 +66,7 @@ function CombatSkillSettings:get_name()
end

function CombatSkillSettings:serialize()
return "CombatSkillSettings.new(" .. serializer_util.serialize_args(self.combatSkillName, self.blacklist) .. ")"
return "CombatSkillSettings.new(" .. serializer_util.serialize_args(self.combatSkillName, self.blacklist, self.defaultWeaponSkillName) .. ")"
end

return CombatSkillSettings
4 changes: 3 additions & 1 deletion ui/TrustHud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ function TrustHud.new(player, action_queue, addon_enabled, menu_width, menu_heig

self:getDisposeBag():add(self.gameInfo:onMenuChange():addAction(function(_, isMenuOpen)
if isMenuOpen then
self.trustMenu:closeAll()
if settings.hud.auto_hide then
self.trustMenu:closeAll()
end
end
end), self.gameInfo:onMenuChange())

Expand Down

0 comments on commit bb298b9

Please sign in to comment.