BT9_011.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 BT9_011 : 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 PermanentCondition(Permanent targetPermanent)
  16. {
  17. return targetPermanent.TopCard.CardNames.Contains("Growlmon");
  18. }
  19. cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: false, card: card, condition: null));
  20. }
  21. if (timing == EffectTiming.None)
  22. {
  23. ChangeDPDeleteEffectMaxDPClass changeDPDeleteEffectMaxDPClass = new ChangeDPDeleteEffectMaxDPClass();
  24. changeDPDeleteEffectMaxDPClass.SetUpICardEffect("Maximum DP of DP-based deletion effects gets +1000 DP", CanUseCondition, card);
  25. changeDPDeleteEffectMaxDPClass.SetUpChangeDPDeleteEffectMaxDPClass(changeMaxDP: ChangeMaxDP);
  26. changeDPDeleteEffectMaxDPClass.SetIsInheritedEffect(true);
  27. cardEffects.Add(changeDPDeleteEffectMaxDPClass);
  28. bool CanUseCondition(Hashtable hashtable)
  29. {
  30. if (isExistOnField(card))
  31. {
  32. if (CardEffectCommons.IsOwnerTurn(card))
  33. {
  34. if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
  35. {
  36. return true;
  37. }
  38. }
  39. }
  40. return false;
  41. }
  42. int ChangeMaxDP(int maxDP, ICardEffect cardEffect)
  43. {
  44. if (cardEffect != null)
  45. {
  46. if (cardEffect.EffectSourceCard != null)
  47. {
  48. if (cardEffect.EffectSourceCard.Owner == card.Owner)
  49. {
  50. maxDP += 1000;
  51. }
  52. }
  53. }
  54. return maxDP;
  55. }
  56. }
  57. return cardEffects;
  58. }
  59. }