|
@@ -1,6 +1,7 @@
|
|
|
using System;
|
|
using System;
|
|
|
using System.Collections;
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
|
|
+using UnityEngine;
|
|
|
using System.Linq;
|
|
using System.Linq;
|
|
|
|
|
|
|
|
namespace DCGO.CardEffects.LM
|
|
namespace DCGO.CardEffects.LM
|
|
@@ -27,7 +28,15 @@ namespace DCGO.CardEffects.LM
|
|
|
|
|
|
|
|
bool PermanentCondition(Permanent permanent)
|
|
bool PermanentCondition(Permanent permanent)
|
|
|
{
|
|
{
|
|
|
- return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card);
|
|
|
|
|
|
|
+ if(CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
|
|
|
|
|
+ {
|
|
|
|
|
+ if (permanent != card.PermanentOfThisCard())
|
|
|
|
|
+ {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool PlayCardCondition(CardSource cardSource)
|
|
bool PlayCardCondition(CardSource cardSource)
|
|
@@ -40,9 +49,11 @@ namespace DCGO.CardEffects.LM
|
|
|
|
|
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
bool DigivolveCardCondition(CardSource cardSource)
|
|
bool DigivolveCardCondition(CardSource cardSource)
|
|
|
{
|
|
{
|
|
|
- if (cardSource.HasText("Angoramon"))
|
|
|
|
|
|
|
+ if (cardSource.IsDigimon)
|
|
|
|
|
+ if (cardSource.HasText("Angoramon"))
|
|
|
return true;
|
|
return true;
|
|
|
|
|
|
|
|
return false;
|
|
return false;
|
|
@@ -50,14 +61,17 @@ namespace DCGO.CardEffects.LM
|
|
|
|
|
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
{
|
|
|
- if(CardEffectCommons.CanTriggerWhenPermanentWouldPlay(hashtable, PlayCardCondition))
|
|
|
|
|
|
|
+ if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
{
|
|
{
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (CardEffectCommons.CanTriggerWhenPermanentWouldPlay(hashtable, PlayCardCondition))
|
|
|
|
|
+ {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- if(CardEffectCommons.CanTriggerWhenPermanentWouldDigivolve(hashtable, PermanentCondition, DigivolveCardCondition))
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
|
|
+ if (CardEffectCommons.CanTriggerWhenPermanentWouldDigivolve(hashtable, PermanentCondition, DigivolveCardCondition))
|
|
|
|
|
+ {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
return false;
|
|
@@ -69,7 +83,10 @@ namespace DCGO.CardEffects.LM
|
|
|
{
|
|
{
|
|
|
if(CardEffectCommons.IsExistOnBattleArea(card))
|
|
if(CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
{
|
|
{
|
|
|
- return true;
|
|
|
|
|
|
|
+ if (CardEffectCommons.CanActivateSuspendCostEffect(card))
|
|
|
|
|
+ {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -78,90 +95,80 @@ namespace DCGO.CardEffects.LM
|
|
|
|
|
|
|
|
IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
{
|
|
{
|
|
|
|
|
+
|
|
|
if(CardEffectCommons.IsExistOnBattleArea(card))
|
|
if(CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
{
|
|
{
|
|
|
- yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(
|
|
|
|
|
|
|
+ if (!card.PermanentOfThisCard().IsSuspended && card.PermanentOfThisCard().CanSuspend)
|
|
|
|
|
+ {
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(
|
|
|
new List<Permanent>() { card.PermanentOfThisCard() },
|
|
new List<Permanent>() { card.PermanentOfThisCard() },
|
|
|
CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
|
|
CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
|
|
|
|
|
|
|
|
- if (card.PermanentOfThisCard().IsSuspended)
|
|
|
|
|
- {
|
|
|
|
|
- ChangeCostClass changeCostClass = new ChangeCostClass();
|
|
|
|
|
- changeCostClass.SetUpICardEffect("Cost -2", CanUseChangeCostCondition, card);
|
|
|
|
|
- changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
|
|
|
|
|
- card.Owner.UntilCalculateFixedCostEffect.Add((_timing) => changeCostClass);
|
|
|
|
|
-
|
|
|
|
|
- bool CanUseChangeCostCondition(Hashtable hashtable)
|
|
|
|
|
|
|
+ if (card.PermanentOfThisCard().IsSuspended)
|
|
|
{
|
|
{
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
|
|
|
|
|
|
|
|
- int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
|
|
|
|
|
- {
|
|
|
|
|
- if (CardSourceCondition(cardSource))
|
|
|
|
|
|
|
+ ChangeCostClass changeCostClass = new ChangeCostClass();
|
|
|
|
|
+ changeCostClass.SetUpICardEffect("Cost -2", CanUseChangeCostCondition, card);
|
|
|
|
|
+ changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
|
|
|
|
|
+ card.Owner.UntilCalculateFixedCostEffect.Add((_timing) => changeCostClass);
|
|
|
|
|
+
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable));
|
|
|
|
|
+
|
|
|
|
|
+ bool CanUseChangeCostCondition(Hashtable hashtable)
|
|
|
{
|
|
{
|
|
|
- if (RootCondition(root))
|
|
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (CardSourceCondition(cardSource))
|
|
|
{
|
|
{
|
|
|
- if (PermanentsCondition(targetPermanents))
|
|
|
|
|
|
|
+ if (RootCondition(root))
|
|
|
{
|
|
{
|
|
|
- Cost -= 2;
|
|
|
|
|
|
|
+ if (PermanentsCondition(targetPermanents))
|
|
|
|
|
+ {
|
|
|
|
|
+ Cost -= 2;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- return Cost;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- bool PermanentsCondition(List<Permanent> targetPermanents)
|
|
|
|
|
- {
|
|
|
|
|
- if (targetPermanents == null)
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
|
|
+ return Cost;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- else
|
|
|
|
|
|
|
+ bool PermanentsCondition(List<Permanent> targetPermanents)
|
|
|
{
|
|
{
|
|
|
- if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
|
|
|
|
|
|
|
+ if (targetPermanents != null)
|
|
|
{
|
|
{
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- bool CardSourceCondition(CardSource cardSource)
|
|
|
|
|
- {
|
|
|
|
|
- if (cardSource != null)
|
|
|
|
|
|
|
+ bool CardSourceCondition(CardSource cardSource)
|
|
|
{
|
|
{
|
|
|
- if (cardSource.Owner == card.Owner)
|
|
|
|
|
|
|
+ if (cardSource != null)
|
|
|
{
|
|
{
|
|
|
- if (cardSource.IsDigimon)
|
|
|
|
|
|
|
+ if (cardSource.Owner == card.Owner)
|
|
|
{
|
|
{
|
|
|
- if (cardSource.HasText("Angoramon"))
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- bool RootCondition(SelectCardEffect.Root root)
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- bool isUpDown()
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable));
|
|
|
|
|
|
|
+ bool RootCondition(SelectCardEffect.Root root)
|
|
|
|
|
+ {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- yield return null;
|
|
|
|
|
|
|
+ bool isUpDown()
|
|
|
|
|
+ {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|