Jelajahi Sumber

Merge branch 'develop' into Warning-Removal-Experimental-and-Animations

x89rt2 3 bulan lalu
induk
melakukan
cbc1db091d
32 mengubah file dengan 308 tambahan dan 331 penghapusan
  1. 2 2
      Assets/CardBaseEntity/BT20/Black/Digimon/BT20_056_P1.asset
  2. 2 2
      Assets/CardBaseEntity/BT20/Black/Digimon/BT20_056_P2.asset
  3. 2 2
      Assets/CardBaseEntity/BT20/Black/Digimon/BT20_056_P3.asset
  4. 2 2
      Assets/CardBaseEntity/BT20/Black/Digimon/BT20_056_P4.asset
  5. 2 2
      Assets/CardBaseEntity/BT20/Black/Digimon/BT20_056_P5.asset
  6. 1 1
      Assets/CardBaseEntity/BT23/Red/Digimon/BT23_005_P1.asset
  7. 1 1
      Assets/CardBaseEntity/BT25/Purple/Digimon/BT25_079.asset
  8. 19 17
      Assets/Scripts/CardEffect/BT11/Purple/BT11_088.cs
  9. 3 1
      Assets/Scripts/CardEffect/BT15/Blue/BT15_029.cs
  10. 2 1
      Assets/Scripts/CardEffect/BT16/Red/BT16_015.cs
  11. 19 37
      Assets/Scripts/CardEffect/BT20/Red/BT20_093.cs
  12. 1 1
      Assets/Scripts/CardEffect/BT22/Purple/BT22_092.cs
  13. 2 2
      Assets/Scripts/CardEffect/BT22/Yellow/BT22_042.cs
  14. 20 31
      Assets/Scripts/CardEffect/BT7/Green/BT7_051.cs
  15. 23 44
      Assets/Scripts/CardEffect/EX3/Yellow/EX3_069.cs
  16. 20 12
      Assets/Scripts/CardEffect/EX4/Green/EX4_063.cs
  17. 77 101
      Assets/Scripts/CardEffect/EX4/Purple/EX4_058.cs
  18. 2 1
      Assets/Scripts/CardEffect/EX9/Black/EX9_057.cs
  19. 2 0
      Assets/Scripts/CardEffect/EX9/White/EX9_074.cs
  20. 4 6
      Assets/Scripts/CardEffect/P/Red/P_110.cs
  21. 5 5
      Assets/Scripts/Script/AutoProcessing.cs
  22. 5 7
      Assets/Scripts/Script/CEntity_EffectController.cs
  23. 28 10
      Assets/Scripts/Script/CardEffectCommons/KeyWordEffects/Retaliation.cs
  24. 4 7
      Assets/Scripts/Script/CardEffectFactory/KeyWordEffects/ArtsDigivolve.cs
  25. 3 3
      Assets/Scripts/Script/DataBase.cs
  26. 9 3
      Assets/Scripts/Script/ICardEffect.cs
  27. 1 1
      Assets/Scripts/Script/MultipleSkills.cs
  28. 8 3
      Assets/Scripts/Script/SelectDNACondition.cs
  29. 1 1
      Assets/Scripts/Script/SelectJogressEffect.cs
  30. 1 1
      Assets/Scripts/Script/TurnStateMachine.cs
  31. 35 22
      Assets/Scripts/Script/UserSelectionManager.cs
  32. 2 2
      ProjectSettings/ProjectSettings.asset

+ 2 - 2
Assets/CardBaseEntity/BT20/Black/Digimon/BT20_056_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:95266e4f4b121507ab2c91284a4b0c2b4cb67758056e3d39c303bcdd5bc9b225
-size 1913
+oid sha256:1d0c749c7e392cf7e2fb8fafceaca4592ed06f94839a1089402eedb57d84a4df
+size 1914

+ 2 - 2
Assets/CardBaseEntity/BT20/Black/Digimon/BT20_056_P2.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:d6dbc82b5f739e3af59604b1d7b7ba05fb15e1dc945eb8146668aa410b1a0882
-size 1913
+oid sha256:b0dc782b4d7c8626ea9f1761637d628506cfefd4fc1bde00f27efe0051eadb6f
+size 1914

+ 2 - 2
Assets/CardBaseEntity/BT20/Black/Digimon/BT20_056_P3.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:ba2cb8a609b6c42746a0a691b20e83fd33de28c30dd6c7141a6ec8debc82f54a
-size 1913
+oid sha256:7af3ebef9879a2bc6e59a116dabd4808d7ab74ad8a9af1b9c1ef8de4da790009
+size 1914

+ 2 - 2
Assets/CardBaseEntity/BT20/Black/Digimon/BT20_056_P4.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:cd9a8c9e73f2450af03111a08bb70c643ec4f35edbccc044ef50b07c09b3ffcc
-size 1913
+oid sha256:b89e57b51b412b1e8c0c07be8264435b9d8a27763cf2ab0fc66bb77bdfdc90c9
+size 1914

+ 2 - 2
Assets/CardBaseEntity/BT20/Black/Digimon/BT20_056_P5.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:99c2e62404f5ef712e0539fdbdbb3ad0a072862b559d2408fea0f4a509fba620
-size 1913
+oid sha256:32bd1f90b661515e46af0f7ebb6cc5b6a2bca0770aaa6a1570070b2010475c80
+size 1914

+ 1 - 1
Assets/CardBaseEntity/BT23/Red/Digimon/BT23_005_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:62b5fe0e1ae2cdf9137b518f7bf3f9deea9dcedfe666f8888c9813da88a511a1
+oid sha256:59b5a180f9c8133b7a897fc66b1b7219c9adcd6c206c538a1cac170a0a87329d
 size 1393
 size 1393

+ 1 - 1
Assets/CardBaseEntity/BT25/Purple/Digimon/BT25_079.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:082189309e2373162f3f231c28681061411e94d74b6bc6428cfa40990a47ba68
+oid sha256:e0bd1b3e089585e17e86ca51824c8fb29e17dd64a73002cddf69973e2262c4a3
 size 1286
 size 1286

+ 19 - 17
Assets/Scripts/CardEffect/BT11/Purple/BT11_088.cs

@@ -2,6 +2,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
 
 
+// Bagramon
 namespace DCGO.CardEffects.BT11
 namespace DCGO.CardEffects.BT11
 {
 {
     public class BT11_088 : CEntity_Effect
     public class BT11_088 : CEntity_Effect
@@ -390,23 +391,24 @@ namespace DCGO.CardEffects.BT11
                             SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
                             SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
 
 
                             selectCardEffect.SetUp(
                             selectCardEffect.SetUp(
-                                        canTargetCondition: CanSelectCardCondition,
-                                        canTargetCondition_ByPreSelecetedList: null,
-                                        canEndSelectCondition: CanEndSelectCondition,
-                                        canNoSelect: () => false,
-                                        selectCardCoroutine: SelectCardCoroutine,
-                                        afterSelectCardCoroutine: null,
-                                        message: "Select 1 digivolution card to discard.",
-                                        maxCount: 1,
-                                        canEndNotMax: false,
-                                        isShowOpponent: true,
-                                        mode: SelectCardEffect.Mode.Custom,
-                                        root: SelectCardEffect.Root.Custom,
-                                        customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
-                                        canLookReverseCard: true,
-                                        selectPlayer: card.Owner,
-                                        cardEffect: null);
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: CanEndSelectCondition,
+                                canNoSelect: () => false,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 digivolution card to discard.",
+                                maxCount: 1,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.DigivolutionCards,
+                                customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: null);
 
 
+                            selectCardEffect.SetUseFaceDown();
                             selectCardEffect.SetUpCustomMessage("Select 1 digivolution card to discard.", "The opponent is selecting 1 digivolution card to discard.");
                             selectCardEffect.SetUpCustomMessage("Select 1 digivolution card to discard.", "The opponent is selecting 1 digivolution card to discard.");
 
 
                             yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
                             yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
@@ -570,4 +572,4 @@ namespace DCGO.CardEffects.BT11
             return cardEffects;
             return cardEffects;
         }
         }
     }
     }
-}
+}

+ 3 - 1
Assets/Scripts/CardEffect/BT15/Blue/BT15_029.cs

@@ -60,6 +60,7 @@ namespace DCGO.CardEffects.BT15
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Place 1 Digimon card to digivolution cards to return 1 of your opponent's Digimon whose level is less than or equal to the placed card's level to the bottom of the deck.", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Place 1 Digimon card to digivolution cards to return 1 of your opponent's Digimon whose level is less than or equal to the placed card's level to the bottom of the deck.", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
                 activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
+                activateClass.SetIsDigimonEffect(true);
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectSharedDiscription()
                 string EffectSharedDiscription()
@@ -155,6 +156,7 @@ namespace DCGO.CardEffects.BT15
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Place 1 Digimon card to digivolution cards to return 1 of your opponent's Digimon whose level is less than or equal to the placed card's level to the bottom of the deck.", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Place 1 Digimon card to digivolution cards to return 1 of your opponent's Digimon whose level is less than or equal to the placed card's level to the bottom of the deck.", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
                 activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
+                activateClass.SetIsDigimonEffect(true);
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectSharedDiscription()
                 string EffectSharedDiscription()
@@ -342,4 +344,4 @@ namespace DCGO.CardEffects.BT15
             return cardEffects;
             return cardEffects;
         }
         }
     }
     }
-}
+}

+ 2 - 1
Assets/Scripts/CardEffect/BT16/Red/BT16_015.cs

@@ -37,6 +37,7 @@ namespace DCGO.CardEffects.BT16
                 activateClass.SetUpICardEffect("Add [End of Attack] to all of this Digimon's [On Deletion] effects.", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Add [End of Attack] to all of this Digimon's [On Deletion] effects.", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 activateClass.SetIsBackgroundProcess(true);
                 activateClass.SetIsBackgroundProcess(true);
+                activateClass.SetIsDigimonEffect(true);
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()
@@ -242,4 +243,4 @@ namespace DCGO.CardEffects.BT16
             return cardEffects;
             return cardEffects;
         }
         }
     }
     }
-}
+}

+ 19 - 37
Assets/Scripts/CardEffect/BT20/Red/BT20_093.cs

@@ -1,10 +1,9 @@
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
-using UnityEngine;
 using System.Linq;
 using System.Linq;
 using System;
 using System;
-using Photon.Pun;
 
 
+// Unleash the Dragon-Gene
 namespace DCGO.CardEffects.BT20
 namespace DCGO.CardEffects.BT20
 {
 {
     public class BT20_093 : CEntity_Effect
     public class BT20_093 : CEntity_Effect
@@ -14,7 +13,6 @@ namespace DCGO.CardEffects.BT20
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
             #region Main Effect
             #region Main Effect
-
             if (timing == EffectTiming.OptionSkill)
             if (timing == EffectTiming.OptionSkill)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
@@ -45,7 +43,6 @@ namespace DCGO.CardEffects.BT20
                     if (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition))
                     if (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition))
                     {
                     {
                         #region Reduce Play Cost
                         #region Reduce Play Cost
-
                         ChangeCostClass changeCostClass = new ChangeCostClass();
                         ChangeCostClass changeCostClass = new ChangeCostClass();
                         changeCostClass.SetUpICardEffect($"Play Cost -3", CanUseReduceCondition, card);
                         changeCostClass.SetUpICardEffect($"Play Cost -3", CanUseReduceCondition, card);
                         changeCostClass.SetUpChangeCostClass(
                         changeCostClass.SetUpChangeCostClass(
@@ -75,33 +72,20 @@ namespace DCGO.CardEffects.BT20
 
 
                         int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
                         int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
                         {
                         {
-                            if (CardSourceCondition(cardSource))
+                            if (CardSourceCondition(cardSource)
+                            && RootCondition(root)
+                            && PermanentsCondition(targetPermanents))
                             {
                             {
-                                if (RootCondition(root))
-                                {
-                                    if (PermanentsCondition(targetPermanents))
-                                    {
-                                        cost -= 3;
-                                    }
-                                }
+                                cost -= 3;
                             }
                             }
-
+                             
                             return cost;
                             return cost;
                         }
                         }
 
 
                         bool PermanentsCondition(List<Permanent> targetPermanents)
                         bool PermanentsCondition(List<Permanent> targetPermanents)
                         {
                         {
-                            if (targetPermanents == null)
-                            {
-                                return true;
-                            }
-
-                            if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
-                            {
-                                return true;
-                            }
-
-                            return false;
+                            return targetPermanents == null
+                                    || targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0;
                         }
                         }
 
 
                         bool CardSourceCondition(CardSource cardSource)
                         bool CardSourceCondition(CardSource cardSource)
@@ -118,7 +102,6 @@ namespace DCGO.CardEffects.BT20
                         {
                         {
                             return true;
                             return true;
                         }
                         }
-
                         #endregion
                         #endregion
 
 
                         List<CardSource> selectedCards = new List<CardSource>();
                         List<CardSource> selectedCards = new List<CardSource>();
@@ -158,17 +141,19 @@ namespace DCGO.CardEffects.BT20
                             isTapped: false,
                             isTapped: false,
                             root: SelectCardEffect.Root.Hand,
                             root: SelectCardEffect.Root.Hand,
                             activateETB: true));
                             activateETB: true));
+
+                        #region Remove Reduction
+                        card.Owner.UntilCalculateFixedCostEffect.Remove(getCardEffect);
+                        #endregion
                     }
                     }
 
 
                     yield return ContinuousController.instance.StartCoroutine(
                     yield return ContinuousController.instance.StartCoroutine(
                         CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
                         CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
                 }
                 }
             }
             }
-
             #endregion
             #endregion
 
 
             #region Delay Effect
             #region Delay Effect
-
             if (timing == EffectTiming.WhenRemoveField)
             if (timing == EffectTiming.WhenRemoveField)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
@@ -215,19 +200,17 @@ namespace DCGO.CardEffects.BT20
                 IEnumerator SuccessProcess()
                 IEnumerator SuccessProcess()
                 {
                 {
                     yield return ContinuousController.instance.StartCoroutine(
                     yield return ContinuousController.instance.StartCoroutine(
-                                                        CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
-                                                            CanSelectDNACardCondition,
-                                                            payCost: true,
-                                                            isHand: true,
-                                                            activateClass
-                                                        ));
+                        CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
+                            CanSelectDNACardCondition,
+                            payCost: true,
+                            isHand: true,
+                            activateClass
+                        ));
                 }
                 }
             }
             }
-
             #endregion
             #endregion
 
 
             #region Security Effect
             #region Security Effect
-
             if (timing == EffectTiming.SecuritySkill)
             if (timing == EffectTiming.SecuritySkill)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
@@ -356,10 +339,9 @@ namespace DCGO.CardEffects.BT20
                         CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
                         CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
                 }
                 }
             }
             }
-
             #endregion
             #endregion
 
 
             return cardEffects;
             return cardEffects;
         }
         }
     }
     }
-}
+}

+ 1 - 1
Assets/Scripts/CardEffect/BT22/Purple/BT22_092.cs

@@ -210,7 +210,7 @@ namespace DCGO.CardEffects.BT22
                                             if (selectedEffect.CanUse(null))
                                             if (selectedEffect.CanUse(null))
                                             {
                                             {
                                                 yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(null));
                                                 yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(null));
-
+                                                ((ActivateICardEffect)selectedEffect).AddUse();
                                                 yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
                                                 yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
                                             }
                                             }
                                         }
                                         }

+ 2 - 2
Assets/Scripts/CardEffect/BT22/Yellow/BT22_042.cs

@@ -1,7 +1,6 @@
 using System;
 using System;
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
-using System.Linq;
 
 
 // Nyabootmon
 // Nyabootmon
 namespace DCGO.CardEffects.BT22
 namespace DCGO.CardEffects.BT22
@@ -181,6 +180,7 @@ namespace DCGO.CardEffects.BT22
                 activateClass.SetUpICardEffect("Activate a [When Digivolving] effect", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Activate a [When Digivolving] effect", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetHashString("BT22_042_UseWD");
                 activateClass.SetHashString("BT22_042_UseWD");
+                activateClass.SetIsDigimonEffect(true);
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()
@@ -282,4 +282,4 @@ namespace DCGO.CardEffects.BT22
             return cardEffects;
             return cardEffects;
         }
         }
     }
     }
-}
+}

+ 20 - 31
Assets/Scripts/CardEffect/BT7/Green/BT7_051.cs

@@ -1,17 +1,15 @@
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
-using UnityEngine;
 using System.Linq;
 using System.Linq;
-using Photon;
-using System;
-using Photon.Pun;
-using System.Net.Security;
+
+// RhinoKabuterimon
 public class BT7_051 : CEntity_Effect
 public class BT7_051 : CEntity_Effect
 {
 {
     public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
     public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
     {
     {
         List<ICardEffect> cardEffects = new List<ICardEffect>();
         List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
+        #region Reduced Cost
         if (timing == EffectTiming.None)
         if (timing == EffectTiming.None)
         {
         {
             bool Condition()
             bool Condition()
@@ -21,20 +19,14 @@ public class BT7_051 : CEntity_Effect
 
 
             bool PermanentCondition(Permanent targetPermanent)
             bool PermanentCondition(Permanent targetPermanent)
             {
             {
-                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(targetPermanent, card))
-                {
-                    if (targetPermanent.DigivolutionCards.Count((cardSource) => cardSource.IsTamer) >= 1)
-                    {
-                        return true;
-                    }
-                }
-
-                return false;
+                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(targetPermanent, card)
+                    && targetPermanent.DigivolutionCards.Any((cardSource) => cardSource.IsTamer);
             }
             }
 
 
             bool CardSourceCondition(CardSource cardSource)
             bool CardSourceCondition(CardSource cardSource)
             {
             {
-                return cardSource == card && cardSource.Owner.HandCards.Contains(cardSource);
+                return cardSource == card
+                    && cardSource.Owner.HandCards.Contains(cardSource);
             }
             }
 
 
             bool RootCondition(SelectCardEffect.Root root)
             bool RootCondition(SelectCardEffect.Root root)
@@ -52,43 +44,39 @@ public class BT7_051 : CEntity_Effect
                 condition: Condition,
                 condition: Condition,
                 setFixedCost: false));
                 setFixedCost: false));
         }
         }
+        #endregion
 
 
+        #region When Attacking
         if (timing == EffectTiming.OnAllyAttack)
         if (timing == EffectTiming.OnAllyAttack)
         {
         {
             ActivateClass activateClass = new ActivateClass();
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Digivolve this Digimon into [Insectoid] or [Ten Warriors] Digimon", CanUseCondition, card);
             activateClass.SetUpICardEffect("Digivolve this Digimon into [Insectoid] or [Ten Warriors] Digimon", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
             cardEffects.Add(activateClass);
             cardEffects.Add(activateClass);
 
 
-            string EffectDiscription()
+            string EffectDescription()
             {
             {
                 return "[When Attacking] If a card with [Hybrid] or [Insectoid] in its traits is in this Digimon's digivolution cards, this Digimon can digivolve into a Digimon card with [Insectoid] or [Ten Warriors] in its traits in your hand for a memory cost of 3.";
                 return "[When Attacking] If a card with [Hybrid] or [Insectoid] in its traits is in this Digimon's digivolution cards, this Digimon can digivolve into a Digimon card with [Insectoid] or [Ten Warriors] in its traits in your hand for a memory cost of 3.";
             }
             }
 
 
             bool CanSelectCardCondition(CardSource cardSource)
             bool CanSelectCardCondition(CardSource cardSource)
             {
             {
-                return cardSource.IsDigimon && (cardSource.CardTraits.Contains("Insectoid") || cardSource.CardTraits.Contains("Ten Warriors") || cardSource.CardTraits.Contains("TenWarriors"));
+                return cardSource.IsDigimon
+                    && (cardSource.CardTraits.Contains("Insectoid")
+                        || cardSource.CardTraits.Contains("Ten Warriors"));
             }
             }
 
 
             bool CanUseCondition(Hashtable hashtable)
             bool CanUseCondition(Hashtable hashtable)
             {
             {
-                return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                return CardEffectCommons.IsExistOnBattleAreaTrigger(card, activateClass)
+                    && CardEffectCommons.CanTriggerOnAttack(hashtable, card);
             }
             }
 
 
             bool CanActivateCondition(Hashtable hashtable)
             bool CanActivateCondition(Hashtable hashtable)
             {
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
-                {
-                    if (card.Owner.HandCards.Count >= 1)
-                    {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardTraits.Contains("Hybrid") || cardSource.CardTraits.Contains("Insectoid")) >= 1)
-                        {
-                            return true;
-                        }
-                    }
-                }
-
-                return false;
+                return CardEffectCommons.IsExistOnBattleAreaActivate(card, activateClass)
+                    && CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition)
+                    && card.PermanentOfThisCard().DigivolutionCards.Any((cardSource) => cardSource.EqualsTraits("Hybrid") || cardSource.EqualsTraits("Insectoid"));
             }
             }
 
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
@@ -105,6 +93,7 @@ public class BT7_051 : CEntity_Effect
                     successProcess: null));
                     successProcess: null));
             }
             }
         }
         }
+        #endregion
 
 
         return cardEffects;
         return cardEffects;
     }
     }

+ 23 - 44
Assets/Scripts/CardEffect/EX3/Yellow/EX3_069.cs

@@ -2,6 +2,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
 
 
+// Trial of the Four Great Dragons
 namespace DCGO.CardEffects.EX3
 namespace DCGO.CardEffects.EX3
 {
 {
     public class EX3_069 : CEntity_Effect
     public class EX3_069 : CEntity_Effect
@@ -10,14 +11,15 @@ namespace DCGO.CardEffects.EX3
         {
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
+            #region Main
             if (timing == EffectTiming.OptionSkill)
             if (timing == EffectTiming.OptionSkill)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
                 activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
-                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription());
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
-                string EffectDiscription()
+                string EffectDescription()
                 {
                 {
                     return "[Main] <Draw 1>. Then, place this card in your battle area.";
                     return "[Main] <Draw 1>. Then, place this card in your battle area.";
                 }
                 }
@@ -35,32 +37,26 @@ namespace DCGO.CardEffects.EX3
                         cardEffect: activateClass));
                         cardEffect: activateClass));
                 }
                 }
             }
             }
+            #endregion
 
 
+            #region Delay
             if (timing == EffectTiming.OnDeclaration)
             if (timing == EffectTiming.OnDeclaration)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Play 1 Digimon from hand", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Play 1 Digimon from hand", CanUseCondition, card);
-                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription());
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
-                string EffectDiscription()
+                string EffectDescription()
                 {
                 {
                     return "[Main] <Delay> (By trashing this card in your battle area, activate the effect below. You can't activate this effect the turn this card enters play.) - Play 1 Digimon card with [Four Great Dragons] in its traits from your hand without paying the cost. The Digimon played by this effect can't digivolve to level 7, and at the end of your opponent's turn, delete that Digimon.";
                     return "[Main] <Delay> (By trashing this card in your battle area, activate the effect below. You can't activate this effect the turn this card enters play.) - Play 1 Digimon card with [Four Great Dragons] in its traits from your hand without paying the cost. The Digimon played by this effect can't digivolve to level 7, and at the end of your opponent's turn, delete that Digimon.";
                 }
                 }
 
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                 {
-                    if (cardSource.EqualsTraits("Four Great Dragons"))
-                    {
-                        if (cardSource.IsDigimon)
-                        {
-                            if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
-                            {
-                                return true;
-                            }
-                        }
-                    }
-                    return false;
+                    return cardSource.EqualsTraits("Four Great Dragons")
+                        && cardSource.IsDigimon
+                        && CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass);
                 }
                 }
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
@@ -150,15 +146,8 @@ namespace DCGO.CardEffects.EX3
 
 
                                     bool CardCondition(CardSource cardSource)
                                     bool CardCondition(CardSource cardSource)
                                     {
                                     {
-                                        if (cardSource.Level == 7)
-                                        {
-                                            if (cardSource.HasLevel)
-                                            {
-                                                return true;
-                                            }
-                                        }
-
-                                        return false;
+                                        return cardSource.HasLevel
+                                            && cardSource.Level == 7;
                                     }
                                     }
                                 }
                                 }
 
 
@@ -166,33 +155,20 @@ namespace DCGO.CardEffects.EX3
                                 {
                                 {
                                     ActivateClass activateClass1 = new ActivateClass();
                                     ActivateClass activateClass1 = new ActivateClass();
                                     activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition1, card);
                                     activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition1, card);
-                                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "");
+                                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, 1, false, "");
+                                    activateClass1.SetHashString("EX3_069_EoOT");
                                     card.Owner.UntilOpponentTurnEndEffects.Add(GetCardEffect);
                                     card.Owner.UntilOpponentTurnEndEffects.Add(GetCardEffect);
 
 
                                     bool CanUseCondition1(Hashtable hashtable)
                                     bool CanUseCondition1(Hashtable hashtable)
                                     {
                                     {
-                                        if (CardEffectCommons.IsOpponentTurn(card))
-                                        {
-                                            return true;
-                                        }
-
-                                        return false;
+                                        return CardEffectCommons.IsOpponentTurn(card);
                                     }
                                     }
 
 
                                     bool CanActivateCondition1(Hashtable hashtable)
                                     bool CanActivateCondition1(Hashtable hashtable)
                                     {
                                     {
-                                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
-                                        {
-                                            if (selectedPermanent.CanBeDestroyedBySkill(activateClass1))
-                                            {
-                                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass1))
-                                                {
-                                                    return true;
-                                                }
-                                            }
-                                        }
-
-                                        return false;
+                                        return CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent)
+                                            && selectedPermanent.CanBeDestroyedBySkill(activateClass1)
+                                            && !selectedPermanent.TopCard.CanNotBeAffected(activateClass1);
                                     }
                                     }
 
 
                                     IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
                                     IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
@@ -215,13 +191,16 @@ namespace DCGO.CardEffects.EX3
                     }
                     }
                 }
                 }
             }
             }
+            #endregion
 
 
+            #region Security
             if (timing == EffectTiming.SecuritySkill)
             if (timing == EffectTiming.SecuritySkill)
             {
             {
                 cardEffects.Add(CardEffectFactory.PlaceSelfDelayOptionSecurityEffect(card));
                 cardEffects.Add(CardEffectFactory.PlaceSelfDelayOptionSecurityEffect(card));
             }
             }
+            #endregion
 
 
             return cardEffects;
             return cardEffects;
         }
         }
     }
     }
-}
+}

+ 20 - 12
Assets/Scripts/CardEffect/EX4/Green/EX4_063.cs

@@ -2,6 +2,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
 
 
+// Henry Wong & Shu-Chong Wong
 namespace DCGO.CardEffects.EX4
 namespace DCGO.CardEffects.EX4
 {
 {
     public class EX4_063 : CEntity_Effect
     public class EX4_063 : CEntity_Effect
@@ -10,14 +11,15 @@ namespace DCGO.CardEffects.EX4
         {
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
+            #region Start of Your Main Phase
             if (timing == EffectTiming.OnStartMainPhase)
             if (timing == EffectTiming.OnStartMainPhase)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Play 1 [Terriermon] or [Lopmon] from hand", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Play 1 [Terriermon] or [Lopmon] from hand", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
-                string EffectDiscription()
+                string EffectDescription()
                 {
                 {
                     return "[Start of Your Main Phase] If you have 1 or fewer Digimon in play, you may play 1 [Terriermon] or [Lopmon] from your hand without paying the cost. Digimon played by this effect can't digivolve and are deleted at the end of your opponent's turn.";
                     return "[Start of Your Main Phase] If you have 1 or fewer Digimon in play, you may play 1 [Terriermon] or [Lopmon] from your hand without paying the cost. Digimon played by this effect can't digivolve and are deleted at the end of your opponent's turn.";
                 }
                 }
@@ -101,12 +103,12 @@ namespace DCGO.CardEffects.EX4
                         }
                         }
 
 
                         yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
                         yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                                                cardSources: selectedCards,
-                                                activateClass: activateClass,
-                                                payCost: false,
-                                                isTapped: false,
-                                                root: SelectCardEffect.Root.Hand,
-                                                activateETB: true));
+                            cardSources: selectedCards,
+                            activateClass: activateClass,
+                            payCost: false,
+                            isTapped: false,
+                            root: SelectCardEffect.Root.Hand,
+                            activateETB: true));
 
 
 
 
                         foreach (CardSource selectedCard in selectedCards)
                         foreach (CardSource selectedCard in selectedCards)
@@ -142,7 +144,8 @@ namespace DCGO.CardEffects.EX4
                                 {
                                 {
                                     ActivateClass activateClass1 = new ActivateClass();
                                     ActivateClass activateClass1 = new ActivateClass();
                                     activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition1, card);
                                     activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition1, card);
-                                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "");
+                                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, 1, false, "");
+                                    activateClass1.SetHashString("EX4_063_EoOT");
                                     card.Owner.UntilOpponentTurnEndEffects.Add(GetCardEffect);
                                     card.Owner.UntilOpponentTurnEndEffects.Add(GetCardEffect);
 
 
                                     bool CanUseCondition1(Hashtable hashtable)
                                     bool CanUseCondition1(Hashtable hashtable)
@@ -194,16 +197,18 @@ namespace DCGO.CardEffects.EX4
                     }
                     }
                 }
                 }
             }
             }
+            #endregion
 
 
+            #region Your Turn
             if (timing == EffectTiming.BeforePayCost)
             if (timing == EffectTiming.BeforePayCost)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Digivolution Cost -1", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Digivolution Cost -1", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
                 activateClass.SetHashString("Digisorption-1_EX4_063");
                 activateClass.SetHashString("Digisorption-1_EX4_063");
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
-                string EffectDiscription()
+                string EffectDescription()
                 {
                 {
                     return "[Your Turn] When one of your Digimon with [Terriermon] or [Lopmon] in its digivolution cards would digivolve, by suspending this Tamer, reduce the digivolution cost by 1.";
                     return "[Your Turn] When one of your Digimon with [Terriermon] or [Lopmon] in its digivolution cards would digivolve, by suspending this Tamer, reduce the digivolution cost by 1.";
                 }
                 }
@@ -325,13 +330,16 @@ namespace DCGO.CardEffects.EX4
                     }
                     }
                 }
                 }
             }
             }
+            #endregion
 
 
+            #region Security
             if (timing == EffectTiming.SecuritySkill)
             if (timing == EffectTiming.SecuritySkill)
             {
             {
                 cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
                 cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
             }
             }
+            #endregion
 
 
             return cardEffects;
             return cardEffects;
         }
         }
     }
     }
-}
+}

+ 77 - 101
Assets/Scripts/CardEffect/EX4/Purple/EX4_058.cs

@@ -3,6 +3,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
 
 
+// Ravemon
 namespace DCGO.CardEffects.EX4
 namespace DCGO.CardEffects.EX4
 {
 {
     public class EX4_058 : CEntity_Effect
     public class EX4_058 : CEntity_Effect
@@ -11,155 +12,129 @@ namespace DCGO.CardEffects.EX4
         {
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
+            #region Jamming
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
                 cardEffects.Add(CardEffectFactory.JammingSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
                 cardEffects.Add(CardEffectFactory.JammingSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
             }
             }
+            #endregion
 
 
+            #region End of Attack
             if (timing == EffectTiming.OnEndAttack)
             if (timing == EffectTiming.OnEndAttack)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Delete this Digimon to play 1 [Ravemon] from trash at the end of opponent's turn", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Delete this Digimon to play 1 [Ravemon] from trash at the end of opponent's turn", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
-                string EffectDiscription()
+                string EffectDescription()
                 {
                 {
                     return "[End of Attack] By deleting this Digimon that has a digivolution card with [Bird] or [Avian] in one of its traits, at the end of your opponent's turn, play 1 [Ravemon] from your trash without paying the cost.";
                     return "[End of Attack] By deleting this Digimon that has a digivolution card with [Bird] or [Avian] in one of its traits, at the end of your opponent's turn, play 1 [Ravemon] from your trash without paying the cost.";
                 }
                 }
 
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                 {
-                    if (cardSource != null)
-                    {
-                        if (cardSource.IsDigimon)
-                        {
-                            if (cardSource.Owner == card.Owner)
-                            {
-                                if (cardSource.CardNames.Contains("Ravemon"))
-                                {
-                                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
-                                    {
-                                        return true;
-                                    }
-                                }
-                            }
-                        }
-                    }
-
-                    return false;
+                    return cardSource != null
+                        && cardSource.IsDigimon
+                        && cardSource.Owner == card.Owner
+                        && cardSource.CardNames.Contains("Ravemon")
+                        && CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass);
                 }
                 }
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
                 {
                 {
-                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                    return CardEffectCommons.IsExistOnBattleAreaTrigger(card, activateClass)
+                        && CardEffectCommons.CanTriggerOnAttack(hashtable, card);
                 }
                 }
 
 
                 bool CanActivateCondition(Hashtable hashtable)
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count(cardSource => cardSource.HasBirdTraits) >= 1)
-                        {
-                            if (card.PermanentOfThisCard().CanBeDestroyedBySkill(activateClass))
-                            {
-                                return true;
-                            }
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleAreaActivate(card, activateClass)
+                        && card.PermanentOfThisCard().DigivolutionCards.Count(cardSource => cardSource.HasBirdTraits) >= 1
+                        && card.PermanentOfThisCard().CanBeDestroyedBySkill(activateClass);
                 }
                 }
 
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { card.PermanentOfThisCard() }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
+
+                    IEnumerator SuccessProcess()
                     {
                     {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count(cardSource => cardSource.HasBirdTraits) >= 1)
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { card.PermanentOfThisCard() }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
+                        ActivateClass activateClass1 = new ActivateClass();
+                        activateClass1.SetUpICardEffect("Play 1 [Ravemon] from trash", CanUseCondition1, card);
+                        activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, 1, false, "");
+                        activateClass1.SetHashString("EX4_058_EoOT");
+                        CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilOpponentTurnEnd, card: card, cardEffect: activateClass1, timing: EffectTiming.OnEndTurn);
 
 
-                            IEnumerator SuccessProcess()
-                            {
-                                ActivateClass activateClass1 = new ActivateClass();
-                                activateClass1.SetUpICardEffect("Play 1 [Ravemon] from trash", CanUseCondition1, card);
-                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "");
-                                CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilOpponentTurnEnd, card: card, cardEffect: activateClass1, timing: EffectTiming.OnEndTurn);
+                        bool CanUseCondition1(Hashtable hashtable)
+                        {
+                            return CardEffectCommons.IsOpponentTurn(card);
+                        }
 
 
-                                bool CanUseCondition1(Hashtable hashtable)
-                                {
-                                    return CardEffectCommons.IsOpponentTurn(card);
-                                }
+                        bool CanActivateCondition1(Hashtable hashtable)
+                        {
+                            return CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
+                        }
 
 
-                                bool CanActivateCondition1(Hashtable hashtable)
+                        IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
+                        {
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition(cardSource)))
+                            {
+                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
+
+                                List<CardSource> selectedCards = new List<CardSource>();
+
+                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                selectCardEffect.SetUp(
+                                    canTargetCondition: CanSelectCardCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    canNoSelect: () => false,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    message: "Select 1 [Ravemon] to play.",
+                                    maxCount: maxCount,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    mode: SelectCardEffect.Mode.Custom,
+                                    root: SelectCardEffect.Root.Trash,
+                                    customRootCardList: null,
+                                    canLookReverseCard: true,
+                                    selectPlayer: card.Owner,
+                                    cardEffect: activateClass1);
+
+                                selectCardEffect.SetUpCustomMessage("Select 1 [Ravemon] to play.", "The opponent is selecting 1 [Ravemon] to play.");
+                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                yield return StartCoroutine(selectCardEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
                                 {
                                 {
-                                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                                    {
-                                        return true;
-                                    }
+                                    selectedCards.Add(cardSource);
 
 
-                                    return false;
+                                    yield return null;
                                 }
                                 }
 
 
-                                IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
-                                {
-                                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition(cardSource)))
-                                    {
-                                        int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
-
-                                        List<CardSource> selectedCards = new List<CardSource>();
-
-                                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                        selectCardEffect.SetUp(
-                                                    canTargetCondition: CanSelectCardCondition,
-                                                    canTargetCondition_ByPreSelecetedList: null,
-                                                    canEndSelectCondition: null,
-                                                    canNoSelect: () => false,
-                                                    selectCardCoroutine: SelectCardCoroutine,
-                                                    afterSelectCardCoroutine: null,
-                                                    message: "Select 1 [Ravemon] to play.",
-                                                    maxCount: maxCount,
-                                                    canEndNotMax: false,
-                                                    isShowOpponent: true,
-                                                    mode: SelectCardEffect.Mode.Custom,
-                                                    root: SelectCardEffect.Root.Trash,
-                                                    customRootCardList: null,
-                                                    canLookReverseCard: true,
-                                                    selectPlayer: card.Owner,
-                                                    cardEffect: activateClass1);
-
-                                        selectCardEffect.SetUpCustomMessage("Select 1 [Ravemon] to play.", "The opponent is selecting 1 [Ravemon] to play.");
-                                        selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                                        yield return StartCoroutine(selectCardEffect.Activate());
-
-                                        IEnumerator SelectCardCoroutine(CardSource cardSource)
-                                        {
-                                            selectedCards.Add(cardSource);
-
-                                            yield return null;
-                                        }
-
-                                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
-                                    }
-                                }
-
-                                yield return null;
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
                             }
                             }
                         }
                         }
+
+                        yield return null;
                     }
                     }
                 }
                 }
             }
             }
+            #endregion
 
 
+            #region On Deletion
             if (timing == EffectTiming.OnDestroyedAnyone)
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Opponent trashes 1 card from hand and add the top card of opponent's security to hand", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Opponent trashes 1 card from hand and add the top card of opponent's security to hand", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
-                string EffectDiscription()
+                string EffectDescription()
                 {
                 {
                     return "[On Deletion] If your opponent has 8 or more cards in their hand, they trash 1 card in their hand. Then, if your opponent has 7 or fewer cards in their hand, they add the top card of their security stack to their hand.";
                     return "[On Deletion] If your opponent has 8 or more cards in their hand, they trash 1 card in their hand. Then, if your opponent has 7 or fewer cards in their hand, they add the top card of their security stack to their hand.";
                 }
                 }
@@ -236,8 +211,9 @@ namespace DCGO.CardEffects.EX4
                     }
                     }
                 }
                 }
             }
             }
+            #endregion
 
 
             return cardEffects;
             return cardEffects;
         }
         }
     }
     }
-}
+}

+ 2 - 1
Assets/Scripts/CardEffect/EX9/Black/EX9_057.cs

@@ -55,6 +55,7 @@ namespace DCGO.CardEffects.EX9
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Return 4 Digi-Egg [Negamon] to Digi-Egg deck, to move to battle area.", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Return 4 Digi-Egg [Negamon] to Digi-Egg deck, to move to battle area.", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateBreedingCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 activateClass.SetUpActivateClass(CanActivateBreedingCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetIsSkippable(true);
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()
@@ -394,4 +395,4 @@ namespace DCGO.CardEffects.EX9
             return cardEffects;
             return cardEffects;
         }
         }
     }
     }
-}
+}

+ 2 - 0
Assets/Scripts/CardEffect/EX9/White/EX9_074.cs

@@ -122,6 +122,7 @@ namespace DCGO.CardEffects.EX9
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Place digimon from trash as top source card, delete digimon", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Place digimon from trash as top source card, delete digimon", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetIsDigimonEffect(true);
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()
@@ -314,6 +315,7 @@ namespace DCGO.CardEffects.EX9
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Place digimon from trash as top source card, delete digimon", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Place digimon from trash as top source card, delete digimon", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetIsDigimonEffect(true);
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()

+ 4 - 6
Assets/Scripts/CardEffect/P/Red/P_110.cs

@@ -1,11 +1,9 @@
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
-using UnityEngine;
 using System.Linq;
 using System.Linq;
-using Photon;
 using System;
 using System;
-using Photon.Pun;
 
 
+// Shadramon
 public class P_110 : CEntity_Effect
 public class P_110 : CEntity_Effect
 {
 {
     public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
     public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
@@ -25,11 +23,11 @@ public class P_110 : CEntity_Effect
         if (timing == EffectTiming.OnEnterFieldAnyone)
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
         {
             ActivateClass activateClass = new ActivateClass();
             ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Play 1 [Veemon] or [Wormmon] from hand", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetUpICardEffect("Play 1 [Veemon] or [Wormmon] from trash for free", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
             cardEffects.Add(activateClass);
             cardEffects.Add(activateClass);
 
 
-            string EffectDiscription()
+            string EffectDescription()
             {
             {
                 return "[When Digivolving] You may play 1 [Veemon]/[Wormmon] from your trash suspended without paying the cost.";
                 return "[When Digivolving] You may play 1 [Veemon]/[Wormmon] from your trash suspended without paying the cost.";
             }
             }

+ 5 - 5
Assets/Scripts/Script/AutoProcessing.cs

@@ -899,7 +899,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
                     {
                     {
                         if (cardEffect.CanUse(hashtable))
                         if (cardEffect.CanUse(hashtable))
                         {
                         {
-                            cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEfffectThisTurn(cardEffect);
+                            cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEffectThisTurn(cardEffect);
                             yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)cardEffect).Activate(hashtable));
                             yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)cardEffect).Activate(hashtable));
                         }
                         }
                     }
                     }
@@ -922,7 +922,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
                         {
                         {
                             if (cardEffect.CanUse(hashtable))
                             if (cardEffect.CanUse(hashtable))
                             {
                             {
-                                cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEfffectThisTurn(cardEffect);
+                                cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEffectThisTurn(cardEffect);
                                 yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)cardEffect).Activate(hashtable));
                                 yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)cardEffect).Activate(hashtable));
                             }
                             }
                         }
                         }
@@ -945,7 +945,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
                         {
                         {
                             if (cardEffect.CanUse(hashtable))
                             if (cardEffect.CanUse(hashtable))
                             {
                             {
-                                cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEfffectThisTurn(cardEffect);
+                                cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEffectThisTurn(cardEffect);
                                 yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)cardEffect).Activate(hashtable));
                                 yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)cardEffect).Activate(hashtable));
                             }
                             }
                         }
                         }
@@ -968,7 +968,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
                         {
                         {
                             if (cardEffect.CanUse(hashtable))
                             if (cardEffect.CanUse(hashtable))
                             {
                             {
-                                cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEfffectThisTurn(cardEffect);
+                                cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEffectThisTurn(cardEffect);
                                 yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)cardEffect).Activate(hashtable));
                                 yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)cardEffect).Activate(hashtable));
                             }
                             }
                         }
                         }
@@ -1036,7 +1036,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
                         {
                         {
                             if (cardEffect.CanUse(hashtable))
                             if (cardEffect.CanUse(hashtable))
                             {
                             {
-                                cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEfffectThisTurn(cardEffect);
+                                cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEffectThisTurn(cardEffect);
                                 yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)cardEffect).Activate(hashtable));
                                 yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)cardEffect).Activate(hashtable));
                             }
                             }
                         }
                         }

+ 5 - 7
Assets/Scripts/Script/CEntity_EffectController.cs

@@ -1,8 +1,6 @@
-using System.Collections;
+using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine;
-using System;
-using System.IO;
 
 
 public class CEntity_EffectController : MonoBehaviour
 public class CEntity_EffectController : MonoBehaviour
 {
 {
@@ -184,7 +182,7 @@ public class CEntity_EffectController : MonoBehaviour
         #region Generate and set an instance of the card effect class
         #region Generate and set an instance of the card effect class
         bool CanAttachEffectComponent()
         bool CanAttachEffectComponent()
         {
         {
-            if (string.IsNullOrEmpty(ClassName)) 
+            if (string.IsNullOrEmpty(ClassName))
                 return false;
                 return false;
 
 
             if (Type.GetType(ClassName) == null)
             if (Type.GetType(ClassName) == null)
@@ -199,7 +197,7 @@ public class CEntity_EffectController : MonoBehaviour
                     if (Type.GetType($"DCGO.CardEffects.Tokens.{ClassName}") == null)
                     if (Type.GetType($"DCGO.CardEffects.Tokens.{ClassName}") == null)
                         return false;
                         return false;
                 }
                 }
-                
+
             }
             }
 
 
             return true;
             return true;
@@ -218,7 +216,7 @@ public class CEntity_EffectController : MonoBehaviour
                 else
                 else
                     t = Type.GetType($"DCGO.CardEffects.Tokens.{ClassName}");
                     t = Type.GetType($"DCGO.CardEffects.Tokens.{ClassName}");
             }
             }
-                
+
 
 
             Component component = this.gameObject.AddComponent(t);
             Component component = this.gameObject.AddComponent(t);
 
 
@@ -268,7 +266,7 @@ public class CEntity_EffectController : MonoBehaviour
     #endregion
     #endregion
 
 
     #region Register as effects used this turn
     #region Register as effects used this turn
-    public void RegisterUseEfffectThisTurn(ICardEffect cardEffect)
+    public void RegisterUseEffectThisTurn(ICardEffect cardEffect)
     {
     {
         UseEffectsThisTurn.Add(cardEffect);
         UseEffectsThisTurn.Add(cardEffect);
     }
     }

+ 28 - 10
Assets/Scripts/Script/CardEffectCommons/KeyWordEffects/Retaliation.cs

@@ -21,7 +21,7 @@ public partial class CardEffectCommons
 
 
                     if (TopCard != null)
                     if (TopCard != null)
                     {
                     {
-                        if (IsByBattle(hashtable))
+                        if (IsExistOnTrash(TopCard))
                         {
                         {
                             IBattle battle = GetBattleFromHashtable(hashtable);
                             IBattle battle = GetBattleFromHashtable(hashtable);
 
 
@@ -31,26 +31,30 @@ public partial class CardEffectCommons
 
 
                                 if (battleHashtable != null)
                                 if (battleHashtable != null)
                                 {
                                 {
-                                    List<Permanent> WinnerPermanents = GetWinnerPermanentsRealFromHashtable(battleHashtable);
+                                    List<Permanent> LoserPermanents = GetLoserPermanentsFromHashtable(battleHashtable);
 
 
-                                    if (WinnerPermanents != null)
+                                    if (LoserPermanents != null)
                                     {
                                     {
-                                        if (WinnerPermanents.Count((permanent) => permanent.cardSources.Contains(TopCard)) == 0)
+                                        if (LoserPermanents.Some((permanent) => permanent.cardSources.Contains(TopCard)))
                                         {
                                         {
-                                            bool canDestroyWinner = WinnerPermanents.Some(permanent => IsOpponentPermanent(permanent, TopCard));
-
-                                            if (canDestroyWinner)
+                                            #region Work out if opponent is still in play
+                                            if (LoserPermanents.Some(permanent => IsOpponentPermanent(permanent, TopCard)))// In case of tie, any other permanent is the opponent's digimon
                                             {
                                             {
-                                                List<Permanent> LoserPermanents = GetLoserPermanentsFromHashtable(battleHashtable);
+                                                return true;
+                                            } 
+                                            else
+                                            {
+                                                List<Permanent> WinnerPermanents = GetWinnerPermanentsRealFromHashtable(battleHashtable);
 
 
-                                                if (LoserPermanents != null)
+                                                if (WinnerPermanents != null)
                                                 {
                                                 {
-                                                    if (LoserPermanents.Some((permanent) => permanent.cardSources.Contains(TopCard)))
+                                                    if (WinnerPermanents.Some(permanent => IsOpponentPermanent(permanent, TopCard)))
                                                     {
                                                     {
                                                         return true;
                                                         return true;
                                                     }
                                                     }
                                                 }
                                                 }
                                             }
                                             }
+                                            #endregion
                                         }
                                         }
                                     }
                                     }
                                 }
                                 }
@@ -102,6 +106,20 @@ public partial class CardEffectCommons
                                             {
                                             {
                                                 yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(destroyTargetPermanents, CardEffectHashtable(activateClass)).Destroy());
                                                 yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(destroyTargetPermanents, CardEffectHashtable(activateClass)).Destroy());
                                             }
                                             }
+                                            else //In case of tie there is no winner permanents but the other loser permanent is the target
+                                            {
+                                                List<Permanent> LoserPermanents = GetLoserPermanentsFromHashtable(battleHashtable);
+
+                                                if (LoserPermanents != null)
+                                                {
+                                                    destroyTargetPermanents = LoserPermanents.Filter(permanent => IsOpponentPermanent(permanent, TopCard));
+
+                                                    if (destroyTargetPermanents.Count >= 1)
+                                                    {
+                                                        yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(destroyTargetPermanents, CardEffectHashtable(activateClass)).Destroy());
+                                                    }
+                                                }
+                                            }
                                         }
                                         }
                                     }
                                     }
                                 }
                                 }

+ 4 - 7
Assets/Scripts/Script/CardEffectFactory/KeyWordEffects/ArtsDigivolve.cs

@@ -1,8 +1,5 @@
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
-using System;
-using System.Linq;
-using UnityEngine;
 
 
 public partial class CardEffectFactory
 public partial class CardEffectFactory
 {
 {
@@ -17,12 +14,12 @@ public partial class CardEffectFactory
 
 
         bool CanUseCondition(Hashtable hashtable) => CardEffectCommons.IsExistOnExecutingArea(card);
         bool CanUseCondition(Hashtable hashtable) => CardEffectCommons.IsExistOnExecutingArea(card);
 
 
-        bool CanResolveCondition(CardSource optionCard) => CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectPermanentCondition);
+        bool CanResolveCondition(CardSource optionCard) => CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition, true);
 
 
         bool CanSelectPermanentCondition(Permanent permanent)
         bool CanSelectPermanentCondition(Permanent permanent)
         {
         {
-            return (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card)
-                    || CardEffectCommons.IsPermanentExistsOnOwnerBreedingArea(permanent, card))
+            return CardEffectCommons.IsOwnerPermanent(permanent, card)
+                && permanent.IsDigimon
                 && card.CanPlayCardTargetFrame(permanent.PermanentFrame, false, artsDigivolutionClass, SelectCardEffect.Root.Execution);
                 && card.CanPlayCardTargetFrame(permanent.PermanentFrame, false, artsDigivolutionClass, SelectCardEffect.Root.Execution);
         }
         }
         
         
@@ -61,4 +58,4 @@ public partial class CardEffectFactory
         }
         }
     }
     }
     #endregion
     #endregion
-}
+}

+ 3 - 3
Assets/Scripts/Script/DataBase.cs

@@ -1,4 +1,4 @@
-using System.Collections;
+using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine;
 using System;
 using System;
@@ -455,7 +455,7 @@ public class DataBase : MonoBehaviour
 
 
     public static string PierceEffectDiscription()
     public static string PierceEffectDiscription()
     {
     {
-        return "<Piercing> (When this Digimon attacks and deletes an opponent's Digimon and survives the battle, it performs any security checks it normally would.)";
+        return "<Piercing> (When this Digimon deletes your opponent's Digimon in battle while attacking, it checks security before the attack ends.)";
     }
     }
 
 
     public static string RetaliationEffectDiscription()
     public static string RetaliationEffectDiscription()
@@ -1016,4 +1016,4 @@ public class ParameterComparer : IEqualityComparer<object[]>
     }
     }
 
 
     #endregion
     #endregion
-}
+}

+ 9 - 3
Assets/Scripts/Script/ICardEffect.cs

@@ -1,5 +1,4 @@
-using Photon.Pun;
-using System;
+using System;
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine;
@@ -388,7 +387,7 @@ public abstract class ICardEffect
         {
         {
             if (EffectSourceCard != null)
             if (EffectSourceCard != null)
             {
             {
-                if (EffectSourceCard.PermanentOfThisCard() != null)
+                if (EffectSourceCard.PermanentOfThisCard() != null && !IsOnDeletion)
                 {
                 {
                     if (IsInheritedEffect || IsLinkedEffect)
                     if (IsInheritedEffect || IsLinkedEffect)
                     {
                     {
@@ -1246,6 +1245,13 @@ public static class ActivateICardEffectExtensionClass
     }
     }
     #endregion
     #endregion
 
 
+    #region add a usage of an X Per Turn
+    public static void AddUse(this ActivateICardEffect activateICardEffect)
+    {
+        ((ICardEffect)activateICardEffect).EffectSourceCard.cEntity_EffectController.RegisterUseEffectThisTurn((ICardEffect)activateICardEffect);
+    }
+    #endregion
+
     #region Effect → Processing
     #region Effect → Processing
 
 
     public static IEnumerator Activate_Effect_Execute(this ActivateICardEffect activateICardEffect, Hashtable hash, UnityAction<ICardEffect> useEffectCallback)
     public static IEnumerator Activate_Effect_Execute(this ActivateICardEffect activateICardEffect, Hashtable hash, UnityAction<ICardEffect> useEffectCallback)

+ 1 - 1
Assets/Scripts/Script/MultipleSkills.cs

@@ -358,7 +358,7 @@ public class MultipleSkills : MonoBehaviourPunCallbacks
                     skillInfos_active[_skillIndex].CardEffect.SetOnProcessCallbuck(() =>
                     skillInfos_active[_skillIndex].CardEffect.SetOnProcessCallbuck(() =>
                         {
                         {
                             SkillInfos_used.Add(skillInfos_active[_skillIndex]);
                             SkillInfos_used.Add(skillInfos_active[_skillIndex]);
-                            cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEfffectThisTurn(cardEffect);
+                            cardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEffectThisTurn(cardEffect);
                         });
                         });
 
 
                     if (cardEffect is ActivateICardEffect)
                     if (cardEffect is ActivateICardEffect)

+ 8 - 3
Assets/Scripts/Script/SelectDNACondition.cs

@@ -10,13 +10,16 @@ public class SelectDNACondition : MonoBehaviourPunCallbacks
     public void SetUp
     public void SetUp
         (Player SelectPlayer,
         (Player SelectPlayer,
         CardSource targetDNA,
         CardSource targetDNA,
-        Func<int, IEnumerator> SelectDNACoroutine)
+        Func<int, IEnumerator> SelectDNACoroutine,
+        bool IsLocal = false)
     {
     {
         _selectPlayer = SelectPlayer;
         _selectPlayer = SelectPlayer;
         _targetDNA = targetDNA;
         _targetDNA = targetDNA;
         _selectDNACoroutine = SelectDNACoroutine;
         _selectDNACoroutine = SelectDNACoroutine;
         _notDoSync = false;
         _notDoSync = false;
-    }
+        _isDigivolutionCost = false;
+        _isLocal = IsLocal;
+}
 
 
     Player _selectPlayer = null;
     Player _selectPlayer = null;
     CardSource _targetDNA = null;
     CardSource _targetDNA = null;
@@ -24,6 +27,8 @@ public class SelectDNACondition : MonoBehaviourPunCallbacks
     List<int> _candidates = new List<int>();
     List<int> _candidates = new List<int>();
     public int _selectedCount = 0;
     public int _selectedCount = 0;
     bool _notDoSync = false;
     bool _notDoSync = false;
+    bool _isDigivolutionCost = false;
+    bool _isLocal = false;
 
 
     public void ResetSelectDNAConditionClass()
     public void ResetSelectDNAConditionClass()
     {
     {
@@ -65,7 +70,7 @@ public class SelectDNACondition : MonoBehaviourPunCallbacks
                 string selectPlayerMessage = "Which DNA do you want?";
                 string selectPlayerMessage = "Which DNA do you want?";
                 string notSelectPlayerMessage = "The opponent is choosing from which DNA to do.";
                 string notSelectPlayerMessage = "The opponent is choosing from which DNA to do.";
 
 
-                GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements, selectPlayer: _targetDNA.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements, selectPlayer: _targetDNA.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage, _isLocal);
 
 
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
 
 

+ 1 - 1
Assets/Scripts/Script/SelectJogressEffect.cs

@@ -187,7 +187,7 @@ public class SelectJogressEffect : MonoBehaviour
             {
             {
                 #region select DNA condition
                 #region select DNA condition
                 SelectDNACondition selectDNACondition = GManager.instance.GetComponent<SelectDNACondition>();
                 SelectDNACondition selectDNACondition = GManager.instance.GetComponent<SelectDNACondition>();
-                selectDNACondition.SetUp(_card.Owner, _card, SelectDNA);
+                selectDNACondition.SetUp(_card.Owner, _card, SelectDNA, _isLocal);
 
 
                 yield return ContinuousController.instance.StartCoroutine(selectDNACondition.Activate());
                 yield return ContinuousController.instance.StartCoroutine(selectDNACondition.Activate());
 
 

+ 1 - 1
Assets/Scripts/Script/TurnStateMachine.cs

@@ -1186,7 +1186,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
                         //Count up the number of uses
                         //Count up the number of uses
                         if (UseCardEffect.MaxCountPerTurn < 100)
                         if (UseCardEffect.MaxCountPerTurn < 100)
                         {
                         {
-                            UseCardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEfffectThisTurn(UseCardEffect);
+                            UseCardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEffectThisTurn(UseCardEffect);
                         }
                         }
 
 
                         // yield return StartCoroutine(((ActivateICardEffect)UseCardEffect).Activate_Optional_Effect_Execute(null));
                         // yield return StartCoroutine(((ActivateICardEffect)UseCardEffect).Activate_Optional_Effect_Execute(null));

+ 35 - 22
Assets/Scripts/Script/UserSelectionManager.cs

@@ -9,6 +9,7 @@ public class UserSelectionManager : MonoBehaviourPunCallbacks
 {
 {
     bool _endSelect = false;
     bool _endSelect = false;
     int _selectedIntValue = 0;
     int _selectedIntValue = 0;
+    bool _isLocal = false;
     bool _selectedBoolValue => getBoolFromInt(_selectedIntValue);
     bool _selectedBoolValue => getBoolFromInt(_selectedIntValue);
     public int SelectedIntValue => _selectedIntValue;
     public int SelectedIntValue => _selectedIntValue;
     public bool SelectedBoolValue => _selectedBoolValue;
     public bool SelectedBoolValue => _selectedBoolValue;
@@ -98,11 +99,12 @@ public class UserSelectionManager : MonoBehaviourPunCallbacks
         yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
         yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
     }
     }
 
 
-    public void SetIntSelection(List<SelectionElement<int>> selectionElements, Player selectPlayer, string selectPlayerMessage, string notSelectPlayerMessage)
+    public void SetIntSelection(List<SelectionElement<int>> selectionElements, Player selectPlayer, string selectPlayerMessage, string notSelectPlayerMessage, bool IsLocal = false)
     {
     {
         _endSelect = false;
         _endSelect = false;
         _selectedIntValue = 0;
         _selectedIntValue = 0;
         _selectPlayer = selectPlayer;
         _selectPlayer = selectPlayer;
+        _isLocal = IsLocal;
 
 
         if (selectPlayer.isYou)
         if (selectPlayer.isYou)
         {
         {
@@ -112,7 +114,7 @@ public class UserSelectionManager : MonoBehaviourPunCallbacks
 
 
             foreach (SelectionElement<int> selectionElement in selectionElements)
             foreach (SelectionElement<int> selectionElement in selectionElements)
             {
             {
-                command_SelectCommands.Add(new Command_SelectCommand(selectionElement.Message, () => SetInt_RPC(selectPlayer.PlayerID, selectionElement.Value), selectionElement.SpriteIndex));
+                command_SelectCommands.Add(new Command_SelectCommand(selectionElement.Message, () => SendSelection(selectionElement.Value), selectionElement.SpriteIndex));
             }
             }
 
 
             GManager.instance.selectCommandPanel.SetUpCommandButton(command_SelectCommands);
             GManager.instance.selectCommandPanel.SetUpCommandButton(command_SelectCommands);
@@ -132,25 +134,31 @@ public class UserSelectionManager : MonoBehaviourPunCallbacks
                     canSelectValue.Add(selectionElement.Value);
                     canSelectValue.Add(selectionElement.Value);
                 }
                 }
 
 
-                if (canSelectValue.Count >= 1)
-                {
-                    SetInt_RPC(selectPlayer.PlayerID, canSelectValue[UnityEngine.Random.Range(0, canSelectValue.Count)]);
-                }
-
-                else
-                {
-                    SetInt_RPC(selectPlayer.PlayerID, 0);
-                }
+                int value = canSelectValue.Count >= 1 ? canSelectValue[UnityEngine.Random.Range(0, canSelectValue.Count)] : 0;
+                SendSelection(value);
             }
             }
             #endregion
             #endregion
         }
         }
+
+        void SendSelection(int value)
+        {
+            if (_isLocal)
+            {
+                SetIntForPlayer(selectPlayer.PlayerID, value);
+            }
+            else
+            {
+                SetInt_RPC(selectPlayer.PlayerID, value);
+            }
+        }
     }
     }
 
 
-    public void SetBoolSelection(List<SelectionElement<bool>> selectionElements, Player selectPlayer, string selectPlayerMessage, string notSelectPlayerMessage)
+    public void SetBoolSelection(List<SelectionElement<bool>> selectionElements, Player selectPlayer, string selectPlayerMessage, string notSelectPlayerMessage, bool IsLocal = false)
     {
     {
         _endSelect = false;
         _endSelect = false;
         _selectedIntValue = 0;
         _selectedIntValue = 0;
         _selectPlayer = selectPlayer;
         _selectPlayer = selectPlayer;
+        _isLocal = IsLocal;
 
 
         if (selectPlayer.isYou)
         if (selectPlayer.isYou)
         {
         {
@@ -160,7 +168,7 @@ public class UserSelectionManager : MonoBehaviourPunCallbacks
 
 
             foreach (SelectionElement<bool> selectionElement in selectionElements)
             foreach (SelectionElement<bool> selectionElement in selectionElements)
             {
             {
-                command_SelectCommands.Add(new Command_SelectCommand(selectionElement.Message, () => SetBool_RPC(selectPlayer.PlayerID, selectionElement.Value), selectionElement.SpriteIndex));
+                command_SelectCommands.Add(new Command_SelectCommand(selectionElement.Message, () => SendSelection(selectionElement.Value), selectionElement.SpriteIndex));
             }
             }
 
 
             GManager.instance.selectCommandPanel.SetUpCommandButton(command_SelectCommands);
             GManager.instance.selectCommandPanel.SetUpCommandButton(command_SelectCommands);
@@ -180,18 +188,23 @@ public class UserSelectionManager : MonoBehaviourPunCallbacks
                     canSelectValue.Add(selectionElement.Value);
                     canSelectValue.Add(selectionElement.Value);
                 }
                 }
 
 
-                if (canSelectValue.Count >= 1)
-                {
-                    SetBool_RPC(selectPlayer.PlayerID, canSelectValue[UnityEngine.Random.Range(0, canSelectValue.Count)]);
-                }
-
-                else
-                {
-                    SetBool_RPC(selectPlayer.PlayerID, false);
-                }
+                bool value = canSelectValue.Count >= 1 ? canSelectValue[UnityEngine.Random.Range(0, canSelectValue.Count)] : false;
+                SendSelection(value);
             }
             }
             #endregion
             #endregion
         }
         }
+
+        void SendSelection(bool value)
+        {
+            if (_isLocal)
+            {
+                SetBoolForPlayer(selectPlayer.PlayerID, value);
+            }
+            else
+            {
+                SetBool_RPC(selectPlayer.PlayerID, value);
+            }
+        }
     }
     }
 }
 }
 
 

+ 2 - 2
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:88e7ffd856cadaefbebc9621be12ea2ad3173ed8c67b8e8dd69a8511794f2ae7
-size 20480
+oid sha256:aad0004cb7d2b3006f12ed07b3cba205384875432ab368b1fa019160c6bdd3fe
+size 20479