| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using System.Linq;
- using Photon;
- using System;
- using Photon.Pun;
- public class ST12_04 : 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("Memory +1", CanUseCondition, card);
- activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
- cardEffects.Add(activateClass);
- string EffectDiscription()
- {
- return "[Your Turn][Once Per Turn] When you play a Digimon with [Sistermon] in its name, gain 1 memory.";
- }
- bool CanUseCondition(Hashtable hashtable)
- {
- if (CardEffectCommons.IsExistOnBattleArea(card))
- {
- if (CardEffectCommons.IsOwnerTurn(card))
- {
- if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, (permanent) => CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && permanent.TopCard.ContainsCardName("Sistermon")))
- {
- return true;
- }
- }
- }
- return false;
- }
- bool CanActivateCondition(Hashtable hashtable)
- {
- if (CardEffectCommons.IsExistOnBattleArea(card))
- {
- return true;
- }
- return false;
- }
- IEnumerator ActivateCoroutine(Hashtable _hashtable)
- {
- yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
- }
- }
- if (timing == EffectTiming.None)
- {
- bool Condition()
- {
- if (CardEffectCommons.IsExistOnBattleArea(card))
- {
- if (card.PermanentOfThisCard().TopCard.ContainsCardName("Huckmon"))
- {
- return true;
- }
- if (card.PermanentOfThisCard().TopCard.HasRoyalKnightTraits)
- {
- return true;
- }
- }
- return false;
- }
- cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 1000, isInheritedEffect: true, card: card, condition: Condition));
- }
- return cardEffects;
- }
- }
|