Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: changed the EffectRange of LiturgyOfTheBell
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 18, 2023
1 parent 953dbaf commit 39fa3b9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions RotationSolver.Basic/Actions/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ private bool TargetAreaFriend(float range, bool mustUse, PlayerCharacter player)
//计算玩家和被打的T之间的关系。
else
{
var attackT = TargetFilter.FindAttackedTarget(DataCenter.PartyTanks.GetObjectInRadius(range + _action.EffectRange), mustUse);
var effectRange = (ActionID)ID == ActionID.LiturgyOfTheBell ? 20 : _action.EffectRange;
var attackT = TargetFilter.FindAttackedTarget(DataCenter.PartyTanks.GetObjectInRadius(range + effectRange), mustUse);

if (attackT == null)
{
Expand All @@ -171,15 +172,15 @@ private bool TargetAreaFriend(float range, bool mustUse, PlayerCharacter player)
{
var disToTankRound = Vector3.Distance(player.Position, attackT.Position) + attackT.HitboxRadius;

if (disToTankRound < _action.EffectRange
|| disToTankRound > 2 * _action.EffectRange - player.HitboxRadius)
if (disToTankRound < effectRange
|| disToTankRound > 2 * effectRange - player.HitboxRadius)
{
_position = player.Position;
}
else
{
Vector3 directionToTank = attackT.Position - player.Position;
var MoveDirection = directionToTank / directionToTank.Length() * Math.Max(0, disToTankRound - _action.EffectRange);
var MoveDirection = directionToTank / directionToTank.Length() * Math.Max(0, disToTankRound - effectRange);
_position = player.Position + MoveDirection;
}
}
Expand Down

0 comments on commit 39fa3b9

Please sign in to comment.