| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- using System.Collections;
- using System.Collections.Generic;
- // Luxmon
- namespace DCGO.CardEffects.EX6
- {
- public class EX6_017 : CEntity_Effect
- {
- public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
- {
- List<ICardEffect> cardEffects = new List<ICardEffect>();
- #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 Digimon card with the [Angel]/[Archangel] trait and 1 card with the [Three Great Angels] trait among them to your hand. Return the rest to the bottom of the deck.";
- }
- bool CanSelectCardCondition(CardSource cardSource)
- {
- return cardSource.IsDigimon
- && (cardSource.CardTraits.Contains("Angel")
- || cardSource.CardTraits.Contains("Archangel"));
- }
- bool CanSelectCardCondition1(CardSource cardSource)
- {
- return cardSource.CardTraits.Contains("Three Great Angels")
- || cardSource.CardTraits.Contains("ThreeGreatAngels");
- }
- bool CanUseCondition(Hashtable hashtable)
- {
- return CardEffectCommons.IsExistOnBattleArea(card)
- && CardEffectCommons.CanTriggerOnPlay(hashtable, card);
- }
- bool CanActivateCondition(Hashtable hashtable)
- {
- return CardEffectCommons.IsExistOnBattleArea(card);
- }
- IEnumerator ActivateCoroutine(Hashtable _hashtable)
- {
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
- revealCount: 3,
- simplifiedSelectCardConditions:
- new SimplifiedSelectCardConditionClass[]
- {
- new SimplifiedSelectCardConditionClass(
- canTargetCondition:CanSelectCardCondition,
- message: "Select 1 Digimon card with the [Angel]/[Archangel] trait.",
- mode: SelectCardEffect.Mode.AddHand,
- maxCount: 1,
- selectCardCoroutine: null),
- new SimplifiedSelectCardConditionClass(
- canTargetCondition:CanSelectCardCondition1,
- message: "Select 1 card with [Three Great Angels] trait.",
- mode: SelectCardEffect.Mode.AddHand,
- maxCount: 1,
- selectCardCoroutine: null),
- },
- remainingCardsPlace: RemainingCardsPlace.DeckBottom,
- activateClass: activateClass
- ));
- }
- }
- #endregion
- #region Inherit
- if (timing == EffectTiming.OnAllyAttack)
- {
- ActivateClass activateClass = new ActivateClass();
- activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
- activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
- activateClass.SetIsInheritedEffect(true);
- activateClass.SetHashString("Draw1_EX6_017");
- cardEffects.Add(activateClass);
- string EffectDiscription()
- {
- return "[When Attacking][Once Per Turn] If this Digimon has the [Angel]/[Archangel]/[Three Great Angels] trait, Draw 1";
- }
- bool CanUseCondition(Hashtable hashtable)
- {
- return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
- && CardEffectCommons.CanTriggerOnAttack(hashtable, card);
- }
- bool CanActivateCondition(Hashtable hashtable)
- {
- return CardEffectCommons.IsExistOnBattleArea(card)
- && (card.PermanentOfThisCard().TopCard.CardTraits.Contains("Angel")
- || card.PermanentOfThisCard().TopCard.CardTraits.Contains("Archangel")
- || card.PermanentOfThisCard().TopCard.CardTraits.Contains("Three Great Angels")
- || card.PermanentOfThisCard().TopCard.CardTraits.Contains("ThreeGreatAngels"));
- }
- IEnumerator ActivateCoroutine(Hashtable _hashtable)
- {
- yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
- }
- }
- #endregion
- return cardEffects;
- }
- }
- }
|