Просмотр исходного кода

few card updates, changes to selecting digivolution cards to trash

mbunch_kascope 1 год назад
Родитель
Сommit
5b8990a758

+ 2 - 2
Assets/CardBaseEntity/EX7/Red/Digimon/Volcanicdramon-EX7-014.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:f22d622049c653684dcc2491123ea6f1e9494e506999de15d1da8c5eaa032a11
-size 1559
+oid sha256:ef178dd7d3e0d205a33771a20b08f5e1b2e9eedbda624671b11909a4144e1123
+size 1560

+ 2 - 2
Assets/CardBaseEntity/EX7/Red/Digimon/Volcanicdramon-EX7-014_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:96dfa9e0d58134cd22f6d073294827a4ac7693fb1edce1bd2289f5b164227cb9
-size 1565
+oid sha256:a8fd5b8d4a9b7a4fe5e16da24a15c4f2ecf584bf5fb857f37233101ccf518a87
+size 1566

+ 2 - 2
Assets/CardEffect/EX7/Purple/EyesmonScatterMode_EX7_053.cs

@@ -70,7 +70,7 @@ namespace DCGO.CardEffects.EX7
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: discardCount,
-                            canNoSelect: true,
+                            canNoSelect: false,
                             canEndNotMax: false,
                             isShowOpponent: true,
                             selectCardCoroutine: null,
@@ -91,7 +91,7 @@ namespace DCGO.CardEffects.EX7
                             canTargetCondition: CanSelectCardCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            canNoSelect: () => false,
+                            canNoSelect: () => true,
                             selectCardCoroutine: null,
                             afterSelectCardCoroutine: null,
                             message: "Select 1 card to add to your hand.",

+ 1 - 1
Assets/CardEffect/EX7/Purple/HeavyMetaldramon_EX7_062.cs

@@ -18,7 +18,7 @@ namespace DCGO.CardEffects.EX7
                 {
                     if (targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 5)
                     {
-                        if (targetPermanent.TopCard.CardTraits.Contains("Dark Dragon") || targetPermanent.TopCard.CardTraits.Contains("Evil Dragon"))
+                        if (targetPermanent.TopCard.EqualsTraits("Dark Dragon") || targetPermanent.TopCard.EqualsTraits("Evil Dragon"))
                         {
                             return true;
                         }

+ 11 - 12
Assets/CardEffect/EX7/Red/Deputymon_EX7_010.cs

@@ -35,7 +35,7 @@ namespace DCGO.CardEffects.EX7
 
                 string EffectDiscription()
                 {
-                    return "[When Digivolving] You may trash any 1 Option card from 1 Digimon's digivolution cards.";
+                    return "[When Digivolving] [Once Per Turn] You may trash 1 Option card in 1 Digimon's digivolution cards.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)
@@ -76,15 +76,14 @@ namespace DCGO.CardEffects.EX7
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {                      
-                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SelectTrashDigivolutionCards(
-                         permanentCondition: CanSelectPermanentCondition,
-                         cardCondition: CanSelectCardCondition,
-                         maxCount: 1,
-                         canNoTrash: true,
-                         isFromOnly1Permanent: false,
-                         activateClass: activateClass,
-                         selectString: "Digimon"
-                     ));                 
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SelectTrashDigivolutionCards(
+                        permanentCondition: CanSelectPermanentCondition,
+                        cardCondition: CanSelectCardCondition,
+                        maxCount: 1,
+                        canNoTrash: false,
+                        isFromOnly1Permanent: true,
+                        activateClass: activateClass
+                    ));
                 }
             }
             #endregion
@@ -100,7 +99,7 @@ namespace DCGO.CardEffects.EX7
 
                 string EffectDiscription()
                 {
-                    return "[When Attacking] You may trash any 1 Option card from 1 Digimon's digivolution cards.";
+                    return "[When Attacking] [Once Per Turn] You may trash 1 Option card in 1 Digimon's digivolution cards.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)
@@ -148,7 +147,7 @@ namespace DCGO.CardEffects.EX7
                         canNoTrash: true,
                         isFromOnly1Permanent: false,
                         activateClass: activateClass,
-                        selectString: "Digimon"
+                        selectString: "Option"
                     ));
                 }
             }

+ 0 - 10
Assets/Scripts/AutoProcessing.cs

@@ -367,15 +367,6 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
     #region The same effect has already been achieved
     public static bool HasExecutedSameEffect(List<SkillInfo> skillInfos, SkillInfo skillInfo)
     {
-        /*
-        bool hasExecutedSameEffect = skillInfos.Some((skillInfo1) => skillInfo1.CardEffect.IsSameEffect(skillInfo.CardEffect));
-
-        if (hasExecutedSameEffect)
-        {
-            Debug.Log($"{skillInfo.CardEffect.EffectSourceCard.CardNames[0]}の{skillInfo.CardEffect.EffectName}は同一処理中に発動済み");
-        }
-        */
-
         return skillInfos.Some((skillInfo1) => skillInfo1.CardEffect.IsSameEffect(skillInfo.CardEffect));
     }
     #endregion
@@ -789,7 +780,6 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
 
         if (cardEffect.CanActivate(hashtable) || cardEffect.IsDeclarative)
         {
-            UnityEngine.Debug.Log($"ActivateEffectProcess - Passing CanActivate: {cardEffect.EffectSourceCard.BaseENGCardNameFromEntity}");
             bool isEffectProcessing = MainProcessingEffect != null;
 
             if (!isEffectProcessing)

+ 0 - 1
Assets/Scripts/CardEffectCommons.cs

@@ -334,7 +334,6 @@ public partial class CardEffectCommons
         if (targetPermanent == null) yield break;
         if (targetPermanent.TopCard == null) yield break;
         if (targetPermanent.DigivolutionCards.Count((cardSource) => !cardSource.CanNotTrashFromDigivolutionCards(activateClass)) == 0) yield break;
-        Debug.Log($"Trashing Digivolution Cards From Top/Bottom: Target Can Not Be Affected - {targetPermanent.TopCard.CanNotBeAffected(activateClass)}");
         if (targetPermanent.TopCard.CanNotBeAffected(activateClass)) yield break;
         if (trashCount <= 0) yield break;
 

+ 1 - 1
Assets/Scripts/CardEffectCommons/CanUseEffects/OnDeletion.cs

@@ -257,7 +257,7 @@ public partial class CardEffectCommons
                 }
             }
         }
-        Debug.Log("CAN ACTIVATE: Line 3");
+
         return false;
     }
     #endregion

+ 11 - 7
Assets/Scripts/CardEffectCommons/TrashDigivolutionCards.cs

@@ -17,7 +17,7 @@ public partial class CardEffectCommons
 
         bool CanSelectPermanentCondition(Permanent permanent)
         {
-            if (IsPermanentExistsOnOpponentBattleArea(permanent, card))
+            if (IsPermanentExistsOnBattleArea(permanent))
             {
                 if (permanentCondition == null || permanentCondition(permanent))
                 {
@@ -48,9 +48,15 @@ public partial class CardEffectCommons
             return false;
         }
 
+        int permanentSum =
+            GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer
+                .Map(player => player.GetBattleAreaPermanents().Filter(CanSelectPermanentCondition))
+                .Flat().Count();
+
         int digivolutionCardsSum =
-                card.Owner.Enemy.GetBattleAreaPermanents()
-                .Filter(CanSelectPermanentCondition)
+                GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer
+                .Map(player => player.GetBattleAreaPermanents().Filter(CanSelectPermanentCondition))
+                .Flat()
                 .Map(permanent => permanent.DigivolutionCards.Count(CanSelectCardCondition))
                 .Sum();
 
@@ -77,16 +83,14 @@ public partial class CardEffectCommons
                 break;
             }
 
-            if (!card.Owner.Enemy.GetBattleAreaPermanents().Some(CanSelectPermanentCondition))
+            if (permanentSum < 1)
             {
                 break;
             }
-
             else
             {
                 permanentSelectedCount++;
-
-                maxCount = Math.Min(1, card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition));
+                maxCount = Math.Min(1, permanentSum);
 
                 SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 

+ 4 - 4
Assets/Scripts/MultipleSkills.cs

@@ -115,7 +115,7 @@ public class MultipleSkills : MonoBehaviourPunCallbacks
                 #region Check if the effect can be activated
                 if (!skillInfo.CardEffect.CanActivate(skillInfo.Hashtable))
                 {
-                    //Debug.Log($"{skillInfo.CardEffect.EffectName} Can't Activate");
+                    Debug.Log($"{skillInfo.CardEffect.EffectName} Can't Activate");
                     continue;
                 }
 
@@ -123,7 +123,7 @@ public class MultipleSkills : MonoBehaviourPunCallbacks
                 {
                     if (skipCondition(_autoProcessing.skillInfos_used, skillInfo))
                     {
-                        //Debug.Log($"{skillInfo.CardEffect.EffectName} has been skipped");
+                        Debug.Log($"{skillInfo.CardEffect.EffectName} has been skipped");
 
                         continue;
                     }
@@ -131,11 +131,11 @@ public class MultipleSkills : MonoBehaviourPunCallbacks
 
                 if (IsCutinEffect(CheckNewTriggredSkill_mainStack))
                 {
-                    //Debug.Log($"{skillInfo.CardEffect.EffectName} is Cut In effect");
+                    Debug.Log($"{skillInfo.CardEffect.EffectName} is Cut In effect");
 
                     if (GManager.instance.autoProcessing.IsCutInEffectHasUsed(skillInfo.CardEffect))
                     {
-                        //Debug.Log($"{skillInfo.CardEffect.EffectName} has been used");
+                        Debug.Log($"{skillInfo.CardEffect.EffectName} has been used");
 
                         continue;
                     }