|
|
@@ -12,9 +12,10 @@ namespace DCGO.CardEffects.BT20
|
|
|
{
|
|
|
List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
|
|
|
+ #region When Digivolving
|
|
|
if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
{
|
|
|
- #region When Digivolving
|
|
|
+
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
activateClass.SetUpICardEffect("Become unaffected by opponents effects, then can attack", CanUseCondition, card);
|
|
|
activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
|
|
|
@@ -25,22 +26,25 @@ namespace DCGO.CardEffects.BT20
|
|
|
return "[When Digivolving] if [Jesmon]/[X Antibody] is in this Digimon's digivoulution cards, for the turn, 1 of your Digimon isn't affected by your opponent's effects. Then, 1 of your Digimon may attack.";
|
|
|
}
|
|
|
|
|
|
+ bool SourceCondition(CardSource source)
|
|
|
+ {
|
|
|
+ return source.EqualsCardName("Jesmon") || source.EqualsCardName("X Antibody");
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanSelectCondition(Permanent permanent)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
|
|
|
+ }
|
|
|
+
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
|
- if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
|
|
|
- {
|
|
|
- return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
|
|
|
- }
|
|
|
- return false;
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
|
|
|
+ CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
|
|
|
}
|
|
|
|
|
|
bool CanActivateCondition(Hashtable hashtable)
|
|
|
{
|
|
|
- if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- return false;
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
|
|
|
}
|
|
|
|
|
|
IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
@@ -49,20 +53,39 @@ namespace DCGO.CardEffects.BT20
|
|
|
|
|
|
if (this_card != null)
|
|
|
{
|
|
|
- bool CanSelectCondition(Permanent permanent)
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Jesmon") || cardSource.EqualsCardName("X Antibody")) >= 1)
|
|
|
+ if (card.PermanentOfThisCard().DigivolutionCards.Count(SourceCondition) >= 1)
|
|
|
{
|
|
|
#region select immunity recipient
|
|
|
{
|
|
|
+ Permanent immunityPermanent = null;
|
|
|
+
|
|
|
+ int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectCondition));
|
|
|
+
|
|
|
+ SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
+
|
|
|
+ selectPermanentEffect.SetUp(
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ canTargetCondition: CanSelectCondition,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ maxCount: maxCount,
|
|
|
+ canNoSelect: true,
|
|
|
+ canEndNotMax: false,
|
|
|
+ selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
+ afterSelectPermanentCoroutine: null,
|
|
|
+ mode: SelectPermanentEffect.Mode.Custom,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will be immune from your opponent's effects.", "Opponent is selecting 1 Digimon that will be immune from your effects.");
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
+
|
|
|
IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
+ {
|
|
|
+ immunityPermanent = permanent;
|
|
|
+ yield return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(immunityPermanent != null)
|
|
|
{
|
|
|
CanNotAffectedClass canNotAffectedClass = new CanNotAffectedClass();
|
|
|
canNotAffectedClass.SetUpICardEffect("Isn't affected by opponent's effects.", CanUseConditionImmunity, card);
|
|
|
@@ -87,7 +110,7 @@ namespace DCGO.CardEffects.BT20
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- bool SkillCondition (ICardEffect cardEffect)
|
|
|
+ bool SkillCondition(ICardEffect cardEffect)
|
|
|
{
|
|
|
if (CardEffectCommons.IsOpponentEffect(cardEffect, card))
|
|
|
{
|
|
|
@@ -97,7 +120,7 @@ namespace DCGO.CardEffects.BT20
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- ICardEffect GetCardEffect (EffectTiming _timing)
|
|
|
+ ICardEffect GetCardEffect(EffectTiming _timing)
|
|
|
{
|
|
|
if (_timing == EffectTiming.None)
|
|
|
{
|
|
|
@@ -106,313 +129,224 @@ namespace DCGO.CardEffects.BT20
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- yield return null;
|
|
|
}
|
|
|
-
|
|
|
- int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectCondition));
|
|
|
-
|
|
|
- SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
-
|
|
|
- selectPermanentEffect.SetUp(
|
|
|
- selectPlayer: card.Owner,
|
|
|
- canTargetCondition: CanSelectCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- maxCount: maxCount,
|
|
|
- canNoSelect: true,
|
|
|
- canEndNotMax: false,
|
|
|
- selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
- afterSelectPermanentCoroutine: null,
|
|
|
- mode: SelectPermanentEffect.Mode.Custom,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that be immune from your opponent's effects.", "Opponent is selecting on Digimon that will be immune from your effects.");
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
-
|
|
|
}
|
|
|
#endregion
|
|
|
}
|
|
|
|
|
|
+ #region Select attacker
|
|
|
{
|
|
|
- #region Select attacker
|
|
|
+ bool CanSelectAttackPermanentCondition(Permanent permanent)
|
|
|
{
|
|
|
- bool CanSelectAttackPermanentCondition(Permanent permanent)
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
|
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
|
|
|
+ if (permanent.CanAttack(activateClass))
|
|
|
{
|
|
|
- if (permanent.CanAttack(activateClass))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return true;
|
|
|
}
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
- {
|
|
|
- SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
|
|
|
-
|
|
|
- selectAttackEffect.SetUp(
|
|
|
- attacker: permanent,
|
|
|
- canAttackPlayerCondition: () => true,
|
|
|
- defenderCondition: (permanent) => true,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
|
|
|
}
|
|
|
-
|
|
|
- int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectAttackPermanentCondition));
|
|
|
-
|
|
|
- SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
-
|
|
|
- selectPermanentEffect.SetUp(
|
|
|
- selectPlayer: card.Owner,
|
|
|
- canTargetCondition: CanSelectAttackPermanentCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- maxCount: maxCount,
|
|
|
- canNoSelect: true,
|
|
|
- canEndNotMax: false,
|
|
|
- selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
- afterSelectPermanentCoroutine: null,
|
|
|
- mode: SelectPermanentEffect.Mode.Custom,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that be immune from your opponent's effects.", "Opponent is selecting on Digimon that will be immune from your effects.");
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
+ return false;
|
|
|
}
|
|
|
- #endregion
|
|
|
- }
|
|
|
|
|
|
- CanNotAffectedClass canNotAffectedClass = new CanNotAffectedClass();
|
|
|
- canNotAffectedClass.SetUpICardEffect("Isn't affected by opponent's effects", CanUseCondition1, card);
|
|
|
- canNotAffectedClass.SetUpCanNotAffectedClass(CardCondition: CardCondition, SkillCondition: SkillCondition);
|
|
|
- this_card.UntilOpponentTurnEndEffects.Add((_timing) => canNotAffectedClass);
|
|
|
-
|
|
|
- bool CanUseCondition1(Hashtable hashtable)
|
|
|
- {
|
|
|
- return CardEffectCommons.IsPermanentExistsOnBattleArea(this_card);
|
|
|
- }
|
|
|
-
|
|
|
- bool CardCondition(CardSource cardSource)
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnBattleArea(this_card))
|
|
|
+ IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
{
|
|
|
- if (cardSource == this_card.TopCard)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
+ SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
|
|
|
|
|
|
- return false;
|
|
|
- }
|
|
|
+ selectAttackEffect.SetUp(
|
|
|
+ attacker: permanent,
|
|
|
+ canAttackPlayerCondition: () => true,
|
|
|
+ defenderCondition: (permanent) => true,
|
|
|
+ cardEffect: activateClass);
|
|
|
|
|
|
- bool SkillCondition(ICardEffect cardEffect)
|
|
|
- {
|
|
|
- if (cardEffect != null)
|
|
|
- {
|
|
|
- if (cardEffect.EffectSourceCard != null)
|
|
|
- {
|
|
|
- if (cardEffect.EffectSourceCard.Owner == card.Owner.Enemy)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
|
|
|
}
|
|
|
- return false;
|
|
|
+
|
|
|
+ int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectAttackPermanentCondition));
|
|
|
+
|
|
|
+ SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
+
|
|
|
+ selectPermanentEffect.SetUp(
|
|
|
+ selectPlayer: card.Owner,
|
|
|
+ canTargetCondition: CanSelectAttackPermanentCondition,
|
|
|
+ canTargetCondition_ByPreSelecetedList: null,
|
|
|
+ canEndSelectCondition: null,
|
|
|
+ maxCount: maxCount,
|
|
|
+ canNoSelect: true,
|
|
|
+ canEndNotMax: false,
|
|
|
+ selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
+ afterSelectPermanentCoroutine: null,
|
|
|
+ mode: SelectPermanentEffect.Mode.Custom,
|
|
|
+ cardEffect: activateClass);
|
|
|
+
|
|
|
+ selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that be immune from your opponent's effects.", "Opponent is selecting on Digimon that will be immune from your effects.");
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
}
|
|
|
+ #endregion
|
|
|
}
|
|
|
}
|
|
|
- #endregion
|
|
|
}
|
|
|
+ #endregion
|
|
|
|
|
|
-
|
|
|
+ #region Your Turn
|
|
|
if (timing == EffectTiming.None)
|
|
|
{
|
|
|
- #region Your Turn
|
|
|
- {
|
|
|
- AddSkillClass addSkillClass = new AddSkillClass();
|
|
|
- addSkillClass.SetUpICardEffect("[Your Turn] All of your Digimon with [Sistermon] or the [Royal Knight] trait gain <Piercing> and can attack your opponent's unsuspended Digimon.", CanUseCondition, card);
|
|
|
- addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
|
|
|
- cardEffects.Add(addSkillClass);
|
|
|
-
|
|
|
-
|
|
|
- CanAttackTargetDefendingPermanentClass canAttackTargetDefendingPermanentClass = new CanAttackTargetDefendingPermanentClass();
|
|
|
- canAttackTargetDefendingPermanentClass.SetUpICardEffect($"Can attack to unsuspended Digimon", CanUseCondition1, card);
|
|
|
- canAttackTargetDefendingPermanentClass.SetUpCanAttackTargetDefendingPermanentClass(attackerCondition: PermanentCondition, defenderCondition: DefenderCondition, cardEffectCondition: CardEffectCondition);
|
|
|
- card.Owner.UntilOpponentTurnEndEffects.Add((_timing) => canAttackTargetDefendingPermanentClass);
|
|
|
-
|
|
|
- bool CanUseCondition1(Hashtable hashtable)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ AddSkillClass addSkillClass = new AddSkillClass();
|
|
|
+ addSkillClass.SetUpICardEffect("[Your Turn] All of your Digimon with [Sistermon] or the [Royal Knight] trait gain <Piercing> and can attack your opponent's unsuspended Digimon.", CanUseCondition, card);
|
|
|
+ addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
|
|
|
+ cardEffects.Add(addSkillClass);
|
|
|
|
|
|
- bool DefenderCondition(Permanent permanent)
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
|
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
+ if (CardEffectCommons.IsOwnerTurn(card))
|
|
|
{
|
|
|
- if (!permanent.IsSuspended)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return true;
|
|
|
}
|
|
|
-
|
|
|
- return false;
|
|
|
}
|
|
|
|
|
|
- bool CardEffectCondition(ICardEffect cardEffect)
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool PermanentCondition(Permanent permanent)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
|
|
|
{
|
|
|
- return true;
|
|
|
+ if (permanent.TopCard.ContainsCardName("Sistermon") || permanent.TopCard.HasRoyalKnightTraits)
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
- bool CanUseCondition(Hashtable hashtable)
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsOpponentTurn(card))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- return false;
|
|
|
- }
|
|
|
+ bool CardSourceCondition(CardSource cardSource)
|
|
|
+ {
|
|
|
+ return PermanentCondition(cardSource.PermanentOfThisCard());
|
|
|
+ }
|
|
|
|
|
|
- bool PermanentCondition(Permanent permanent)
|
|
|
+ List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
|
|
|
+ {
|
|
|
+ if (_timing == EffectTiming.OnDetermineDoSecurityCheck)
|
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
|
|
|
+ bool Condition()
|
|
|
{
|
|
|
- if (permanent.TopCard.ContainsCardName("Sistermon") || permanent.TopCard.HasRoyalKnightTraits)
|
|
|
- return true;
|
|
|
+ return CardSourceCondition(cardSource);
|
|
|
}
|
|
|
|
|
|
- return false;
|
|
|
+ cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: false, card: card, condition: Condition));
|
|
|
}
|
|
|
|
|
|
- bool CardSourceCondition(CardSource cardSource)
|
|
|
- {
|
|
|
- if (PermanentCondition(cardSource.PermanentOfThisCard()))
|
|
|
- {
|
|
|
- if (cardSource == cardSource.PermanentOfThisCard().TopCard)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
+ return cardEffects;
|
|
|
+ }
|
|
|
|
|
|
- return false;
|
|
|
- }
|
|
|
+ CanAttackTargetDefendingPermanentClass canAttackTargetDefendingPermanentClass = new CanAttackTargetDefendingPermanentClass();
|
|
|
+ canAttackTargetDefendingPermanentClass.SetUpICardEffect($"Can attack to unsuspended Digimon", CanUseCondition1, card);
|
|
|
+ canAttackTargetDefendingPermanentClass.SetUpCanAttackTargetDefendingPermanentClass(attackerCondition: PermanentCondition, defenderCondition: DefenderCondition, cardEffectCondition: CardEffectCondition);
|
|
|
+ cardEffects.Add(canAttackTargetDefendingPermanentClass);
|
|
|
|
|
|
- List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
|
|
|
+ bool CanUseCondition1(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
|
|
|
+ }
|
|
|
+
|
|
|
+ bool DefenderCondition(Permanent permanent)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
{
|
|
|
- if (_timing == EffectTiming.None)
|
|
|
+ if (!permanent.IsSuspended)
|
|
|
{
|
|
|
- bool Condition()
|
|
|
- {
|
|
|
- return CardSourceCondition(cardSource);
|
|
|
- }
|
|
|
-
|
|
|
- cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: false, card: card, condition: Condition));
|
|
|
-
|
|
|
+ return true;
|
|
|
}
|
|
|
-
|
|
|
- return cardEffects;
|
|
|
}
|
|
|
- }
|
|
|
- #endregion
|
|
|
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- #region Inherit
|
|
|
+ bool CardEffectCondition(ICardEffect cardEffect)
|
|
|
{
|
|
|
- AddSkillClass addSkillClass = new AddSkillClass();
|
|
|
- addSkillClass.SetUpICardEffect("While this Digimon is [JesmonGX], all of you Digimon gain <Piercing> and can also attack your opponent's unsuspended Digimon.", CanUseCondition, card);
|
|
|
- addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
|
|
|
- cardEffects.Add(addSkillClass);
|
|
|
-
|
|
|
- CanAttackTargetDefendingPermanentClass canAttackTargetDefendingPermanentClass = new CanAttackTargetDefendingPermanentClass();
|
|
|
- canAttackTargetDefendingPermanentClass.SetUpICardEffect($"Can attack to unsuspended Digimon", CanUseCondition1, card);
|
|
|
- canAttackTargetDefendingPermanentClass.SetUpCanAttackTargetDefendingPermanentClass(attackerCondition: PermanentCondition, defenderCondition: DefenderCondition, cardEffectCondition: CardEffectCondition);
|
|
|
- canAttackTargetDefendingPermanentClass.SetIsInheritedEffect(true);
|
|
|
- card.Owner.UntilOpponentTurnEndEffects.Add((_timing) => canAttackTargetDefendingPermanentClass);
|
|
|
-
|
|
|
- bool CanUseCondition1(Hashtable hashtable)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Inherit
|
|
|
+ if(timing == EffectTiming.None)
|
|
|
+ {
|
|
|
+ AddSkillClass addSkillClass = new AddSkillClass();
|
|
|
+ addSkillClass.SetUpICardEffect("[Your Turn] While this Digimon is [Jesmon GX], all of your Digimon gain <Piercing> and can also attack your opponent's unsuspended Digimon.", CanUseCondition, card);
|
|
|
+ addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
|
|
|
+ addSkillClass.SetIsInheritedEffect(true);
|
|
|
+ cardEffects.Add(addSkillClass);
|
|
|
|
|
|
- bool DefenderCondition(Permanent permanent)
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
|
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
+ if (CardEffectCommons.IsOwnerTurn(card))
|
|
|
{
|
|
|
- if (!permanent.IsSuspended)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return card.PermanentOfThisCard().TopCard.EqualsCardName("Jesmon GX");
|
|
|
}
|
|
|
-
|
|
|
- return false;
|
|
|
}
|
|
|
|
|
|
- bool CardEffectCondition(ICardEffect cardEffect)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- bool CanUseCondition(Hashtable hashtable)
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsOpponentTurn(card))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
+ bool PermanentCondition(Permanent permanent)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
|
|
|
+ }
|
|
|
|
|
|
- return false;
|
|
|
- }
|
|
|
+ bool CardSourceCondition(CardSource cardSource)
|
|
|
+ {
|
|
|
+ return PermanentCondition(cardSource.PermanentOfThisCard());
|
|
|
+ }
|
|
|
|
|
|
- bool PermanentCondition(Permanent permanent)
|
|
|
+ List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
|
|
|
+ {
|
|
|
+ if (_timing == EffectTiming.OnDetermineDoSecurityCheck)
|
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
|
|
|
+ bool Condition()
|
|
|
{
|
|
|
- if (permanent.TopCard.EqualsCardName("Jesmon GX"))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return CardSourceCondition(cardSource);
|
|
|
}
|
|
|
|
|
|
- return false;
|
|
|
+ cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: false, card: card, condition: Condition));
|
|
|
}
|
|
|
|
|
|
- bool CardSourceCondition(CardSource cardSource)
|
|
|
- {
|
|
|
- if (PermanentCondition(cardSource.PermanentOfThisCard()))
|
|
|
- {
|
|
|
- if (cardSource == cardSource.PermanentOfThisCard().TopCard)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
+ return cardEffects;
|
|
|
+ }
|
|
|
|
|
|
- return false;
|
|
|
- }
|
|
|
+ CanAttackTargetDefendingPermanentClass canAttackTargetDefendingPermanentClass = new CanAttackTargetDefendingPermanentClass();
|
|
|
+ canAttackTargetDefendingPermanentClass.SetUpICardEffect($"Can attack to unsuspended Digimon", CanUseCondition1, card);
|
|
|
+ canAttackTargetDefendingPermanentClass.SetUpCanAttackTargetDefendingPermanentClass(attackerCondition: PermanentCondition, defenderCondition: DefenderCondition, cardEffectCondition: CardEffectCondition);
|
|
|
+ canAttackTargetDefendingPermanentClass.SetIsInheritedEffect(true);
|
|
|
+ cardEffects.Add(canAttackTargetDefendingPermanentClass);
|
|
|
|
|
|
- List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
|
|
|
+ bool CanUseCondition1(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
|
|
|
+ }
|
|
|
+
|
|
|
+ bool DefenderCondition(Permanent permanent)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
{
|
|
|
- if (_timing == EffectTiming.None)
|
|
|
+ if (!permanent.IsSuspended)
|
|
|
{
|
|
|
- bool Condition()
|
|
|
- {
|
|
|
- return CardSourceCondition(cardSource);
|
|
|
- }
|
|
|
-
|
|
|
- cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: true, card: card, condition: Condition));
|
|
|
+ return true;
|
|
|
}
|
|
|
-
|
|
|
- return cardEffects;
|
|
|
}
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CardEffectCondition(ICardEffect cardEffect)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
}
|
|
|
- #endregion
|
|
|
}
|
|
|
+ #endregion
|
|
|
+
|
|
|
return cardEffects;
|
|
|
}
|
|
|
}
|