Albert Vasconcellos 2 роки тому
батько
коміт
60a3860c7b

+ 87 - 110
Assets/CardEffect/BT15/Yellow/Babamon_BT15_041.cs

@@ -90,7 +90,7 @@ public class Babamon_BT15_041 : CEntity_Effect
         #endregion
 
         #region On Deletion
-        if (timing == EffectTiming.OnEnterFieldAnyone)
+        if (timing == EffectTiming.OnDestroyedAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Give opponent's Digimon -6000 DP.", CanUseCondition, card);
@@ -104,12 +104,7 @@ public class Babamon_BT15_041 : CEntity_Effect
 
             bool CanActivateCondition(Hashtable hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
-                {
-                    return true;
-                }
-
-                return false;
+                return CardEffectCommons.CanActivateOnDeletion(card);
             }
 
             bool CanUseCondition(Hashtable hashtable)
@@ -171,6 +166,7 @@ public class Babamon_BT15_041 : CEntity_Effect
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Delete this Digimon to play [Rosemon] or [Jijimon] from hand.", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetHashString("DeleteAndPlay_BT15_041");
             cardEffects.Add(activateClass);
 
             string EffectDiscription()
@@ -220,135 +216,116 @@ public class Babamon_BT15_041 : CEntity_Effect
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { card.PermanentOfThisCard() }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
+                yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                    new List<Permanent>() { card.PermanentOfThisCard() },
+                    CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
 
-                IEnumerator SuccessProcess()
+                if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
                 {
-                    if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
-                    {
-                        List<CardSource> selectedCards = new List<CardSource>();
-
-                        int maxCount = 1;
+                    List<CardSource> selectedCards = new List<CardSource>();
 
-                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+                    int maxCount = 1;
+                    bool selectedCard = false;
 
-                        selectHandEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectCardCondition,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: maxCount,
-                            canNoSelect: true,
-                            canEndNotMax: false,
-                            isShowOpponent: true,
-                            selectCardCoroutine: SelectCardCoroutine,
-                            afterSelectCardCoroutine: null,
-                            mode: SelectHandEffect.Mode.Custom,
-                            cardEffect: activateClass);
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
 
-                        selectHandEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
-                        selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectCardCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        selectCardCoroutine: SelectCardCoroutine,
+                        afterSelectCardCoroutine: null,
+                        mode: SelectHandEffect.Mode.Custom,
+                        cardEffect: activateClass);
 
-                        yield return StartCoroutine(selectHandEffect.Activate());
+                    selectHandEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
+                    selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
 
-                        IEnumerator SelectCardCoroutine(CardSource cardSource)
-                        {
-                            selectedCards.Add(cardSource);
+                    yield return StartCoroutine(selectHandEffect.Activate());
 
-                            yield return null;
-                        }
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        selectedCards.Add(cardSource);
+                        selectedCard = true;
 
                         yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
 
-
-                        IEnumerator AfterSelectCoroutine(List<CardSource> cardSources)
+                        if (selectedCards[0].HasWhenDigivolvingEffect)
                         {
-                            List<Permanent> permanents = CardEffectCommons.GetPlayedPermanentsFromEnterFieldHashtable(
-                    hashtable: _hashtable,
-                    rootCondition: null);
+                            List<ICardEffect> candidateEffects = cardSource.PermanentOfThisCard().EffectList(EffectTiming.OnEnterFieldAnyone)
+                            .Clone()
+                            .Filter(cardEffect => cardEffect != null && cardEffect is ActivateICardEffect && !cardEffect.IsSecurityEffect && cardEffect.IsWhenDigivolving);
 
-                            if (permanents != null)
+                            if (candidateEffects.Count >= 1)
                             {
-                                List<ICardEffect> candidateEffects = permanents
-                                    .Map(permanent => permanent.EffectList(EffectTiming.OnEnterFieldAnyone))
-                                    .Flat()
-                                    .Clone()
-                                    .Filter(cardEffect => cardEffect != null && cardEffect is ActivateICardEffect && !cardEffect.IsSecurityEffect && cardEffect.IsWhenDigivolving);
+                                ICardEffect selectedEffect = null;
 
-                                if (candidateEffects.Count >= 1)
+                                if (candidateEffects.Count == 1)
                                 {
-                                    ICardEffect selectedEffect = null;
-
-                                    if (candidateEffects.Count == 1)
-                                    {
-                                        selectedEffect = candidateEffects[0];
-                                    }
+                                    selectedEffect = candidateEffects[0];
+                                }
 
-                                    else
+                                else
+                                {
+                                    List<SkillInfo> skillInfos = candidateEffects
+                                        .Map(cardEffect => new SkillInfo(cardEffect, null, EffectTiming.None));
+
+                                    List<CardSource> cardSources = candidateEffects
+                                        .Map(cardEffect => cardEffect.EffectSourceCard);
+
+                                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                    selectCardEffect.SetUp(
+                                        canTargetCondition: (cardSource) => true,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        canNoSelect: () => false,
+                                        selectCardCoroutine: null,
+                                        afterSelectCardCoroutine: null,
+                                        message: "Select 1 effect to activate.",
+                                        maxCount: 1,
+                                        canEndNotMax: false,
+                                        isShowOpponent: false,
+                                        mode: SelectCardEffect.Mode.Custom,
+                                        root: SelectCardEffect.Root.Custom,
+                                        customRootCardList: cardSources,
+                                        canLookReverseCard: true,
+                                        selectPlayer: card.Owner,
+                                        cardEffect: activateClass);
+
+                                    selectCardEffect.SetNotShowCard();
+                                    selectCardEffect.SetUpSkillInfos(skillInfos);
+                                    selectCardEffect.SetUpAfterSelectIndexCoroutine(AfterSelectIndexCoroutine);
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                                    IEnumerator AfterSelectIndexCoroutine(List<int> selectedIndexes)
                                     {
-                                        List<SkillInfo> skillInfos = candidateEffects
-                                            .Map(cardEffect => new SkillInfo(cardEffect, null, EffectTiming.None));
-
-                                        List<CardSource> cardSources1 = candidateEffects
-                                            .Map(cardEffect => cardEffect.EffectSourceCard);
-
-                                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                        selectCardEffect.SetUp(
-                                            canTargetCondition: (cardSource) => true,
-                                            canTargetCondition_ByPreSelecetedList: null,
-                                            canEndSelectCondition: null,
-                                            canNoSelect: () => false,
-                                            selectCardCoroutine: null,
-                                            afterSelectCardCoroutine: null,
-                                            message: "Select 1 effect to activate.",
-                                            maxCount: 1,
-                                            canEndNotMax: false,
-                                            isShowOpponent: false,
-                                            mode: SelectCardEffect.Mode.Custom,
-                                            root: SelectCardEffect.Root.Custom,
-                                            customRootCardList: cardSources,
-                                            canLookReverseCard: true,
-                                            selectPlayer: card.Owner,
-                                            cardEffect: activateClass);
-
-                                        selectCardEffect.SetNotShowCard();
-                                        selectCardEffect.SetUpSkillInfos(skillInfos);
-                                        selectCardEffect.SetUpAfterSelectIndexCoroutine(AfterSelectIndexCoroutine);
-
-                                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-
-                                        IEnumerator AfterSelectIndexCoroutine(List<int> selectedIndexes)
+                                        if (selectedIndexes.Count == 1)
                                         {
-                                            if (selectedIndexes.Count == 1)
-                                            {
-                                                selectedEffect = candidateEffects[selectedIndexes[0]];
-                                                yield return null;
-                                            }
+                                            selectedEffect = candidateEffects[selectedIndexes[0]];
+                                            yield return null;
                                         }
                                     }
+                                }
 
-                                    if (selectedEffect != null)
-                                    {
-                                        if (selectedEffect.EffectSourceCard != null)
-                                        {
-                                            if (selectedEffect.EffectSourceCard.PermanentOfThisCard() != null)
-                                            {
-                                                Hashtable effectHashtable = CardEffectCommons.WhenDigivolvingCheckHashtableOfCard(selectedEffect.EffectSourceCard);
-
-                                                if (selectedEffect.CanUse(effectHashtable))
-                                                {
-                                                    yield return ContinuousController.instance.StartCoroutine(((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
-                                                }
-                                            }
-                                        }
-                                    }
+                                if (selectedEffect != null)
+                                {
+                                    Hashtable effectHashtable = CardEffectCommons.WhenDigivolvingCheckHashtableOfCard(selectedEffect.EffectSourceCard);
+                                    Debug.Log("XX");
+
+                                        yield return ContinuousController.instance.StartCoroutine(
+                                            ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
+                                    
                                 }
                             }
                         }
                     }
-
-
                 }
             }
 

+ 137 - 0
Assets/CardEffect/BT15/Yellow/Holy_Arrow_BT15_093.cs

@@ -0,0 +1,137 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System.Linq;
+using Photon;
+using System;
+using Photon.Pun;
+
+public class Holy_Arrow_BT15_093 : CEntity_Effect
+{
+    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    {
+        List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+
+        #region Main
+
+        if (timing == EffectTiming.OptionSkill)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
+            activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
+
+            string EffectDiscription()
+            {
+                return "[Main] 1 of your opponent's Digimon gets -6000 DP for the turn. Then, by trashing the top or bottom card of your security stack, 1 of your opponent's Digimon gets -6000 DP for the turn.";
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
+            }
+
+            bool CanSelectPermanentCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                {
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Custom,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -6000.", "The opponent is selecting 1 Digimon that will get DP -6000.");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(targetPermanent: permanent, changeValue: -6000, effectDuration: EffectDuration.UntilEachTurnEnd, activateClass: activateClass));
+                    }
+                }
+
+                if (card.Owner.SecurityCards.Count >= 1)
+                {
+                    List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                    {
+                        new SelectionElement<bool>(message: $"Security Top", value : true, spriteIndex: 0),
+                        new SelectionElement<bool>(message: $"Security Bottom", value : false, spriteIndex: 1),
+                    };
+
+                    string selectPlayerMessage = "Which will you trash the top or bottom card of the security?";
+                    string notSelectPlayerMessage = "The opponent is selecting whether to trash the top or bottom card of security.";
+
+                    GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+
+                    bool fromTop = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -6000.", "The opponent is selecting 1 Digimon that will get DP -6000.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(targetPermanent: permanent, changeValue: -6000, effectDuration: EffectDuration.UntilEachTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+
+
+        }
+
+        #endregion
+
+        #region Security effect
+        if (timing == EffectTiming.SecuritySkill)
+        {
+            CardEffectCommons.AddActivateMainOptionSecurityEffect(
+                card: card,
+                cardEffects: ref cardEffects,
+                effectName: $"Minus DP");
+        }
+        #endregion
+
+        return cardEffects;
+    }
+
+}

+ 11 - 0
Assets/CardEffect/BT15/Yellow/Holy_Arrow_BT15_093.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ac4baa17395342241a0d666fa072dbe3
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 11 - 0
Assets/CardEffect/BT15/Yellow/Kari_Kamiya_BT15_084.cs

@@ -12,6 +12,8 @@ public class Kari_Kamiya_BT15_084 : CEntity_Effect
     {
         List<ICardEffect> cardEffects = new List<ICardEffect>();
 
+        #region When trashed from security
+
         if (timing == EffectTiming.OnDiscardSecurity)
         {
             ActivateClass activateClass = new ActivateClass();
@@ -85,11 +87,16 @@ public class Kari_Kamiya_BT15_084 : CEntity_Effect
                 }
             }
         }
+        #endregion
 
+        #region Start of Turn
         if (timing == EffectTiming.OnStartTurn)
         {
             cardEffects.Add(CardEffectFactory.SetMemoryTo3TamerEffect(card));
         }
+        #endregion
+
+        #region All turns
 
         if (timing == EffectTiming.OnLoseSecurity)
         {
@@ -175,10 +182,14 @@ public class Kari_Kamiya_BT15_084 : CEntity_Effect
             }
         }
 
+        #endregion
+
+        #region Security effect
         if (timing == EffectTiming.SecuritySkill)
         {
             cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
         }
+        #endregion
 
         return cardEffects;
     }

+ 229 - 0
Assets/CardEffect/BT15/Yellow/Revelation_of_Light_BT15_092.cs

@@ -0,0 +1,229 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System.Linq;
+using Photon;
+using System;
+using Photon.Pun;
+
+public class Revelation_of_Light_BT15_092 : CEntity_Effect
+{
+    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    {
+        List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+        #region When trashed from security
+
+        if (timing == EffectTiming.OnDiscardSecurity)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Activate security effect", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
+
+            string EffectDiscription()
+            {
+                return "When an effect trashes this card from the security stack, activate this card's [Security] effect.";
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOnTrashSelfSecurity(hashtable, cardEffect => cardEffect != null, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.IsExistOnTrash(card);
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                ActivateClass mainActivateClass = CardEffectCommons.OptionSecurityEffect(card);
+
+                if (mainActivateClass != null)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(mainActivateClass.Activate(CardEffectCommons.OptionMainCheckHashtable(card)));
+                }
+            }
+        }
+
+        #endregion
+
+        #region Main
+
+        if (timing == EffectTiming.OptionSkill)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Play 1 Digimon from security", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
+
+            string EffectDiscription()
+            {
+                return "[Main] Search your security stack. You may play 1 level 4 or lower yellow Digimon card among them wihtout paying the cost. If you have a Tamer with [Kari Kamiya] in it's name, place this card at the top of your security stack.";
+            }
+
+            bool CanSelectCardCondition(CardSource cardSource)
+            {
+                if (cardSource.IsDigimon)
+                {
+                    if (cardSource.CardColors.Contains(CardColor.Yellow) && cardSource.Level <= 4)
+                    {
+                        if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                        {
+                            return true;
+                        }
+                    }
+                }
+
+                return false;
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (card.Owner.SecurityCards.Count >= 1)
+                {
+                    return true;
+                }
+
+                return false;
+            }
+
+            bool PermanentCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                {
+                    if (permanent.IsTamer)
+                    {
+                        if (permanent.TopCard.ContainsCardName("Kari Kamiya"))
+                        {
+                            return true;
+                        }
+
+                        if (permanent.TopCard.ContainsCardName("KariKamiya"))
+                        {
+                            return true;
+                        }
+                    }
+                }
+
+                return false;
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                if (card.Owner.SecurityCards.Count >= 1)
+                {
+                    bool played = false;
+
+                    int maxCount = Math.Min(1, card.Owner.SecurityCards.Count(CanSelectCardCondition));
+
+                    List<CardSource> selectedCards = new List<CardSource>();
+
+                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect.SetUp(
+                        canTargetCondition: CanSelectCardCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        canNoSelect: () => true,
+                        selectCardCoroutine: SelectCardCoroutine,
+                        afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                        message: "Select 1 Tamer to play.",
+                        maxCount: maxCount,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        mode: SelectCardEffect.Mode.Custom,
+                        root: SelectCardEffect.Root.Security,
+                        customRootCardList: null,
+                        canLookReverseCard: true,
+                        selectPlayer: card.Owner,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        selectedCards.Add(cardSource);
+
+                        yield return null;
+                    }
+
+                    IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
+                    {
+                        if (cardSources.Count >= 1)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
+                                player: card.Owner,
+                                refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Security, activateETB: true));
+
+                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, PermanentCondition))
+                        {
+                                yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, toTop: true));
+
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(card.Owner));
+
+                                yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(card.Owner).AddSecurity());
+                            
+                        }
+                    }
+                }
+            }
+        }
+        #endregion
+
+        #region Security effect
+
+        if (timing == EffectTiming.SecuritySkill)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect($"Security Attack -1", CanUseCondition, card);
+            activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetIsSecurityEffect(true);
+            cardEffects.Add(activateClass);
+
+            string EffectDiscription()
+            {
+                return "[Security] All of your opponent's Digimon and all of your opponent's Security Digimon get -5000 DP until the end of your turn.";
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card);
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                bool PermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDPPlayerEffect(
+                    permanentCondition: PermanentCondition,
+                    changeValue: -5000,
+                    effectDuration: EffectDuration.UntilOwnerTurnEnd,
+                    activateClass: activateClass));
+
+                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeSecurityDigimonCardDPPlayerEffect(
+                        cardCondition: cardSource => cardSource.Owner == card.Owner.Enemy,
+                        changeValue: -5000,
+                        effectDuration: EffectDuration.UntilOwnerTurnEnd,
+                        activateClass: activateClass));
+
+            }
+        }
+
+        #endregion
+
+        return cardEffects;
+    }
+}

+ 11 - 0
Assets/CardEffect/BT15/Yellow/Revelation_of_Light_BT15_092.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8ae4d7af49164cc47b954606f79e075e
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 4 - 0
Assets/Scripts/CardEffectCommons.cs

@@ -298,6 +298,10 @@ public partial class CardEffectCommons
     public static ActivateClass OptionMainEffect(CardSource card) => card.EffectList(EffectTiming.OptionSkill).Find(cardEffect => cardEffect != null && cardEffect is ActivateClass && cardEffect.EffectDiscription.Contains("[Main]")) as ActivateClass;
     #endregion
 
+    #region this Option card's Security effect
+    public static ActivateClass OptionSecurityEffect(CardSource card) => card.EffectList(EffectTiming.SecuritySkill).Find(cardEffect => cardEffect != null && cardEffect is ActivateClass && cardEffect.EffectDiscription.Contains("[Security]")) as ActivateClass;
+    #endregion
+
     #region Add Option's Security effect that "Activate this card's Main effect" to cardEffects
     public static void AddActivateMainOptionSecurityEffect(CardSource card, ref List<ICardEffect> cardEffects, string effectName, string effectDiscription = "", Func<ICardEffect, IEnumerator> afterMainEffect = null)
     {

+ 8 - 0
Assets/Scripts/CardSource.cs

@@ -1706,6 +1706,14 @@ public class CardSource : MonoBehaviour
                 && cardEffect.IsOnPlay);
     #endregion
 
+    #region whether this card has [When Digivolving] effect
+    public bool HasWhenDigivolvingEffect =>
+        EffectList(EffectTiming.OnEnterFieldAnyone)
+            .Some(cardEffect => cardEffect is ActivateICardEffect
+                && !cardEffect.IsInheritedEffect && !cardEffect.IsSecurityEffect
+                && cardEffect.IsWhenDigivolving);
+    #endregion
+
     #region whether this card has [Digisorption]
     public bool HasDigisorption =>
         EffectList(EffectTiming.BeforePayCost)