BT5_008.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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 BT5_008 : 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. bool Condition()
  16. {
  17. if (CardEffectCommons.IsExistOnBattleArea(card))
  18. {
  19. if (CardEffectCommons.IsOwnerTurn(card))
  20. {
  21. return true;
  22. }
  23. }
  24. return false;
  25. }
  26. bool PermanentCondition(Permanent permanent)
  27. {
  28. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
  29. {
  30. if (permanent != card.PermanentOfThisCard())
  31. {
  32. if (permanent.TopCard.CardNames.Contains("Gaossmon"))
  33. {
  34. return true;
  35. }
  36. }
  37. }
  38. return false;
  39. }
  40. cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
  41. permanentCondition: PermanentCondition,
  42. changeValue: 3000,
  43. isInheritedEffect: false,
  44. card: card,
  45. condition: Condition,
  46. effectName: () => "Your other [Gaossmon]s gain DP +3000"));
  47. }
  48. if (timing == EffectTiming.None)
  49. {
  50. CannotReduceCostClass cannotReduceCostClass = new CannotReduceCostClass();
  51. cannotReduceCostClass.SetUpICardEffect("Opponent can't reduce digivolution costs", CanUseCondition, card);
  52. cannotReduceCostClass.SetUpCannotReduceCostClass(
  53. playerCondition: PlayerCondition,
  54. targetPermanentsCondition: TargetPermanentsCondition,
  55. cardCondition: CardCondition);
  56. cardEffects.Add(cannotReduceCostClass);
  57. bool CanUseCondition(Hashtable hashtable)
  58. {
  59. if (CardEffectCommons.IsExistOnBattleArea(card))
  60. {
  61. if (CardEffectCommons.IsOpponentTurn(card))
  62. {
  63. if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
  64. {
  65. return true;
  66. }
  67. }
  68. }
  69. return false;
  70. }
  71. bool PlayerCondition(Player player)
  72. {
  73. return player == card.Owner.Enemy;
  74. }
  75. bool TargetPermanentsCondition(List<Permanent> targetPermanents)
  76. {
  77. if (targetPermanents != null)
  78. {
  79. if (targetPermanents.Count((permanent) => permanent != null) >= 1)
  80. {
  81. return true;
  82. }
  83. }
  84. return false;
  85. }
  86. bool CardCondition(CardSource cardSource)
  87. {
  88. return cardSource.IsPermanent;
  89. }
  90. }
  91. return cardEffects;
  92. }
  93. }