|
|
@@ -12,7 +12,7 @@ namespace DCGO.CardEffects.BT16
|
|
|
{
|
|
|
var cardEffects = new List<ICardEffect>();
|
|
|
|
|
|
- #region Alternate Digivolution Requirement
|
|
|
+ #region Alternate Digivolution Requirement, Blocker
|
|
|
if(timing == EffectTiming.None)
|
|
|
{
|
|
|
bool PermanentCondition(Permanent targetPermanent)
|
|
|
@@ -27,119 +27,62 @@ namespace DCGO.CardEffects.BT16
|
|
|
card: card,
|
|
|
condition: null)
|
|
|
);
|
|
|
+
|
|
|
+ cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
- #region Raid
|
|
|
- if(timing == EffectTiming.OnAllyAttack)
|
|
|
- {
|
|
|
- cardEffects.Add(CardEffectFactory.RaidSelfEffect(
|
|
|
- isInheritedEffect: false,
|
|
|
- card: card,
|
|
|
- condition: null)
|
|
|
- );
|
|
|
- }
|
|
|
- #endregion
|
|
|
-
|
|
|
- #region On Play
|
|
|
- if(timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
+ #region On Play/When Digivolving
|
|
|
+ if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
|
- activateClass.SetUpICardEffect("Select 1 of your Digimon to gain effects", CanUseCondition, card);
|
|
|
- activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
|
|
|
+ activateClass.SetUpICardEffect("Unsuspend 1 level 4 or lower Digimon", CanUseCondition, card);
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
|
|
|
cardEffects.Add(activateClass);
|
|
|
|
|
|
string EffectDiscription()
|
|
|
{
|
|
|
- return "[On Play] 1 of your Digimon can't be deleted in battle until the end of your opponent's turn.";
|
|
|
- }
|
|
|
-
|
|
|
- bool CanUseCondition(Hashtable hashtable)
|
|
|
- {
|
|
|
- return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
|
|
|
- }
|
|
|
-
|
|
|
- bool CanActivateCondition(Hashtable hashtable)
|
|
|
- {
|
|
|
- return CardEffectCommons.IsExistOnBattleArea(card);
|
|
|
+ return "[On Play] [When Digivolving] Unsuspend 1 of your level 4 or lower Digimon.";
|
|
|
}
|
|
|
|
|
|
bool CanSelectPermanentCondition(Permanent permanent)
|
|
|
{
|
|
|
- return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
|
|
|
- }
|
|
|
-
|
|
|
- IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
- {
|
|
|
- SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
-
|
|
|
- selectPermanentEffect.SetUp(
|
|
|
- selectPlayer: card.Owner,
|
|
|
- canTargetCondition: CanSelectPermanentCondition,
|
|
|
- canTargetCondition_ByPreSelecetedList: null,
|
|
|
- canEndSelectCondition: null,
|
|
|
- maxCount: 1,
|
|
|
- canNoSelect: false,
|
|
|
- canEndNotMax: false,
|
|
|
- selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
- afterSelectPermanentCoroutine: null,
|
|
|
- mode: SelectPermanentEffect.Mode.Custom,
|
|
|
- cardEffect: activateClass);
|
|
|
-
|
|
|
- selectPermanentEffect.SetUpCustomMessage(
|
|
|
- "Select 1 Digimon that will get effects.",
|
|
|
- "The opponent is selecting 1 Digimon that will get effects.");
|
|
|
-
|
|
|
- yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
-
|
|
|
- IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
|
|
|
{
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotBeDeletedByBattle(
|
|
|
- targetPermanent: permanent,
|
|
|
- canNotBeDestroyedByBattleCondition: CanNotBeDestroyedByBattleCondition,
|
|
|
- effectDuration: EffectDuration.UntilOpponentTurnEnd,
|
|
|
- activateClass: activateClass,
|
|
|
- effectName: "Can't be deleted in battle"));
|
|
|
-
|
|
|
- bool CanNotBeDestroyedByBattleCondition(Permanent permanent1, Permanent attackingPermanent, Permanent defendingPermanent, CardSource defendingCard)
|
|
|
+ if (permanent.Level <= 4)
|
|
|
{
|
|
|
- return permanent == attackingPermanent || permanent == defendingPermanent;
|
|
|
+ if (permanent.TopCard.HasLevel)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
- #endregion
|
|
|
|
|
|
- #region When Digivolving
|
|
|
- if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
- {
|
|
|
- ActivateClass activateClass = new ActivateClass();
|
|
|
- activateClass.SetUpICardEffect("Select 1 of your Digimon to gain effects", CanUseCondition, card);
|
|
|
- activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
|
|
|
- cardEffects.Add(activateClass);
|
|
|
-
|
|
|
- string EffectDiscription()
|
|
|
- {
|
|
|
- return "[When Digivolving] 1 of your Digimon can't be deleted in battle until the end of your opponent's turn.";
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
|
- return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
|
|
|
+ return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
|
|
|
}
|
|
|
|
|
|
bool CanActivateCondition(Hashtable hashtable)
|
|
|
{
|
|
|
- return CardEffectCommons.IsExistOnBattleArea(card);
|
|
|
- }
|
|
|
+ if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- bool CanSelectPermanentCondition(Permanent permanent)
|
|
|
- {
|
|
|
- return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
- IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
{
|
|
|
+ int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
|
|
|
+
|
|
|
SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
|
|
|
|
|
|
selectPermanentEffect.SetUp(
|
|
|
@@ -147,38 +90,18 @@ namespace DCGO.CardEffects.BT16
|
|
|
canTargetCondition: CanSelectPermanentCondition,
|
|
|
canTargetCondition_ByPreSelecetedList: null,
|
|
|
canEndSelectCondition: null,
|
|
|
- maxCount: 1,
|
|
|
+ maxCount: maxCount,
|
|
|
canNoSelect: false,
|
|
|
canEndNotMax: false,
|
|
|
- selectPermanentCoroutine: SelectPermanentCoroutine,
|
|
|
+ selectPermanentCoroutine: null,
|
|
|
afterSelectPermanentCoroutine: null,
|
|
|
- mode: SelectPermanentEffect.Mode.Custom,
|
|
|
+ mode: SelectPermanentEffect.Mode.UnTap,
|
|
|
cardEffect: activateClass);
|
|
|
-
|
|
|
- selectPermanentEffect.SetUpCustomMessage(
|
|
|
- "Select 1 Digimon that will get effects.",
|
|
|
- "The opponent is selecting 1 Digimon that will get effects.");
|
|
|
-
|
|
|
yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
|
|
|
-
|
|
|
- IEnumerator SelectPermanentCoroutine(Permanent permanent)
|
|
|
- {
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotBeDeletedByBattle(
|
|
|
- targetPermanent: permanent,
|
|
|
- canNotBeDestroyedByBattleCondition: CanNotBeDestroyedByBattleCondition,
|
|
|
- effectDuration: EffectDuration.UntilOpponentTurnEnd,
|
|
|
- activateClass: activateClass,
|
|
|
- effectName: "Can't be deleted in battle"));
|
|
|
-
|
|
|
- bool CanNotBeDestroyedByBattleCondition(Permanent permanent1, Permanent attackingPermanent, Permanent defendingPermanent, CardSource defendingCard)
|
|
|
- {
|
|
|
- return permanent == attackingPermanent || permanent == defendingPermanent;
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
-
|
|
|
+
|
|
|
#region Inherited Effect
|
|
|
if (timing == EffectTiming.OnAllyAttack)
|
|
|
{
|