Browse Source

Update BT16_063.cs

x89rt2 4 months ago
parent
commit
bcd087b434
1 changed files with 5 additions and 41 deletions
  1. 5 41
      Assets/Scripts/CardEffect/BT16/Black/BT16_063.cs

+ 5 - 41
Assets/Scripts/CardEffect/BT16/Black/BT16_063.cs

@@ -130,49 +130,13 @@ namespace DCGO.CardEffects.BT16
 
                     if (selectedPermanent != null)
                     {
-                        CanNotAffectedClass canNotAffectedClass = new CanNotAffectedClass();
-                        canNotAffectedClass.SetUpICardEffect("Isn't affected by opponent's Digimon's effect", CanUseUnaffectedCondition, card);
-                        canNotAffectedClass.SetUpCanNotAffectedClass(CardCondition: CardUnaffectedCondition, SkillCondition: SkillCondition);
-                        selectedPermanent.UntilOpponentTurnEndEffects.Add((_timing) => canNotAffectedClass);
+                        #region Give Digimon Effect Immunity
 
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateBuffEffect(selectedPermanent));
-
-                        bool CanUseUnaffectedCondition(Hashtable hashtable)
-                        {
-                            return CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent);
-                        }
-
-                        bool CardUnaffectedCondition(CardSource cardSource)
-                        {
-                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
-                            {
-                                if (cardSource == selectedPermanent.TopCard)
-                                {
-                                    return true;
-                                }
-                            }
+                        selectedPermanent.UntilOpponentTurnEndEffects.Add((_timing) => PermanentEffectFactory.DigimonEffectImmunity(selectedPermanent));
 
-                            return false;
-                        }
-
-                        bool SkillCondition(ICardEffect cardEffect)
-                        {
-                            if (cardEffect != null)
-                            {
-                                if (cardEffect.EffectSourceCard != null)
-                                {
-                                    if (cardEffect.EffectSourceCard.Owner == card.Owner.Enemy)
-                                    {
-                                        if (cardEffect.IsDigimonEffect)
-                                        {
-                                            return true;
-                                        }
-                                    }
-                                }
-                            }
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateBuffEffect(selectedPermanent));
 
-                            return false;
-                        }
+                        #endregion
                     }
 
                     if (CardEffectCommons.IsJogress(hashtable))
@@ -262,4 +226,4 @@ namespace DCGO.CardEffects.BT16
             return cardEffects;
         }
     }
-}
+}