using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Linq; using Photon; using System; using Photon.Pun; public class BT3_031 : CEntity_Effect { public override List CardEffects(EffectTiming timing, CardSource card) { List cardEffects = new List(); if (timing == EffectTiming.None) { bool Condition() { return card.Owner.HandCards.Contains(card); } bool PermanentCondition(Permanent targetPermanent) { if (targetPermanent != null) { if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(targetPermanent, card)) { if (targetPermanent.TopCard.CardNames.Contains("Paildramon")) { return true; } if (targetPermanent.TopCard.CardNames.Contains("Dinobeemon")) { return true; } } } return false; } bool CardSourceCondition(CardSource cardSource) { return cardSource == card && cardSource.Owner.HandCards.Contains(cardSource); } bool RootCondition(SelectCardEffect.Root root) { return root == SelectCardEffect.Root.Hand; } cardEffects.Add(CardEffectFactory.ChangeDigivolutionCostStaticEffect( changeValue: -2, permanentCondition: PermanentCondition, cardCondition: CardSourceCondition, rootCondition: RootCondition, isInheritedEffect: false, card: card, condition: Condition, setFixedCost: false)); } if (timing == EffectTiming.None) { cardEffects.Add(CardEffectFactory.JammingSelfStaticEffect(isInheritedEffect: false, card: card, condition: null)); } if (timing == EffectTiming.OnEnterFieldAnyone) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect("Unsuspend all your Digimon with Jamming", CanUseCondition, card); activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription()); cardEffects.Add(activateClass); string EffectDiscription() { return "[When Digivolving] Unsuspend all of your Digimon with ."; } bool CanSelectPermanentCondition(Permanent permanent) { if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)) { if (permanent.HasJamming) { if (permanent.IsSuspended) { return true; } } } return false; } bool CanUseCondition(Hashtable hashtable) { return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card); } bool CanActivateCondition(Hashtable hashtable) { if (CardEffectCommons.IsExistOnBattleArea(card)) { if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition)) { return true; } } return false; } IEnumerator ActivateCoroutine(Hashtable _hashtable) { if (isExistOnField(card)) { if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard())) { if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition)) { List unsuspendPermanetns = new List(); foreach (Permanent permanent in card.Owner.GetBattleAreaDigimons()) { if (CanSelectPermanentCondition(permanent)) { unsuspendPermanetns.Add(permanent); } } yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(unsuspendPermanetns, activateClass).Unsuspend()); } } } } } return cardEffects; } }