using System.Collections; using System.Collections.Generic; namespace DCGO.CardEffects.BT20 { public class BT20_060 : CEntity_Effect { public override List CardEffects(EffectTiming timing, CardSource card) { List cardEffects = new List(); #region DNA Digivolution if (timing == EffectTiming.None) { AddJogressConditionClass addJogressConditionClass = new AddJogressConditionClass(); addJogressConditionClass.SetUpICardEffect($"DNA Digivolution", CanUseCondition, card); addJogressConditionClass.SetUpAddJogressConditionClass(getJogressCondition: GetJogress); addJogressConditionClass.SetNotShowUI(true); cardEffects.Add(addJogressConditionClass); bool CanUseCondition(Hashtable hashtable) { return true; } JogressCondition GetJogress(CardSource cardSource) { if (cardSource == card) { bool PermanentConditionA(Permanent permanent) { return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && permanent.TopCard.CardColors.Contains(CardColor.Black) && permanent.Levels_ForJogress(card).Contains(6); } bool PermanentConditionB(Permanent permanent) { return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && (permanent.TopCard.CardColors.Contains(CardColor.Yellow) || permanent.TopCard.CardColors.Contains(CardColor.Red)) && permanent.Levels_ForJogress(card).Contains(6); } JogressConditionElement[] elements = { new(PermanentConditionA, "a level 6 Black Digimon"), new(PermanentConditionB, "a level 6 Yellow or Red Digimon") }; JogressCondition jogressCondition = new JogressCondition(elements, 0); return jogressCondition; } return null; } } #endregion #region Ace - Blast DNA Digivolve if (timing == EffectTiming.OnCounterTiming) { List blastDNAConditions = new List { new("Alphamon"), new("Ouryumon") }; cardEffects.Add(CardEffectFactory.BlastDNADigivolveEffect(card: card, blastDNAConditions: blastDNAConditions, condition: null)); } #endregion #region On Play/ When Digivolving Shared bool CanSelectPermanentConditionShared(Permanent permanent) { return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card); } bool CanActivateConditionShared(Hashtable hashtable) { return CardEffectCommons.IsExistOnBattleAreaDigimon(card); } #endregion #region On Play if (timing == EffectTiming.OnEnterFieldAnyone) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect("One of your opponent's Digimon gets -15000 DP", CanUseCondition, card); activateClass.SetUpActivateClass(CanActivateConditionShared, ActivateCoroutine, -1, false, EffectDescription()); cardEffects.Add(activateClass); string EffectDescription() { return "[On Play] 1 of your opponent's Digimon gets -15000 DP until the end of their turn. Then, if DNA digivolving, trash your opponent's top security card and ."; } bool CanUseCondition(Hashtable hashtable) { return CardEffectCommons.CanTriggerOnPlay(hashtable, card); } IEnumerator ActivateCoroutine(Hashtable hashtable) { if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentConditionShared)) { Permanent selectedPermanent = null; SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent(); selectPermanentEffect.SetUp( selectPlayer: card.Owner, canTargetCondition: CanSelectPermanentConditionShared, canTargetCondition_ByPreSelecetedList: null, canEndSelectCondition: null, maxCount: 1, canNoSelect: false, canEndNotMax: false, selectPermanentCoroutine: SelectPermanentCoroutine, afterSelectPermanentCoroutine: null, mode: SelectPermanentEffect.Mode.Custom, cardEffect: activateClass); selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -15000.", "The opponent is selecting 1 Digimon that will get DP -15000."); yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate()); IEnumerator SelectPermanentCoroutine(Permanent permanent) { selectedPermanent = permanent; yield return null; } if (selectedPermanent != null) { yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP( targetPermanent: selectedPermanent, changeValue: -15000, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass)); } } if (CardEffectCommons.IsJogress(hashtable)) { yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity( player: card.Owner.Enemy, destroySecurityCount: 1, cardEffect: activateClass, fromTop: true).DestroySecurity()); yield return ContinuousController.instance.StartCoroutine(new IRecovery( player: card.Owner, AddLifeCount: 1, cardEffect: activateClass).Recovery()); } } } #endregion #region When Digivolving if (timing == EffectTiming.OnEnterFieldAnyone) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect("One of your opponent's Digimon gets -15000 DP", CanUseCondition, card); activateClass.SetUpActivateClass(CanActivateConditionShared, ActivateCoroutine, -1, false, EffectDescription()); cardEffects.Add(activateClass); string EffectDescription() { return "[When Digivolving] 1 of your opponent's Digimon gets -15000 DP until the end of their turn. Then, if DNA digivolving, trash your opponent's top security card and ."; } bool CanUseCondition(Hashtable hashtable) { return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card); } IEnumerator ActivateCoroutine(Hashtable hashtable) { if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentConditionShared)) { Permanent selectedPermanent = null; SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent(); selectPermanentEffect.SetUp( selectPlayer: card.Owner, canTargetCondition: CanSelectPermanentConditionShared, canTargetCondition_ByPreSelecetedList: null, canEndSelectCondition: null, maxCount: 1, canNoSelect: false, canEndNotMax: false, selectPermanentCoroutine: SelectPermanentCoroutine, afterSelectPermanentCoroutine: null, mode: SelectPermanentEffect.Mode.Custom, cardEffect: activateClass); selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -15000.", "The opponent is selecting 1 Digimon that will get DP -15000."); yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate()); IEnumerator SelectPermanentCoroutine(Permanent permanent) { selectedPermanent = permanent; yield return null; } if (selectedPermanent != null) { yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP( targetPermanent: selectedPermanent, changeValue: -15000, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass)); } } if (CardEffectCommons.IsJogress(hashtable)) { yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity( player: card.Owner.Enemy, destroySecurityCount: 1, cardEffect: activateClass, fromTop: true).DestroySecurity()); yield return ContinuousController.instance.StartCoroutine(new IRecovery( player: card.Owner, AddLifeCount: 1, cardEffect: activateClass).Recovery()); } } } #endregion #region All Turns if (timing == EffectTiming.OnLoseSecurity) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect("Gain 3 memory", CanUseCondition, card); activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription()); activateClass.SetHashString("RemovedSec_BT20_060"); cardEffects.Add(activateClass); string EffectDescription() { return "[All Turns] (Once Per Turn) When security stacks are removed from, When security stacks are removed from, gain 3 memory."; } bool CanUseCondition(Hashtable hashtable) { return CardEffectCommons.IsExistOnBattleAreaDigimon(card) && CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, _ => true); } bool CanActivateCondition(Hashtable hashtable) { return CardEffectCommons.IsExistOnBattleAreaDigimon(card); } IEnumerator ActivateCoroutine(Hashtable hashtable) { yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(3, activateClass)); } } #endregion return cardEffects; } } }