|
|
@@ -1,6 +1,7 @@
|
|
|
using System;
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
+using System.Linq;
|
|
|
|
|
|
//OmniShoutmon
|
|
|
namespace DCGO.CardEffects.BT21
|
|
|
@@ -109,7 +110,7 @@ namespace DCGO.CardEffects.BT21
|
|
|
{
|
|
|
if (cardSource.IsDigimon)
|
|
|
{
|
|
|
- if (cardSource.EqualsCardName("Shoutmon"))
|
|
|
+ if (cardSource.EqualsCardNameDigiXros("Shoutmon"))
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
@@ -362,8 +363,89 @@ namespace DCGO.CardEffects.BT21
|
|
|
|
|
|
if (selectedCard != null)
|
|
|
{
|
|
|
+ #region reduce play cost
|
|
|
+
|
|
|
+ ChangeCostClass changeCostClass = new ChangeCostClass();
|
|
|
+ changeCostClass.SetUpICardEffect("Play Cost -5", CanUseCondition1, card);
|
|
|
+ changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
|
|
|
+ Func<EffectTiming, ICardEffect> getCardEffect = GetCardEffect;
|
|
|
+ card.Owner.UntilCalculateFixedCostEffect.Add(getCardEffect);
|
|
|
+
|
|
|
+ ICardEffect GetCardEffect(EffectTiming _timing)
|
|
|
+ {
|
|
|
+ if (_timing == EffectTiming.None)
|
|
|
+ {
|
|
|
+ return changeCostClass;
|
|
|
+ }
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CanUseCondition1(Hashtable hashtable)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
|
|
|
+ {
|
|
|
+ if (CardSourceCondition(cardSource))
|
|
|
+ {
|
|
|
+ if (RootCondition(root))
|
|
|
+ {
|
|
|
+ if (PermanentsCondition(targetPermanents))
|
|
|
+ {
|
|
|
+ Cost -= 5;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return Cost;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool PermanentsCondition(List<Permanent> targetPermanents)
|
|
|
+ {
|
|
|
+ if (targetPermanents == null)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool CardSourceCondition(CardSource cardSource)
|
|
|
+ {
|
|
|
+ if (cardSource != null)
|
|
|
+ {
|
|
|
+ if (cardSource.Owner == card.Owner)
|
|
|
+ {
|
|
|
+ return CanSelectCardCondition(cardSource);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool RootCondition(SelectCardEffect.Root root)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ bool isUpDown()
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
bool isPlayed = false;
|
|
|
- var reducdedCost = selectedCard.BasePlayCostFromEntity - 5;
|
|
|
+ Permanent thisPermanent = card.PermanentOfThisCard();
|
|
|
|
|
|
yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
|
|
|
cardSources: new List<CardSource>() { selectedCard },
|
|
|
@@ -371,8 +453,13 @@ namespace DCGO.CardEffects.BT21
|
|
|
payCost: true,
|
|
|
isTapped: false,
|
|
|
root: SelectCardEffect.Root.Hand,
|
|
|
- activateETB: true,
|
|
|
- fixedCost: reducdedCost));
|
|
|
+ activateETB: true));
|
|
|
+
|
|
|
+ #region release reducing play cost
|
|
|
+
|
|
|
+ card.Owner.UntilCalculateFixedCostEffect.Remove(getCardEffect);
|
|
|
+
|
|
|
+ #endregion
|
|
|
|
|
|
if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedCard.PermanentOfThisCard())) isPlayed = true;
|
|
|
|
|
|
@@ -383,7 +470,7 @@ namespace DCGO.CardEffects.BT21
|
|
|
|
|
|
selectPermanentEffect.SetUp(
|
|
|
selectPlayer: card.Owner,
|
|
|
- canTargetCondition: permanent => permanent == card.PermanentOfThisCard(),
|
|
|
+ canTargetCondition: permanent => permanent == thisPermanent,
|
|
|
canTargetCondition_ByPreSelecetedList: null,
|
|
|
canEndSelectCondition: null,
|
|
|
maxCount: 1,
|