|
@@ -1,8 +1,9 @@
|
|
|
|
|
+using ExitGames.Client.Photon;
|
|
|
|
|
+using System;
|
|
|
using System.Collections;
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
-using UnityEngine;
|
|
|
|
|
using System.Linq;
|
|
using System.Linq;
|
|
|
-using System;
|
|
|
|
|
|
|
+using UnityEngine;
|
|
|
|
|
|
|
|
// Mega Digimon Fusion
|
|
// Mega Digimon Fusion
|
|
|
public class BT5_109 : CEntity_Effect
|
|
public class BT5_109 : CEntity_Effect
|
|
@@ -35,7 +36,7 @@ public class BT5_109 : CEntity_Effect
|
|
|
|
|
|
|
|
ActivateClass activateClass1 = new ActivateClass();
|
|
ActivateClass activateClass1 = new ActivateClass();
|
|
|
Func<EffectTiming, ICardEffect> getCardEffect = GetCardEffect;
|
|
Func<EffectTiming, ICardEffect> getCardEffect = GetCardEffect;
|
|
|
- activateClass1.SetUpICardEffect("Digivolution Cost -6", CanUseCondition1, card);
|
|
|
|
|
|
|
+ activateClass1.SetUpICardEffect("Digivolution Cost -6 and add self bounce", CanUseCondition1, card);
|
|
|
activateClass1.SetUpActivateClass(CanActivateCondition, ActivateCoroutine1, -1, true, EffectDiscription1());
|
|
activateClass1.SetUpActivateClass(CanActivateCondition, ActivateCoroutine1, -1, true, EffectDiscription1());
|
|
|
CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilEachTurnEnd, card: card, cardEffect: null, timing: EffectTiming.None, getCardEffect: getCardEffect);
|
|
CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilEachTurnEnd, card: card, cardEffect: null, timing: EffectTiming.None, getCardEffect: getCardEffect);
|
|
|
|
|
|
|
@@ -45,17 +46,8 @@ public class BT5_109 : CEntity_Effect
|
|
|
activateClass2.SetUpActivateClass(null, ActivateCoroutine2, -1, false, "");
|
|
activateClass2.SetUpActivateClass(null, ActivateCoroutine2, -1, false, "");
|
|
|
activateClass2.SetIsBackgroundProcess(true);
|
|
activateClass2.SetIsBackgroundProcess(true);
|
|
|
CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilEachTurnEnd, card: card, cardEffect: null, timing: EffectTiming.None, getCardEffect: getCardEffect1);
|
|
CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilEachTurnEnd, card: card, cardEffect: null, timing: EffectTiming.None, getCardEffect: getCardEffect1);
|
|
|
-
|
|
|
|
|
- Permanent playedPermanent = ;
|
|
|
|
|
-
|
|
|
|
|
- ActivateClass activateClass3 = new ActivateClass();
|
|
|
|
|
- activateClass3.SetUpICardEffect("Bottom deck the Digimon", CanUseCondition2, playedPermanent.TopCard);
|
|
|
|
|
- activateClass3.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine3, -1, false, EffectDiscription2());
|
|
|
|
|
- activateClass3.SetEffectSourcePermanent(playedPermanent);
|
|
|
|
|
- playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect2);
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
#region Reduce evo cost
|
|
#region Reduce evo cost
|
|
|
-
|
|
|
|
|
string EffectDiscription1()
|
|
string EffectDiscription1()
|
|
|
{
|
|
{
|
|
|
return "Reduce the memory cost of the digivolution by 6.";
|
|
return "Reduce the memory cost of the digivolution by 6.";
|
|
@@ -90,7 +82,7 @@ public class BT5_109 : CEntity_Effect
|
|
|
ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
|
|
ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
|
|
|
|
|
|
|
|
ChangeCostClass changeCostClass = new ChangeCostClass();
|
|
ChangeCostClass changeCostClass = new ChangeCostClass();
|
|
|
- changeCostClass.SetUpICardEffect("Digivolution Cost -6", CanUseCondition3, card);
|
|
|
|
|
|
|
+ changeCostClass.SetUpICardEffect("Digivolution Cost -6 and add self bounce", CanUseCondition3, card);
|
|
|
changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true); card.Owner.UntilCalculateFixedCostEffect.Add((_timing) => changeCostClass);
|
|
changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true); card.Owner.UntilCalculateFixedCostEffect.Add((_timing) => changeCostClass);
|
|
|
|
|
|
|
|
yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable1));
|
|
yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable1));
|
|
@@ -144,110 +136,114 @@ public class BT5_109 : CEntity_Effect
|
|
|
{
|
|
{
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- ICardEffect GetCardEffect(EffectTiming _timing)
|
|
|
|
|
- {
|
|
|
|
|
- if (_timing == EffectTiming.BeforePayCost)
|
|
|
|
|
- {
|
|
|
|
|
- return activateClass1;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Permanent playedPermanent = CardEffectCommons.GetPermanentsFromHashtable(hashtable)[0];
|
|
|
|
|
|
|
|
|
|
+ ActivateClass activateClass3 = new ActivateClass();
|
|
|
|
|
+ activateClass3.SetUpICardEffect("Bottom deck the Digimon", CanUseCondition2, playedPermanent.TopCard);
|
|
|
|
|
+ activateClass3.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine3, -1, false, EffectDiscription2());
|
|
|
|
|
+ activateClass3.SetEffectSourcePermanent(playedPermanent);
|
|
|
|
|
+ playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect2);
|
|
|
|
|
|
|
|
- IEnumerator ActivateCoroutine2(Hashtable _hashtable1)
|
|
|
|
|
- {
|
|
|
|
|
- if (CardEffectCommons.CanTriggerWhenPermanentWouldDigivolve(
|
|
|
|
|
- hashtable: _hashtable1,
|
|
|
|
|
- permanentCondition: PermanentCondition,
|
|
|
|
|
- cardCondition: null))
|
|
|
|
|
|
|
+ #region Bot deck end of turn
|
|
|
|
|
+ if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
|
|
|
{
|
|
{
|
|
|
- card.Owner.UntilEachTurnEndEffects.Remove(getCardEffect);
|
|
|
|
|
- card.Owner.UntilEachTurnEndEffects.Remove(getCardEffect1);
|
|
|
|
|
- yield return null;
|
|
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- ICardEffect GetCardEffect1(EffectTiming _timing)
|
|
|
|
|
- {
|
|
|
|
|
- if (_timing == EffectTiming.AfterPayCost)
|
|
|
|
|
|
|
+ string EffectDiscription2()
|
|
|
{
|
|
{
|
|
|
- return activateClass2;
|
|
|
|
|
|
|
+ return "[End of Your Turn] Return the Digimon that digivolved with this effect to the bottom of its owner's deck. (Trash all of the digivolution cards of that Digimon.)";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- yield return new WaitForSeconds(0.2f);
|
|
|
|
|
-
|
|
|
|
|
- #endregion
|
|
|
|
|
|
|
+ bool CanUseCondition2(Hashtable hashtable1)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (CardEffectCommons.IsOwnerTurn(card))
|
|
|
|
|
+ {
|
|
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
|
|
|
|
|
+ {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- #region Bot deck end of turn
|
|
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
|
|
|
|
|
- {
|
|
|
|
|
- yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ bool CanActivateCondition1(Hashtable hashtable1)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
|
|
|
|
|
+ {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- string EffectDiscription2()
|
|
|
|
|
- {
|
|
|
|
|
- return "[End of Your Turn] Return the Digimon that digivolved with this effect to the bottom of its owner's deck. (Trash all of the digivolution cards of that Digimon.)";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- bool CanUseCondition2(Hashtable hashtable1)
|
|
|
|
|
- {
|
|
|
|
|
- if (CardEffectCommons.IsOwnerTurn(card))
|
|
|
|
|
|
|
+ IEnumerator ActivateCoroutine3(Hashtable _hashtable1)
|
|
|
{
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
|
|
|
|
|
|
|
+ if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
|
|
|
{
|
|
{
|
|
|
- return true;
|
|
|
|
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(new DeckBottomBounceClass(
|
|
|
|
|
+ new List<Permanent>() { playedPermanent },
|
|
|
|
|
+ CardEffectCommons.CardEffectHashtable(activateClass3)).DeckBounce());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return false;
|
|
|
|
|
|
|
+ ICardEffect GetCardEffect2(EffectTiming _timing)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (_timing == EffectTiming.OnEndTurn)
|
|
|
|
|
+ {
|
|
|
|
|
+ return activateClass3;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- bool CanActivateCondition1(Hashtable hashtable1)
|
|
|
|
|
|
|
+ ICardEffect GetCardEffect(EffectTiming _timing)
|
|
|
{
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
|
|
|
|
|
|
|
+ if (_timing == EffectTiming.BeforePayCost)
|
|
|
{
|
|
{
|
|
|
- if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return activateClass1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return false;
|
|
|
|
|
|
|
+ return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- IEnumerator ActivateCoroutine3(Hashtable _hashtable1)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ IEnumerator ActivateCoroutine2(Hashtable _hashtable1)
|
|
|
{
|
|
{
|
|
|
- if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
|
|
|
|
|
|
|
+ if (CardEffectCommons.CanTriggerWhenPermanentWouldDigivolve(
|
|
|
|
|
+ hashtable: _hashtable1,
|
|
|
|
|
+ permanentCondition: PermanentCondition,
|
|
|
|
|
+ cardCondition: null))
|
|
|
{
|
|
{
|
|
|
- yield return ContinuousController.instance.StartCoroutine(new DeckBottomBounceClass(
|
|
|
|
|
- new List<Permanent>() { playedPermanent },
|
|
|
|
|
- CardEffectCommons.CardEffectHashtable(activateClass3)).DeckBounce());
|
|
|
|
|
|
|
+ card.Owner.UntilEachTurnEndEffects.Remove(getCardEffect);
|
|
|
|
|
+ card.Owner.UntilEachTurnEndEffects.Remove(getCardEffect1);
|
|
|
|
|
+ yield return null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- ICardEffect GetCardEffect2(EffectTiming _timing)
|
|
|
|
|
|
|
+ ICardEffect GetCardEffect1(EffectTiming _timing)
|
|
|
{
|
|
{
|
|
|
- if (_timing == EffectTiming.OnEndTurn)
|
|
|
|
|
|
|
+ if (_timing == EffectTiming.AfterPayCost)
|
|
|
{
|
|
{
|
|
|
- return activateClass3;
|
|
|
|
|
|
|
+ return activateClass2;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ yield return new WaitForSeconds(0.2f);
|
|
|
#endregion
|
|
#endregion
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#region Security Effect
|
|
#region Security Effect
|
|
|
-
|
|
|
|
|
if (timing == EffectTiming.SecuritySkill)
|
|
if (timing == EffectTiming.SecuritySkill)
|
|
|
{
|
|
{
|
|
|
ActivateClass activateClass = new ActivateClass();
|
|
ActivateClass activateClass = new ActivateClass();
|
|
@@ -270,7 +266,6 @@ public class BT5_109 : CEntity_Effect
|
|
|
yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.AddThisCardToHand(card, activateClass));
|
|
yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.AddThisCardToHand(card, activateClass));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
return cardEffects;
|
|
return cardEffects;
|