diff --git a/Directory.Build.props b/Directory.Build.props index 0e92ffc8f..5f2d34830 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ net7.0-windows enable ArchiTed - 2.3.9 + 2.4.0 x64 AnyCPU diff --git a/Resources/AnimationLockTime.json b/Resources/AnimationLockTime.json index 7ff4bd921..5a5661922 100644 --- a/Resources/AnimationLockTime.json +++ b/Resources/AnimationLockTime.json @@ -60,6 +60,7 @@ "190": 0.1, "260": 0.6, "1128": 2.1, + "1129": 2.1, "2240": 0.6, "2242": 0.6, "2248": 0.6, @@ -174,13 +175,19 @@ "7505": 0.6, "7506": 0.6, "7507": 0.6, + "7509": 0.6, "7510": 0.1, "7511": 0.1, "7517": 0.6, "7518": 0.6, + "7527": 0.6, + "7528": 0.6, + "7529": 0.6, "7546": 0.6, "7548": 0.6, "7557": 0.6, + "7559": 0.6, + "7560": 0.6, "7561": 0.6, "7562": 0.6, "7568": 0.1, @@ -237,6 +244,8 @@ "16508": 0.6, "16514": 0.6, "16516": 0.6, + "16524": 0.1, + "16525": 0.1, "16527": 0.6, "16540": 0.6, "16552": 0.6, @@ -258,6 +267,8 @@ "24284": 0.1, "24285": 0.6, "24290": 0.6, + "24291": 0.6, + "24300": 0.6, "24309": 0.6, "24312": 0.1, "24313": 0.6, diff --git a/RotationSolver/UI/RotationConfigWindow_Debug.cs b/RotationSolver/UI/RotationConfigWindow_Debug.cs index 8c9f3e05f..d020c90cf 100644 --- a/RotationSolver/UI/RotationConfigWindow_Debug.cs +++ b/RotationSolver/UI/RotationConfigWindow_Debug.cs @@ -86,6 +86,8 @@ private unsafe void DrawParty() ImGui.Text("CanHealSingleSpell: " + DataCenter.CanHealSingleSpell.ToString()); ImGui.Text("CanHealAreaAbility: " + DataCenter.CanHealAreaAbility.ToString()); ImGui.Text("CanHealAreaSpell: " + DataCenter.CanHealAreaSpell.ToString()); + + ImGui.Text("PartyMembersAverHP: " + DataCenter.PartyMembersAverHP.ToString()); } private unsafe void DrawTargetData() diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs index f1eb9dcad..0a9de7a98 100644 --- a/RotationSolver/Updaters/TargetUpdater.cs +++ b/RotationSolver/Updaters/TargetUpdater.cs @@ -244,14 +244,17 @@ private unsafe static void UpdateFriends(IEnumerable allTargets) private static float GetPartyMemberHPRatio(BattleChara member) { - if((DateTime.Now - Watcher.HealTime).TotalSeconds > 0.5 + if((DateTime.Now - Watcher.HealTime).TotalSeconds > 1 || !Watcher.HealHP.TryGetValue(member.ObjectId, out var hp)) { return member.GetHealthRatio(); } - return member.CurrentHp == 0 ? 0 - : Math.Min(1, (hp + member.CurrentHp) / (float)member.MaxHp); + if(member.CurrentHp > 0 && member.CurrentHp <= hp.Item1) + { + return Math.Min(1, hp.Item2 / (float)member.MaxHp); + } + return member.GetHealingRatio(); } diff --git a/RotationSolver/Watcher.cs b/RotationSolver/Watcher.cs index a54c9557b..18b8da063 100644 --- a/RotationSolver/Watcher.cs +++ b/RotationSolver/Watcher.cs @@ -20,7 +20,7 @@ public class Watcher : IDisposable private static Hook _receiveAbilityHook; public static DateTime HealTime { get; private set; } = DateTime.Now; - public static Dictionary HealHP { get; private set; } = new Dictionary(); + public static Dictionary HealHP { get; private set; } = new Dictionary(); public Watcher() { SignatureHelper.Initialise(this); @@ -90,7 +90,7 @@ private static void ActionFromSelf(uint sourceId, ActionEffectSet set, uint id) if (tar == null || action == null) return; HealHP = set.TargetEffects.Where(e => e[0].Type == ActionEffectType.Heal).ToDictionary(e => - e.Target.ObjectId, e => e[0].Value); + e.Target.ObjectId, e =>((e.Target is BattleChara b ? b.CurrentHp : 0u), e[0].Value + (e.Target is BattleChara b1 ? b1.CurrentHp : 0u))); HealTime = DateTime.Now; //Record