|
@@ -0,0 +1,94 @@
|
|
|
|
|
+using System.Collections;
|
|
|
|
|
+using System.Collections.Generic;
|
|
|
|
|
+
|
|
|
|
|
+// Bearmon
|
|
|
|
|
+namespace DCGO.CardEffects.BT25
|
|
|
|
|
+{
|
|
|
|
|
+ public class BT25_009 : CEntity_Effect
|
|
|
|
|
+ {
|
|
|
|
|
+ public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
|
|
|
|
|
+ {
|
|
|
|
|
+ List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
|
|
+
|
|
|
|
|
+ #region Alternate Digivolution Requirement
|
|
|
|
|
+ if (timing == EffectTiming.None)
|
|
|
|
|
+ {
|
|
|
|
|
+ static bool PermanentCondition(Permanent targetPermanent)
|
|
|
|
|
+ {
|
|
|
|
|
+ return targetPermanent.TopCard.HasTSTraits;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: false, card: card, condition: null, level: 2));
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region Start Of Your Main Phase
|
|
|
|
|
+ if (timing == EffectTiming.OnStartMainPhase)
|
|
|
|
|
+ {
|
|
|
|
|
+ ActivateClass activateClass = new ActivateClass();
|
|
|
|
|
+ activateClass.SetUpICardEffect("Digivolve into a [Beast],[Animal],[Sovereign] other than [Sea Animal] in traits/[TS] digimon in hand for free", CanUseCondition, card);
|
|
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
|
|
|
|
|
+ cardEffects.Add(activateClass);
|
|
|
|
|
+
|
|
|
|
|
+ string EffectDiscription()
|
|
|
|
|
+ {
|
|
|
|
|
+ return "[Start of Your Main Phase] If you have 4 or less memory, this Digimon may digivolve into a Digimon card with [Beast], [Animal] or [Sovereign], other than [Sea Animal], in any of its traits or the [TS] trait in the hand without paying the cost.";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
|
|
+ {
|
|
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ bool CanActivateCondition(Hashtable hashtable)
|
|
|
|
|
+ {
|
|
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
|
|
|
|
|
+ && CardEffectCommons.IsOwnerTurn(card)
|
|
|
|
|
+ && card.Owner.MemoryForPlayer <= 4;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ bool CanSelectCardCondition(CardSource cardSource)
|
|
|
|
|
+ {
|
|
|
|
|
+ return cardSource.IsDigimon
|
|
|
|
|
+ && (cardSource.HasBeastTraits
|
|
|
|
|
+ || cardSource.HasTSTraits)
|
|
|
|
|
+ && cardSource.CanPlayCardTargetFrame(card.PermanentOfThisCard().PermanentFrame, false, activateClass);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
|
|
+ {
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
|
|
|
|
|
+ card.PermanentOfThisCard(),
|
|
|
|
|
+ digivolvingCard => CanSelectCardCondition(digivolvingCard),
|
|
|
|
|
+ payCost: false,
|
|
|
|
|
+ reduceCostTuple: null,
|
|
|
|
|
+ fixedCostTuple: null,
|
|
|
|
|
+ ignoreDigivolutionRequirementFixedCost: -1,
|
|
|
|
|
+ isHand: true,
|
|
|
|
|
+ activateClass: activateClass,
|
|
|
|
|
+ successProcess: null
|
|
|
|
|
+ ));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region All Turns - Inherited Effect
|
|
|
|
|
+ if (timing == EffectTiming.None)
|
|
|
|
|
+ {
|
|
|
|
|
+ bool Condition()
|
|
|
|
|
+ {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(
|
|
|
|
|
+ changeValue: 1000,
|
|
|
|
|
+ isInheritedEffect: true,
|
|
|
|
|
+ card: card,
|
|
|
|
|
+ condition: Condition));
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ return cardEffects;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|