|
|
@@ -198,7 +198,7 @@ namespace DCGO.CardEffects.EX11
|
|
|
yield return null;
|
|
|
}
|
|
|
|
|
|
- if (selectedCards.Count > 0)
|
|
|
+ if (selectedCards.Count > 0 && CardEffectCommons.HasMatchConditionOwnersPermanent(card, targetPermanents.Contains))
|
|
|
{
|
|
|
while (selectedCards.Any())
|
|
|
{
|
|
|
@@ -232,59 +232,57 @@ namespace DCGO.CardEffects.EX11
|
|
|
}
|
|
|
else selectedPermament = targetPermanents[0];
|
|
|
|
|
|
- if (selectedPermament != null)
|
|
|
+ List<CardSource> digivolutionCards_fixed = new List<CardSource>();
|
|
|
+ digivolutionCards_fixed.Clear(); // Clear here in cases of multiple loops
|
|
|
+
|
|
|
+ if (selectedCards.Count > 1)
|
|
|
{
|
|
|
- List<CardSource> digivolutionCards_fixed = new List<CardSource>();
|
|
|
- digivolutionCards_fixed.Clear(); // Clear here in cases of multiple loops
|
|
|
- if (selectedCards.Count > 1)
|
|
|
+ SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
+
|
|
|
+ selectCardEffect.SetUp(
|
|
|
+ canTargetCondition: (cardSource) => true,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: CanEndSelectCondition,
|
|
|
+ canNoSelect: () => false,
|
|
|
+ selectCardCoroutine: null,
|
|
|
+ afterSelectCardCoroutine: AfterSelectCardCoroutine,
|
|
|
+ message: "Specify the order to place the cards in the digivolution cards\n(cards will be placed so that cards with lower numbers are on top).",
|
|
|
+ maxCount: selectedCards.Count,
|
|
|
+ canEndNotMax: true,
|
|
|
+ isShowOpponent: true,
|
|
|
+ mode: SelectCardEffect.Mode.Custom,
|
|
|
+ root: SelectCardEffect.Root.Custom,
|
|
|
+ customRootCardList: selectedCards,
|
|
|
+ canLookReverseCard: true,
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Cards");
|
|
|
+
|
|
|
+ bool CanEndSelectCondition(List<CardSource> cardSources)
|
|
|
{
|
|
|
- SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
-
|
|
|
- selectCardEffect.SetUp(
|
|
|
- canTargetCondition: (cardSource) => true,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: CanEndSelectCondition,
|
|
|
- canNoSelect: () => false,
|
|
|
- selectCardCoroutine: null,
|
|
|
- afterSelectCardCoroutine: AfterSelectCardCoroutine,
|
|
|
- message: "Specify the order to place the cards in the digivolution cards\n(cards will be placed so that cards with lower numbers are on top).",
|
|
|
- maxCount: selectedCards.Count,
|
|
|
- canEndNotMax: true,
|
|
|
- isShowOpponent: true,
|
|
|
- mode: SelectCardEffect.Mode.Custom,
|
|
|
- root: SelectCardEffect.Root.Custom,
|
|
|
- customRootCardList: selectedCards,
|
|
|
- canLookReverseCard: true,
|
|
|
- selectPlayer: card.Owner,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Cards");
|
|
|
-
|
|
|
- bool CanEndSelectCondition(List<CardSource> cardSources)
|
|
|
- {
|
|
|
- return !CardEffectCommons.HasNoElement(cardSources);
|
|
|
- }
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
-
|
|
|
- IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
|
|
|
- {
|
|
|
- digivolutionCards_fixed.AddRange(cardSources);
|
|
|
- selectedCards.RemoveAll(cardSources.Contains);
|
|
|
- yield return null;
|
|
|
- }
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect2(digivolutionCards_fixed, "Digivolution Cards", true, true));
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectedPermament.AddDigivolutionCardsBottom(digivolutionCards_fixed, activateClass));
|
|
|
+ return !CardEffectCommons.HasNoElement(cardSources);
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- digivolutionCards_fixed.AddRange(selectedCards);
|
|
|
- selectedCards.Clear();
|
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect2(digivolutionCards_fixed, "Digivolution Cards", true, true));
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectedPermament.AddDigivolutionCardsBottom(digivolutionCards_fixed, activateClass));
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
+
|
|
|
+ IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
|
|
|
+ {
|
|
|
+ digivolutionCards_fixed.AddRange(cardSources);
|
|
|
+ selectedCards.RemoveAll(cardSources.Contains);
|
|
|
+ yield return null;
|
|
|
}
|
|
|
+
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect2(digivolutionCards_fixed, "Digivolution Cards", true, true));
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectedPermament.AddDigivolutionCardsBottom(digivolutionCards_fixed, activateClass));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ digivolutionCards_fixed.AddRange(selectedCards);
|
|
|
+ selectedCards.Clear();
|
|
|
+
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect2(digivolutionCards_fixed, "Digivolution Cards", true, true));
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectedPermament.AddDigivolutionCardsBottom(digivolutionCards_fixed, activateClass));
|
|
|
}
|
|
|
}
|
|
|
}
|