| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- using System.Collections;
- using System.Collections.Generic;
- namespace DCGO.CardEffects.BT19
- {
- public class BT19_079 : CEntity_Effect
- {
- public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
- {
- List<ICardEffect> cardEffects = new List<ICardEffect>();
- #region Start of Your Turn
- if (timing == EffectTiming.OnStartTurn)
- {
- cardEffects.Add(CardEffectFactory.SetMemoryTo3TamerEffect(card));
- }
- #endregion
- #region All Turns
- if (timing == EffectTiming.BeforePayCost)
- {
- ActivateClass activateClass = new ActivateClass();
- activateClass.SetUpICardEffect("Can select DigiXros cards from Tamer's digivolution cards", CanUseCondition, card);
- activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
- activateClass.SetHashString("CanSelectDigiXrosFromTamer_BT19_079");
- cardEffects.Add(activateClass);
- string EffectDescription()
- {
- return
- "[All Turns] When any of your [Xros Heart] trait Digimon cards with DigiXros requirements would be played, by suspending this Tamer, you may place cards from under your Tamers as digivolution cards for a DigiXros.";
- }
- bool CardCondition(CardSource cardSource)
- {
- return cardSource.Owner == card.Owner && cardSource.IsDigimon &&
- cardSource.EqualsTraits("Xros Heart") && cardSource.HasDigiXros;
- }
- bool CanUseCondition(Hashtable hashtable)
- {
- return CardEffectCommons.IsExistOnBattleArea(card) &&
- CardEffectCommons.CanTriggerWhenPermanentWouldPlay(hashtable, CardCondition) &&
- CardEffectCommons.IsOnly1CardPlayed(hashtable);
- }
- bool CanActivateCondition(Hashtable hashtable)
- {
- return CardEffectCommons.IsExistOnBattleArea(card) && CardEffectCommons.CanActivateSuspendCostEffect(card);
- }
- IEnumerator ActivateCoroutine(Hashtable hashtable)
- {
- yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(
- new List<Permanent>() { card.PermanentOfThisCard() }, CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
- ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
- AddMaxUnderTamerCountDigiXrosClass addMaxTamerCountDigiXrosClass = new AddMaxUnderTamerCountDigiXrosClass();
- addMaxTamerCountDigiXrosClass.SetUpICardEffect("Can select DigiXros cards from Tamer's digivolution cards",
- CanUseCondition1, card);
- addMaxTamerCountDigiXrosClass.SetUpAddMaxUnderTamerCountDigiXrosClass(getMaxUnderTamerCount: GetCount);
- card.Owner.UntilCalculateFixedCostEffect.Add(_ => addMaxTamerCountDigiXrosClass);
- bool CanUseCondition1(Hashtable conHashtable)
- {
- return true;
- }
- int GetCount(CardSource cardSource)
- {
- if (CardSourceCondition(cardSource))
- {
- return 100;
- }
- return 0;
- }
- bool CardSourceCondition(CardSource cardSource)
- {
- if (cardSource.Owner == card.Owner)
- {
- if (cardSource.HasDigiXros)
- {
- return true;
- }
- }
- return false;
- }
- }
- }
- #endregion
- #region Security Effect
- if (timing == EffectTiming.SecuritySkill)
- {
- cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
- }
- #endregion
- return cardEffects;
- }
- }
- }
|