using System.Collections; using System.Collections.Generic; namespace DCGO.CardEffects.BT18 { public class BT18_093 : CEntity_Effect { public override List CardEffects(EffectTiming timing, CardSource card) { List cardEffects = new List(); #region Start of Your Turn if (timing == EffectTiming.OnStartTurn) { cardEffects.Add(CardEffectFactory.SetMemoryTo3TamerEffect(card)); } #endregion #region Start of Your Main Phase if (timing == EffectTiming.OnStartMainPhase) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect("Trash 1 Option or [Ghost]/[Three Musketeers] from hand to ", CanUseCondition, card); activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription()); cardEffects.Add(activateClass); string EffectDescription() { return "[Start of Your Main Phase] By trashing 1 Option card or 1 card with the [Ghost]/[Three Musketeers] trait in your hand, ."; } bool CanUseCondition(Hashtable hashtable) { return CardEffectCommons.IsExistOnBattleArea(card) && CardEffectCommons.IsOwnerTurn(card); } bool CanSelectCardCondition(CardSource cardSource) { return cardSource.IsOption || cardSource.ContainsTraits("Ghost") || cardSource.ContainsTraits("Three Musketeers"); } bool CanActivateCondition(Hashtable hashtable) { return CardEffectCommons.IsExistOnBattleArea(card) && CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition); } IEnumerator ActivateCoroutine(Hashtable hashtable) { SelectHandEffect selectHandEffect = GManager.instance.GetComponent(); selectHandEffect.SetUp( canTargetCondition: CanSelectCardCondition, canTargetCondition_ByPreSelecetedList: null, canEndSelectCondition: null, canNoSelect: true, selectCardCoroutine: null, afterSelectCardCoroutine: AfterSelectCardCoroutine, maxCount: 1, canEndNotMax: false, isShowOpponent: true, mode: SelectHandEffect.Mode.Discard, selectPlayer: card.Owner, cardEffect: activateClass); selectHandEffect.SetUpCustomMessage( "Select 1 Option card or 1 card with the [Ghost]/[Three Musketeers] trait to discard.", "The opponent is selecting 1 Option card or 1 card with the [Ghost]/[Three Musketeers] trait to discard."); yield return ContinuousController.instance.StartCoroutine(selectHandEffect.Activate()); IEnumerator AfterSelectCardCoroutine(List cardSources) { if (cardSources.Count > 0) { yield return ContinuousController.instance.StartCoroutine( new DrawClass(card.Owner, 1, activateClass).Draw()); } } } } #endregion #region Security Effect if (timing == EffectTiming.SecuritySkill) { cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card)); } #endregion return cardEffects; } } }