BT6_007.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System.Linq;
  5. using Photon;
  6. using System;
  7. using Photon.Pun;
  8. public class BT6_007 : CEntity_Effect
  9. {
  10. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  11. {
  12. List<ICardEffect> cardEffects = new List<ICardEffect>();
  13. if (timing == EffectTiming.OnEnterFieldAnyone)
  14. {
  15. ActivateClass activateClass = new ActivateClass();
  16. activateClass.SetUpICardEffect("Memory +1", CanUseCondition, card);
  17. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
  18. activateClass.SetHashString("Memory+1_BT6_007");
  19. cardEffects.Add(activateClass);
  20. string EffectDiscription()
  21. {
  22. return "[All Turns][Once Per Turn] When you play a Tamer with [Tai Kamiya] in its name, gain 1 memory.";
  23. }
  24. bool PermanentCondition(Permanent permanent)
  25. {
  26. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
  27. {
  28. if (permanent.IsTamer)
  29. {
  30. if (permanent.TopCard.ContainsCardName("Tai Kamiya"))
  31. {
  32. return true;
  33. }
  34. }
  35. }
  36. return false;
  37. }
  38. bool CanUseCondition(Hashtable hashtable)
  39. {
  40. if (CardEffectCommons.IsExistOnBattleArea(card))
  41. {
  42. if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
  43. {
  44. return true;
  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(card.Owner.AddMemory(1, activateClass));
  60. }
  61. }
  62. if (timing == EffectTiming.None)
  63. {
  64. bool Condition()
  65. {
  66. if (CardEffectCommons.IsExistOnBattleArea(card))
  67. {
  68. if (CardEffectCommons.IsOwnerTurn(card))
  69. {
  70. if (card.PermanentOfThisCard().TopCard.EqualsCardName("Agumon - Bond of Bravery"))
  71. {
  72. return true;
  73. }
  74. }
  75. }
  76. return false;
  77. }
  78. cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(changeValue: 1, isInheritedEffect: true, card: card, condition: Condition));
  79. }
  80. return cardEffects;
  81. }
  82. }