using System.Collections; using System.Collections.Generic; // Moonmon namespace DCGO.CardEffects.BT22 { public class BT22_006 : CEntity_Effect { public override List CardEffects(EffectTiming timing, CardSource card) { List cardEffects = new List(); if (timing == EffectTiming.OnAddDigivolutionCards) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect("Draw 1, trash 1", CanUseCondition, card); activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription()); activateClass.SetHashString("BT22_006_Draw1"); activateClass.SetIsInheritedEffect(true); cardEffects.Add(activateClass); string EffectDiscription() { return "[Your Turn] [Once Per Turn] When effects place this Digimon's top stacked card as its bottom digivolution card, (Draw 1 card from your deck.) and trash 1 card in your hand."; } bool CanUseCondition(Hashtable hashtable) { return CardEffectCommons.CanTriggerOnAddDigivolutionCard(hashtable, permament => permament == card.PermanentOfThisCard(), cardEffect => cardEffect.EffectSourceCard != null, null) && CardEffectCommons.IsFromDigimon(hashtable); } bool CanActivateCondition(Hashtable hashtable) { return CardEffectCommons.IsExistOnBattleAreaDigimon(card) && CardEffectCommons.IsOwnerTurn(card); } IEnumerator ActivateCoroutine(Hashtable hashtable) { yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw()); SelectHandEffect selectHandEffect = GManager.instance.GetComponent(); selectHandEffect.SetUp( selectPlayer: card.Owner, canTargetCondition: (cardSource) => true, canTargetCondition_ByPreSelecetedList: null, canEndSelectCondition: null, maxCount: 1, canNoSelect: true, canEndNotMax: false, isShowOpponent: true, selectCardCoroutine: null, afterSelectCardCoroutine: null, mode: SelectHandEffect.Mode.Discard, cardEffect: activateClass); yield return StartCoroutine(selectHandEffect.Activate()); } } return cardEffects; } } }