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

Commit

Permalink
fix: fixed IsFriendly.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Nov 27, 2023
1 parent 231598f commit 05aecc6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ public partial class BaseAction : IBaseAction
/// <summary>
/// Is a friendly action.
/// </summary>
public bool IsFriendly => _option.HasFlag(ActionOption.Friendly);
public bool IsFriendly
{
get
{
if (_action.CanTargetFriendly) return true;
if (_action.CanTargetHostile) return false;
return _option.HasFlag(ActionOption.Friendly);
}
}

/// <summary>
/// Is effect of time.
Expand Down

0 comments on commit 05aecc6

Please sign in to comment.