|
|
@@ -12,7 +12,7 @@ namespace DCGO.CardEffects.EX6
|
|
|
List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
|
|
|
#region DigiXros
|
|
|
-
|
|
|
+
|
|
|
if (timing == EffectTiming.None)
|
|
|
{
|
|
|
AddDigiXrosConditionClass addDigiXrosConditionClass = new AddDigiXrosConditionClass();
|
|
|
@@ -20,19 +20,19 @@ namespace DCGO.CardEffects.EX6
|
|
|
addDigiXrosConditionClass.SetUpAddDigiXrosConditionClass(getDigiXrosCondition: GetDigiXros);
|
|
|
addDigiXrosConditionClass.SetNotShowUI(true);
|
|
|
cardEffects.Add(addDigiXrosConditionClass);
|
|
|
-
|
|
|
+
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
DigiXrosCondition GetDigiXros(CardSource cardSource)
|
|
|
{
|
|
|
if (cardSource == card)
|
|
|
{
|
|
|
DigiXrosConditionElement element = new DigiXrosConditionElement(CanSelectCardCondition,
|
|
|
"[Gokuumon] or [Sagomon] or [Cho-Hakkaimon]");
|
|
|
-
|
|
|
+
|
|
|
bool CanSelectCardCondition(CardSource xrosCardSource)
|
|
|
{
|
|
|
if (xrosCardSource != null)
|
|
|
@@ -50,31 +50,31 @@ namespace DCGO.CardEffects.EX6
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
List<DigiXrosConditionElement> elements = new List<DigiXrosConditionElement>() { element };
|
|
|
-
|
|
|
+
|
|
|
DigiXrosCondition digiXrosCondition = new DigiXrosCondition(elements, null, 2);
|
|
|
-
|
|
|
+
|
|
|
return digiXrosCondition;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#endregion
|
|
|
-
|
|
|
+
|
|
|
#region On Play/ When Attacking/ ESS Shared
|
|
|
-
|
|
|
+
|
|
|
string EffectSharedDescription()
|
|
|
{
|
|
|
return
|
|
|
"[On Play] [When Attacking] [Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, reveal the top 4 cards of your deck. Add 1 of each [Gokuumon], [Sagomon], [Cho-Hakkaimon] and [Shakamon] among them to the hand. Return the rest to the bottom of the deck.";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
bool CanSelectSecMinusPermanentSharedCondition(Permanent permanent)
|
|
|
{
|
|
|
if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
|
|
|
@@ -84,30 +84,30 @@ namespace DCGO.CardEffects.EX6
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#endregion
|
|
|
-
|
|
|
+
|
|
|
#region On Play
|
|
|
-
|
|
|
+
|
|
|
if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
activateClass.SetUpICardEffect(
|
|
|
- "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, reveal the top 4 cards of your deck. Add 1 of each [Gokuumon], [Sagomon], [Cho-Hakkaimon] and [Shakamon] among them to the hand. Return the rest to the bottom of the deck.",
|
|
|
+ "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, reveal the top 4 cards of your deck. Add 1 [Gokuumon], 1 [Sagomon], 1 [Cho-Hakkaimon] and 1 [Shakamon] among them to the hand. Return the rest to the bottom of the deck.",
|
|
|
CanUseCondition, card);
|
|
|
activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
|
|
|
EffectSharedDescription());
|
|
|
activateClass.SetHashString("SecurityAttack-1Search_EX6-025");
|
|
|
cardEffects.Add(activateClass);
|
|
|
-
|
|
|
+
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
|
return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
bool CanActivateCondition(Hashtable hashtable)
|
|
|
{
|
|
|
if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
@@ -116,7 +116,7 @@ namespace DCGO.CardEffects.EX6
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
|
|
|
{
|
|
|
if (card.Owner.LibraryCards.Count >= 1)
|
|
|
@@ -125,20 +125,20 @@ namespace DCGO.CardEffects.EX6
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
{
|
|
|
if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
|
|
|
{
|
|
|
int maxCount = Math.Min(1,
|
|
|
CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
|
|
|
-
|
|
|
+
|
|
|
SelectPermanentEffect selectPermanentEffect =
|
|
|
GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
-
|
|
|
+
|
|
|
selectPermanentEffect.SetUp(
|
|
|
selectPlayer: card.Owner,
|
|
|
canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
|
|
|
@@ -151,12 +151,12 @@ namespace DCGO.CardEffects.EX6
|
|
|
afterSelectPermanentCoroutine: null,
|
|
|
mode: SelectPermanentEffect.Mode.Custom,
|
|
|
cardEffect: activateClass);
|
|
|
-
|
|
|
+
|
|
|
selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get Security Attack -1.",
|
|
|
"The opponent is selecting 1 Digimon that will get Security Attack -1.");
|
|
|
-
|
|
|
+
|
|
|
yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
-
|
|
|
+
|
|
|
IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
{
|
|
|
yield return ContinuousController.instance.StartCoroutine(
|
|
|
@@ -164,14 +164,14 @@ namespace DCGO.CardEffects.EX6
|
|
|
effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
|
|
|
{
|
|
|
yield return ContinuousController.instance.StartCoroutine(
|
|
|
CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
|
|
|
revealCount: 4,
|
|
|
simplifiedSelectCardConditions:
|
|
|
- new[]
|
|
|
+ new SimplifiedSelectCardConditionClass[]
|
|
|
{
|
|
|
new SimplifiedSelectCardConditionClass(
|
|
|
canTargetCondition: cardSource => cardSource.ContainsCardName("Gokuumon"),
|
|
|
@@ -204,11 +204,11 @@ namespace DCGO.CardEffects.EX6
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#endregion
|
|
|
-
|
|
|
+
|
|
|
#region When Attacking
|
|
|
-
|
|
|
+
|
|
|
if (timing == EffectTiming.OnAllyAttack)
|
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
@@ -219,12 +219,12 @@ namespace DCGO.CardEffects.EX6
|
|
|
EffectSharedDescription());
|
|
|
activateClass.SetHashString("SecurityAttack-1_EX6-025");
|
|
|
cardEffects.Add(activateClass);
|
|
|
-
|
|
|
+
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
|
return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
bool CanActivateCondition(Hashtable hashtable)
|
|
|
{
|
|
|
if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
@@ -234,20 +234,20 @@ namespace DCGO.CardEffects.EX6
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
{
|
|
|
if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
|
|
|
{
|
|
|
int maxCount = Math.Min(1,
|
|
|
CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
|
|
|
-
|
|
|
+
|
|
|
SelectPermanentEffect selectPermanentEffect =
|
|
|
GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
-
|
|
|
+
|
|
|
selectPermanentEffect.SetUp(
|
|
|
selectPlayer: card.Owner,
|
|
|
canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
|
|
|
@@ -260,12 +260,12 @@ namespace DCGO.CardEffects.EX6
|
|
|
afterSelectPermanentCoroutine: null,
|
|
|
mode: SelectPermanentEffect.Mode.Custom,
|
|
|
cardEffect: activateClass);
|
|
|
-
|
|
|
+
|
|
|
selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get Security Attack -1.",
|
|
|
"The opponent is selecting 1 Digimon that will get Security Attack -1.");
|
|
|
-
|
|
|
+
|
|
|
yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
-
|
|
|
+
|
|
|
IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
{
|
|
|
yield return ContinuousController.instance.StartCoroutine(
|
|
|
@@ -275,11 +275,11 @@ namespace DCGO.CardEffects.EX6
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#endregion
|
|
|
-
|
|
|
+
|
|
|
#region All Turns
|
|
|
-
|
|
|
+
|
|
|
if (timing == EffectTiming.WhenRemoveField)
|
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
@@ -290,13 +290,13 @@ namespace DCGO.CardEffects.EX6
|
|
|
EffectDescription());
|
|
|
activateClass.SetHashString("AllTurns_EX6_025");
|
|
|
cardEffects.Add(activateClass);
|
|
|
-
|
|
|
+
|
|
|
string EffectDescription()
|
|
|
{
|
|
|
return
|
|
|
"[All Turns] When this Digimon would leave the battle area, return 1 yellow Digimon card from this Digimon's digivolution cards to the hand.";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
bool CanSelectCardCondition(CardSource cardSource)
|
|
|
{
|
|
|
if (cardSource.IsDigimon)
|
|
|
@@ -306,10 +306,10 @@ namespace DCGO.CardEffects.EX6
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
|
if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
@@ -319,10 +319,10 @@ namespace DCGO.CardEffects.EX6
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
bool CanActivateCondition(Hashtable hashtable)
|
|
|
{
|
|
|
if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
@@ -332,22 +332,22 @@ namespace DCGO.CardEffects.EX6
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
{
|
|
|
if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
{
|
|
|
Permanent cardPermanent = card.PermanentOfThisCard();
|
|
|
-
|
|
|
+
|
|
|
if (cardPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
|
|
|
{
|
|
|
int maxCount = Math.Min(1, cardPermanent.DigivolutionCards.Count(CanSelectCardCondition));
|
|
|
-
|
|
|
+
|
|
|
SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
|
|
|
-
|
|
|
+
|
|
|
selectCardEffect.SetUp(
|
|
|
canTargetCondition: CanSelectCardCondition,
|
|
|
canTargetCondition_ByPreSelecetedList: null,
|
|
|
@@ -365,17 +365,17 @@ namespace DCGO.CardEffects.EX6
|
|
|
canLookReverseCard: true,
|
|
|
selectPlayer: card.Owner,
|
|
|
cardEffect: activateClass);
|
|
|
-
|
|
|
+
|
|
|
yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#endregion
|
|
|
-
|
|
|
+
|
|
|
#region When Attacking - ESS
|
|
|
-
|
|
|
+
|
|
|
if (timing == EffectTiming.OnAllyAttack)
|
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
@@ -385,38 +385,38 @@ namespace DCGO.CardEffects.EX6
|
|
|
activateClass.SetIsInheritedEffect(true);
|
|
|
activateClass.SetHashString("SecurityAttack-1_EX6-025");
|
|
|
cardEffects.Add(activateClass);
|
|
|
-
|
|
|
+
|
|
|
string EffectDescription()
|
|
|
{
|
|
|
return
|
|
|
"[When Attacking][Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn.";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
|
return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
bool CanActivateCondition(Hashtable hashtable)
|
|
|
{
|
|
|
if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
{
|
|
|
if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
|
|
|
{
|
|
|
int maxCount = Math.Min(1,
|
|
|
CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
|
|
|
-
|
|
|
+
|
|
|
SelectPermanentEffect selectPermanentEffect =
|
|
|
GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
-
|
|
|
+
|
|
|
selectPermanentEffect.SetUp(
|
|
|
selectPlayer: card.Owner,
|
|
|
canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
|
|
|
@@ -429,12 +429,12 @@ namespace DCGO.CardEffects.EX6
|
|
|
afterSelectPermanentCoroutine: null,
|
|
|
mode: SelectPermanentEffect.Mode.Custom,
|
|
|
cardEffect: activateClass);
|
|
|
-
|
|
|
+
|
|
|
selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get Security Attack -1.",
|
|
|
"The opponent is selecting 1 Digimon that will get Security Attack -1.");
|
|
|
-
|
|
|
+
|
|
|
yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
-
|
|
|
+
|
|
|
IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
{
|
|
|
yield return ContinuousController.instance.StartCoroutine(
|
|
|
@@ -444,7 +444,7 @@ namespace DCGO.CardEffects.EX6
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
return cardEffects;
|