BT8_062.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 BT8_062 : 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.None)
  14. {
  15. ChangeCardNamesClass changeCardNamesClass = new ChangeCardNamesClass();
  16. changeCardNamesClass.SetUpICardEffect("Also treated as [SkullKnightmon]", CanUseCondition, card);
  17. changeCardNamesClass.SetUpChangeCardNamesClass(changeCardNames: changeCardNames);
  18. cardEffects.Add(changeCardNamesClass);
  19. bool CanUseCondition(Hashtable hashtable)
  20. {
  21. return true;
  22. }
  23. List<string> changeCardNames(CardSource cardSource, List<string> CardNames)
  24. {
  25. if (cardSource == card)
  26. {
  27. CardNames.Add("SkullKnightmon");
  28. }
  29. return CardNames;
  30. }
  31. }
  32. if (timing == EffectTiming.None)
  33. {
  34. ChangeCardNamesClass changeCardNamesClass = new ChangeCardNamesClass();
  35. changeCardNamesClass.SetUpICardEffect("Also treated as [DeadlyAxemon]", CanUseCondition, card);
  36. changeCardNamesClass.SetUpChangeCardNamesClass(changeCardNames: changeCardNames);
  37. cardEffects.Add(changeCardNamesClass);
  38. bool CanUseCondition(Hashtable hashtable)
  39. {
  40. return true;
  41. }
  42. List<string> changeCardNames(CardSource cardSource, List<string> CardNames)
  43. {
  44. if (cardSource == card)
  45. {
  46. CardNames.Add("DeadlyAxemon");
  47. }
  48. return CardNames;
  49. }
  50. }
  51. if (timing == EffectTiming.OnEnterFieldAnyone)
  52. {
  53. ActivateClass activateClass = new ActivateClass();
  54. activateClass.SetUpICardEffect("Gain Jamming and Blocker", CanUseCondition, card);
  55. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
  56. cardEffects.Add(activateClass);
  57. string EffectDiscription()
  58. {
  59. return "[When Digivolving] This Digimon gains <Jamming> (This Digimon can't be deleted in battles against Security Digimon) and <Blocker> (When an opponent's Digimon attacks, you may suspend this Digimon to force the opponent to attack it instead) until the end of your opponent's next turn.";
  60. }
  61. bool CanUseCondition(Hashtable hashtable)
  62. {
  63. return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
  64. }
  65. bool CanActivateCondition(Hashtable hashtable)
  66. {
  67. if (CardEffectCommons.IsExistOnBattleArea(card))
  68. {
  69. return true;
  70. }
  71. return false;
  72. }
  73. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  74. {
  75. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainJamming(targetPermanent: card.PermanentOfThisCard(), effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
  76. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(targetPermanent: card.PermanentOfThisCard(), effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
  77. }
  78. }
  79. return cardEffects;
  80. }
  81. }