Parcourir la source

fixes to quantumon, updated class typing for namespaces, allowed cardsources to use english name

mbunch_kascope il y a 2 ans
Parent
commit
28c7e14ccf

+ 6 - 17
Assets/CardEffect/LM/Yellow/Quantumon_LM_020.cs

@@ -25,20 +25,7 @@ namespace DCGO.CardEffects.LM
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (cardSource.CardNames.Contains("X Antibody") || cardSource.CardNames.Contains("XAntibody"))
-                    {
-                        return true;
-                    }
-
-                    if (cardSource.Level == 6)
-                    {
-                        if (cardSource.HasLevel)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return true;
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
@@ -80,7 +67,6 @@ namespace DCGO.CardEffects.LM
                     bool placedToSecurity = false;
 
                     List<Permanent> selectedPermanents = new List<Permanent>();
-                    List<CardSource> selectedCards = new List<CardSource>();
 
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
@@ -135,7 +121,7 @@ namespace DCGO.CardEffects.LM
                                 canNoSelect: () => false,
                                 selectCardCoroutine: SelectCardCoroutine,
                                 afterSelectCardCoroutine: AfterSelectCardCoroutine,
-                                message: "Select 1 card to discard.",
+                                message: "Select 1 card to return to top of deck.",
                                 maxCount: maxCount,
                                 canEndNotMax: false,
                                 isShowOpponent: true,
@@ -260,7 +246,10 @@ namespace DCGO.CardEffects.LM
                             maxCount: -1,
                             selectCardCoroutine: RevealedCardsCoroutine),
                         remainingCardsPlace: RemainingCardsPlace.DeckTopOrBottom,
-                        activateClass: activateClass
+                        activateClass: activateClass,
+                        revealedCardsCoroutine: null,
+                        refSelectedCards: null,
+                        isOpponentDeck: true
                     ));
 
                     IEnumerator RevealedCardsCoroutine(CardSource revealedCard)

+ 4 - 4
Assets/Scripts/AutoProcessing.cs

@@ -519,7 +519,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
     {
         List<SkillInfo> skillInfos = new List<SkillInfo>();
 
-        #region プレイヤーの効果
+        #region player effect
         foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer)
         {
             foreach (ICardEffect cardEffect in player.EffectList(timing).Filter(cardEffect => cardEffectCondition == null || cardEffectCondition(cardEffect)))
@@ -538,7 +538,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
         }
         #endregion
 
-        #region 場のパーマネントの効果
+        #region Effects of permanents in play
         foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer)
         {
             foreach (Permanent permanent in player.GetFieldPermanents())
@@ -560,7 +560,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
         }
         #endregion
 
-        #region トラッシュのカードの効果
+        #region Trash card effect
         foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer)
         {
             foreach (CardSource cardSource in player.TrashCards)
@@ -582,7 +582,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
         }
         #endregion
 
-        #region 手札のカードの効果
+        #region Effects of cards in hand
         foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer)
         {
             foreach (CardSource cardSource in player.HandCards)

+ 10 - 2
Assets/Scripts/CEntity_EffectController.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using UnityEngine;
 using System;
+using System.IO;
 
 public class CEntity_EffectController : MonoBehaviour
 {
@@ -153,13 +154,17 @@ public class CEntity_EffectController : MonoBehaviour
     #endregion
 
     #region カード効果をセット
-    public void AddCardEffect(string ClassName)
+    public void AddCardEffect(string ID, string ClassName)
     {
+        ID = ID.Split("-")[0];
         #region カード効果クラスのインスタンスを生成してセット
         bool CanAttachEffectComponent()
         {
             if (string.IsNullOrEmpty(ClassName)) return false;
-            if (Type.GetType(ClassName) == null) return false;
+            if (Type.GetType(ClassName) == null)
+            {
+                if (Type.GetType($"DCGO.CardEffects.{ID}.{ClassName}") == null) return false;
+            }
 
             return true;
         }
@@ -170,6 +175,9 @@ public class CEntity_EffectController : MonoBehaviour
         {
             Type t = Type.GetType(ClassName);
 
+            if (t == null)
+                t = Type.GetType($"DCGO.CardEffects.{ID}.{ClassName}");
+
             Component component = this.gameObject.AddComponent(t);
 
             if (component is CEntity_Effect)

+ 1 - 1
Assets/Scripts/CardObjectController.cs

@@ -352,7 +352,7 @@ public class CardObjectController : MonoBehaviour
 
         cardSource.SetBaseData(cEntity_Base, player);
 
-        cardSource.cEntity_EffectController.AddCardEffect(cEntity_Base.CardEffectClassName);
+        cardSource.cEntity_EffectController.AddCardEffect(cEntity_Base.CardID, cEntity_Base.CardEffectClassName);
 
         cardSource.SetUpCardIndex(GManager.instance.CardIndex);
 

+ 1 - 1
Assets/Scripts/CardSource.cs

@@ -30,7 +30,7 @@ public class CardSource : MonoBehaviour
     {
         _cEntity_Base = cEntity_Base;
         Owner = owner;
-        gameObject.name = _cEntity_Base.CardName_JPN;
+        gameObject.name = _cEntity_Base.CardName_ENG;
 
         SetFace();
     }