|
|
@@ -26,7 +26,7 @@ namespace DCGO.CardEffects.BT23
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
- bool CanSelectReductionCardCondition(CardSource cardSource)
|
|
|
+ bool CanSelectReturnCardCondition(CardSource cardSource)
|
|
|
{
|
|
|
return cardSource.ContainsCardName("Huckmon") &&
|
|
|
cardSource.ContainsCardName("Sistermon") &&
|
|
|
@@ -38,9 +38,9 @@ namespace DCGO.CardEffects.BT23
|
|
|
if (timing == EffectTiming.BeforePayCost)
|
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
- activateClass.SetUpICardEffect("Return 3 cards with [Huckmon], [Sistermon] or [Jesmon] in their names to get Play Cost -6", CanUseCondition, card);
|
|
|
+ activateClass.SetUpICardEffect("Return 3 cards with [Huckmon], [Sistermon] or [Jesmon] in their names to get Play Cost -5", CanUseCondition, card);
|
|
|
activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
|
|
|
- activateClass.SetHashString("PlayCost-5_BT23-057");
|
|
|
+ activateClass.SetHashString("PlayCost-5_BT12_057");
|
|
|
cardEffects.Add(activateClass);
|
|
|
|
|
|
string EffectDiscription()
|
|
|
@@ -50,10 +50,29 @@ namespace DCGO.CardEffects.BT23
|
|
|
|
|
|
bool CardCondition(CardSource cardSource)
|
|
|
{
|
|
|
- return cardSource == card;
|
|
|
+ if (cardSource == card)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsExistOnHand(cardSource))
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
- bool CanNoSelect(CardSource cardSource) => CardEffectCommons.UniversalRootCanNoSelectCondition(cardSource);
|
|
|
+ bool CanNoSelect(CardSource cardSource)
|
|
|
+ {
|
|
|
+ if (cardSource != null)
|
|
|
+ {
|
|
|
+ if (cardSource.PayingCost(SelectCardEffect.Root.Hand, null, checkAvailability: false) > cardSource.Owner.MaxMemoryCost)
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
|
@@ -62,14 +81,22 @@ namespace DCGO.CardEffects.BT23
|
|
|
|
|
|
bool CanActivateCondition(Hashtable hashtable)
|
|
|
{
|
|
|
- return CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReductionCardCondition) >= 3;
|
|
|
+ if (CardEffectCommons.IsExistOnHand(card))
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReturnCardCondition) >= 3)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
{
|
|
|
List<CardSource> selectedCards = new List<CardSource>();
|
|
|
|
|
|
- if (CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReductionCardCondition) >= 3)
|
|
|
+ if (CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReturnCardCondition) >= 3)
|
|
|
{
|
|
|
bool noSelect = CanNoSelect(CardEffectCommons.GetCardFromHashtable(_hashtable));
|
|
|
|
|
|
@@ -78,13 +105,13 @@ namespace DCGO.CardEffects.BT23
|
|
|
SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
|
|
|
selectCardEffect.SetUp(
|
|
|
- canTargetCondition: CanSelectReductionCardCondition,
|
|
|
+ canTargetCondition: CanSelectReturnCardCondition,
|
|
|
canTargetCondition_ByPreSelecetedList: null,
|
|
|
canEndSelectCondition: null,
|
|
|
canNoSelect: () => noSelect,
|
|
|
selectCardCoroutine: SelectCardCoroutine,
|
|
|
afterSelectCardCoroutine: null,
|
|
|
- message: "Select cards to add to your deck\n(cards will be placed back to your deck so that cards with lower numbers are on top).",
|
|
|
+ message: "Select cards to add to the top your deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
|
|
|
maxCount: maxCount,
|
|
|
canEndNotMax: false,
|
|
|
isShowOpponent: true,
|
|
|
@@ -106,98 +133,79 @@ namespace DCGO.CardEffects.BT23
|
|
|
if (selectedCards.Count == 3)
|
|
|
{
|
|
|
selectedCards.Reverse();
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryTopCards(selectedCards));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ if (card.Owner.CanReduceCost(null, card))
|
|
|
+ {
|
|
|
+ ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
|
|
|
+ }
|
|
|
|
|
|
- List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
|
|
|
- {
|
|
|
- new SelectionElement<bool>(message: $"Top of deck", value : true, spriteIndex: 0),
|
|
|
- new SelectionElement<bool>(message: $"Bottom of deck", value : false, spriteIndex: 1),
|
|
|
- };
|
|
|
-
|
|
|
- string selectPlayerMessage = "Return cards to top or bottom of deck?";
|
|
|
- string notSelectPlayerMessage = "The opponent is choosing to return cards to top or bottom of deck.";
|
|
|
-
|
|
|
- GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
|
|
|
- yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
|
|
|
-
|
|
|
- bool topOfDeck = GManager.instance.userSelectionManager.SelectedBoolValue;
|
|
|
- if (topOfDeck)
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryTopCards(selectedCards));
|
|
|
- else
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(selectedCards));
|
|
|
-
|
|
|
- if (card.Owner.CanReduceCost(null, card))
|
|
|
- {
|
|
|
- ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
|
|
|
- }
|
|
|
-
|
|
|
- ChangeCostClass changeCostClass = new ChangeCostClass();
|
|
|
- changeCostClass.SetUpICardEffect("Play Cost -1", CanUseCondition1, card);
|
|
|
- changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
|
|
|
- card.Owner.UntilCalculateFixedCostEffect.Add((_timing) => changeCostClass);
|
|
|
+ ChangeCostClass changeCostClass = new ChangeCostClass();
|
|
|
+ changeCostClass.SetUpICardEffect("Play Cost -1", CanUseCondition1, card);
|
|
|
+ changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
|
|
|
+ card.Owner.UntilCalculateFixedCostEffect.Add((_timing) => changeCostClass);
|
|
|
|
|
|
- bool CanUseCondition1(Hashtable hashtable)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ bool CanUseCondition1(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
|
|
|
- int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
|
|
|
+ int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
|
|
|
+ {
|
|
|
+ if (CardSourceCondition(cardSource))
|
|
|
+ {
|
|
|
+ if (RootCondition(root))
|
|
|
{
|
|
|
- if (CardSourceCondition(cardSource))
|
|
|
+ if (PermanentsCondition(targetPermanents))
|
|
|
{
|
|
|
- if (RootCondition(root))
|
|
|
- {
|
|
|
- if (PermanentsCondition(targetPermanents))
|
|
|
- {
|
|
|
- int targetCost = 0;
|
|
|
-
|
|
|
- if (selectedCards.Count >= 3)
|
|
|
- targetCost += 5;
|
|
|
-
|
|
|
- Cost -= targetCost;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ int targetCost = 0;
|
|
|
|
|
|
- return Cost;
|
|
|
- }
|
|
|
+ if (selectedCards.Count >= 3)
|
|
|
+ targetCost += 5;
|
|
|
|
|
|
- bool PermanentsCondition(List<Permanent> targetPermanents)
|
|
|
- {
|
|
|
- if (targetPermanents == null)
|
|
|
- {
|
|
|
- return true;
|
|
|
+ Cost -= targetCost;
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return false;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- bool CardSourceCondition(CardSource cardSource)
|
|
|
- {
|
|
|
- return cardSource == card;
|
|
|
- }
|
|
|
+ return Cost;
|
|
|
+ }
|
|
|
|
|
|
- bool RootCondition(SelectCardEffect.Root root)
|
|
|
+ bool PermanentsCondition(List<Permanent> targetPermanents)
|
|
|
+ {
|
|
|
+ if (targetPermanents == null)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- bool isUpDown()
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable));
|
|
|
- }
|
|
|
+ bool CardSourceCondition(CardSource cardSource)
|
|
|
+ {
|
|
|
+ return cardSource == card;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool RootCondition(SelectCardEffect.Root root)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool isUpDown()
|
|
|
+ {
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -217,11 +225,11 @@ namespace DCGO.CardEffects.BT23
|
|
|
{
|
|
|
if (card.Owner.HandCards.Contains(card))
|
|
|
{
|
|
|
- ICardEffect activateClass = card.EffectList(EffectTiming.BeforePayCost).Find(cardEffect => cardEffect.EffectName == "Return 3 cards with [Huckmon], [Sistermon] or [Jesmon] in their names to get Play Cost -5");
|
|
|
+ ICardEffect activateClass = card.EffectList(EffectTiming.BeforePayCost).Find(cardEffect => cardEffect.EffectName == "Return 6 [D-Brigade] to get Play Cost -6");
|
|
|
|
|
|
if (activateClass != null)
|
|
|
{
|
|
|
- if (CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReductionCardCondition) >= 3)
|
|
|
+ if (CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReturnCardCondition) >= 3)
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
@@ -239,7 +247,7 @@ namespace DCGO.CardEffects.BT23
|
|
|
{
|
|
|
if (PermanentsCondition(targetPermanents))
|
|
|
{
|
|
|
- int trashCount = CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReductionCardCondition);
|
|
|
+ int trashCount = CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReturnCardCondition);
|
|
|
int targetCount = 0;
|
|
|
|
|
|
if (trashCount >= 3)
|