BT7_009.cs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 BT7_009 : 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.OnAllyAttack)
  14. {
  15. ActivateClass activateClass = new ActivateClass();
  16. activateClass.SetUpICardEffect("Reveal the top 5 cards of deck", CanUseCondition, card);
  17. activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
  18. activateClass.SetIsInheritedEffect(true);
  19. activateClass.SetHashString("Reveal5_BT7_008");
  20. cardEffects.Add(activateClass);
  21. string EffectDiscription()
  22. {
  23. return "[When Attacking][Once Per Turn] Reveal the top 5 cards of your deck. Add all cards with [Sistermon] in their names among them to your hand. Place the remaining cards at the bottom of your deck in any order.";
  24. }
  25. bool CanSelectCardCondition(CardSource cardSource)
  26. {
  27. return cardSource.ContainsCardName("Sistermon");
  28. }
  29. bool CanUseCondition(Hashtable hashtable)
  30. {
  31. return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
  32. }
  33. bool CanActivateCondition(Hashtable hashtable)
  34. {
  35. if (CardEffectCommons.IsExistOnBattleArea(card))
  36. {
  37. return true;
  38. }
  39. return false;
  40. }
  41. IEnumerator ActivateCoroutine(Hashtable _hashtable)
  42. {
  43. yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.RevealDeckTopCardsAndProcessForAll(
  44. revealCount: 5,
  45. simplifiedSelectCardCondition:
  46. new SimplifiedSelectCardConditionClass(
  47. canTargetCondition: CanSelectCardCondition,
  48. message: "",
  49. mode: SelectCardEffect.Mode.AddHand,
  50. maxCount: -1,
  51. selectCardCoroutine: null),
  52. remainingCardsPlace: RemainingCardsPlace.DeckBottom,
  53. activateClass: activateClass
  54. ));
  55. }
  56. }
  57. return cardEffects;
  58. }
  59. }