P_235.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. // Digital Accident Tactics Squad
  4. namespace DCGO.CardEffects.P
  5. {
  6. public class P_235 : CEntity_Effect
  7. {
  8. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  9. {
  10. List<ICardEffect> cardEffects = new List<ICardEffect>();
  11. #region ignoring colours
  12. if (timing == EffectTiming.None)
  13. {
  14. cardEffects.Add(CardEffectFactory.UseRequirements(card, CardCondition));
  15. bool CardCondition(CardSource cardSource)
  16. {
  17. return cardSource.EqualsTraits("DATA SQUAD");
  18. }
  19. }
  20. #endregion
  21. #region Main
  22. if (timing == EffectTiming.OptionSkill)
  23. {
  24. ActivateClass activateClass = new ActivateClass();
  25. activateClass.SetUpICardEffect("Reveal top 3, add 1 [DATA SQUAD] card to hand, bottom deck the rest, place in battle area", CanUseCondition, card);
  26. activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription());
  27. cardEffects.Add(activateClass);
  28. string EffectDescription()
  29. {
  30. return "[Main] Reveal the top 3 cards of your deck. Add 1 card with the [DATA SQUAD] trait among them to the hand. Return the rest to the bottom of the deck. Then, place this card in the battle area.";
  31. }
  32. bool CanUseCondition(Hashtable hashtable)
  33. {
  34. return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
  35. }
  36. bool CanSelectCardCondition(CardSource cardSource)
  37. {
  38. return cardSource.EqualsTraits("DATA SQUAD");
  39. }
  40. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  41. {
  42. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
  43. revealCount: 3,
  44. simplifiedSelectCardConditions:
  45. new SimplifiedSelectCardConditionClass[]
  46. {
  47. new SimplifiedSelectCardConditionClass(
  48. canTargetCondition:CanSelectCardCondition,
  49. message: "Select 1 [DATA SQUAD] card.",
  50. mode: SelectCardEffect.Mode.AddHand,
  51. maxCount: 1,
  52. selectCardCoroutine: null),
  53. },
  54. remainingCardsPlace: RemainingCardsPlace.DeckBottom,
  55. activateClass: activateClass
  56. ));
  57. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
  58. }
  59. }
  60. #endregion
  61. #region Delay
  62. if (timing == EffectTiming.OnDeclaration)
  63. {
  64. cardEffects.Add(CardEffectFactory.Gain2MemoryOptionDelayEffect(card));
  65. }
  66. #endregion
  67. #region Security
  68. if (timing == EffectTiming.SecuritySkill)
  69. {
  70. cardEffects.Add(CardEffectFactory.PlaceSelfDelayOptionSecurityEffect(card));
  71. }
  72. #endregion
  73. return cardEffects;
  74. }
  75. }
  76. }