using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Linq; using Photon; using System; using Photon.Pun; public class BT3_111 : 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.OnDetermineDoSecurityCheck) { cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: false, card: card, condition: null)); } if (timing == EffectTiming.OnEndBattle) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect("Unsuspend this Digimon", CanUseCondition, card); activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription()); activateClass.SetHashString("Unsuspend_BT3_111"); cardEffects.Add(activateClass); string EffectDiscription() { return "[Your Turn][Once Per Turn] When this Digimon deletes an opponent's Digimon in battle and survives, unsuspend this Digimon."; } bool CanUseCondition(Hashtable hashtable) { if (CardEffectCommons.IsExistOnBattleArea(card)) { if (CardEffectCommons.IsOwnerTurn(card)) { bool WinnerCondition(Permanent permanent) => permanent.cardSources.Contains(card); bool LoserCondition(Permanent permanent) => CardEffectCommons.IsOpponentPermanent(permanent, card); if (CardEffectCommons.CanTriggerWhenDeleteOpponentDigimonByBattle(hashtable: hashtable, winnerCondition: WinnerCondition, loserCondition: LoserCondition, isOnlyWinnerSurvive: true)) { return true; } } } return false; } bool CanActivateCondition(Hashtable hashtable) { if (CardEffectCommons.IsExistOnBattleArea(card)) { return true; } return false; } IEnumerator ActivateCoroutine(Hashtable _hashtable) { Permanent selectedPermanent = card.PermanentOfThisCard(); yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List() { selectedPermanent }, activateClass).Unsuspend()); } } return cardEffects; } }