Эх сурвалжийг харах

added check for level, name and trait for if being revealed

mbunch_kascope 1 жил өмнө
parent
commit
17b6c5ae5a

+ 0 - 3
Assets/Scripts/CEntity_EffectController.cs

@@ -69,16 +69,13 @@ public class CEntity_EffectController : MonoBehaviour
                                     {
                                         if (cardEffect is IAddSkillEffect)
                                         {
-                                            UnityEngine.Debug.Log($"ADD SKILL CHECK {cardSource.BaseENGCardNameFromEntity}: {cardEffect.IsInheritedEffect}== {(cardSource == permanent.TopCard)} || {cardSource.IsFlipped}");
                                             if (cardEffect.IsInheritedEffect == (cardSource == permanent.TopCard) || (cardEffect.IsInheritedEffect && cardSource.IsFlipped))
                                             {
                                                 continue;
                                             }
 
-                                            UnityEngine.Debug.Log($"ADD SKILL CHECK {cardEffect.CanUse(null)}");
                                             if (cardEffect.CanUse(null))
                                             {
-                                                UnityEngine.Debug.Log($"ADD SKILL CHECK {!card.CanNotBeAffected(cardEffect)}");
                                                 if (!card.CanNotBeAffected(cardEffect))
                                                     GetCardEffects = ((IAddSkillEffect)cardEffect).GetCardEffect(card, GetCardEffects, timing);
                                             }

+ 20 - 5
Assets/Scripts/CardSource.cs

@@ -561,7 +561,7 @@ public class CardSource : MonoBehaviour
     {
         get
         {
-            if (IsFlipped)
+            if (IsFlipped && !IsBeingRevealed)
                 return -1;
             else
                 return _cEntity_Base.PlayCost;
@@ -1156,7 +1156,7 @@ public class CardSource : MonoBehaviour
     {
         get
         {
-            if (IsFlipped)
+            if (IsFlipped && !IsBeingRevealed)
                 return new List<string>();
 
             List<string> cardNames = BaseCardNames.Clone();
@@ -2084,7 +2084,7 @@ public class CardSource : MonoBehaviour
     {
         get
         {
-            if (IsFlipped)
+            if (IsFlipped && !IsBeingRevealed)
                 return new List<string>();
 
             List<string> traits =
@@ -2179,7 +2179,7 @@ public class CardSource : MonoBehaviour
                 if (EffectList(timing)
                     .Some(cardEffect => cardEffect.IsInheritedEffect
                     && !cardEffect.IsDisabled
-                    && !IsFlipped))
+                    && (!IsFlipped || IsBeingRevealed)))
                 {
                     return true;
                 }
@@ -2374,7 +2374,22 @@ public class CardSource : MonoBehaviour
     #endregion
 
     #region whether this card has level
-    public bool HasLevel => _cEntity_Base == null || _cEntity_Base.HasLevel || IsFlipped;
+    public bool HasLevel
+    {
+        get
+        {
+            if(_cEntity_Base == null || _cEntity_Base.HasLevel)
+            {
+                if (IsFlipped && !IsBeingRevealed)
+                    return false;
+
+                return true;
+            }
+
+            return false;
+        }
+    }
+
     #endregion
 
     #region whether this card is level 2