|
|
@@ -148,35 +148,44 @@ namespace DCGO.CardEffects.P
|
|
|
|
|
|
if (timing == EffectTiming.None)
|
|
|
{
|
|
|
- ActivateClass activateClass = new ActivateClass();
|
|
|
- activateClass.SetUpICardEffect("Gain 1k DP for each colour digimon & tamers have on field", CanUseCondition, card);
|
|
|
- activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
|
|
|
- cardEffects.Add(activateClass);
|
|
|
-
|
|
|
- string EffectDiscription()
|
|
|
- {
|
|
|
- return "[All Turns] This Digimon gets +1000 DP for each color Digimon and Tamers have.";
|
|
|
- }
|
|
|
-
|
|
|
- bool CanUseCondition(Hashtable hashtable)
|
|
|
- {
|
|
|
- return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
|
|
|
- }
|
|
|
-
|
|
|
- IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
- {
|
|
|
- List<CardSource> cards = card.Owner.FieldPermanents
|
|
|
+ List<CardSource> cards = card.Owner.FieldPermanents
|
|
|
.Where(x => x.IsDigimon && x.IsTamer)
|
|
|
.Select(x => x.TopCard)
|
|
|
.Concat(card.Owner.Enemy.FieldPermanents
|
|
|
.Where(x => x.IsDigimon && x.IsTamer)
|
|
|
.Select(x => x.TopCard))
|
|
|
.ToList();
|
|
|
+ var colourCount = Combinations.GetDifferenetColorCardCount(cards);
|
|
|
+ var newDP = colourCount * 1000;
|
|
|
|
|
|
- var colourCount = Combinations.GetDifferenetColorCardCount(cards);
|
|
|
- var newDP = colourCount * 1000;
|
|
|
+ bool Condition()
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsExistOnBattleArea(card);
|
|
|
+ }
|
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(targetPermanent: card.PermanentOfThisCard(), changeValue: newDP, EffectDuration.Continuous, activateClass: activateClass));
|
|
|
+ bool PermanentCondition(Permanent permanent)
|
|
|
+ {
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
|
|
|
+ {
|
|
|
+ if (permanent == card.PermanentOfThisCard())
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
|
|
|
+ permanentCondition: PermanentCondition,
|
|
|
+ changeValue: newDP,
|
|
|
+ isInheritedEffect: false,
|
|
|
+ card: card,
|
|
|
+ condition: Condition,
|
|
|
+ effectName: EffectDiscription));
|
|
|
+ string EffectDiscription()
|
|
|
+ {
|
|
|
+ return "[All Turns] This Digimon gets +1000 DP for each color Digimon and Tamers have.";
|
|
|
}
|
|
|
}
|
|
|
|