|
@@ -232,51 +232,8 @@ namespace DCGO.CardEffects.EX10
|
|
|
|
|
|
|
|
bool CanSelectPurplePermanentCondition(Permanent permanent)
|
|
bool CanSelectPurplePermanentCondition(Permanent permanent)
|
|
|
{
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
|
|
|
|
|
- {
|
|
|
|
|
- if (permanent.TopCard.CardColors.Contains(CardColor.Purple))
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- IEnumerator ActivateBlockerRetalCoroutine(Hashtable _hashtable, ActivateClass activateClass)
|
|
|
|
|
- {
|
|
|
|
|
- if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
|
|
- {
|
|
|
|
|
- if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPurplePermanentCondition))
|
|
|
|
|
- {
|
|
|
|
|
- int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPurplePermanentCondition));
|
|
|
|
|
-
|
|
|
|
|
- SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
|
|
-
|
|
|
|
|
- selectPermanentEffect.SetUp(
|
|
|
|
|
- selectPlayer: card.Owner,
|
|
|
|
|
- canTargetCondition: CanSelectPurplePermanentCondition,
|
|
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
|
|
- canEndSelectCondition: null,
|
|
|
|
|
- maxCount: maxCount,
|
|
|
|
|
- canNoSelect: false,
|
|
|
|
|
- canEndNotMax: false,
|
|
|
|
|
- selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
|
|
- afterSelectPermanentCoroutine: null,
|
|
|
|
|
- mode: SelectPermanentEffect.Mode.Custom,
|
|
|
|
|
- cardEffect: activateClass);
|
|
|
|
|
-
|
|
|
|
|
- selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get Blocker and Retaliation.", "The opponent is selecting 1 Digimon that will get Blocker and Retaliation.");
|
|
|
|
|
-
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
|
|
-
|
|
|
|
|
- IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
|
|
- {
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(targetPermanent: permanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRetaliation(targetPermanent: permanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
|
|
|
|
|
+ && permanent.TopCard.CardColors.Contains(CardColor.Purple);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
@@ -287,7 +244,7 @@ namespace DCGO.CardEffects.EX10
|
|
|
{
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
activateClass.SetUpICardEffect("Your 1 Digimon gains Retaliation and Blocker", CanUseCondition, card);
|
|
activateClass.SetUpICardEffect("Your 1 Digimon gains Retaliation and Blocker", CanUseCondition, card);
|
|
|
- activateClass.SetUpActivateClass(CanActivateCondition, hashtable => ActivateBlockerRetalCoroutine(hashtable, activateClass), -1, false, EffectDiscription());
|
|
|
|
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
|
|
|
cardEffects.Add(activateClass);
|
|
cardEffects.Add(activateClass);
|
|
|
|
|
|
|
|
string EffectDiscription()
|
|
string EffectDiscription()
|
|
@@ -312,17 +269,53 @@ namespace DCGO.CardEffects.EX10
|
|
|
|
|
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
|
|
+ {
|
|
|
|
|
+ if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPurplePermanentCondition))
|
|
|
|
|
+ {
|
|
|
|
|
+ int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPurplePermanentCondition));
|
|
|
|
|
+
|
|
|
|
|
+ SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
|
|
+
|
|
|
|
|
+ selectPermanentEffect.SetUp(
|
|
|
|
|
+ selectPlayer: card.Owner,
|
|
|
|
|
+ canTargetCondition: CanSelectPurplePermanentCondition,
|
|
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
|
|
+ canEndSelectCondition: null,
|
|
|
|
|
+ maxCount: maxCount,
|
|
|
|
|
+ canNoSelect: false,
|
|
|
|
|
+ canEndNotMax: false,
|
|
|
|
|
+ selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
|
|
+ afterSelectPermanentCoroutine: null,
|
|
|
|
|
+ mode: SelectPermanentEffect.Mode.Custom,
|
|
|
|
|
+ cardEffect: activateClass);
|
|
|
|
|
+
|
|
|
|
|
+ selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get Blocker and Retaliation.", "The opponent is selecting 1 Digimon that will get Blocker and Retaliation.");
|
|
|
|
|
+
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
|
|
+
|
|
|
|
|
+ IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
|
|
+ {
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(targetPermanent: permanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRetaliation(targetPermanent: permanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
- #region On Deletion non-inherit
|
|
|
|
|
|
|
+ #region On Deletion
|
|
|
|
|
|
|
|
if (timing == EffectTiming.OnDestroyedAnyone)
|
|
if (timing == EffectTiming.OnDestroyedAnyone)
|
|
|
{
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
activateClass.SetUpICardEffect("Your 1 Digimon gains Retaliation and Blocker", CanUseCondition, card);
|
|
activateClass.SetUpICardEffect("Your 1 Digimon gains Retaliation and Blocker", CanUseCondition, card);
|
|
|
- activateClass.SetUpActivateClass(CanActivateCondition, hashtable => ActivateBlockerRetalCoroutine(hashtable, activateClass), -1, true, EffectDiscription());
|
|
|
|
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
|
|
|
cardEffects.Add(activateClass);
|
|
cardEffects.Add(activateClass);
|
|
|
|
|
|
|
|
string EffectDiscription()
|
|
string EffectDiscription()
|
|
@@ -347,11 +340,44 @@ namespace DCGO.CardEffects.EX10
|
|
|
|
|
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPurplePermanentCondition))
|
|
|
|
|
+ {
|
|
|
|
|
+ int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPurplePermanentCondition));
|
|
|
|
|
+
|
|
|
|
|
+ SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
|
|
+
|
|
|
|
|
+ selectPermanentEffect.SetUp(
|
|
|
|
|
+ selectPlayer: card.Owner,
|
|
|
|
|
+ canTargetCondition: CanSelectPurplePermanentCondition,
|
|
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
|
|
+ canEndSelectCondition: null,
|
|
|
|
|
+ maxCount: maxCount,
|
|
|
|
|
+ canNoSelect: false,
|
|
|
|
|
+ canEndNotMax: false,
|
|
|
|
|
+ selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
|
|
+ afterSelectPermanentCoroutine: null,
|
|
|
|
|
+ mode: SelectPermanentEffect.Mode.Custom,
|
|
|
|
|
+ cardEffect: activateClass);
|
|
|
|
|
+
|
|
|
|
|
+ selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get Blocker and Retaliation.", "The opponent is selecting 1 Digimon that will get Blocker and Retaliation.");
|
|
|
|
|
+
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
|
|
+
|
|
|
|
|
+ IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
|
|
+ {
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(targetPermanent: permanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRetaliation(targetPermanent: permanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
- #region On Deletion inherit
|
|
|
|
|
|
|
+ #region ESS - On Deletion
|
|
|
|
|
|
|
|
if (timing == EffectTiming.OnDestroyedAnyone)
|
|
if (timing == EffectTiming.OnDestroyedAnyone)
|
|
|
{
|
|
{
|