Angoramon_LM_008.cs 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. namespace DCGO.CardEffects.LM
  4. {
  5. public class Angoramon_LM_008 : CEntity_Effect
  6. {
  7. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  8. {
  9. List<ICardEffect> cardEffects = new List<ICardEffect>();
  10. #region Start of Main Phase
  11. if(timing == EffectTiming.OnStartMainPhase)
  12. {
  13. ActivateClass activateClass = new ActivateClass();
  14. activateClass.SetUpICardEffect("gain +1 memory", CanUseCondition, card);
  15. activateClass.SetUpActivateClass(CanActivateCondition, ActivateEffect, -1, false, EffectDiscription());
  16. cardEffects.Add(activateClass);
  17. string EffectDiscription()
  18. {
  19. return "[Start of Your Main Phase] If you have a Tamer, gain 1 memory.";
  20. }
  21. bool HasTamerCondition(Permanent permanent)
  22. {
  23. return permanent.IsTamer;
  24. }
  25. bool CanUseCondition(Hashtable hashtable)
  26. {
  27. if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, HasTamerCondition))
  28. {
  29. if(card.Owner.CanAddMemory(activateClass))
  30. {
  31. return true;
  32. }
  33. }
  34. return false;
  35. }
  36. bool CanActivateCondition(Hashtable hashtable)
  37. {
  38. if (CardEffectCommons.IsOwnerTurn(card))
  39. {
  40. if (CardEffectCommons.IsExistOnBattleArea(card))
  41. {
  42. return true;
  43. }
  44. }
  45. return false;
  46. }
  47. IEnumerator ActivateEffect(Hashtable hashtable)
  48. {
  49. yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
  50. }
  51. }
  52. #endregion
  53. #region Your Turn - Inherited Effect
  54. if (timing == EffectTiming.None)
  55. {
  56. bool Condition()
  57. {
  58. if (CardEffectCommons.IsExistOnBattleArea(card))
  59. {
  60. if (CardEffectCommons.IsOwnerTurn(card))
  61. {
  62. if(card.PermanentOfThisCard().TopCard != card)
  63. {
  64. if (card.PermanentOfThisCard().TopCard.HasText("Angoramon"))
  65. {
  66. return true;
  67. }
  68. }
  69. }
  70. }
  71. return false;
  72. }
  73. cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000, isInheritedEffect: true, card: card, condition: Condition));
  74. }
  75. #endregion
  76. return cardEffects;
  77. }
  78. }
  79. }