|
|
@@ -97,67 +97,67 @@ namespace DCGO.CardEffects.LM
|
|
|
selectedCards.Add(cardSource);
|
|
|
yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- #region Then, Delete 1 of your opponent's Digimon with 8000 DP or less.
|
|
|
- int MaxDP()
|
|
|
- {
|
|
|
- int DP = 8000;
|
|
|
+ #region Then, Delete 1 of your opponent's Digimon with 8000 DP or less.
|
|
|
+ int MaxDP()
|
|
|
+ {
|
|
|
+ int DP = 8000;
|
|
|
|
|
|
- List<CardColor> cardColors = new List<CardColor>();
|
|
|
+ List<CardColor> cardColors = new List<CardColor>();
|
|
|
|
|
|
- foreach (CardSource source in card.PermanentOfThisCard().cardSources)
|
|
|
+ foreach (CardSource source in card.PermanentOfThisCard().cardSources)
|
|
|
+ {
|
|
|
+ foreach (CardColor cardColor in source.CardColors)
|
|
|
{
|
|
|
- foreach (CardColor cardColor in source.CardColors)
|
|
|
- {
|
|
|
- if (!cardColors.Contains(cardColor))
|
|
|
- cardColors.Add(cardColor);
|
|
|
- }
|
|
|
+ if (!cardColors.Contains(cardColor))
|
|
|
+ cardColors.Add(cardColor);
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- cardColors = cardColors.Distinct().ToList();
|
|
|
+ cardColors = cardColors.Distinct().ToList();
|
|
|
|
|
|
- DP += cardColors.Count * 1000;
|
|
|
+ DP += cardColors.Count * 1000;
|
|
|
|
|
|
- return DP;
|
|
|
- }
|
|
|
+ return DP;
|
|
|
+ }
|
|
|
|
|
|
- bool CanSelectPermanentCondition(Permanent permanent)
|
|
|
+ bool CanSelectPermanentCondition(Permanent permanent)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
+ if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(MaxDP(), activateClass))
|
|
|
{
|
|
|
- if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(MaxDP(), activateClass))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return true;
|
|
|
}
|
|
|
-
|
|
|
- return false;
|
|
|
}
|
|
|
|
|
|
- if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
|
|
|
- {
|
|
|
- int maxDeleteCount = System.Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
|
|
|
-
|
|
|
- SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
-
|
|
|
- selectPermanentEffect.SetUp(
|
|
|
- selectPlayer: card.Owner,
|
|
|
- canTargetCondition: CanSelectPermanentCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- maxCount: maxDeleteCount,
|
|
|
- canNoSelect: false,
|
|
|
- canEndNotMax: false,
|
|
|
- selectPermanentCoroutine: null,
|
|
|
- afterSelectPermanentCoroutine: null,
|
|
|
- mode: SelectPermanentEffect.Mode.Destroy,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
- }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
|
|
|
+ {
|
|
|
+ int maxDeleteCount = System.Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
|
|
|
+
|
|
|
+ SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
|
|
|
- #endregion
|
|
|
+ selectPermanentEffect.SetUp(
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ canTargetCondition: CanSelectPermanentCondition,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ maxCount: maxDeleteCount,
|
|
|
+ canNoSelect: false,
|
|
|
+ canEndNotMax: false,
|
|
|
+ selectPermanentCoroutine: null,
|
|
|
+ afterSelectPermanentCoroutine: null,
|
|
|
+ mode: SelectPermanentEffect.Mode.Destroy,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
}
|
|
|
+
|
|
|
+ #endregion
|
|
|
}
|
|
|
}
|
|
|
|