|
|
@@ -114,6 +114,7 @@ namespace DCGO.CardEffects.BT25
|
|
|
player: card.Owner,
|
|
|
hashtable: hashtable,
|
|
|
cardToTrash: selectedCardToTrash,
|
|
|
+ activateClass: activateClass,
|
|
|
successProcess: SuccessProcess,
|
|
|
failureProcess: null
|
|
|
));
|
|
|
@@ -251,96 +252,6 @@ namespace DCGO.CardEffects.BT25
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- bool CanSelectPlayCondition(CardSource cardSource)
|
|
|
- {
|
|
|
- return (cardSource.IsDigimon
|
|
|
- || cardSource.IsTamer)
|
|
|
- && cardSource.HasPlayCost
|
|
|
- && cardSource.EqualsTraits("BEATBREAK")
|
|
|
- && cardSource.GetCostItself <= 4
|
|
|
- && CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass);
|
|
|
- }
|
|
|
-
|
|
|
- bool canSelectHand = CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectPlayCondition);
|
|
|
- bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectPlayCondition);
|
|
|
-
|
|
|
- if (canSelectHand || canSelectTrash)
|
|
|
- {
|
|
|
- #region Setup Location Selection
|
|
|
- List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>();
|
|
|
- if (canSelectHand)
|
|
|
- {
|
|
|
- selectionElements.Add(new(message: $"From hand", value: 1, spriteIndex: 0));
|
|
|
- }
|
|
|
- if (canSelectTrash)
|
|
|
- {
|
|
|
- selectionElements.Add(new(message: $"From trash", value: 2, spriteIndex: 0));
|
|
|
- }
|
|
|
- selectionElements.Add(new(message: $"Do not play", value: 3, spriteIndex: 1));
|
|
|
-
|
|
|
- string selectPlayerMessage = "From which area do you select a card?";
|
|
|
- string notSelectPlayerMessage = "The opponent is choosing from which area to select a card.";
|
|
|
-
|
|
|
- GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
|
|
|
- #endregion
|
|
|
-
|
|
|
- bool doPlay = GManager.instance.userSelectionManager.SelectedIntValue != 3;
|
|
|
- bool fromHand = GManager.instance.userSelectionManager.SelectedIntValue == 1;
|
|
|
-
|
|
|
- if (doPlay)
|
|
|
- {
|
|
|
- #region Hand/Trash Card Selection & Play
|
|
|
- if (fromHand)
|
|
|
- {
|
|
|
- SelectHandEffect selectHandEffect2 = GManager.instance.GetComponent<SelectHandEffect>();
|
|
|
-
|
|
|
- selectHandEffect2.SetUp(
|
|
|
- selectPlayer: card.Owner,
|
|
|
- canTargetCondition: CanSelectPlayCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- maxCount: 1,
|
|
|
- canNoSelect: true,
|
|
|
- canEndNotMax: false,
|
|
|
- isShowOpponent: true,
|
|
|
- selectCardCoroutine: null,
|
|
|
- afterSelectCardCoroutine: null,
|
|
|
- mode: SelectHandEffect.Mode.PlayForFree,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- yield return StartCoroutine(selectHandEffect2.Activate());
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
-
|
|
|
- selectCardEffect.SetUp(
|
|
|
- canTargetCondition: CanSelectPlayCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- canNoSelect: () => true,
|
|
|
- selectCardCoroutine: null,
|
|
|
- afterSelectCardCoroutine: null,
|
|
|
- message: "Select 1 card to play.",
|
|
|
- maxCount: 1,
|
|
|
- canEndNotMax: false,
|
|
|
- isShowOpponent: true,
|
|
|
- mode: SelectCardEffect.Mode.PlayForFree,
|
|
|
- root: SelectCardEffect.Root.Trash,
|
|
|
- customRootCardList: null,
|
|
|
- canLookReverseCard: true,
|
|
|
- selectPlayer: card.Owner,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- yield return StartCoroutine(selectCardEffect.Activate());
|
|
|
- }
|
|
|
- #endregion
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
@@ -432,8 +343,8 @@ namespace DCGO.CardEffects.BT25
|
|
|
canEndNotMax: false,
|
|
|
isShowOpponent: true,
|
|
|
mode: SelectCardEffect.Mode.Custom,
|
|
|
- root: SelectCardEffect.Root.Custom,
|
|
|
- customRootCardList: card.PermanentOfThisCard().LinkedCards,
|
|
|
+ root: SelectCardEffect.Root.LinkedCards,
|
|
|
+ customRootCardList: null,
|
|
|
canLookReverseCard: true,
|
|
|
selectPlayer: card.Owner,
|
|
|
cardEffect: activateClass);
|