|
@@ -295,6 +295,8 @@ public class Mustymon_ST10_06 : CEntity_Effect
|
|
|
|
|
|
|
|
if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
{
|
|
{
|
|
|
|
|
+ int maxLevel = -1;
|
|
|
|
|
+
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
activateClass.SetUpICardEffect("Delete 1 Digimon", CanUseCondition, card);
|
|
activateClass.SetUpICardEffect("Delete 1 Digimon", CanUseCondition, card);
|
|
|
activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
|
|
activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
|
|
@@ -318,13 +320,13 @@ public class Mustymon_ST10_06 : CEntity_Effect
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- bool CanUseCondition(Hashtable hashtable)
|
|
|
|
|
|
|
+ bool CanSelectPermanentCondition(Permanent permanent)
|
|
|
{
|
|
{
|
|
|
- if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
|
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
{
|
|
{
|
|
|
- if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
|
|
|
|
|
|
|
+ if (permanent.TopCard.HasLevel)
|
|
|
{
|
|
{
|
|
|
- if (CardEffectCommons.IsByEffect(hashtable, null))
|
|
|
|
|
|
|
+ if (permanent.Level <= maxLevel)
|
|
|
{
|
|
{
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
@@ -334,110 +336,71 @@ public class Mustymon_ST10_06 : CEntity_Effect
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- bool CanActivateCondition(Hashtable hashtable)
|
|
|
|
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
{
|
|
|
if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
{
|
|
{
|
|
|
- List<Permanent> permanents = CardEffectCommons.GetPlayedPermanentsFromEnterFieldHashtable(
|
|
|
|
|
- hashtable: hashtable,
|
|
|
|
|
- rootCondition: null);
|
|
|
|
|
-
|
|
|
|
|
- int maxLevel = -1;
|
|
|
|
|
-
|
|
|
|
|
- if (permanents != null)
|
|
|
|
|
|
|
+ if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
|
|
|
{
|
|
{
|
|
|
- List<int> levels = permanents
|
|
|
|
|
- .Filter(permanent => permanent != null && permanent.LevelJustAfterPlayed >= 0)
|
|
|
|
|
- .Map(permanent => permanent.LevelJustAfterPlayed);
|
|
|
|
|
-
|
|
|
|
|
- if (levels.Count >= 1)
|
|
|
|
|
|
|
+ if (CardEffectCommons.IsByEffect(hashtable, null))
|
|
|
{
|
|
{
|
|
|
- maxLevel = levels.Max();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ List<Permanent> permanents = CardEffectCommons.GetPlayedPermanentsFromEnterFieldHashtable(
|
|
|
|
|
+ hashtable: hashtable,
|
|
|
|
|
+ rootCondition: null);
|
|
|
|
|
|
|
|
- bool CanSelectPermanentCondition(Permanent permanent)
|
|
|
|
|
- {
|
|
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
|
|
- {
|
|
|
|
|
- if (permanent.TopCard.HasLevel)
|
|
|
|
|
|
|
+ if (permanents != null)
|
|
|
{
|
|
{
|
|
|
- if (permanent.Level <= maxLevel)
|
|
|
|
|
|
|
+ List<int> levels = permanents
|
|
|
|
|
+ .Filter(permanent => permanent != null && permanent.LevelJustAfterPlayed >= 0)
|
|
|
|
|
+ .Map(permanent => permanent.LevelJustAfterPlayed);
|
|
|
|
|
+
|
|
|
|
|
+ if (levels.Count >= 1)
|
|
|
{
|
|
{
|
|
|
- return true;
|
|
|
|
|
|
|
+ maxLevel = levels.Max();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
|
|
|
|
+ bool CanActivateCondition(Hashtable hashtable)
|
|
|
{
|
|
{
|
|
|
- int maxLevel = -1;
|
|
|
|
|
-
|
|
|
|
|
- List<Permanent> permanents = CardEffectCommons.GetPlayedPermanentsFromEnterFieldHashtable(
|
|
|
|
|
- hashtable: _hashtable,
|
|
|
|
|
- rootCondition: null);
|
|
|
|
|
-
|
|
|
|
|
- if (permanents != null)
|
|
|
|
|
|
|
+ if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
{
|
|
{
|
|
|
- List<int> levels = permanents
|
|
|
|
|
- .Filter(permanent => permanent != null && permanent.LevelJustAfterPlayed >= 0)
|
|
|
|
|
- .Map(permanent => permanent.LevelJustAfterPlayed);
|
|
|
|
|
-
|
|
|
|
|
- if (levels.Count >= 1)
|
|
|
|
|
|
|
+ if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
|
|
|
{
|
|
{
|
|
|
- maxLevel = levels.Max();
|
|
|
|
|
|
|
+ return true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- bool CanSelectPermanentCondition(Permanent permanent)
|
|
|
|
|
- {
|
|
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
|
|
- {
|
|
|
|
|
- if (permanent.TopCard.HasLevel)
|
|
|
|
|
- {
|
|
|
|
|
- if (permanent.Level <= maxLevel)
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
|
|
|
|
|
- {
|
|
|
|
|
- int maxCount = 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: maxCount,
|
|
|
|
|
- canNoSelect: false,
|
|
|
|
|
- canEndNotMax: false,
|
|
|
|
|
- selectPermanentCoroutine: null,
|
|
|
|
|
- afterSelectPermanentCoroutine: null,
|
|
|
|
|
- mode: SelectPermanentEffect.Mode.Destroy,
|
|
|
|
|
- cardEffect: activateClass);
|
|
|
|
|
-
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
|
|
+ {
|
|
|
|
|
+ int maxCount = 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: maxCount,
|
|
|
|
|
+ canNoSelect: false,
|
|
|
|
|
+ canEndNotMax: false,
|
|
|
|
|
+ selectPermanentCoroutine: null,
|
|
|
|
|
+ afterSelectPermanentCoroutine: null,
|
|
|
|
|
+ mode: SelectPermanentEffect.Mode.Destroy,
|
|
|
|
|
+ cardEffect: activateClass);
|
|
|
|
|
+
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|