Skip to content

Commit

Permalink
v10.7.3 (#188)
Browse files Browse the repository at this point in the history
* Adding support for Entrust + Indicolure in Gambit picker

* Adding check for extra song instrument while singing dummy songs

* Fixing singer view selection

* Update README.md

* Adding Bard song diagnostics

* Adding tags field to Gambit

* Adding support for no sub job

* Disabling sub job menu item when no sub job is present

* Bumping Trust version to 10.1.0

* PR feedback

* Adding Reactions menu item

* Updating default Red Mage trust settings

* Updating default widget positions

* Fixing false positive in Bard trust diagnostics

* PR feedback

* WIP of speed singing

* Getting rid of extra multiplier on Marcato duration

* Adding StepTracker and HasDazeCondition

* Adding Command Gambit ability

* Adding // trust sc mintp command

* Adding elemental resistances

* Collapsing debuffs section of target widget when there are no debuffs

* Target widget cleanup

* Clean up

* Moving turn to face mob out of action queue

* Adding new actions

* Adding GridLayout

* Showing and disabling spells and job abilities which are unavailable on sub job

* Adding more resistance data to monster families

* Adding shortcuts for menus and widgets

* Adding shortcut for gambits

* Adding shortcut for skillchains menu

* Fixing nil issue

* Fixing nil exception in SongTracker

* Fixing regression with Gambits

* Adding missing __eq function to RunTo and RunAway

* Disabling singing while moving

* Updating default Bard trust settings and fixing song editor to respect current mode

* Fixing nil issue with ConfigEditor

* Fixing more focus issues

* Bumping Trust version to 10.2.0

* PR feedback

* Updating deafult alter egos and pull targets

* Adding more pull targets

* Updating default widget positions

* Updating release notes

* Updating manifest

* Update create_release.yml

* Updating TrustInstaller

* Updating manifest.json

* Update README.md

* Update README.md

* Updating manifest.json

* Fixing singer regressions

* Disabling keyboard shortcuts while chat is open

* Adding rolls viwe

* Adding Geomancy view

* Fixing edge case with Shooter

* Adding separate queue for equipping automaton attachments

* Disabling AutoPetMode while equipping attachments

* Fixing issue where ManeuverMode would be overriden by settings

* Overhauled AutomatonSettingsMenuItem and added abilty to customize maneuvers

* Updating help text for maneuver menu.

* Updating ManeuverMode help text

* Removing res.items dependency on PUP job file

* PR feedback

* Adding TODO

* Fixing regression in SongSettingsMenuItem

* Bumping Trust version to 10.2.1

* Fixing merge issue in manifest.json

* Adding PetStatusWidget

* Adding AutomatonStatusWidget

* Updating PetMode on AutomatonStatusWidget when changing attachments

* Removing debug error

* Bumping Trust version to 10.2.2

* Updating AutomatonStatusWidget text formatting

* Fixing scrolling content offset with section header views

* Adding pet ability in AutomatonStatusWidget

* Updating default position for pet status widget

* Updating default attachment set for LightTank

* Re-enabling AutoFaceMobMode while singing because turn to face mob is no longer in action queue

* Fixing copy on GambitSettingsMenuItem reset button

* Adding Default and Gambits for Rune Fencer

* Adding PathWidget

* Adding TargetNameCondition

* Fixing nil exception in PathRecorder

* Fixing nil exception in PathRecorder

* Adding new IPC messages

* Fixing self targeting weapon skills and nil exception with job abilities

* Updating release notes for 10.3.0

* PR feedback

* Bumping Trust version to 10.3.1

* Adding autocomplete for Trust commands

* Resetting content offset of autocomplete when menu disappears

* Removing ActionBatchingMode

* Adding MigrationManager and migration to move Bard job settings under SongSettings key

* Updating default Bard job settings file

* Adding menu to pick pianissimo songs

* Refactoring commands into GeneralCommands and MenuCommands and adding settings.xml flag to disable autocomplete

* Showing command description in info bar

* PR feedback

* Fixing missing handle_stop issue

* Fixing issue where no pianissimo song is initially selected

* Adding pianissimo songs to SongSettingsEditor

* Updating description for AutoClarionCallMode

* Fixing issue reordering Pianissimo songs

* Adding Soul Voice as a conflicting buff for Marcato

* Updating release notes

* PR feedback

* Adding menu for editing the remote commands whitelist

* Update migration_v1.lua

* Fixing issue where Bard settings migration ran on all jobs

* PR feedback

* Fixing merge issue

* PR feedback

* Fixing issue where EarthSpirit would not be dismissed

* Fixing issue where BloodPactSettings default ability would not appear selected

* Adding Puller role if neither main nor sub job Trust can pull

* Clean up

* Fixing spell, job ability and weapon skill actions for JP players

* Fixing strategem actions for JP players

* PR feedback

* PR feedback

* Updating release notes

* Adding CombatSkillsCondition and updating Hasso to only be used with 2-handed weapons

* Fixing issue where pull distance can't be edited in the UI

* Bumping Trust version to 10.4.5

* Updating default Samurai job settings file

* Adding MagicBurstTrustCommands and NukeTrustCommands

* Adding NukeCommands

* Fixing issue where Scholar menu does not refresh when changing arts

* Bumping Trust version to 10.4.6

* Adding nil check in party mob update packet

* Updating release notes

* Adding MultiPickerConfigItem

* PR feedback

* Edge cases for Truster

* Fixing nil error

* Remove sleep debuff when attacking a monster

* Fixing issue with casting spell on dead enemy

* Adding JobCondition to match multiple jobs

* Fixing PLD Gambits

* Updating default Gambits for Dancer

* Adding Apururu to cylibs/res/trusts.lua

* Bumping Trust version to 10.4.8

* Filtering out Gambit ability targets if job has no abilities for that target type

* Fixing typo in EnemiesNearbyCondition

* Updating manifest.json

* Bumping Trust version to 10.4.9

* Fixing TargetNameCondition

* Bumping Trust version to 10.5.0

* PR feedback

* Adding Phalanx and Phalanx II to blacklist for Buff.new

* Adding more spells to Buff blacklist

* Updating default job settings for Red Mage

* Adding Reset button to Self and Party buff settings

* Updating default Red Mage job settings file

* Adding // trust set and // trust cycle commands to auto complete

* Converting TrustInfoBar to a MarqueeCollectionViewCell

* Cleanup

* Hiding status removal Blacklist for Red Mage

* Truncating skillchains

* Adding AutoCampMode

* Bumping Trust version to 10.5.2

* PR feedback

* Updating HealerSettingsMenuItem to use new ModeConfigEditor

* Adding friendly descriptions for AutoHealMode, AutoStatusRemovalMode and AutoDetectAuraMode

* Migrating modes menus to ModeConfigEditor

* Updating description for AutoGambitMode

* Fixing issue where GambitSettingsEditor reset when getting focus

* Showing full gambit description in info bar

* Bumping Trust version to 10.5.3

* PR feedback

* Updating is_moving

* Updating manifest.json

* Fixing typo

* Filtering out Gambits where ability is nil

* Updating SkillchainPropertyCondition to use MultiPickerConfigItem

* Updating manifest.json

* Adding replacements for AzureSets

* Fixing issue with Call Wyvern Gambit

* Fixing Nukes Config editor

* Updating // trust pull camp to work when main job doesn't have puller role

* PR feedback

* Nil fixes

* Fixing issue where setting storm II would evaluate to storm I

* Adding option to mirror AutoEngageMode and CombatMode when assisting

* Showing Pulling menu item in main job settings menu even if main job does not have puller role

* Bumping Trust version to 10.5.9

* PR feedback

* Updating get_spirit_for_day and adding avatar widget

* Bumping Trust version to 10.6.0

* Fixing remote commands and pull commands

* Commenting out WeaponSkill.to_action because it was messing up action hud

* Adding conditions to skillchain steps

* Bumping Trust version to 10.6.2

* Updating rolling modes delta

* Adding ShooterSettingsMenuItem

* Checking AutoSkillchainMode in Shooter role

* Fixing issue where SkillChainAbility conditions was nil

* Fixing issue with abilities buff empty state

* Updating RollSettingsMenuItem

* Fixing duplicate MaxDistanceCondition on RangedAttack

* Fixing duplicate MaxDistanceCondition on Approach

* Removing skillchain sets from UI

* Migrating AlterEgoSettingsMenuItem to use new UX pattern

* Fixing issue where Conditions menu item doesn't work in job abilities buff item

* Adding Reset button to JobAbilitiesSettingsMenuItem

* Updating description for AutoRollMode

* PR feedback

* spell_util changes (#182)

* Update sleeper.lua

Replace use of "spell_util.get_spell_recast" with "spell_util.is_spell_on_cooldown"

* Update spell_util.lua

Remove "get_spell_recast" and fix "can_cast_spell" and "is_spell_on_cooldown" to use "windower.ffxi.get_spell_recasts" instead

* Update spell_util.lua

Add "Aria of Passion", "Dispelga" and "Impact" to whitelisted spells

* Adding default Scholar gambits to use Addendum: White and Black

* Updating distance for Full Circle and adding migration for new SCH default gambits

* Disabling mode changes while a mode delta is active

* Adding new menu view to create battle sets

* Adding Profiles menu item

* Bumping Trust version to 10.7.0

* PR feedback

* Renaming CreateBattleSetEditor to CreateProfileEditor

* Adding repeating migration to update Default gambits

* PR feedback

* Adding PetTacticalPointsCondition and hook in Gambiter

* Bumping Trust version to 10.7.2

* Adding Corpse target to Ally for Gambits

* Updating default DRG gambits

---------

Co-authored-by: Seth VanHeulen <[email protected]>
  • Loading branch information
cyrite and svanheulen committed Sep 19, 2024
1 parent da993ba commit 649c9d5
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 4 deletions.
1 change: 1 addition & 0 deletions Trust-Cylibs-Include.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ NeverCondition = require('cylibs/conditions/never')
NotCondition = require('cylibs/conditions/not_condition')
NumResistsCondition = require('cylibs/conditions/num_resists')
PetHitPointsPercentCondition = require('cylibs/conditions/pet_hpp')
PetTacticalPointsCondition = require('cylibs/conditions/pet_tp')
ReadyAbilityCondition = require('cylibs/conditions/ready_ability')
SkillchainPropertyCondition = require('cylibs/conditions/skillchain_property')
SpellRecastReadyCondition = require('cylibs/conditions/spell_recast_ready')
Expand Down
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 = '10.7.1'
_addon.version = '10.7.3'
_addon.release_notes = [[
This update introduces new menus for Bard, autocomplete for Trust
commands, new commands and important bug fixes for users running the
Expand Down
1 change: 1 addition & 0 deletions cylibs/conditions/condition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function Condition.defaultSerializableConditionClasses()
EnemiesNearbyCondition.__class,
ModeCondition.__class,
PetHitPointsPercentCondition.__class,
PetTacticalPointsCondition.__class,
HasPetCondition.__class,
NumResistsCondition.__class,
SkillchainPropertyCondition.__class,
Expand Down
61 changes: 61 additions & 0 deletions cylibs/conditions/pet_tp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---------------------------
-- Condition checking the player's pet's tactical points.
-- @class module
-- @name PetTacticalPointsCondition
local ConfigItem = require('ui/settings/editors/config/ConfigItem')
local PickerConfigItem = require('ui/settings/editors/config/PickerConfigItem')
local serializer_util = require('cylibs/util/serializer_util')

local Condition = require('cylibs/conditions/condition')
local PetTacticalPointsCondition = setmetatable({}, { __index = Condition })
PetTacticalPointsCondition.__index = PetTacticalPointsCondition
PetTacticalPointsCondition.__type = "PetTacticalPointsCondition"
PetTacticalPointsCondition.__class = "PetTacticalPointsCondition"

function PetTacticalPointsCondition.new(tp, operator)
local self = setmetatable(Condition.new(), PetTacticalPointsCondition)
self.tp = tp or 1000
self.operator = operator or Condition.Operator.LessThanOrEqualTo
return self
end

function PetTacticalPointsCondition:is_satisfied(target_index, tp)
local target = windower.ffxi.get_mob_by_index(target_index)
if target and tp then
local pet_index = target.pet_index
if pet_index and pet_index ~= 0 then
local pet = windower.ffxi.get_mob_by_index(pet_index)
return pet and Condition:eval(tp, self.tp, self.operator)
end
end
return false
end

function PetTacticalPointsCondition:get_config_items()
return L{
ConfigItem.new('tp', 0, 3000, 100, function(value) return value.."" end, "TP"),
PickerConfigItem.new('operator', self.operator, L{ Condition.Operator.GreaterThanOrEqualTo, Condition.Operator.Equals, Condition.Operator.GreaterThan, Condition.Operator.LessThan, Condition.Operator.LessThanOrEqualTo }, nil, "Operator")
}
end

function PetTacticalPointsCondition:tostring()
return "Pet TP "..self.operator.." "..self.tp
end

function PetTacticalPointsCondition.description()
return "Pet TP."
end

function PetTacticalPointsCondition.valid_targets()
return S{ Condition.TargetType.Self }
end

function PetTacticalPointsCondition:serialize()
return "PetTacticalPointsCondition.new(" .. serializer_util.serialize_args(self.tp, self.operator) .. ")"
end

return PetTacticalPointsCondition




18 changes: 18 additions & 0 deletions cylibs/trust/roles/gambiter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,24 @@ function Gambiter:on_add()
end
end)

WindowerEvents.PetUpdate:addAction(function(owner_id, pet_id, pet_index, pet_name, pet_hpp, pet_mpp, pet_tp)
local target = self:get_player()
if target and target:get_id() == owner_id then
logger.notice(self.__class, 'on_pet_update', 'check_gambits')

local gambits = self:get_all_gambits():filter(function(gambit)
for condition in gambit:getConditions():it() do
if condition.__type == PetTacticalPointsCondition.__type then
return true
end
return false
end
end)

self:check_gambits(L{ target }, gambits, pet_tp)
end
end)

self.skillchainer:on_skillchain():addAction(function(target_id, skillchain_step)
local target = self:get_target()
if target and target:get_id() == target_id then
Expand Down
1 change: 1 addition & 0 deletions data/DRG.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ return {
Default = L{
Gambit.new("Self", L{NotCondition.new(L{HasBuffCondition.new("Spirit Surge")}), NotCondition.new(L{HasPetCondition.new()})}, JobAbility.new("Call Wyvern", L{}, L{}), "Self", L{}),
Gambit.new("Self", L{HasPetCondition.new(L{}), PetHitPointsPercentCondition.new(25, "<=")}, JobAbility.new("Spirit Link", L{}, L{}), "Self"),
Gambit.new("Self", L{HasPetCondition.new(L{}), PetTacticalPointsCondition.new(3000, "=="), MaxTacticalPointsCondition.new(500)}, JobAbility.new("Spirit Link", L{}, L{}), "Self", L{}),
Gambit.new("Self", L{HasPetCondition.new(L{}), InBattleCondition.new()}, JobAbility.new("Spirit Bond", L{}, L{}), "Self"),
Gambit.new("Enemy", L{MaxTacticalPointsCondition.new(1000)}, JobAbility.new("Jump", L{}, L{}), "Self"),
Gambit.new("Enemy", L{MaxTacticalPointsCondition.new(1000)}, JobAbility.new("High Jump", L{}, L{}), "Self"),
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "10.7.1",
"download_url": "https://github.com/cyritegamestudios/trust/releases/download/v10.7.1/trust.zip"
"version": "10.7.3",
"download_url": "https://github.com/cyritegamestudios/trust/archive/refs/heads/alpha.zip"
}
1 change: 1 addition & 0 deletions ui/settings/menus/conditions/ConditionSettingsMenuItem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function ConditionSettingsMenuItem.new(trustSettings, trustSettingsMode, parentM
[EnemiesNearbyCondition.__type] = "enemies_nearby",
[ModeCondition.__type] = "mode",
[PetHitPointsPercentCondition.__type] = "pet_hpp",
[PetTacticalPointsCondition.__type] = "pet_tp",
[HasPetCondition.__type] = "has_pet",
[NumResistsCondition.__type] = "num_resists",
[SkillchainPropertyCondition.__type] = "skillchain_property",
Expand Down
2 changes: 1 addition & 1 deletion ui/settings/menus/gambits/GambitSettingsMenuItem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ end
function GambitSettingsMenuItem:getAbilities(gambitTarget, flatten)
local gambitTargetMap = T{
[GambitTarget.TargetType.Self] = S{'Self'},
[GambitTarget.TargetType.Ally] = S{'Party'},
[GambitTarget.TargetType.Ally] = S{'Party', 'Corpse'},
[GambitTarget.TargetType.Enemy] = S{'Enemy'}
}
local targets = gambitTargetMap[gambitTarget]
Expand Down

0 comments on commit 649c9d5

Please sign in to comment.