Skip to content

Commit

Permalink
Revert "Add single target aoe override"
Browse files Browse the repository at this point in the history
This reverts commit 65f3bf1.
  • Loading branch information
NostraThomas99 committed Apr 14, 2024
1 parent bbb7649 commit d357fca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 0 additions & 5 deletions RotationSolver.Basic/Actions/ActionConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,4 @@ public bool IsEnabled
/// Is this action should be a mistake action.
/// </summary>
public bool IsInMistake { get; set; }

/// <summary>
/// Is this action a single target AoE
/// </summary>
public bool SingleTargetAoEOverride { get; set; }
}
15 changes: 11 additions & 4 deletions RotationSolver.Basic/Actions/ActionTargetInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private readonly bool GeneralCheck(BattleChara gameObject, bool skipStatusProvid
if (!gameObject.IsAttackable()) return false;
}

return CheckStatus(gameObject, skipStatusProvideCheck)
return CheckStatus(gameObject, skipStatusProvideCheck)
&& CheckTimeToKill(gameObject)
&& CheckResistance(gameObject);
}
Expand Down Expand Up @@ -183,7 +183,7 @@ private readonly bool CheckResistance(GameObject gameObject)
return false;
}
}
else if (action.Info.Aspect != Aspect.Piercing) // Physic
else if(action.Info.Aspect != Aspect.Piercing) // Physic
{
if (gameObject.HasStatus(false, StatusHelper.PhysicResistancec))
{
Expand Down Expand Up @@ -278,7 +278,7 @@ private readonly bool CheckTimeToKill(GameObject gameObject)
var target = GetMostCanTargetObjects(canTargets, canAffects, aoeCount)
.OrderByDescending(ObjectHelper.GetHealthRatio).FirstOrDefault();
if (target == null) return null;
return new(target, [.. GetAffects(target, canAffects)], target.Position);
return new(target, [..GetAffects(target, canAffects)], target.Position);
}

private readonly TargetResult? FindTargetAreaMove(float range)
Expand Down Expand Up @@ -442,7 +442,14 @@ private readonly IEnumerable<BattleChara> GetMostCanTargetObjects(IEnumerable<Ba
objectMax.Add(t);
}
}
return objectMax;
//if (aoeCount > 0 && objectMax.Count > 0 && objectMax.Count < action.Config.AoeCount && !action.Setting.IsFriendly)
//{
// return [];
//}
//else
{
return objectMax;
}
}

private readonly int CanGetTargetCount(GameObject target, IEnumerable<GameObject> canAffects)
Expand Down
1 change: 0 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/MachinistRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ static partial void ModifyRicochetPvE(ref ActionSetting setting)
setting.CreateConfig = () => new()
{
AoeCount = 1,
SingleTargetAoEOverride = true,
};
}

Expand Down

0 comments on commit d357fca

Please sign in to comment.