BT3_040.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 BT3_040 : 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. ChangeCardColorClass changeCardColorClass = new ChangeCardColorClass();
  16. changeCardColorClass.SetUpICardEffect($"Also treated as blue", CanUseCondition, card);
  17. changeCardColorClass.SetUpChangeCardColorClass(ChangeCardColors: ChangeCardColors);
  18. cardEffects.Add(changeCardColorClass);
  19. bool CanUseCondition(Hashtable hashtable)
  20. {
  21. if (CardEffectCommons.IsExistOnBattleArea(card))
  22. {
  23. if (CardEffectCommons.IsOwnerTurn(card))
  24. {
  25. return true;
  26. }
  27. }
  28. return false;
  29. }
  30. List<CardColor> ChangeCardColors(CardSource cardSource, List<CardColor> CardColors)
  31. {
  32. if (cardSource == card)
  33. {
  34. CardColors.Add(CardColor.Blue);
  35. }
  36. return CardColors;
  37. }
  38. }
  39. if (timing == EffectTiming.None)
  40. {
  41. bool Condition()
  42. {
  43. if (CardEffectCommons.IsExistOnBattleArea(card))
  44. {
  45. if (CardEffectCommons.IsOpponentTurn(card))
  46. {
  47. return true;
  48. }
  49. }
  50. return false;
  51. }
  52. bool PermanentCondition(Permanent permanent)
  53. {
  54. if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
  55. {
  56. if (permanent.HasNoDigivolutionCards)
  57. {
  58. return true;
  59. }
  60. }
  61. return false;
  62. }
  63. cardEffects.Add(CardEffectFactory.ChangeSAttackStaticEffect(
  64. permanentCondition: PermanentCondition,
  65. changeValue: -1,
  66. isInheritedEffect: false,
  67. card: card,
  68. condition: Condition));
  69. }
  70. return cardEffects;
  71. }
  72. }