Browse Source

final 1.6.1 build

mbunch_kascope 1 năm trước cách đây
mục cha
commit
3992a1435e

+ 1 - 1
Assets/CardEffect/EX8/Blue/EX8_023.cs

@@ -101,7 +101,7 @@ namespace DCGO.CardEffects.EX8
                             mode: SelectPermanentEffect.Mode.Custom,
                             cardEffect: activateClass);
 
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will trash digivolution cards.", "The opponent is selecting 1 Digimon that will trash digivolution cards.");
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will gain effects.", "The opponent is selecting 1 Digimon that will gain effects.");
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 

+ 1 - 1
Assets/CardEffect/EX8/Blue/EX8_029.cs

@@ -37,7 +37,7 @@ namespace DCGO.CardEffects.EX8
                         {
                         new JogressConditionElement(PermanentCondition1, "Plesiomon"),
 
-                        new JogressConditionElement(PermanentCondition2, "a level 5 or higher w/[Seadramon] in name"),
+                        new JogressConditionElement(PermanentCondition2, "a level 5 w/[Seadramon] in name"),
                         };
 
                         JogressCondition jogressCondition = new JogressCondition(elements, 0);

+ 50 - 46
Assets/CardEffect/EX8/Purple/EX8_059.cs

@@ -140,39 +140,51 @@ namespace DCGO.CardEffects.EX8
 
                                 if (selectedPermanent != null)
                                 {
+                                    CardSource _topCard = selectedPermanent.TopCard;
+
                                     ActivateClass activateClass1 = new ActivateClass();
-                                    activateClass1.SetUpICardEffect("Trash 1 card in your hand.", GivenEffectCanUseCondition, selectedPermanent.TopCard);
-                                    activateClass1.SetUpActivateClass(GivenEffectCanActivateCondition, GivenEffectActivateCoroutine, -1, false, GivenEffectDescription());
+                                    activateClass1.SetUpICardEffect("Trash 1 card", CanUseCondition1, selectedPermanent.TopCard);
+                                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
                                     activateClass1.SetEffectSourcePermanent(selectedPermanent);
-                                    selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+                                    CardEffectCommons.AddEffectToPermanent(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, card: card, cardEffect: activateClass1, timing: EffectTiming.OnDestroyedAnyone);
 
                                     if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                    {
                                         yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                                    }
 
-                                    string GivenEffectDescription()
+                                    string EffectDiscription1()
                                     {
                                         return "[On Deletion] Trash 1 card in your hand.";
                                     }
 
-                                    bool GivenEffectCanUseCondition(Hashtable hashtable)
+                                    bool CanUseCondition1(Hashtable hashtable1)
                                     {
-                                        return CardEffectCommons.CanTriggerOnDeletion(hashtable, selectedPermanent.TopCard);
+                                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                        {
+                                            if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable1, (permanent) => permanent == selectedPermanent))
+                                            {
+                                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                                {
+                                                    return true;
+                                                }
+                                            }
+                                        }
+
+                                        return false;
                                     }
 
-                                    bool GivenEffectCanActivateCondition(Hashtable hashtable1)
+                                    bool CanActivateCondition1(Hashtable hashtable1)
                                     {
-                                        if (CardEffectCommons.CanActivateOnDeletion(selectedPermanent.TopCard))
+                                        if (CardEffectCommons.IsTopCardInTrashOnDeletion(hashtable1))
                                         {
-                                            /*if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
-                                            {
-                                                return true;
-                                            }*/
+                                            return true;
                                         }
 
                                         return false;
                                     }
 
-                                    IEnumerator GivenEffectActivateCoroutine(Hashtable _hashtable)
+                                    IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
                                     {
                                         if (selectedPermanent.TopCard.Owner.HandCards.Count >= 1)
                                         {
@@ -197,16 +209,6 @@ namespace DCGO.CardEffects.EX8
                                             yield return StartCoroutine(selectHandEffect.Activate());
                                         }
                                     }
-
-                                    ICardEffect GetCardEffect(EffectTiming _timing)
-                                    {
-                                        if (_timing == EffectTiming.OnDestroyedAnyone)
-                                        {
-                                            return activateClass1;
-                                        }
-
-                                        return null;
-                                    }
                                 }
                             }
                         }
@@ -318,39 +320,51 @@ namespace DCGO.CardEffects.EX8
 
                                 if (selectedPermanent != null)
                                 {
+                                    CardSource _topCard = selectedPermanent.TopCard;
+
                                     ActivateClass activateClass1 = new ActivateClass();
-                                    activateClass1.SetUpICardEffect("Trash 1 card in your hand.", GivenEffectCanUseCondition, selectedPermanent.TopCard);
-                                    activateClass1.SetUpActivateClass(GivenEffectCanActivateCondition, GivenEffectActivateCoroutine, -1, false, GivenEffectDescription());
+                                    activateClass1.SetUpICardEffect("Trash 1 card", CanUseCondition1, selectedPermanent.TopCard);
+                                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
                                     activateClass1.SetEffectSourcePermanent(selectedPermanent);
-                                    selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+                                    CardEffectCommons.AddEffectToPermanent(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, card: card, cardEffect: activateClass1, timing: EffectTiming.OnDestroyedAnyone);
 
                                     if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                    {
                                         yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                                    }
 
-                                    string GivenEffectDescription()
+                                    string EffectDiscription1()
                                     {
                                         return "[On Deletion] Trash 1 card in your hand.";
                                     }
 
-                                    bool GivenEffectCanUseCondition(Hashtable hashtable)
+                                    bool CanUseCondition1(Hashtable hashtable1)
                                     {
-                                        return CardEffectCommons.CanTriggerOnDeletion(hashtable, selectedPermanent.TopCard);
+                                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                        {
+                                            if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable1, (permanent) => permanent == selectedPermanent))
+                                            {
+                                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                                {
+                                                    return true;
+                                                }
+                                            }
+                                        }
+
+                                        return false;
                                     }
 
-                                    bool GivenEffectCanActivateCondition(Hashtable hashtable1)
+                                    bool CanActivateCondition1(Hashtable hashtable1)
                                     {
-                                        if (CardEffectCommons.CanActivateOnDeletion(selectedPermanent.TopCard))
+                                        if (CardEffectCommons.IsTopCardInTrashOnDeletion(hashtable1))
                                         {
-                                            /*if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
-                                            {
-                                                return true;
-                                            }*/
+                                            return true;
                                         }
 
                                         return false;
                                     }
 
-                                    IEnumerator GivenEffectActivateCoroutine(Hashtable _hashtable)
+                                    IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
                                     {
                                         if (selectedPermanent.TopCard.Owner.HandCards.Count >= 1)
                                         {
@@ -375,16 +389,6 @@ namespace DCGO.CardEffects.EX8
                                             yield return StartCoroutine(selectHandEffect.Activate());
                                         }
                                     }
-
-                                    ICardEffect GetCardEffect(EffectTiming _timing)
-                                    {
-                                        if (_timing == EffectTiming.OnDestroyedAnyone)
-                                        {
-                                            return activateClass1;
-                                        }
-
-                                        return null;
-                                    }
                                 }
                             }
                         }