BT17_079.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. namespace DCGO.CardEffects.BT17
  4. {
  5. public class BT17_079 : CEntity_Effect
  6. {
  7. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  8. {
  9. List<ICardEffect> cardEffects = new List<ICardEffect>();
  10. #region Security Effect
  11. if (timing == EffectTiming.SecuritySkill)
  12. {
  13. cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
  14. }
  15. #endregion
  16. #region Start of Your Main Phase
  17. if (timing == EffectTiming.OnStartMainPhase)
  18. {
  19. ActivateClass activateClass = new ActivateClass();
  20. activateClass.SetUpICardEffect("Memory +1", CanUseCondition, card);
  21. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
  22. cardEffects.Add(activateClass);
  23. string EffectDescription()
  24. {
  25. return "[Start of Your Main Phase] If your opponent has a Digimon, gain 1 memory.";
  26. }
  27. bool CanUseCondition(Hashtable hashtable)
  28. {
  29. if (CardEffectCommons.IsExistOnBattleArea(card))
  30. {
  31. if (CardEffectCommons.IsOwnerTurn(card))
  32. {
  33. return true;
  34. }
  35. }
  36. return false;
  37. }
  38. bool CanActivateCondition(Hashtable hashtable)
  39. {
  40. if (CardEffectCommons.IsExistOnBattleArea(card))
  41. {
  42. if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
  43. {
  44. if (card.Owner.CanAddMemory(activateClass))
  45. {
  46. return true;
  47. }
  48. }
  49. }
  50. return false;
  51. }
  52. IEnumerator ActivateCoroutine(Hashtable hashtable)
  53. {
  54. yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
  55. }
  56. }
  57. #endregion
  58. #region Your Turn - ESS
  59. if (timing == EffectTiming.None)
  60. {
  61. bool Condition()
  62. {
  63. if (CardEffectCommons.IsExistOnBattleArea(card))
  64. {
  65. if (CardEffectCommons.IsOwnerTurn(card))
  66. {
  67. return true;
  68. }
  69. }
  70. return false;
  71. }
  72. cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000, isInheritedEffect: true, card: card,
  73. condition: Condition));
  74. }
  75. if (timing == EffectTiming.OnDetermineDoSecurityCheck)
  76. {
  77. bool Condition()
  78. {
  79. if (CardEffectCommons.IsExistOnBattleArea(card))
  80. {
  81. if (CardEffectCommons.IsOwnerTurn(card))
  82. {
  83. if (card.PermanentOfThisCard().DP >= 10000)
  84. {
  85. return true;
  86. }
  87. }
  88. }
  89. return false;
  90. }
  91. cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: true, card: card, condition: Condition));
  92. }
  93. #endregion
  94. return cardEffects;
  95. }
  96. }
  97. }