BT24_005.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. // Kyokyomon
  4. namespace DCGO.CardEffects.BT24
  5. {
  6. public class BT24_005 : CEntity_Effect
  7. {
  8. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  9. {
  10. List<ICardEffect> cardEffects = new List<ICardEffect>();
  11. #region ESS
  12. if (timing == EffectTiming.OnAddDigivolutionCards)
  13. {
  14. ActivateClass activateClass = new ActivateClass();
  15. activateClass.SetUpICardEffect("Reveal 3 then return to top or bot.", CanUseCondition, card);
  16. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
  17. activateClass.SetHashString("BT24_005_Reveal");
  18. activateClass.SetIsInheritedEffect(true);
  19. cardEffects.Add(activateClass);
  20. string EffectDescription()
  21. {
  22. return "[Your Turn] [Once Per Turn] When Tamer cards are placed in this Digimon's digivolution cards, reveal the top 3 cards of your deck. Return the revealed cards to the top or bottom of the deck.";
  23. }
  24. bool CanUseCondition(Hashtable hashtable)
  25. {
  26. return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
  27. CardEffectCommons.IsOwnerTurn(card) &&
  28. CardEffectCommons.CanTriggerOnAddDigivolutionCard(
  29. hashtable: hashtable,
  30. permanentCondition: permanent => permanent == card.PermanentOfThisCard(),
  31. cardEffectCondition: null,
  32. cardCondition: cardSource =>
  33. cardSource.IsTamer);
  34. }
  35. bool CanActivateCondition(Hashtable hashtable)
  36. {
  37. return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
  38. }
  39. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  40. {
  41. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.RevealDeckTopCardsAndProcessForAll(
  42. revealCount: 3,
  43. simplifiedSelectCardCondition:
  44. new SimplifiedSelectCardConditionClass(
  45. canTargetCondition: (cardSource) => false,
  46. message: "",
  47. mode: SelectCardEffect.Mode.Custom,
  48. maxCount: -1,
  49. selectCardCoroutine: null),
  50. remainingCardsPlace: RemainingCardsPlace.DeckTopOrBottom,
  51. activateClass: activateClass
  52. ));
  53. }
  54. }
  55. #endregion
  56. return cardEffects;
  57. }
  58. }
  59. }