|
|
@@ -68,15 +68,12 @@ namespace DCGO.CardEffects.P
|
|
|
|
|
|
if (timing == EffectTiming.None)
|
|
|
{
|
|
|
- int count()
|
|
|
- {
|
|
|
- return 2 * ((card.Owner.TrashCards.Count + card.Owner.Enemy.TrashCards.Count) / 5);
|
|
|
- }
|
|
|
-
|
|
|
ChangeCostClass changeCostClass = new ChangeCostClass();
|
|
|
changeCostClass.SetUpICardEffect($"Play Cost -", CanUseCondition, card);
|
|
|
- changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => true, isChangePayingCost: () => true);
|
|
|
- changeCostClass.SetNotShowUI(true);
|
|
|
+ changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost,
|
|
|
+ cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: IsUpDown,
|
|
|
+ isCheckAvailability: () => false, isChangePayingCost: () => true);
|
|
|
+
|
|
|
cardEffects.Add(changeCostClass);
|
|
|
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
@@ -85,8 +82,6 @@ namespace DCGO.CardEffects.P
|
|
|
{
|
|
|
if (CardEffectCommons.HasMatchConditionPermanent(PermanentCondition))
|
|
|
{
|
|
|
- changeCostClass.SetEffectName($"Play Cost -{count()}");
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
@@ -94,46 +89,54 @@ namespace DCGO.CardEffects.P
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
|
|
|
+ bool PermanentCondition(Permanent Permanent)
|
|
|
{
|
|
|
- if (CardSourceCondition(cardSource))
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(Permanent))
|
|
|
{
|
|
|
- if (RootCondition(root))
|
|
|
+ if (Permanent.IsDigimon)
|
|
|
{
|
|
|
- if (PermanentsCondition(targetPermanents))
|
|
|
+ if (Permanent.DP >= 13000)
|
|
|
{
|
|
|
- int reducedCount = count();
|
|
|
-
|
|
|
- if (reducedCount >= 1)
|
|
|
- Cost -= reducedCount;
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return Cost;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
- bool PermanentCondition(Permanent Permanent)
|
|
|
+ int count()
|
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(Permanent))
|
|
|
+ return 2 * ((card.Owner.TrashCards.Count + card.Owner.Enemy.TrashCards.Count) / 5);
|
|
|
+ }
|
|
|
+
|
|
|
+ int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root,
|
|
|
+ List<Permanent> targetPermanents)
|
|
|
+ {
|
|
|
+ if (CardSourceCondition(cardSource))
|
|
|
{
|
|
|
- if (Permanent.DP >= 13000)
|
|
|
+ if (RootCondition(root))
|
|
|
{
|
|
|
- return true;
|
|
|
+ if (PermanentsCondition(targetPermanents))
|
|
|
+ {
|
|
|
+ cost -= count();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return false;
|
|
|
+ return cost;
|
|
|
}
|
|
|
|
|
|
bool PermanentsCondition(List<Permanent> targetPermanents)
|
|
|
{
|
|
|
- if (targetPermanents != null)
|
|
|
+ if (targetPermanents == null)
|
|
|
{
|
|
|
- if (targetPermanents.Count(PermanentCondition) > 0)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
@@ -146,10 +149,10 @@ namespace DCGO.CardEffects.P
|
|
|
|
|
|
bool RootCondition(SelectCardEffect.Root root)
|
|
|
{
|
|
|
- return root == SelectCardEffect.Root.Hand;
|
|
|
+ return (root == SelectCardEffect.Root.Hand);
|
|
|
}
|
|
|
|
|
|
- bool isUpDown()
|
|
|
+ bool IsUpDown()
|
|
|
{
|
|
|
return true;
|
|
|
}
|