|
@@ -1,6 +1,8 @@
|
|
|
using System.Collections;
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
+//st21-08 Togemon
|
|
|
|
|
+//Code largely copied from st20 birdramon, so if one has a problem, check the other to make sure it's not also there
|
|
|
namespace DCGO.CardEffects.ST21
|
|
namespace DCGO.CardEffects.ST21
|
|
|
{
|
|
{
|
|
|
public class ST21_08 : CEntity_Effect
|
|
public class ST21_08 : CEntity_Effect
|
|
@@ -9,33 +11,129 @@ namespace DCGO.CardEffects.ST21
|
|
|
{
|
|
{
|
|
|
List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
|
|
|
|
|
|
|
+ #region Alternate Digivolution Requirement
|
|
|
if (timing == EffectTiming.None)
|
|
if (timing == EffectTiming.None)
|
|
|
|
|
+ {
|
|
|
|
|
+ static bool PermanentCondition(Permanent targetPermanent)
|
|
|
|
|
+ {
|
|
|
|
|
+ return targetPermanent.TopCard.EqualsTraits("ADVENTURE") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 3;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false, card: card, condition: null));
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region On-Play/When-Digivolving Shared
|
|
|
|
|
+ bool CanActivateCondition(Hashtable hashtable)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
|
|
+ {
|
|
|
|
|
+ List<CardSource> tamerCards = new List<CardSource>();
|
|
|
|
|
+
|
|
|
|
|
+ foreach (Permanent permanent in card.Owner.GetBattleAreaPermanents())
|
|
|
|
|
+ {
|
|
|
|
|
+ if (permanent.IsTamer && permanent.TopCard.EqualsTraits("ADVENTURE"))
|
|
|
|
|
+ {
|
|
|
|
|
+ tamerCards.Add(permanent.TopCard);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return Combinations.GetDifferenetColorCardCount(tamerCards) >= 3;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region On Play
|
|
|
|
|
+ if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
|
|
+ {
|
|
|
|
|
+ ActivateClass activateClass = new ActivateClass();
|
|
|
|
|
+ activateClass.SetUpICardEffect("If your Tamers with the [ADVENTURE] trait have 3 or more total colors, this Digimon may digivolve into a Digimon card with the [ADVENTURE] trait in the hand without paying the cost.", CanUseCondition, card);
|
|
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
|
|
|
|
|
+ cardEffects.Add(activateClass);
|
|
|
|
|
+
|
|
|
|
|
+ string EffectDiscription()
|
|
|
|
|
+ {
|
|
|
|
|
+ return "[On Play] If your Tamers with the [ADVENTURE] trait have 3 or more total colors, this Digimon may digivolve into a Digimon card with the [ADVENTURE] trait in the hand without paying the cost.";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
|
|
+ {
|
|
|
|
|
+ return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ bool CanDigivolveIntoCardCondition(CardSource cardSource)
|
|
|
|
|
+ {
|
|
|
|
|
+ return cardSource.IsDigimon && cardSource.EqualsTraits("ADVENTURE");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
|
|
+ {
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(
|
|
|
|
|
+ CardEffectCommons.DigivolveIntoHandOrTrashCard(
|
|
|
|
|
+ targetPermanent: card.PermanentOfThisCard(),
|
|
|
|
|
+ cardCondition: CanDigivolveIntoCardCondition,
|
|
|
|
|
+ payCost: false,
|
|
|
|
|
+ reduceCostTuple: null,
|
|
|
|
|
+ fixedCostTuple: null,
|
|
|
|
|
+ ignoreDigivolutionRequirementFixedCost: -1,
|
|
|
|
|
+ isHand: true,
|
|
|
|
|
+ activateClass: activateClass,
|
|
|
|
|
+ successProcess: null));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region When Digivolving
|
|
|
|
|
+ if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
{
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
- activateClass.SetUpICardEffect("", CanUseCondition, card);
|
|
|
|
|
|
|
+ activateClass.SetUpICardEffect("If your Tamers with the [ADVENTURE] trait have 3 or more total colors, this Digimon may digivolve into a Digimon card with the [ADVENTURE] trait in the hand without paying the cost.", CanUseCondition, card);
|
|
|
activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
|
|
activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
|
|
|
cardEffects.Add(activateClass);
|
|
cardEffects.Add(activateClass);
|
|
|
|
|
|
|
|
string EffectDiscription()
|
|
string EffectDiscription()
|
|
|
{
|
|
{
|
|
|
- return "";
|
|
|
|
|
|
|
+ return "[When Digivolving] If your Tamers with the [ADVENTURE] trait have 3 or more total colors, this Digimon may digivolve into a Digimon card with the [ADVENTURE] trait in the hand without paying the cost.";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
{
|
|
|
- return true;
|
|
|
|
|
|
|
+ return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- bool CanActivateCondition(Hashtable hashtable)
|
|
|
|
|
|
|
+ bool CanDigivolveIntoCardCondition(CardSource cardSource)
|
|
|
{
|
|
{
|
|
|
- return true;
|
|
|
|
|
|
|
+ return cardSource.IsDigimon && cardSource.EqualsTraits("ADVENTURE");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
{
|
|
{
|
|
|
- yield return null;
|
|
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(
|
|
|
|
|
+ CardEffectCommons.DigivolveIntoHandOrTrashCard(
|
|
|
|
|
+ targetPermanent: card.PermanentOfThisCard(),
|
|
|
|
|
+ cardCondition: CanDigivolveIntoCardCondition,
|
|
|
|
|
+ payCost: false,
|
|
|
|
|
+ reduceCostTuple: null,
|
|
|
|
|
+ fixedCostTuple: null,
|
|
|
|
|
+ ignoreDigivolutionRequirementFixedCost: -1,
|
|
|
|
|
+ isHand: true,
|
|
|
|
|
+ activateClass: activateClass,
|
|
|
|
|
+ successProcess: null));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region All Turn - ESS
|
|
|
|
|
+ if (timing == EffectTiming.None)
|
|
|
|
|
+ {
|
|
|
|
|
+ cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 1000, isInheritedEffect: true, card: card, condition: null));
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
|
|
|
|
|
return cardEffects;
|
|
return cardEffects;
|
|
|
}
|
|
}
|