using System.Collections; using System.Collections.Generic; namespace DCGO.CardEffects.BT19 { public class BT19_017 : CEntity_Effect { public override List CardEffects(EffectTiming timing, CardSource card) { List cardEffects = new List(); #region On Play if (timing == EffectTiming.OnEnterFieldAnyone) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card); activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription()); cardEffects.Add(activateClass); string EffectDescription() { return "[On Play] Reveal the top 3 cards of your deck. Add 1 card with the [Aqua]/[Sea Animal] in one of its traits and 1 card with the [LIBERATOR] trait among them to the hand. Return the rest to the bottom of the deck."; } bool CanSelectAquaCardCondition(CardSource cardSource) { return cardSource.HasAquaTraits; } bool CanSelectLiberatorCardCondition(CardSource cardSource) { return cardSource.ContainsTraits("LIBERATOR"); } bool CanUseCondition(Hashtable hashtable) { return CardEffectCommons.CanTriggerOnPlay(hashtable, card); } bool CanActivateCondition(Hashtable hashtable) { return CardEffectCommons.IsExistOnBattleAreaDigimon(card) && card.Owner.LibraryCards.Count >= 1; } IEnumerator ActivateCoroutine(Hashtable hashtable) { yield return ContinuousController.instance.StartCoroutine( CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect( revealCount: 3, simplifiedSelectCardConditions: new SimplifiedSelectCardConditionClass[] { new( canTargetCondition: CanSelectAquaCardCondition, message: "Select 1 Digimon card with the [Aqua]/[Sea Animal] in one of its traits.", mode: SelectCardEffect.Mode.AddHand, maxCount: 1, selectCardCoroutine: null), new( canTargetCondition: CanSelectLiberatorCardCondition, message: "Select 1 card with the [LIBERATOR] trait.", mode: SelectCardEffect.Mode.AddHand, maxCount: 1, selectCardCoroutine: null), }, remainingCardsPlace: RemainingCardsPlace.DeckBottom, activateClass: activateClass )); } } #endregion #region End of Attack - ESS if (timing == EffectTiming.OnEndAttack) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect("Memory +1", CanUseCondition, card); activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription()); activateClass.SetIsInheritedEffect(true); activateClass.SetHashString("Memory+1_BT19_017"); cardEffects.Add(activateClass); string EffectDescription() { return "[End of Attack] (Once Per Turn) Gain 1 memory."; } bool CanUseCondition(Hashtable hashtable) { return CardEffectCommons.CanTriggerOnEndAttack(hashtable, card); } bool CanActivateCondition(Hashtable hashtable) { return CardEffectCommons.IsExistOnBattleAreaDigimon(card); } IEnumerator ActivateCoroutine(Hashtable hashtable) { yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass)); } } #endregion return cardEffects; } } }