using System.Collections; using System.Collections.Generic; namespace DCGO.CardEffects.EX7 { public class EX7_068 : CEntity_Effect { public override List CardEffects(EffectTiming timing, CardSource card) { List cardEffects = new List(); #region Main Effect if (timing == EffectTiming.OptionSkill) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card); activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription()); cardEffects.Add(activateClass); string EffectDescription() { return "[Main] . Then, you may play 1 level 3 Digimon card with the [Puppet] trait from your hand without paying the cost."; } bool CanUseCondition(Hashtable hashtable) { return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card); } bool IsLevel3PuppetCardCondition(CardSource cardSource) { return cardSource.IsDigimon && cardSource.HasLevel && cardSource.IsLevel3 && cardSource.ContainsTraits("Puppet") && CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass); } IEnumerator ActivateCoroutine(Hashtable hashtable) { if (card.Owner.LibraryCards.Count >= 1) { yield return ContinuousController.instance.StartCoroutine( new DrawClass(card.Owner, 1, activateClass).Draw()); } if (CardEffectCommons.HasMatchConditionOwnersHand(card, IsLevel3PuppetCardCondition)) { List selectedCards = new List(); SelectHandEffect selectHandEffect = GManager.instance.GetComponent(); selectHandEffect.SetUp( selectPlayer: card.Owner, canTargetCondition: IsLevel3PuppetCardCondition, canTargetCondition_ByPreSelecetedList: null, canEndSelectCondition: null, maxCount: 1, canNoSelect: true, canEndNotMax: false, isShowOpponent: true, selectCardCoroutine: SelectCardCoroutine, afterSelectCardCoroutine: null, mode: SelectHandEffect.Mode.Custom, cardEffect: activateClass); selectHandEffect.SetUpCustomMessage("Select 1 Digimon card to play.", "The opponent is selecting 1 Digimon card to play."); selectHandEffect.SetUpCustomMessage_ShowCard("Played Card"); yield return StartCoroutine(selectHandEffect.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.Hand, activateETB: true)); } } } #endregion #region Security Effect if (timing == EffectTiming.SecuritySkill) { CardEffectCommons.AddActivateMainOptionSecurityEffect(card: card, cardEffects: ref cardEffects, effectName: $". Then, you may play 1 level 3 Digimon card with the [Puppet] trait from your hand without paying the cost."); } #endregion return cardEffects; } } }