|
|
@@ -46,10 +46,7 @@ namespace DCGO.CardEffects.BT15
|
|
|
|
|
|
#region Shared OP/WA
|
|
|
|
|
|
- string SharedEffectName()
|
|
|
- {
|
|
|
- return "De-Digivolve 2 on 1 Digimon.";
|
|
|
- }
|
|
|
+ string SharedEffectName = "De-Digivolve 2 on 1 Digimon.";
|
|
|
|
|
|
string SharedEffectDescription(string tag)
|
|
|
{
|
|
|
@@ -99,41 +96,14 @@ namespace DCGO.CardEffects.BT15
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
- #region On Play
|
|
|
-
|
|
|
- if (timing == EffectTiming.OnEnterFieldAnyone)
|
|
|
- {
|
|
|
- ActivateClass activateClass = new ActivateClass();
|
|
|
- activateClass.SetUpICardEffect(SharedEffectName(), CanUseCondition, card);
|
|
|
- activateClass.SetUpActivateClass(SharedCanActivateCondition, (hash) => SharedActivateCoroutine(hash, activateClass), -1, false, SharedEffectDescription("On Play"));
|
|
|
- cardEffects.Add(activateClass);
|
|
|
-
|
|
|
- bool CanUseCondition(Hashtable hashtable)
|
|
|
- {
|
|
|
- return CardEffectCommons.CanTriggerOnPlay(hashtable, card)
|
|
|
- && CardEffectCommons.IsExistOnBattleArea(card);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #endregion
|
|
|
-
|
|
|
- #region When Attacking
|
|
|
-
|
|
|
- if (timing == EffectTiming.OnAllyAttack)
|
|
|
- {
|
|
|
- ActivateClass activateClass = new ActivateClass();
|
|
|
- activateClass.SetUpICardEffect(SharedEffectName(), CanUseCondition, card);
|
|
|
- activateClass.SetUpActivateClass(SharedCanActivateCondition, (hash) => SharedActivateCoroutine(hash, activateClass), -1, false, SharedEffectDescription("When Attacking"));
|
|
|
- cardEffects.Add(activateClass);
|
|
|
-
|
|
|
- bool CanUseCondition(Hashtable hashtable)
|
|
|
- {
|
|
|
- return CardEffectCommons.CanTriggerOnAttack(hashtable, card)
|
|
|
- && CardEffectCommons.IsExistOnBattleArea(card);
|
|
|
- }
|
|
|
- }
|
|
|
+ CardEffectFactory.ActivateClassesForSharedEffects
|
|
|
+ (ref cardEffects, timing, card,
|
|
|
+ SharedEffectName,
|
|
|
+ SharedActivateCoroutine,
|
|
|
+ SharedEffectDescription,
|
|
|
+ optional: false,
|
|
|
+ onPlay: true,
|
|
|
+ whenAttacking: true);
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
@@ -177,25 +147,13 @@ namespace DCGO.CardEffects.BT15
|
|
|
|
|
|
bool CanUseCondition(Hashtable hashtable)
|
|
|
{
|
|
|
- if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsOpponentTurn(card))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return false;
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaTrigger(card, activateClass)
|
|
|
+ && CardEffectCommons.IsOpponentTurn(card);
|
|
|
}
|
|
|
|
|
|
bool CanActivateCondition(Hashtable hashtable)
|
|
|
{
|
|
|
- if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- return false;
|
|
|
+ return CardEffectCommons.IsExistOnBattleAreaActivate(card, activateClass);
|
|
|
}
|
|
|
|
|
|
IEnumerator ActivateCoroutine(Hashtable _hashtable)
|