|
|
@@ -11,6 +11,8 @@ namespace DCGO.CardEffects.EX10
|
|
|
{
|
|
|
List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
|
|
|
+ #region Static Effects
|
|
|
+
|
|
|
#region Alternate Digivolution Requirement
|
|
|
|
|
|
if (timing == EffectTiming.None)
|
|
|
@@ -26,6 +28,7 @@ namespace DCGO.CardEffects.EX10
|
|
|
#endregion
|
|
|
|
|
|
#region Digixros
|
|
|
+
|
|
|
if (timing == EffectTiming.None)
|
|
|
{
|
|
|
AddDigiXrosConditionClass addDigiXrosConditionClass = new AddDigiXrosConditionClass();
|
|
|
@@ -43,7 +46,7 @@ namespace DCGO.CardEffects.EX10
|
|
|
{
|
|
|
if (cardSource == card)
|
|
|
{
|
|
|
- DigiXrosConditionElement element = new DigiXrosConditionElement(CanSelectCardCondition, "SkullKnightmon");
|
|
|
+ DigiXrosConditionElement element = new DigiXrosConditionElement(CanSelectCardCondition, "Damemon");
|
|
|
|
|
|
bool CanSelectCardCondition(CardSource cardSource)
|
|
|
{
|
|
|
@@ -64,7 +67,7 @@ namespace DCGO.CardEffects.EX10
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- DigiXrosConditionElement element1 = new DigiXrosConditionElement(CanSelectCardCondition1, "DeadlyAxemon");
|
|
|
+ DigiXrosConditionElement element1 = new DigiXrosConditionElement(CanSelectCardCondition1, "ChuuChuumon");
|
|
|
|
|
|
bool CanSelectCardCondition1(CardSource cardSource)
|
|
|
{
|
|
|
@@ -95,6 +98,27 @@ namespace DCGO.CardEffects.EX10
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Collision
|
|
|
+
|
|
|
+ if (timing == EffectTiming.OnCounterTiming)
|
|
|
+ {
|
|
|
+ cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false, card, null));
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Rush
|
|
|
+
|
|
|
+ if (timing == EffectTiming.None)
|
|
|
+ {
|
|
|
+ cardEffects.Add(CardEffectFactory.RushSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
#region OP/WD/WA Shared
|
|
|
@@ -112,98 +136,141 @@ namespace DCGO.CardEffects.EX10
|
|
|
bool CanSelectPermanent(Permanent permanent)
|
|
|
{
|
|
|
return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
|
|
|
- permanent.TopCard.HasBagraArmyTraits;
|
|
|
+ CanSelectSource(permanent.TopCard);
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanSelectPermamentTrashDigivolution(Permanent permanent)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
|
|
|
+ && permanent.DigivolutionCards.Exists(CanSelectSource);
|
|
|
}
|
|
|
|
|
|
IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
|
|
|
{
|
|
|
- bool discarded = false;
|
|
|
- List<CardSource> selectedCards = new List<CardSource>();
|
|
|
-
|
|
|
- SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
-
|
|
|
- selectCardEffect.SetUp(
|
|
|
- canTargetCondition: CanSelectSource,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- canNoSelect: () => true,
|
|
|
- selectCardCoroutine: SelectCardCoroutine,
|
|
|
- afterSelectCardCoroutine: null,
|
|
|
- message: "Select 1 digivolution card to discard.",
|
|
|
- maxCount: 1,
|
|
|
- canEndNotMax: false,
|
|
|
- isShowOpponent: true,
|
|
|
- mode: SelectCardEffect.Mode.Custom,
|
|
|
- root: SelectCardEffect.Root.Custom,
|
|
|
- customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
|
|
|
- canLookReverseCard: true,
|
|
|
- selectPlayer: card.Owner,
|
|
|
- cardEffect: null);
|
|
|
-
|
|
|
- selectCardEffect.SetUpCustomMessage("Select 1 digivolution card to discard.", "The opponent is selecting 1 digivolution card to discard.");
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
-
|
|
|
- IEnumerator SelectCardCoroutine(CardSource cardSource)
|
|
|
+ if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermamentTrashDigivolution))
|
|
|
{
|
|
|
- selectedCards.Add(cardSource);
|
|
|
-
|
|
|
- yield return null;
|
|
|
- }
|
|
|
+ #region Select Permament to trash Digivoltuion Cards
|
|
|
+
|
|
|
+ Permanent selectedPermanment = null;
|
|
|
+
|
|
|
+ int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermamentTrashDigivolution));
|
|
|
+ SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
+
|
|
|
+ selectPermanentEffect.SetUp(
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ canTargetCondition: CanSelectPermamentTrashDigivolution,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ maxCount: maxCount,
|
|
|
+ canNoSelect: true,
|
|
|
+ canEndNotMax: false,
|
|
|
+ selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
+ afterSelectPermanentCoroutine: null,
|
|
|
+ mode: SelectPermanentEffect.Mode.Custom,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
+ {
|
|
|
+ selectedPermanment = permanent;
|
|
|
+ yield return null;
|
|
|
+ }
|
|
|
|
|
|
- if (selectedCards.Count >= 1)
|
|
|
- {
|
|
|
- yield return ContinuousController.instance.StartCoroutine(new ITrashDigivolutionCards(card.PermanentOfThisCard(), selectedCards, activateClass).TrashDigivolutionCards());
|
|
|
+ selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon trash digivolution card", "The opponent is selecting 1 Digimon trash digivolution card");
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
|
|
|
- discarded = true;
|
|
|
- }
|
|
|
+ #endregion
|
|
|
|
|
|
- if (discarded)
|
|
|
- {
|
|
|
- if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanent))
|
|
|
+ if (selectedPermanment != null)
|
|
|
{
|
|
|
- Permanent selectedPermanment = null;
|
|
|
-
|
|
|
- #region Select Permanent
|
|
|
-
|
|
|
- int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanent));
|
|
|
- SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
-
|
|
|
- selectPermanentEffect.SetUp(
|
|
|
- selectPlayer: card.Owner,
|
|
|
- canTargetCondition: CanSelectPermanent,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- maxCount: maxCount,
|
|
|
- canNoSelect: false,
|
|
|
- canEndNotMax: false,
|
|
|
- selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
- afterSelectPermanentCoroutine: null,
|
|
|
- mode: SelectPermanentEffect.Mode.Custom,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
+ #region Select Digivolution Card to trash
|
|
|
+
|
|
|
+ CardSource selectedCard = null;
|
|
|
+ SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
+
|
|
|
+ selectCardEffect.SetUp(
|
|
|
+ canTargetCondition: CanSelectSource,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ canNoSelect: () => true,
|
|
|
+ selectCardCoroutine: SelectCardCoroutine,
|
|
|
+ afterSelectCardCoroutine: null,
|
|
|
+ message: "Select 1 digivolution card to discard.",
|
|
|
+ maxCount: 1,
|
|
|
+ canEndNotMax: false,
|
|
|
+ isShowOpponent: true,
|
|
|
+ mode: SelectCardEffect.Mode.Custom,
|
|
|
+ root: SelectCardEffect.Root.Custom,
|
|
|
+ customRootCardList: selectedPermanment.DigivolutionCards,
|
|
|
+ canLookReverseCard: true,
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ cardEffect: null);
|
|
|
+
|
|
|
+ IEnumerator SelectCardCoroutine(CardSource cardSource)
|
|
|
{
|
|
|
- selectedPermanment = permanent;
|
|
|
+ selectedCard = cardSource;
|
|
|
yield return null;
|
|
|
}
|
|
|
|
|
|
- selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to gain <Blocker>, <Retailiation>", "The opponent is selecting 1 Digimon to gain <Blocker>, <Retailiation>");
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
+ selectCardEffect.SetUpCustomMessage("Select 1 digivolution card to discard.", "The opponent is selecting 1 digivolution card to discard.");
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
- if (selectedPermanment != null)
|
|
|
+ if (selectedCard != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.TrashDigivolutionCardsAndProcessAccordingToResult(
|
|
|
+ targetPermanent: selectedPermanment,
|
|
|
+ targetDigivolutionCards: new List<CardSource>() { selectedCard },
|
|
|
+ activateClass: activateClass,
|
|
|
+ successProcess: SuccessProcess,
|
|
|
+ failureProcess: null));
|
|
|
+
|
|
|
+ IEnumerator SuccessProcess(List<CardSource> cardSources)
|
|
|
{
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(
|
|
|
- targetPermanent: selectedPermanment,
|
|
|
- effectDuration: EffectDuration.UntilOpponentTurnEnd,
|
|
|
- activateClass: activateClass));
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRetaliation(
|
|
|
- targetPermanent: selectedPermanment,
|
|
|
- effectDuration: EffectDuration.UntilOpponentTurnEnd,
|
|
|
- activateClass: activateClass));
|
|
|
+ if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanent))
|
|
|
+ {
|
|
|
+ #region Select Permanent to gain effects
|
|
|
+
|
|
|
+ Permanent selectedPermanment1 = null;
|
|
|
+
|
|
|
+ int maxCount1 = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanent));
|
|
|
+ SelectPermanentEffect selectPermanentEffect1 = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
+
|
|
|
+ selectPermanentEffect1.SetUp(
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ canTargetCondition: CanSelectPermanent,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ maxCount: maxCount1,
|
|
|
+ canNoSelect: false,
|
|
|
+ canEndNotMax: false,
|
|
|
+ selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
+ afterSelectPermanentCoroutine: null,
|
|
|
+ mode: SelectPermanentEffect.Mode.Custom,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
+ {
|
|
|
+ selectedPermanment1 = permanent;
|
|
|
+ yield return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ selectPermanentEffect1.SetUpCustomMessage("Select 1 Digimon to gain <Blocker> & <Retaliation>", "The opponent is selecting 1 Digimon to gain <Blocker> & <Retaliation>");
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect1.Activate());
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ if (selectedPermanment1 != null)
|
|
|
+ {
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(
|
|
|
+ targetPermanent: selectedPermanment,
|
|
|
+ effectDuration: EffectDuration.UntilOpponentTurnEnd,
|
|
|
+ activateClass: activateClass));
|
|
|
+
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRetaliation(
|
|
|
+ targetPermanent: selectedPermanment,
|
|
|
+ effectDuration: EffectDuration.UntilOpponentTurnEnd,
|
|
|
+ activateClass: activateClass));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -284,13 +351,16 @@ namespace DCGO.CardEffects.EX10
|
|
|
#endregion
|
|
|
|
|
|
#region Save
|
|
|
+
|
|
|
if (timing == EffectTiming.OnDestroyedAnyone)
|
|
|
{
|
|
|
cardEffects.Add(CardEffectFactory.SaveEffect(card: card));
|
|
|
}
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
#region ESS
|
|
|
+
|
|
|
if (timing == EffectTiming.OnDigivolutionCardDiscarded)
|
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
@@ -321,6 +391,7 @@ namespace DCGO.CardEffects.EX10
|
|
|
yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
return cardEffects;
|