ST1_11.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. public class ST1_11 : CEntity_Effect
  4. {
  5. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  6. {
  7. List<ICardEffect> cardEffects = new List<ICardEffect>();
  8. if (timing == EffectTiming.None)
  9. {
  10. int count()
  11. {
  12. if (CardEffectCommons.IsExistOnBattleArea(card))
  13. {
  14. return card.PermanentOfThisCard().DigivolutionCards.Count / 2;
  15. }
  16. return 0;
  17. }
  18. bool Condition()
  19. {
  20. if (CardEffectCommons.IsExistOnBattleArea(card))
  21. {
  22. if (CardEffectCommons.IsOwnerTurn(card))
  23. {
  24. if (count() >= 1)
  25. {
  26. return true;
  27. }
  28. }
  29. }
  30. return false;
  31. }
  32. cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect<Func<int>>(
  33. changeValue: () => count(),
  34. isInheritedEffect: false,
  35. card: card,
  36. condition: Condition));
  37. }
  38. return cardEffects;
  39. }
  40. }