瀏覽代碼

Purple Effect Scripts, Gyuukimon done

mbunch_kascope 2 年之前
父節點
當前提交
01dd7f909b

+ 8 - 0
Assets/CardEffect/LM/Purple.meta

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

+ 13 - 0
Assets/CardEffect/LM/Purple/Gammamon_LM_016.cs

@@ -0,0 +1,13 @@
+using System.Collections.Generic;
+
+public class Gammamon_LM_016 : CEntity_Effect
+{
+    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    {
+        List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+
+
+        return cardEffects;
+    }
+}

+ 11 - 0
Assets/CardEffect/LM/Purple/Gammamon_LM_016.cs.meta

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

+ 94 - 0
Assets/CardEffect/LM/Purple/Gyuukimon_LM_018.cs

@@ -0,0 +1,94 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+public class Gyuukimon_LM_018 : 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("Place 1 levl 4 Digimon", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+            cardEffects.Add(activateClass);
+
+            string EffectDiscription()
+            {
+                return "[On Play] Delete 1 level 4 or lower Digimon. If you did, you may play 1 [Gyuukimon] Token without paying the cost. (Digimon/Cost 7/Lv.5/Purple/Ultimate/Virus/Dark Animal/3000 DP)";
+            }
+
+            bool CanSelectPermanentCondition(Permanent permanent)
+            {
+                if(permanent.IsDigimon)
+                {
+                    if(permanent.Level <= 4)
+                    {
+                        return true;
+                    }
+                }
+                return false;
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    return true;
+                }
+
+                return false;
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                {
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: 1,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Destroy,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 Level 4 or lower Digimon","Opponent is selecting level 4 or lower Digimon");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { permanent }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
+                    }
+                    
+                    IEnumerator SuccessProcess()
+                    {
+                        ActivateClass activateClass = new ActivateClass();
+                        activateClass.SetUpICardEffect("Play 1 Gyuukimon Token", CanUseCondition, card);
+                        activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                        cardEffects.Add(activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayGyuukimonToken(activateClass));
+                    }
+                }
+            }
+        }
+
+        return cardEffects;
+    }
+}

+ 11 - 0
Assets/CardEffect/LM/Purple/Gyuukimon_LM_018.cs.meta

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

+ 13 - 0
Assets/CardEffect/LM/Purple/Regulusmon_LM_017.cs

@@ -0,0 +1,13 @@
+using System.Collections.Generic;
+
+public class Regulusmon_LM_017 : CEntity_Effect
+{
+    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    {
+        List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+
+
+        return cardEffects;
+    }
+}

+ 11 - 0
Assets/CardEffect/LM/Purple/Regulusmon_LM_017.cs.meta

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

+ 12 - 0
Assets/Scripts/CardEffectCommons.cs

@@ -181,6 +181,18 @@ public partial class CardEffectCommons
     }
     #endregion
 
+    #region Play 1 [Gyuukimon] Token
+    public static IEnumerator PlayGyuukimonToken(ICardEffect activateClass)
+    {
+        yield return ContinuousController.instance.StartCoroutine(PlayToken(
+            tokenData: ContinuousController.instance.GyuukimonToken,
+            activateClass: activateClass,
+            isOwnerPermanent: true,
+            isTapped: false
+        ));
+    }
+    #endregion
+
     #region Security effect of "add this card to hand"
     public static IEnumerator AddThisCardToHand(CardSource card1, ICardEffect activateClass)
     {

+ 21 - 0
Assets/Scripts/ContinuousController.cs

@@ -106,6 +106,7 @@ public class ContinuousController : MonoBehaviour
     public CEntity_Base AmonToken { get; private set; }
     public CEntity_Base UmonToken { get; private set; }
     public CEntity_Base FujitsumonToken { get; private set; }
+    public CEntity_Base GyuukimonToken { get; private set; }
     public CardRestriction BanList { get; private set; } = new CardRestriction(new List<CardLimitCount>(), new List<BannedPair>());
 
     void LoadBanList()
@@ -221,6 +222,26 @@ public class ContinuousController : MonoBehaviour
         };
 
         await FujitsumonToken.GetCardSprite();
+
+        GyuukimonToken = new CEntity_Base()
+        {
+            cardColors = new List<CardColor>() { CardColor.White },
+            PlayCost = 14,
+            Level = 6,
+            CardName_JPN = "ギュウキモン",
+            CardName_ENG = "Gyuukimon",
+            Form_JPN = new List<string>() { "究極の" },
+            Form_ENG = new List<string>() { "Ultimate" },
+            Attribute_JPN = new List<string>() { "ウイルス" },
+            Attribute_ENG = new List<string>() { "Virus" },
+            Type_JPN = new List<string>() { "ダークアニマル" },
+            Type_ENG = new List<string>() { "Dark Animal" },
+            CardSpriteName = "LM-018-token",
+            cardKind = CardKind.Digimon,
+            DP = 3000,
+        };
+
+        await GyuukimonToken.GetCardSprite();
     }
 
     public static ContinuousController instance = null;