From bf375627724ac7a8bab02e88363157b782ddb574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4?= <1123993881@qq.com> Date: Tue, 24 Jan 2023 14:10:56 +0800 Subject: [PATCH] fix: FIx the Moving targeting. --- .../CustomRotation/CustomRotation_BasicInfo.cs | 14 +++++--------- .../Rotations/RangedMagicial/BLM/BLM_Default.cs | 5 ----- .../Rotations/RangedMagicial/BLU/BLU_Default.cs | 1 + 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/RotationSolver/Rotations/CustomRotation/CustomRotation_BasicInfo.cs b/RotationSolver/Rotations/CustomRotation/CustomRotation_BasicInfo.cs index 80758c458..1a769f821 100644 --- a/RotationSolver/Rotations/CustomRotation/CustomRotation_BasicInfo.cs +++ b/RotationSolver/Rotations/CustomRotation/CustomRotation_BasicInfo.cs @@ -49,14 +49,7 @@ private protected CustomRotation() Configs = CreateConfiguration(); } - public BattleChara MoveTarget - { - get - { - if (MoveForwardAbility(1, out var act) && act is BaseAction a) return a.Target; - return null; - } - } + public BattleChara MoveTarget { get; private set; } public string Description => string.Join('\n', DescriptionDict.Select(pair => pair.Key.ToName() + " → " + pair.Value)); @@ -74,5 +67,8 @@ private protected virtual IRotationConfigSet CreateConfiguration() /// /// Update your customized field. /// - private protected virtual void UpdateInfo() { } + private protected virtual void UpdateInfo() + { + MoveTarget = (MoveForwardAbility(1, out var act) && act is BaseAction a) ? a.Target : null; + } } diff --git a/RotationSolver/Rotations/RangedMagicial/BLM/BLM_Default.cs b/RotationSolver/Rotations/RangedMagicial/BLM/BLM_Default.cs index 0d527ddbe..51f0cf818 100644 --- a/RotationSolver/Rotations/RangedMagicial/BLM/BLM_Default.cs +++ b/RotationSolver/Rotations/RangedMagicial/BLM/BLM_Default.cs @@ -54,11 +54,6 @@ private protected override IRotationConfigSet CreateConfiguration() .SetBool("AutoLeylines", true, "Auto use Leylines"); } - private protected override void UpdateInfo() - { - base.UpdateInfo(); - } - private protected override IAction CountDownAction(float remainTime) { //战斗前激情 diff --git a/RotationSolver/Rotations/RangedMagicial/BLU/BLU_Default.cs b/RotationSolver/Rotations/RangedMagicial/BLU/BLU_Default.cs index d48ba34c4..325131900 100644 --- a/RotationSolver/Rotations/RangedMagicial/BLU/BLU_Default.cs +++ b/RotationSolver/Rotations/RangedMagicial/BLU/BLU_Default.cs @@ -50,6 +50,7 @@ private protected override void UpdateInfo() { BlueId = (BLUID)Configs.GetCombo("BlueId"); AttackType = (BLUAttackType)Configs.GetCombo("AttackType"); + base.UpdateInfo(); } private protected override bool AttackAbility(byte abilitiesRemaining, out IAction act)