|
|
@@ -71,132 +71,146 @@ namespace DCGO.CardEffects.EX7
|
|
|
|
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
{
|
|
|
- bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardSharedCondition) >= 3;
|
|
|
- bool canSelectTrash = card.Owner.TrashCards.Count(CanSelectCardSharedCondition) >= 3;
|
|
|
+ List<CardSource> selectedCards = new List<CardSource>();
|
|
|
+ int maxCount = 3;
|
|
|
|
|
|
- if (canSelectHand || canSelectTrash)
|
|
|
+ int handCount = card.Owner.HandCards.Count(CanSelectCardSharedCondition);
|
|
|
+ int trashCount = card.Owner.TrashCards.Count(CanSelectCardSharedCondition);
|
|
|
+
|
|
|
+ if (handCount + trashCount >= maxCount)
|
|
|
{
|
|
|
- if (canSelectHand && canSelectTrash)
|
|
|
+ while (selectedCards.Count != maxCount)
|
|
|
{
|
|
|
- List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
|
|
|
+ bool canSelectHand = handCount > 1;
|
|
|
+ bool canSelectTrash = trashCount > 1;
|
|
|
+
|
|
|
+ if (canSelectHand || canSelectTrash)
|
|
|
{
|
|
|
- new(message: "From hand", value: true, spriteIndex: 0),
|
|
|
- new(message: "From trash", value: false, spriteIndex: 1),
|
|
|
- };
|
|
|
+ if (canSelectHand && canSelectTrash)
|
|
|
+ {
|
|
|
+ List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
|
|
|
+ {
|
|
|
+ new(message: "From hand", value: true, spriteIndex: 0),
|
|
|
+ new(message: "From trash", value: false, spriteIndex: 1),
|
|
|
+ };
|
|
|
|
|
|
- string selectPlayerMessage = "From which area do you return cards?";
|
|
|
- string notSelectPlayerMessage = "The opponent is choosing from which area to return cards.";
|
|
|
+ string selectPlayerMessage = "From which area do you return cards?";
|
|
|
+ string notSelectPlayerMessage = "The opponent is choosing from which area to return cards.";
|
|
|
|
|
|
- GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements,
|
|
|
- selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
|
|
|
- notSelectPlayerMessage: notSelectPlayerMessage);
|
|
|
- }
|
|
|
+ GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements,
|
|
|
+ selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
|
|
|
+ notSelectPlayerMessage: notSelectPlayerMessage);
|
|
|
+ }
|
|
|
|
|
|
- else
|
|
|
- {
|
|
|
- GManager.instance.userSelectionManager.SetBool(canSelectHand);
|
|
|
- }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ GManager.instance.userSelectionManager.SetBool(canSelectHand);
|
|
|
+ }
|
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager
|
|
|
- .WaitForEndSelect());
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
|
|
|
|
|
|
- bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
|
|
|
+ bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
|
|
|
+ int allowedCount = maxCount - selectedCards.Count;
|
|
|
|
|
|
- if (fromHand)
|
|
|
- {
|
|
|
- SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
|
|
|
-
|
|
|
- selectHandEffect.SetUp(
|
|
|
- selectPlayer: card.Owner,
|
|
|
- canTargetCondition: CanSelectCardSharedCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- maxCount: 3,
|
|
|
- canNoSelect: true,
|
|
|
- canEndNotMax: false,
|
|
|
- isShowOpponent: false,
|
|
|
- selectCardCoroutine: null,
|
|
|
- afterSelectCardCoroutine: AfterSelectCardCoroutine,
|
|
|
- mode: SelectHandEffect.Mode.Custom,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- selectHandEffect.SetUpCustomMessage("Select 3 cards to top deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
|
|
|
- "The opponent is selecting 3 cards to top deck.");
|
|
|
- selectHandEffect.SetUpCustomMessage_ShowCard("Deck Top Cards");
|
|
|
-
|
|
|
- yield return StartCoroutine(selectHandEffect.Activate());
|
|
|
- }
|
|
|
+ if (fromHand)
|
|
|
+ {
|
|
|
+ SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
|
|
|
|
|
|
- else
|
|
|
- {
|
|
|
- SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
-
|
|
|
- selectCardEffect.SetUp(
|
|
|
- canTargetCondition: CanSelectCardSharedCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- canNoSelect: () => true,
|
|
|
- selectCardCoroutine: null,
|
|
|
- afterSelectCardCoroutine: AfterSelectCardCoroutine,
|
|
|
- message:
|
|
|
- "Select cards to place at the top of the deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
|
|
|
- maxCount: 3,
|
|
|
- canEndNotMax: false,
|
|
|
- isShowOpponent: false,
|
|
|
- mode: SelectCardEffect.Mode.Custom,
|
|
|
- root: SelectCardEffect.Root.Trash,
|
|
|
- customRootCardList: null,
|
|
|
- canLookReverseCard: true,
|
|
|
- selectPlayer: card.Owner,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- selectCardEffect.SetUpCustomMessage("Select 3 cards to top deck.",
|
|
|
- "The opponent is selecting 3 cards to top deck.");
|
|
|
- selectCardEffect.SetUpCustomMessage_ShowCard("Deck Top Cards");
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
- }
|
|
|
+ selectHandEffect.SetUp(
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ canTargetCondition: CanSelectCardSharedCondition,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ maxCount: allowedCount,
|
|
|
+ canNoSelect: true,
|
|
|
+ canEndNotMax: true,
|
|
|
+ isShowOpponent: false,
|
|
|
+ selectCardCoroutine: null,
|
|
|
+ afterSelectCardCoroutine: AfterSelectCardCoroutine,
|
|
|
+ mode: SelectHandEffect.Mode.Custom,
|
|
|
+ cardEffect: activateClass);
|
|
|
|
|
|
- IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
|
|
|
- {
|
|
|
- if (cardSources.Count == 3)
|
|
|
- {
|
|
|
- cardSources.Reverse();
|
|
|
+ selectHandEffect.SetUpCustomMessage("Select cards to top deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
|
|
|
+ "The opponent is selecting cards to top deck.");
|
|
|
+ selectHandEffect.SetUpCustomMessage_ShowCard("Deck Top Cards");
|
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(
|
|
|
- CardObjectController.AddLibraryTopCards(cardSources));
|
|
|
+ yield return StartCoroutine(selectHandEffect.Activate());
|
|
|
+ }
|
|
|
|
|
|
- if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentSharedCondition))
|
|
|
+ else
|
|
|
{
|
|
|
- SelectPermanentEffect selectPermanentEffect =
|
|
|
- GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
+ SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
|
|
|
- selectPermanentEffect.SetUp(
|
|
|
- selectPlayer: card.Owner,
|
|
|
- canTargetCondition: CanSelectPermanentSharedCondition,
|
|
|
+ selectCardEffect.SetUp(
|
|
|
+ canTargetCondition: CanSelectCardSharedCondition,
|
|
|
canTargetCondition_ByPreSelecetedList: null,
|
|
|
canEndSelectCondition: null,
|
|
|
- maxCount: 1,
|
|
|
- canNoSelect: false,
|
|
|
- canEndNotMax: false,
|
|
|
- selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
- afterSelectPermanentCoroutine: null,
|
|
|
- mode: SelectPermanentEffect.Mode.Custom,
|
|
|
+ canNoSelect: () => true,
|
|
|
+ selectCardCoroutine: null,
|
|
|
+ afterSelectCardCoroutine: AfterSelectCardCoroutine,
|
|
|
+ message:
|
|
|
+ "Select cards to place at the top of the deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
|
|
|
+ maxCount: allowedCount,
|
|
|
+ canEndNotMax: true,
|
|
|
+ isShowOpponent: false,
|
|
|
+ mode: SelectCardEffect.Mode.Custom,
|
|
|
+ root: SelectCardEffect.Root.Trash,
|
|
|
+ customRootCardList: null,
|
|
|
+ canLookReverseCard: true,
|
|
|
+ selectPlayer: card.Owner,
|
|
|
cardEffect: activateClass);
|
|
|
|
|
|
- selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to De-Digivolve.",
|
|
|
- "The opponent is selecting 1 Digimon to De-Digivolve.");
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
+ selectCardEffect.SetUpCustomMessage("Select cards to top deck.",
|
|
|
+ "The opponent is selecting cards to top deck.");
|
|
|
+ selectCardEffect.SetUpCustomMessage_ShowCard("Deck Top Cards");
|
|
|
+
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
+ }
|
|
|
|
|
|
- IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
+ IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
|
|
|
+ {
|
|
|
+ selectedCards.AddRange(cardSources);
|
|
|
+
|
|
|
+ if (selectedCards.Count == 3)
|
|
|
{
|
|
|
+ cardSources.Reverse();
|
|
|
+
|
|
|
yield return ContinuousController.instance.StartCoroutine(
|
|
|
- new IDegeneration(permanent, 1, activateClass).Degeneration());
|
|
|
+ CardObjectController.AddLibraryTopCards(cardSources));
|
|
|
+
|
|
|
+ if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentSharedCondition))
|
|
|
+ {
|
|
|
+ SelectPermanentEffect selectPermanentEffect =
|
|
|
+ GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
+
|
|
|
+ selectPermanentEffect.SetUp(
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ canTargetCondition: CanSelectPermanentSharedCondition,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ maxCount: 1,
|
|
|
+ canNoSelect: false,
|
|
|
+ canEndNotMax: false,
|
|
|
+ selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
+ afterSelectPermanentCoroutine: null,
|
|
|
+ mode: SelectPermanentEffect.Mode.Custom,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to De-Digivolve.",
|
|
|
+ "The opponent is selecting 1 Digimon to De-Digivolve.");
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
+
|
|
|
+ IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
+ {
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(
|
|
|
+ new IDegeneration(permanent, 1, activateClass).Degeneration());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -224,127 +238,141 @@ namespace DCGO.CardEffects.EX7
|
|
|
|
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
{
|
|
|
- bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardSharedCondition) >= 3;
|
|
|
- bool canSelectTrash = card.Owner.TrashCards.Count(CanSelectCardSharedCondition) >= 3;
|
|
|
+ List<CardSource> selectedCards = new List<CardSource>();
|
|
|
+ int maxCount = 3;
|
|
|
|
|
|
- if (canSelectHand || canSelectTrash)
|
|
|
+ int handCount = card.Owner.HandCards.Count(CanSelectCardSharedCondition);
|
|
|
+ int trashCount = card.Owner.TrashCards.Count(CanSelectCardSharedCondition);
|
|
|
+
|
|
|
+ if (handCount + trashCount >= maxCount)
|
|
|
{
|
|
|
- if (canSelectHand && canSelectTrash)
|
|
|
+ while (selectedCards.Count != maxCount)
|
|
|
{
|
|
|
- List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
|
|
|
+ bool canSelectHand = handCount > 1;
|
|
|
+ bool canSelectTrash = trashCount > 1;
|
|
|
+
|
|
|
+ if (canSelectHand || canSelectTrash)
|
|
|
{
|
|
|
- new(message: "From hand", value: true, spriteIndex: 0),
|
|
|
- new(message: "From trash", value: false, spriteIndex: 1),
|
|
|
- };
|
|
|
+ if (canSelectHand && canSelectTrash)
|
|
|
+ {
|
|
|
+ List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
|
|
|
+ {
|
|
|
+ new(message: "From hand", value: true, spriteIndex: 0),
|
|
|
+ new(message: "From trash", value: false, spriteIndex: 1),
|
|
|
+ };
|
|
|
|
|
|
- string selectPlayerMessage = "From which area do you return cards?";
|
|
|
- string notSelectPlayerMessage = "The opponent is choosing from which area to return cards.";
|
|
|
+ string selectPlayerMessage = "From which area do you return cards?";
|
|
|
+ string notSelectPlayerMessage = "The opponent is choosing from which area to return cards.";
|
|
|
|
|
|
- GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements,
|
|
|
- selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
|
|
|
- notSelectPlayerMessage: notSelectPlayerMessage);
|
|
|
- }
|
|
|
+ GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements,
|
|
|
+ selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
|
|
|
+ notSelectPlayerMessage: notSelectPlayerMessage);
|
|
|
+ }
|
|
|
|
|
|
- else
|
|
|
- {
|
|
|
- GManager.instance.userSelectionManager.SetBool(canSelectHand);
|
|
|
- }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ GManager.instance.userSelectionManager.SetBool(canSelectHand);
|
|
|
+ }
|
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager
|
|
|
- .WaitForEndSelect());
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
|
|
|
|
|
|
- bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
|
|
|
+ bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
|
|
|
+ int allowedCount = maxCount - selectedCards.Count;
|
|
|
|
|
|
- if (fromHand)
|
|
|
- {
|
|
|
- SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
|
|
|
-
|
|
|
- selectHandEffect.SetUp(
|
|
|
- selectPlayer: card.Owner,
|
|
|
- canTargetCondition: CanSelectCardSharedCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- maxCount: 3,
|
|
|
- canNoSelect: true,
|
|
|
- canEndNotMax: false,
|
|
|
- isShowOpponent: false,
|
|
|
- selectCardCoroutine: null,
|
|
|
- afterSelectCardCoroutine: AfterSelectCardCoroutine,
|
|
|
- mode: SelectHandEffect.Mode.Custom,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- selectHandEffect.SetUpCustomMessage("Select 3 cards to top deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
|
|
|
- "The opponent is selecting 3 cards to top deck.");
|
|
|
- selectHandEffect.SetUpCustomMessage_ShowCard("Deck Top Cards");
|
|
|
-
|
|
|
- yield return StartCoroutine(selectHandEffect.Activate());
|
|
|
- }
|
|
|
+ if (fromHand)
|
|
|
+ {
|
|
|
+ SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
|
|
|
|
|
|
- else
|
|
|
- {
|
|
|
- SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
-
|
|
|
- selectCardEffect.SetUp(
|
|
|
- canTargetCondition: CanSelectCardSharedCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- canNoSelect: () => true,
|
|
|
- selectCardCoroutine: null,
|
|
|
- afterSelectCardCoroutine: AfterSelectCardCoroutine,
|
|
|
- message:
|
|
|
- "Select cards to place at the top of the deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
|
|
|
- maxCount: 3,
|
|
|
- canEndNotMax: false,
|
|
|
- isShowOpponent: false,
|
|
|
- mode: SelectCardEffect.Mode.Custom,
|
|
|
- root: SelectCardEffect.Root.Trash,
|
|
|
- customRootCardList: null,
|
|
|
- canLookReverseCard: true,
|
|
|
- selectPlayer: card.Owner,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- selectCardEffect.SetUpCustomMessage("Select 3 cards to top deck.",
|
|
|
- "The opponent is selecting 3 cards to top deck.");
|
|
|
- selectCardEffect.SetUpCustomMessage_ShowCard("Deck Top Cards");
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
- }
|
|
|
+ selectHandEffect.SetUp(
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ canTargetCondition: CanSelectCardSharedCondition,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ maxCount: allowedCount,
|
|
|
+ canNoSelect: true,
|
|
|
+ canEndNotMax: true,
|
|
|
+ isShowOpponent: false,
|
|
|
+ selectCardCoroutine: null,
|
|
|
+ afterSelectCardCoroutine: AfterSelectCardCoroutine,
|
|
|
+ mode: SelectHandEffect.Mode.Custom,
|
|
|
+ cardEffect: activateClass);
|
|
|
|
|
|
- IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
|
|
|
- {
|
|
|
- if (cardSources.Count == 3)
|
|
|
- {
|
|
|
- cardSources.Reverse();
|
|
|
+ selectHandEffect.SetUpCustomMessage("Select cards to top deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
|
|
|
+ "The opponent is selecting cards to top deck.");
|
|
|
+ selectHandEffect.SetUpCustomMessage_ShowCard("Deck Top Cards");
|
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(
|
|
|
- CardObjectController.AddLibraryTopCards(cardSources));
|
|
|
+ yield return StartCoroutine(selectHandEffect.Activate());
|
|
|
+ }
|
|
|
|
|
|
- if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentSharedCondition))
|
|
|
+ else
|
|
|
{
|
|
|
- SelectPermanentEffect selectPermanentEffect =
|
|
|
- GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
+ SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
|
|
|
- selectPermanentEffect.SetUp(
|
|
|
- selectPlayer: card.Owner,
|
|
|
- canTargetCondition: CanSelectPermanentSharedCondition,
|
|
|
+ selectCardEffect.SetUp(
|
|
|
+ canTargetCondition: CanSelectCardSharedCondition,
|
|
|
canTargetCondition_ByPreSelecetedList: null,
|
|
|
canEndSelectCondition: null,
|
|
|
- maxCount: 1,
|
|
|
- canNoSelect: false,
|
|
|
- canEndNotMax: false,
|
|
|
- selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
- afterSelectPermanentCoroutine: null,
|
|
|
- mode: SelectPermanentEffect.Mode.Custom,
|
|
|
+ canNoSelect: () => true,
|
|
|
+ selectCardCoroutine: null,
|
|
|
+ afterSelectCardCoroutine: AfterSelectCardCoroutine,
|
|
|
+ message:
|
|
|
+ "Select cards to place at the top of the deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
|
|
|
+ maxCount: allowedCount,
|
|
|
+ canEndNotMax: true,
|
|
|
+ isShowOpponent: false,
|
|
|
+ mode: SelectCardEffect.Mode.Custom,
|
|
|
+ root: SelectCardEffect.Root.Trash,
|
|
|
+ customRootCardList: null,
|
|
|
+ canLookReverseCard: true,
|
|
|
+ selectPlayer: card.Owner,
|
|
|
cardEffect: activateClass);
|
|
|
|
|
|
- selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to De-Digivolve.",
|
|
|
- "The opponent is selecting 1 Digimon to De-Digivolve.");
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
+ selectCardEffect.SetUpCustomMessage("Select cards to top deck.",
|
|
|
+ "The opponent is selecting cards to top deck.");
|
|
|
+ selectCardEffect.SetUpCustomMessage_ShowCard("Deck Top Cards");
|
|
|
+
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
+ }
|
|
|
|
|
|
- IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
+ IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
|
|
|
+ {
|
|
|
+ selectedCards.AddRange(cardSources);
|
|
|
+
|
|
|
+ if (selectedCards.Count == 3)
|
|
|
{
|
|
|
+ cardSources.Reverse();
|
|
|
+
|
|
|
yield return ContinuousController.instance.StartCoroutine(
|
|
|
- new IDegeneration(permanent, 1, activateClass).Degeneration());
|
|
|
+ CardObjectController.AddLibraryTopCards(cardSources));
|
|
|
+
|
|
|
+ if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentSharedCondition))
|
|
|
+ {
|
|
|
+ SelectPermanentEffect selectPermanentEffect =
|
|
|
+ GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
+
|
|
|
+ selectPermanentEffect.SetUp(
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ canTargetCondition: CanSelectPermanentSharedCondition,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ maxCount: 1,
|
|
|
+ canNoSelect: false,
|
|
|
+ canEndNotMax: false,
|
|
|
+ selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
+ afterSelectPermanentCoroutine: null,
|
|
|
+ mode: SelectPermanentEffect.Mode.Custom,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to De-Digivolve.",
|
|
|
+ "The opponent is selecting 1 Digimon to De-Digivolve.");
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
+
|
|
|
+ IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
+ {
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(
|
|
|
+ new IDegeneration(permanent, 1, activateClass).Degeneration());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|