|
|
@@ -132,65 +132,8 @@ namespace DCGO.CardEffects.BT21
|
|
|
|
|
|
if (selectedPermanent != null)
|
|
|
{
|
|
|
- AddSkillClass addSkillClass = new AddSkillClass();
|
|
|
- addSkillClass.SetUpICardEffect("Gain Collision", CanUseCondition1, card);
|
|
|
- addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
|
|
|
- selectedPermanent.TopCard.Owner.UntilOwnerTurnEndEffects.Add((_timing) => addSkillClass);
|
|
|
-
|
|
|
- bool CanUseCondition1(Hashtable hashtable)
|
|
|
- {
|
|
|
- return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
|
|
|
- }
|
|
|
-
|
|
|
- bool CardSourceCondition(CardSource cardSource)
|
|
|
- {
|
|
|
- return PermanentCondition(selectedPermanent);
|
|
|
- }
|
|
|
-
|
|
|
- bool PermanentCondition(Permanent permanent)
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
- {
|
|
|
- if (!permanent.TopCard.CanNotBeAffected(activateClass))
|
|
|
- {
|
|
|
- if (permanent == selectedPermanent)
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
|
|
|
- {
|
|
|
- if (_timing == EffectTiming.OnCounterTiming)
|
|
|
- {
|
|
|
- bool CardSourceCondition(CardSource cardSource)
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsExistOnBattleAreaDigimon(cardSource))
|
|
|
- {
|
|
|
- if (cardSource == selectedPermanent.TopCard)
|
|
|
- {
|
|
|
- if (PermanentCondition(selectedPermanent))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- bool Condition()
|
|
|
- {
|
|
|
- return CardSourceCondition(cardSource);
|
|
|
- }
|
|
|
-
|
|
|
- cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false, cardSource, Condition));
|
|
|
- }
|
|
|
-
|
|
|
- return cardEffects;
|
|
|
- }
|
|
|
+ CollisionClass collisionClass = PermanentEffectFactory.CollisionEffect(selectedPermanent, activateClass);
|
|
|
+ CardEffectCommons.AddEffectToPermanent(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilOwnerTurnEnd, card: card, cardEffect: collisionClass, timing: EffectTiming.OnCounterTiming);
|
|
|
|
|
|
ActivateClass activateClassDebuff = new ActivateClass();
|
|
|
activateClassDebuff.SetUpICardEffect("Attack with this Digimon", CanUseConditionDebuff,
|
|
|
@@ -346,65 +289,8 @@ namespace DCGO.CardEffects.BT21
|
|
|
|
|
|
if (selectedPermanent != null)
|
|
|
{
|
|
|
- AddSkillClass addSkillClass = new AddSkillClass();
|
|
|
- addSkillClass.SetUpICardEffect("Gain Collision", CanUseCondition1, card);
|
|
|
- addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
|
|
|
- selectedPermanent.TopCard.Owner.UntilOwnerTurnEndEffects.Add((_timing) => addSkillClass);
|
|
|
-
|
|
|
- bool CanUseCondition1(Hashtable hashtable)
|
|
|
- {
|
|
|
- return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
|
|
|
- }
|
|
|
-
|
|
|
- bool CardSourceCondition(CardSource cardSource)
|
|
|
- {
|
|
|
- return PermanentCondition(selectedPermanent);
|
|
|
- }
|
|
|
-
|
|
|
- bool PermanentCondition(Permanent permanent)
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
|
|
|
- {
|
|
|
- if (!permanent.TopCard.CanNotBeAffected(activateClass))
|
|
|
- {
|
|
|
- if (permanent == selectedPermanent)
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
|
|
|
- {
|
|
|
- if (_timing == EffectTiming.OnCounterTiming)
|
|
|
- {
|
|
|
- bool CardSourceCondition(CardSource cardSource)
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsExistOnBattleAreaDigimon(cardSource))
|
|
|
- {
|
|
|
- if (cardSource == selectedPermanent.TopCard)
|
|
|
- {
|
|
|
- if (PermanentCondition(selectedPermanent))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- bool Condition()
|
|
|
- {
|
|
|
- return CardSourceCondition(cardSource);
|
|
|
- }
|
|
|
-
|
|
|
- cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false, cardSource, Condition));
|
|
|
- }
|
|
|
-
|
|
|
- return cardEffects;
|
|
|
- }
|
|
|
+ CollisionClass collisionClass = PermanentEffectFactory.CollisionEffect(selectedPermanent, activateClass);
|
|
|
+ CardEffectCommons.AddEffectToPermanent(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilOwnerTurnEnd, card: card, cardEffect: collisionClass, timing: EffectTiming.OnCounterTiming);
|
|
|
|
|
|
ActivateClass activateClassDebuff = new ActivateClass();
|
|
|
activateClassDebuff.SetUpICardEffect("Attack with this Digimon", CanUseConditionDebuff, selectedPermanent.TopCard);
|