|
|
@@ -750,8 +750,8 @@ public partial class CardEffectCommons
|
|
|
int ignoreDigivolutionRequirementFixedCost,
|
|
|
ICardEffect activateClass,
|
|
|
IEnumerator successProcess,
|
|
|
- bool ignoreLevel = false,
|
|
|
- bool ignoreSelection = false)
|
|
|
+ bool ignoreSelection = false,
|
|
|
+ IgnoreRequirement ignoreRequirements = IgnoreRequirement.None)
|
|
|
{
|
|
|
if (targetPermanent == null) yield break;
|
|
|
if (targetPermanent.TopCard == null) yield break;
|
|
|
@@ -760,7 +760,7 @@ public partial class CardEffectCommons
|
|
|
|
|
|
Player owner = targetPermanent.TopCard.Owner;
|
|
|
SelectCardEffect.Root root = SelectCardEffect.Root.Execution;
|
|
|
- bool ignoreDigivolutionRequirement = ignoreDigivolutionRequirementFixedCost >= 0;
|
|
|
+ bool ignoreDigivolutionRequirement = !ignoreRequirements.Equals(IgnoreRequirement.None) || ignoreDigivolutionRequirementFixedCost >= 0;// ignoreDigivolutionRequirementFixedCost >= 0 || ignoreRequirements;
|
|
|
|
|
|
int fixedCost = -1;
|
|
|
|
|
|
@@ -773,7 +773,6 @@ public partial class CardEffectCommons
|
|
|
{
|
|
|
fixedCost = ignoreDigivolutionRequirementFixedCost;
|
|
|
}
|
|
|
-
|
|
|
bool CanSelectCardCondition(CardSource cardSource)
|
|
|
{
|
|
|
if (cardSource.IsDigimon)
|
|
|
@@ -782,13 +781,13 @@ public partial class CardEffectCommons
|
|
|
{
|
|
|
if (!cardSource.CanNotEvolve(targetPermanent))
|
|
|
{
|
|
|
- if (ignoreLevel
|
|
|
- || cardSource.CanPlayCardTargetFrame(
|
|
|
+ if (cardSource.CanPlayCardTargetFrame(
|
|
|
frame: targetPermanent.PermanentFrame,
|
|
|
PayCost: payCost,
|
|
|
cardEffect: activateClass,
|
|
|
root: root,
|
|
|
- fixedCost: fixedCost))
|
|
|
+ fixedCost: fixedCost,
|
|
|
+ ignore: ignoreRequirements))
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
@@ -939,7 +938,6 @@ public partial class CardEffectCommons
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
-
|
|
|
List<CardSource> selectedCards = new List<CardSource>();
|
|
|
|
|
|
IEnumerator SelectCardCoroutine(CardSource cardSource)
|
|
|
@@ -949,40 +947,39 @@ public partial class CardEffectCommons
|
|
|
yield return null;
|
|
|
}
|
|
|
|
|
|
- if (owner.ExecutingCards.Count(CanSelectCardCondition) >= 1)
|
|
|
- {
|
|
|
- int maxCount = 1;
|
|
|
-
|
|
|
- SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
-
|
|
|
- selectCardEffect.SetUp(
|
|
|
- canTargetCondition: CanSelectCardCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- canNoSelect: () => true,
|
|
|
- selectCardCoroutine: SelectCardCoroutine,
|
|
|
- afterSelectCardCoroutine: null,
|
|
|
- message: "Select 1 card to digivolve.",
|
|
|
- maxCount: maxCount,
|
|
|
- canEndNotMax: false,
|
|
|
- isShowOpponent: true,
|
|
|
- mode: SelectCardEffect.Mode.Custom,
|
|
|
- root: SelectCardEffect.Root.Execution,
|
|
|
- customRootCardList: null,
|
|
|
- canLookReverseCard: true,
|
|
|
- selectPlayer: owner,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- selectCardEffect.SetUpCustomMessage("Select 1 card to digivolve.", "The opponent is selecting 1 card to digivolve.");
|
|
|
- selectCardEffect.SetUpCustomMessage_ShowCard("Selected Card");
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- selectedCards.Add(activateClass.EffectSourceCard);
|
|
|
- }
|
|
|
-
|
|
|
+ if (owner.ExecutingCards.Count(CanSelectCardCondition) > 1)
|
|
|
+ {
|
|
|
+ int maxCount = 1;
|
|
|
+
|
|
|
+ SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
+
|
|
|
+ selectCardEffect.SetUp(
|
|
|
+ canTargetCondition: CanSelectCardCondition,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ canNoSelect: () => true,
|
|
|
+ selectCardCoroutine: SelectCardCoroutine,
|
|
|
+ afterSelectCardCoroutine: null,
|
|
|
+ message: "Select 1 card to digivolve.",
|
|
|
+ maxCount: maxCount,
|
|
|
+ canEndNotMax: false,
|
|
|
+ isShowOpponent: true,
|
|
|
+ mode: SelectCardEffect.Mode.Custom,
|
|
|
+ root: SelectCardEffect.Root.Execution,
|
|
|
+ customRootCardList: null,
|
|
|
+ canLookReverseCard: true,
|
|
|
+ selectPlayer: owner,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ selectCardEffect.SetUpCustomMessage("Select 1 card to digivolve.", "The opponent is selecting 1 card to digivolve.");
|
|
|
+ selectCardEffect.SetUpCustomMessage_ShowCard("Selected Card");
|
|
|
+
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ selectedCards.Add(activateClass.EffectSourceCard);
|
|
|
+ }
|
|
|
|
|
|
PlayCardClass playCardClass = new PlayCardClass(
|
|
|
cardSources: selectedCards,
|
|
|
@@ -993,7 +990,8 @@ public partial class CardEffectCommons
|
|
|
root: root,
|
|
|
activateETB: true);
|
|
|
|
|
|
- if (ignoreLevel) playCardClass.SetIgnoreLevel();
|
|
|
+ playCardClass.SetIgnoreRequirements(ignoreRequirements);
|
|
|
+
|
|
|
if (!ignoreDigivolutionRequirement && fixedCost >= 0) playCardClass.SetFixedCost(fixedCost);
|
|
|
|
|
|
yield return ContinuousController.instance.StartCoroutine(playCardClass.PlayCard());
|