|
|
@@ -39,14 +39,14 @@ namespace DCGO.CardEffects.BT22
|
|
|
if (timing == EffectTiming.OnDeclaration)
|
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
- activateClass.SetUpICardEffect("Pay 3, Play 1 level 5 or lower [Flame] digimon from trash. then it may attack", CanUseCondition, card);
|
|
|
+ activateClass.SetUpICardEffect("Pay 3, Play 1 level 5 or lower [Flame]/[CS] digimon from trash. then it may attack", CanUseCondition, card);
|
|
|
activateClass.SetUpActivateClass(null, ActivateCoroutine, 1, false, EffectDiscription());
|
|
|
activateClass.SetHashString("BT22_011_Main");
|
|
|
cardEffects.Add(activateClass);
|
|
|
|
|
|
string EffectDiscription()
|
|
|
{
|
|
|
- return "[Main] [Once Per Turn] By paying 3 cost, you may play 1 play cost 5 or lower Digimon card with the [Flame] from your trash without paying the cost. Then, this Digimon may attack.";
|
|
|
+ return "[Main] [Once Per Turn] By paying 3 cost, you may play 1 play cost 5 or lower Digimon card with the [Flame] or [CS] trait from your trash without paying the cost. Then, this Digimon may attack.";
|
|
|
}
|
|
|
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
@@ -57,66 +57,50 @@ namespace DCGO.CardEffects.BT22
|
|
|
bool CanSelectCardCondition(CardSource cardSource)
|
|
|
{
|
|
|
return cardSource.IsDigimon
|
|
|
- && cardSource.HasFlameTraits
|
|
|
- && cardSource.Level <= 5
|
|
|
+ && (cardSource.HasFlameTraits || cardSource.HasCSTraits)
|
|
|
+ && cardSource.HasPlayCost && cardSource.BasePlayCostFromEntity <= 5
|
|
|
&& CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass);
|
|
|
}
|
|
|
|
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
{
|
|
|
- List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
|
|
|
- {
|
|
|
- new SelectionElement<bool>(message: $"Yes", value : true, spriteIndex: 0),
|
|
|
- new SelectionElement<bool>(message: $"No", value : false, spriteIndex: 1),
|
|
|
- };
|
|
|
-
|
|
|
- string selectPlayerMessage = "Pay cost to play level 5 or lower digimon?";
|
|
|
- string notSelectPlayerMessage = "The opponent is choosing to pay cost";
|
|
|
-
|
|
|
- GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
|
|
|
- yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
|
|
|
- bool isPayingCost = GManager.instance.userSelectionManager.SelectedBoolValue;
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(-3, activateClass));
|
|
|
|
|
|
- if (isPayingCost)
|
|
|
+ if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
|
|
|
{
|
|
|
- yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(-3, activateClass));
|
|
|
-
|
|
|
- if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
|
|
|
+ CardSource selectedCard = null;
|
|
|
+ int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectCardCondition));
|
|
|
+
|
|
|
+ SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
+ selectCardEffect.SetUp(
|
|
|
+ canTargetCondition: CanSelectCardCondition,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ canNoSelect: () => true,
|
|
|
+ selectCardCoroutine: SelectCardCoroutine,
|
|
|
+ afterSelectCardCoroutine: null,
|
|
|
+ message: "Select 1 digimon card to play.",
|
|
|
+ maxCount: maxCount,
|
|
|
+ canEndNotMax: false,
|
|
|
+ isShowOpponent: true,
|
|
|
+ mode: SelectCardEffect.Mode.Custom,
|
|
|
+ root: SelectCardEffect.Root.Trash,
|
|
|
+ customRootCardList: null,
|
|
|
+ canLookReverseCard: true,
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ IEnumerator SelectCardCoroutine(CardSource cardSource)
|
|
|
{
|
|
|
- CardSource selectedCard = null;
|
|
|
- int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectCardCondition));
|
|
|
-
|
|
|
- SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
- selectCardEffect.SetUp(
|
|
|
- canTargetCondition: CanSelectCardCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- canNoSelect: () => true,
|
|
|
- selectCardCoroutine: SelectCardCoroutine,
|
|
|
- afterSelectCardCoroutine: null,
|
|
|
- message: "Select 1 digimon card to play.",
|
|
|
- maxCount: maxCount,
|
|
|
- canEndNotMax: false,
|
|
|
- isShowOpponent: true,
|
|
|
- mode: SelectCardEffect.Mode.Custom,
|
|
|
- root: SelectCardEffect.Root.Trash,
|
|
|
- customRootCardList: null,
|
|
|
- canLookReverseCard: true,
|
|
|
- selectPlayer: card.Owner,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- IEnumerator SelectCardCoroutine(CardSource cardSource)
|
|
|
- {
|
|
|
- selectedCard = cardSource;
|
|
|
- yield return null;
|
|
|
- }
|
|
|
-
|
|
|
- selectCardEffect.SetUpCustomMessage("Select 1 digimon card to play.", "The opponent is selecting 1 digimon card to play.");
|
|
|
- selectCardEffect.SetUpCustomMessage_ShowCard("Selected Card");
|
|
|
- yield return StartCoroutine(selectCardEffect.Activate());
|
|
|
-
|
|
|
- if (selectedCard) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: new List<CardSource>() { selectedCard }, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
|
|
|
+ selectedCard = cardSource;
|
|
|
+ yield return null;
|
|
|
}
|
|
|
+
|
|
|
+ selectCardEffect.SetUpCustomMessage("Select 1 digimon card to play.", "The opponent is selecting 1 digimon card to play.");
|
|
|
+ selectCardEffect.SetUpCustomMessage_ShowCard("Selected Card");
|
|
|
+ yield return StartCoroutine(selectCardEffect.Activate());
|
|
|
+
|
|
|
+ if (selectedCard) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: new List<CardSource>() { selectedCard }, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
|
|
|
}
|
|
|
|
|
|
if (card.PermanentOfThisCard().CanAttack(activateClass))
|