BT12_088.cs 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. namespace DCGO.CardEffects.BT12
  4. {
  5. public class BT12_088 : 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.SecuritySkill)
  11. {
  12. cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
  13. }
  14. if (timing == EffectTiming.OnStartTurn)
  15. {
  16. cardEffects.Add(CardEffectFactory.SetMemoryTo3TamerEffect(card));
  17. }
  18. if (timing == EffectTiming.None)
  19. {
  20. bool Condition()
  21. {
  22. if (CardEffectCommons.IsExistOnBattleArea(card))
  23. {
  24. if (CardEffectCommons.IsOwnerTurn(card))
  25. {
  26. return true;
  27. }
  28. }
  29. return false;
  30. }
  31. cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000, isInheritedEffect: true, card: card, condition: Condition));
  32. }
  33. if (timing == EffectTiming.OnSecurityCheck)
  34. {
  35. ActivateClass activateClass = new ActivateClass();
  36. activateClass.SetUpICardEffect("Memory +2", CanUseCondition, card);
  37. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
  38. activateClass.SetIsInheritedEffect(true);
  39. activateClass.SetHashString("Memory+2_BT12_088");
  40. cardEffects.Add(activateClass);
  41. string EffectDiscription()
  42. {
  43. return "[Your Turn][Once per Turn] When this Digimon checks an opponent's security, gain 2 memory.";
  44. }
  45. bool CanUseCondition(Hashtable hashtable)
  46. {
  47. if (CardEffectCommons.CanTriggerOnAttack(hashtable, card))
  48. {
  49. if (CardEffectCommons.IsOwnerTurn(card))
  50. {
  51. return true;
  52. }
  53. }
  54. return false;
  55. }
  56. bool CanActivateCondition(Hashtable hashtable)
  57. {
  58. if (CardEffectCommons.IsExistOnBattleArea(card))
  59. {
  60. if (card.Owner.CanAddMemory(activateClass))
  61. {
  62. if (card.PermanentOfThisCard().DP >= 10000)
  63. {
  64. return true;
  65. }
  66. }
  67. }
  68. return false;
  69. }
  70. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  71. {
  72. yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(2, activateClass));
  73. }
  74. }
  75. return cardEffects;
  76. }
  77. }
  78. }