ImmuneFromDeDigivolveClass.cs 879 B

12345678910111213141516171819202122232425262728293031323334
  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 ImmuneFromDeDigivolveClass : ICardEffect, IImmuneFromDeDigivolveEffect
  9. {
  10. Func<Permanent, bool> PermanentCondition { get; set; }
  11. public void SetUpImmuneFromDeDigivolveClass(Func<Permanent, bool> PermanentCondition)
  12. {
  13. this.PermanentCondition = PermanentCondition;
  14. }
  15. public bool ImmuneDeDigivolve(Permanent permanent)
  16. {
  17. if (permanent != null)
  18. {
  19. if (permanent.TopCard != null)
  20. {
  21. if (PermanentCondition != null)
  22. {
  23. if (PermanentCondition(permanent))
  24. {
  25. return true;
  26. }
  27. }
  28. }
  29. }
  30. return false;
  31. }
  32. }