Explorar o código

added matt and tk

dp101428 hai 1 ano
pai
achega
5d4a12d343

+ 2 - 2
Assets/CardBaseEntity/ST21/Blue/Tamer/ST21_12.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:17fd178788f35e14fb129753eb1cb3c47c49ad3cdfb51bbd677d3aa3f349bc1e
-size 918
+oid sha256:b31065ee05aa6bbf86515f8a0b6ed41f4f279faf006fa92e97478b762506fbc5
+size 1294

+ 2 - 2
Assets/CardBaseEntity/ST21/Green/Digimon/ST21_07.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:91b024856dc8917e2860515dbf762f768bb9cbabecb96200def73dac32955750
-size 1174
+oid sha256:769cce62cfa1c6149c4993cf65a20bac554a3adba4f142540e03dff16e9dec75
+size 1160

+ 2 - 2
Assets/CardBaseEntity/ST21/Green/Digimon/ST21_09.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:52164599a88d79d3764294844aac3b2beb174ea679a9c57408a8ae32771924e2
-size 918
+oid sha256:abc3f3cf37fa0e9eea5de4944d7d1a6bf7ebaaa1262813770cf06e6930d730d6
+size 1468

+ 2 - 2
Assets/CardBaseEntity/ST21/Purple/Digimon/ST21_10.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:55f325bf96875e9629fcbaebd67aedead77add5c713f2403514b5c3877528dd6
-size 918
+oid sha256:6aeb99e44842a3102596578db6942b17e341920e99698f89b2ff99f5a24e3dda
+size 1414

+ 8 - 0
Assets/CardBaseEntity/ST21/Purple/Tamer.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 68a7f5cf8975a4c4682ee5cfb5bfb4fd
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 3 - 0
Assets/CardBaseEntity/ST21/Purple/Tamer/ST21_13.asset

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ccd9a93195d778166cafec95761a8d2aec845b8291a9a3af1968e36b2ac7102a
+size 1278

+ 8 - 0
Assets/CardBaseEntity/ST21/Purple/Tamer/ST21_13.asset.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: baa762fc137dbdb4799b303b65698a11
+NativeFormatImporter:
+  externalObjects: {}
+  mainObjectFileID: 11400000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 2
Assets/CardBaseEntity/ST21/Yellow/Digimon/ST21_05.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:8fdff5044a2f2393e74d59054c05f48febc44be9bf60a969e34e5ed83f07213d
-size 918
+oid sha256:2b3259c5cb43ed3a9f013c18df8585feea0f427c8a7d66aa8f1e7eee7ca9d243
+size 1283

+ 169 - 0
Assets/CardEffect/ST21/Purple/ST21_13.cs

@@ -0,0 +1,169 @@
+using System.Collections;
+using System.Collections.Generic;
+
+//ST21 Matt & T.K
+namespace DCGO.CardEffects.ST21
+{
+    public class ST21_13 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Cost reduction
+            if (timing == EffectTiming.BeforePayCost)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Reduce Play Cost", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Your Turn] When any Digimon cards with the [ADVENTURE] trait would be played from your hand, by suspending this Tamer, reduce the play cost by 1.";
+                }
+                bool PlayCardCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.IsExistOnHand(cardSource))
+                    {
+                        return cardSource.EqualsTraits("ADVENTURE");
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return CardEffectCommons.CanTriggerWhenPermanentWouldPlay(hashtable, PlayCardCondition);
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsOwnerTurn(card))
+                    {
+                        if (CardEffectCommons.IsExistOnBattleArea(card))
+                        {
+                            if (CardEffectCommons.CanActivateSuspendCostEffect(card))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (!card.PermanentOfThisCard().IsSuspended && card.PermanentOfThisCard().CanSuspend)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(
+                            new List<Permanent>() { card.PermanentOfThisCard() },
+                            CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
+
+                            if (card.PermanentOfThisCard().IsSuspended)
+                            {
+                                ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
+
+                                ChangeCostClass changeCostClass = new ChangeCostClass();
+                                changeCostClass.SetUpICardEffect("Cost -1", CanUseChangeCostCondition, card);
+                                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(_hashtable));
+
+                                bool CanUseChangeCostCondition(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 -= 1;
+                                            }
+                                        }
+                                    }
+
+                                    return Cost;
+                                }
+
+                                bool PermanentsCondition(List<Permanent> targetPermanents)
+                                {
+                                    return targetPermanents != null;
+                                }
+
+                                bool CardSourceCondition(CardSource cardSource)
+                                {
+                                    if (cardSource != null)
+                                    {
+                                        return cardSource.Owner == card.Owner;
+                                    }
+
+                                    return false;
+                                }
+
+                                bool RootCondition(SelectCardEffect.Root root)
+                                {
+                                    return true;
+                                }
+
+                                bool isUpDown()
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            #endregion
+
+            #region Rush gain
+            if (timing == EffectTiming.None)
+            {
+                bool CanUseCondition()
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card) && CardEffectCommons.IsOwnerTurn(card);
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.EqualsTraits("ADVENTURE") && permanent.Level >= 5)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.RushStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    isInheritedEffect: false,
+                    card: card,
+                    condition: CanUseCondition));
+            }
+            #endregion  
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/ST21/Purple/ST21_13.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 80b591b9f5356f24d819087b20d5abb4
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: