ソースを参照

Make CardEffectCommons hand card check consistent with others

Andrej Erdelsky 2 年 前
コミット
3ac7b43ddb

+ 1 - 4
Assets/Scripts/CardEffectCommons/GameContextDeterminarion.cs

@@ -376,10 +376,7 @@ public partial class CardEffectCommons
     #region Whether there is at least 1 card in the owner's hand that satisfies the condition
     public static bool HasMatchConditionOwnersHand(CardSource card, Func<CardSource, bool> CanSelectCardCondition)
     {
-        return GManager.instance.turnStateMachine.gameContext.Players
-        .Map(player => player.HandCards)
-        .Flat()
-        .Some(source => CanSelectCardCondition(source) && IsExistOnHand(source));
+        return card.Owner.HandCards.Some(CanSelectCardCondition);
     }
     #endregion