|
|
@@ -1,74 +1,58 @@
|
|
|
-using System.Collections;
|
|
|
+using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
-using UnityEngine;
|
|
|
|
|
|
+// WereGarurumon
|
|
|
namespace DCGO.CardEffects.BT1
|
|
|
{
|
|
|
public class BT1_040 : CEntity_Effect
|
|
|
{
|
|
|
public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
|
|
|
{
|
|
|
- List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
+ List<ICardEffect> cardEffects = new List<ICardEffect>();
|
|
|
|
|
|
- if (timing == EffectTiming.OnAllyAttack)
|
|
|
- {
|
|
|
- ActivateClass activateClass = new ActivateClass();
|
|
|
- activateClass.SetUpICardEffect("Memory +3", CanUseCondition, card);
|
|
|
- activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
|
|
|
- cardEffects.Add(activateClass);
|
|
|
-
|
|
|
- string EffectDiscription()
|
|
|
- {
|
|
|
- return "[When Attacking] Gain 3 memory. At end of turn lose 3 memory.";
|
|
|
- }
|
|
|
-
|
|
|
- bool CanUseCondition(Hashtable hashtable)
|
|
|
+ if (timing == EffectTiming.OnAllyAttack)
|
|
|
{
|
|
|
- return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
|
|
|
- }
|
|
|
+ ActivateClass activateClass = new ActivateClass();
|
|
|
+ activateClass.SetUpICardEffect("Memory +3", CanUseCondition, card);
|
|
|
+ activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
|
|
|
+ cardEffects.Add(activateClass);
|
|
|
|
|
|
- bool CanActivateCondition(Hashtable hashtable)
|
|
|
- {
|
|
|
- if (CardEffectCommons.IsExistOnBattleArea(card))
|
|
|
+ string EffectDiscription()
|
|
|
{
|
|
|
- return true;
|
|
|
+ return "[When Attacking] Gain 3 memory. At end of turn lose 3 memory.";
|
|
|
}
|
|
|
|
|
|
- return false;
|
|
|
- }
|
|
|
+ bool CanUseCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
|
|
|
+ }
|
|
|
|
|
|
- IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
- {
|
|
|
- yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(3, activateClass));
|
|
|
+ bool CanActivateCondition(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return CardEffectCommons.IsExistOnBattleArea(card);
|
|
|
+ }
|
|
|
|
|
|
- ActivateClass activateClass1 = new ActivateClass();
|
|
|
- activateClass1.SetUpICardEffect("Memory -3", CanUseCondition1, card);
|
|
|
- activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
|
|
|
- CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilEachTurnEnd, card: card, cardEffect: activateClass1, timing: EffectTiming.OnEndTurn);
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
+ {
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(3, activateClass));
|
|
|
|
|
|
- string EffectDiscription1()
|
|
|
- {
|
|
|
- return "Lose 3 memory.";
|
|
|
- }
|
|
|
+ card.Owner.UntilEachTurnEndEffects.Add(GetCardEffect);
|
|
|
|
|
|
- bool CanUseCondition1(Hashtable hashtable)
|
|
|
+ ICardEffect GetCardEffect(EffectTiming _timing)
|
|
|
{
|
|
|
- return true;
|
|
|
- }
|
|
|
+ if (_timing == EffectTiming.OnEndTurn)
|
|
|
+ {
|
|
|
+ return CardEffectFactory.EoTLose3Memory(card);
|
|
|
+ }
|
|
|
|
|
|
- bool CanActivateCondition1(Hashtable hashtable)
|
|
|
- {
|
|
|
- return true;
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
- IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
|
|
|
- {
|
|
|
- yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(-3, activateClass1));
|
|
|
- }
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateBuffEffect(card.PermanentOfThisCard()));
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- return cardEffects;
|
|
|
- }
|
|
|
+ return cardEffects;
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
+}
|