EX3_047.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. namespace DCGO.CardEffects.EX3
  4. {
  5. public class EX3_047 : 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("Memory +1", CanUseCondition, card);
  14. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
  15. activateClass.SetHashString("Memory+1_EX3_047");
  16. cardEffects.Add(activateClass);
  17. string EffectDiscription()
  18. {
  19. return "[Your Turn][Once Per Turn] When you play [Hina Kurihara], gain 1 memory.";
  20. }
  21. bool PermanentCondition(Permanent permanent)
  22. {
  23. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
  24. {
  25. if (permanent.TopCard.CardNames.Contains("Hina Kurihara"))
  26. {
  27. return true;
  28. }
  29. if (permanent.TopCard.CardNames.Contains("HinaKurihara"))
  30. {
  31. return true;
  32. }
  33. }
  34. return false;
  35. }
  36. bool CanUseCondition(Hashtable hashtable)
  37. {
  38. if (CardEffectCommons.IsExistOnBattleArea(card))
  39. {
  40. if (CardEffectCommons.IsOwnerTurn(card))
  41. {
  42. if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
  43. {
  44. return true;
  45. }
  46. }
  47. }
  48. return false;
  49. }
  50. bool CanActivateCondition(Hashtable hashtable)
  51. {
  52. if (CardEffectCommons.IsExistOnBattleArea(card))
  53. {
  54. return true;
  55. }
  56. return false;
  57. }
  58. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  59. {
  60. yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
  61. }
  62. }
  63. if (timing == EffectTiming.None)
  64. {
  65. bool Condition()
  66. {
  67. if (CardEffectCommons.IsExistOnBattleArea(card))
  68. {
  69. if (card.PermanentOfThisCard().TopCard.HasOnPlayEffect)
  70. {
  71. return true;
  72. }
  73. }
  74. return false;
  75. }
  76. cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 1000, isInheritedEffect: true, card: card, condition: Condition));
  77. }
  78. return cardEffects;
  79. }
  80. }
  81. }