| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- using System.Collections;
- using System.Collections.Generic;
- namespace DCGO.CardEffects.EX1
- {
- public class EX1_031 : CEntity_Effect
- {
- public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
- {
- List<ICardEffect> cardEffects = new List<ICardEffect>();
- if (timing == EffectTiming.OnEnterFieldAnyone)
- {
- ActivateClass activateClass = new ActivateClass();
- activateClass.SetUpICardEffect("Recovery +1 (Deck)", CanUseCondition, card);
- activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
- cardEffects.Add(activateClass);
- string EffectDiscription()
- {
- return "[When Digivolving] Trigger <Recovery +1 (Deck)>. (Place the top card of your deck on top of your security stack.)";
- }
- bool CanUseCondition(Hashtable hashtable)
- {
- return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
- }
- bool CanActivateCondition(Hashtable hashtable)
- {
- if (CardEffectCommons.IsExistOnBattleArea(card))
- {
- if (card.Owner.LibraryCards.Count >= 1)
- {
- if (card.Owner.CanAddSecurity(activateClass))
- {
- return true;
- }
- }
- }
- return false;
- }
- IEnumerator ActivateCoroutine(Hashtable _hashtable)
- {
- yield return ContinuousController.instance.StartCoroutine(new IRecovery(card.Owner, 1, activateClass).Recovery());
- }
- }
- if (timing == EffectTiming.None)
- {
- bool CardCondition(CardSource cardSource)
- {
- return cardSource.Owner == card.Owner;
- }
- bool Condition()
- {
- if (CardEffectCommons.IsExistOnBattleArea(card))
- {
- if (CardEffectCommons.IsOpponentTurn(card))
- {
- if (card.PermanentOfThisCard().IsSuspended)
- {
- return true;
- }
- }
- }
- return false;
- }
- cardEffects.Add(CardEffectFactory.ChangeSecurityDigimonCardDPStaticEffect(
- cardCondition: CardCondition,
- changeValue: 5000,
- isInheritedEffect: false,
- card: card,
- condition: Condition,
- effectName: "Your Security Digimon gains DP +5000"));
- }
- return cardEffects;
- }
- }
- }
|