| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- using System.Collections;
- using System.Collections.Generic;
- // Grizzlymon
- namespace DCGO.CardEffects.BT25
- {
- public class BT25_012 : CEntity_Effect
- {
- public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
- {
- List<ICardEffect> cardEffects = new List<ICardEffect>();
- #region Alt Digivolution
- if (timing == EffectTiming.None)
- {
- bool PermanentCondition(Permanent permanent)
- {
- return permanent.TopCard.EqualsTraits("TS");
- }
- cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(PermanentCondition, 2, true, card, null, level: 3));
- }
- #endregion
- #region OP/WD Shared
- string SharedEffectName = "Give 1 of your Digimon <Raid> and +3K DP for turn";
- CardEffectFactory.ActivateClassesForSharedEffects
- (ref cardEffects, timing, card,
- SharedEffectName,
- SharedActivateCoroutine,
- SharedEffectDescription,
- optional: false,
- maxCountPerTurn: -1,
- onPlay: true,
- whenDigivolving: true);
- string SharedEffectDescription(string tag)
- {
- return $"[{tag}] 1 of your Digimon with [Beast], [Animal] or [Sovereign], other than [Sea Animal], in any of its traits or the [Shaman] or [TS] trait gains <Raid> and +3000 DP for the turn.";
- }
- bool CanSelectPermanentCondition(Permanent permanent)
- {
- return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
- && (permanent.TopCard.HasBeastTraits
- || permanent.TopCard.EqualsTraits("Shaman")
- || permanent.TopCard.HasTSTraits);
- }
- IEnumerator SharedActivateCoroutine(Hashtable _hashtable, ActivateClass activateClass)
- {
- if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
- {
- SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
- selectPermanentEffect.SetUp(
- selectPlayer: card.Owner,
- canTargetCondition: CanSelectPermanentCondition,
- canTargetCondition_ByPreSelecetedList: null,
- canEndSelectCondition: null,
- maxCount: 1,
- canNoSelect: false,
- canEndNotMax: false,
- selectPermanentCoroutine: null,
- afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
- mode: SelectPermanentEffect.Mode.Custom,
- cardEffect: activateClass);
- selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to gain Raid and +3000 DP", "Opponent is select 1 Digimon to gain Raid and +3000 DP");
- yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
- IEnumerator AfterSelectPermanentCoroutine(List<Permanent> permanent)
- {
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRaid(
- targetPermanent: permanent[0],
- effectDuration: EffectDuration.UntilEachTurnEnd,
- activateClass: activateClass));
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
- targetPermanent: permanent[0],
- changeValue: 3000,
- effectDuration: EffectDuration.UntilEachTurnEnd,
- activateClass: activateClass));
- }
- }
- }
- #endregion
- #region Inherit
- if (timing == EffectTiming.None)
- {
- bool Condition()
- {
- return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
- }
- cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(
- changeValue: 1000,
- isInheritedEffect: true,
- card: card,
- condition: Condition));
- }
- #endregion
- return cardEffects;
- }
- }
- }
|