BT11_027.cs 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. namespace DCGO.CardEffects.BT11
  4. {
  5. public class BT11_027 : CEntity_Effect
  6. {
  7. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  8. {
  9. List<ICardEffect> cardEffects = new List<ICardEffect>();
  10. if (timing == EffectTiming.OnEnterFieldAnyone)
  11. {
  12. ActivateClass activateClass = new ActivateClass();
  13. activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
  14. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
  15. activateClass.SetHashString("Draw1_BT11_027");
  16. cardEffects.Add(activateClass);
  17. string EffectDiscription()
  18. {
  19. return "[Your Turn][Once Per Turn] When you play a blue Tamer, <Draw 1>. (Draw 1 card from your deck.)";
  20. }
  21. bool PermanentCondition(Permanent permanent)
  22. {
  23. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
  24. {
  25. if (permanent.TopCard.CardColors.Contains(CardColor.Blue))
  26. {
  27. if (permanent.IsTamer)
  28. {
  29. return true;
  30. }
  31. }
  32. }
  33. return false;
  34. }
  35. bool CanUseCondition(Hashtable hashtable)
  36. {
  37. if (CardEffectCommons.IsExistOnBattleArea(card))
  38. {
  39. if (CardEffectCommons.IsOwnerTurn(card))
  40. {
  41. if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
  42. {
  43. return true;
  44. }
  45. }
  46. }
  47. return false;
  48. }
  49. bool CanActivateCondition(Hashtable hashtable)
  50. {
  51. if (CardEffectCommons.IsExistOnBattleArea(card))
  52. {
  53. return true;
  54. }
  55. return false;
  56. }
  57. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  58. {
  59. yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
  60. }
  61. }
  62. if (timing == EffectTiming.OnEnterFieldAnyone)
  63. {
  64. ActivateClass activateClass = new ActivateClass();
  65. activateClass.SetUpICardEffect("Memory +1", CanUseCondition, card);
  66. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
  67. activateClass.SetIsInheritedEffect(true);
  68. activateClass.SetHashString("Memory+1_BT11_027");
  69. cardEffects.Add(activateClass);
  70. string EffectDiscription()
  71. {
  72. return "[Your Turn][Once Per Turn] When you play a blue Tamer, gain 1 memory.";
  73. }
  74. bool PermanentCondition(Permanent permanent)
  75. {
  76. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
  77. {
  78. if (permanent.TopCard.CardColors.Contains(CardColor.Blue))
  79. {
  80. if (permanent.IsTamer)
  81. {
  82. return true;
  83. }
  84. }
  85. }
  86. return false;
  87. }
  88. bool CanUseCondition(Hashtable hashtable)
  89. {
  90. if (CardEffectCommons.IsExistOnBattleArea(card))
  91. {
  92. if (CardEffectCommons.IsOwnerTurn(card))
  93. {
  94. if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
  95. {
  96. return true;
  97. }
  98. }
  99. }
  100. return false;
  101. }
  102. bool CanActivateCondition(Hashtable hashtable)
  103. {
  104. if (CardEffectCommons.IsExistOnBattleArea(card))
  105. {
  106. return true;
  107. }
  108. return false;
  109. }
  110. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  111. {
  112. yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
  113. }
  114. }
  115. return cardEffects;
  116. }
  117. }
  118. }