mbunch_kascope 1 年間 前
コミット
3ffe5f04de

+ 2 - 2
Assets/CardBaseEntity/BT10/Red/Digimon/シャウトモンX5-BT10-013_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:f0da2c0426d2bc64f8410435cb5e894c3441d4d596628e610a7907d4cf86d9e0
-size 2861
+oid sha256:275930cbb44415417f63fc745f8c257451a6cbc10b8041da75154be7d9c9ae9a
+size 2869

+ 4 - 8
Assets/CardEffect/BT15/Green/Rosemon_X_Antibody_BT15_054.cs

@@ -168,18 +168,14 @@ public class Rosemon_X_Antibody_BT15_054 : CEntity_Effect
 
             bool CanUseCondition(Hashtable hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
-                {
-                    if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
-                        return true;
-                }
-
-                return false;
+                return CardEffectCommons.IsOpponentTurn(card) &&
+                       CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                       CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition);
             }
 
             bool CanActivateCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.IsExistOnBattleArea(card);
+                return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)

+ 2 - 3
Assets/CardEffect/BT15/Yellow/Kari_Kamiya_BT15_084.cs

@@ -122,9 +122,8 @@ public class Kari_Kamiya_BT15_084 : CEntity_Effect
                 {
                     if (CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, player => player == card.Owner))
                     {
-                        List<SkillInfo> skills = CardEffectCommons.GetSkillFromHashtable(hashtable);
-
-                        if(skills != null)
+                        ICardEffect effect = CardEffectCommons.GetCardEffectFromHashtable(hashtable);
+                        if (effect != null)
                         {
                             return true;
                         }

+ 1 - 1
Assets/CardEffect/BT16/Purple/Soloogarmon_BT16_076.cs

@@ -65,7 +65,7 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (cardSource.HasLevel && cardSource.Level <= 4 && cardSource.ContainsTraits("SoC"))
+                    if (cardSource.HasLevel && !cardSource.IsLevel2 && cardSource.Level <= 4 && cardSource.ContainsTraits("SoC"))
                     {
                         if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
                         {

+ 1 - 1
Assets/CardEffect/BT17/Yellow/RikaNonaka_BT17_085.cs

@@ -307,7 +307,7 @@ namespace DCGO.CardEffects.BT17
                                 cardCondition: CanSelectCardCondition2,
                                 payCost: true,
                                 reduceCostTuple: null,
-                                fixedCostTuple: (fixedCost: 4, fixedCostCardCondition: null),
+                                fixedCostTuple: null,
                                 ignoreDigivolutionRequirementFixedCost: 4,
                                 isHand: true,
                                 activateClass: activateClass,

+ 11 - 8
Assets/CardEffect/EX4/Purple/Kervimon_EX4_059.cs

@@ -113,8 +113,6 @@ public class Kervimon_EX4_059 : CEntity_Effect
                         {
                             if (selectedPermanent != null)
                             {
-                                CardSource _topCard = selectedPermanent.TopCard;
-
                                 ActivateClass activateClass1 = new ActivateClass();
                                 activateClass1.SetUpICardEffect("Play this card from trash", CanUseCondition1, selectedPermanent.TopCard);
                                 activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, true, EffectDiscription1());
@@ -130,14 +128,11 @@ public class Kervimon_EX4_059 : CEntity_Effect
 
                                 bool CanUseCondition1(Hashtable hashtable1)
                                 {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                    if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable1, (permanent) => permanent == selectedPermanent))
                                     {
-                                        if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable1, (permanent) => permanent == selectedPermanent))
+                                        if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
                                         {
-                                            if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
-                                            {
-                                                return true;
-                                            }
+                                            return true;
                                         }
                                     }
 
@@ -146,6 +141,14 @@ public class Kervimon_EX4_059 : CEntity_Effect
 
                                 bool CanActivateCondition1(Hashtable hashtable1)
                                 {
+                                    if (CardEffectCommons.CanActivateOnDeletion(selectedPermanent.TopCard))
+                                    {
+                                        if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: selectedPermanent.TopCard, payCost: false, cardEffect: activateClass1))
+                                        {
+                                            return true;
+                                        }
+                                    }
+
                                     if (CardEffectCommons.IsTopCardInTrashOnDeletion(hashtable1))
                                     {
                                         CardSource TopCard = CardEffectCommons.GetTopCardFromEffectHashtable(hashtable1);

+ 4 - 0
Assets/Scripts/AttackProcess.cs

@@ -153,6 +153,10 @@ public class AttackProcess : MonoBehaviourPunCallbacks
                     null);
             }
 
+            // activate cutin effects
+            yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.RuleProcess());
+            //yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing_CutIn.TriggeredSkillProcess(true, null));
+
             // callback that is processed before [On Attack]
             if (beforeOnAttackCoroutine != null)
             {

+ 27 - 14
Assets/Scripts/CardController.cs

@@ -148,8 +148,20 @@ public class PlayCardClass
     public void SetIgnoreLevel()
     {
         _ignoreLevel = true;
+        SetIgnoreRequirements(CardEffectCommons.IgnoreRequirement.Level);
     }
 
+    public void SetIgnoreRequirements(CardEffectCommons.IgnoreRequirement ignore)
+    {
+        _ignoreRequirement = ignore;
+    }
+
+    private bool GetIgnoreRequirement(CardEffectCommons.IgnoreRequirement ignore)
+    {
+        Debug.Log($"Get Ignore Requirement: {_ignoreRequirement.Equals(ignore)}, {_ignoreRequirement.Equals(CardEffectCommons.IgnoreRequirement.All)}");
+        return _ignoreRequirement.Equals(ignore) || _ignoreRequirement.Equals(CardEffectCommons.IgnoreRequirement.All);
+    }
+    
     public void SetFixedCost(int FixedCost)
     {
         _fixedCost = FixedCost;
@@ -179,6 +191,7 @@ public class PlayCardClass
     bool _activateETB = true;
     bool _showEffect = false;
     bool _ignoreLevel = false;
+    CardEffectCommons.IgnoreRequirement _ignoreRequirement = CardEffectCommons.IgnoreRequirement.None;
     int _fixedCost = -1;
     int _reducedCost = 0;
     int[] _jogressEvoRootsFrameIDs = null;
@@ -316,7 +329,7 @@ public class PlayCardClass
 
                     else
                     {
-                        if (card.CanEvolve(targetPermanents[0], true) || _ignoreLevel)
+                        if (card.CanEvolve(targetPermanents[0], true) || GetIgnoreRequirement(CardEffectCommons.IgnoreRequirement.Level) || _ignoreLevel)
                         {
                             isEvolution = true;
                         }
@@ -381,18 +394,14 @@ public class PlayCardClass
 
                                 if (!IsBurst(card))
                                 {
-                                    foreach (int cost in card.CostList(targetPermanent, ignoreLevel: _ignoreLevel, checkAvailability: false))
+                                    foreach (int cost in card.CostList(targetPermanent, ignoreLevel: GetIgnoreRequirement(CardEffectCommons.IgnoreRequirement.Level), checkAvailability: false))
                                     {
-                                        //TODO: Wait for testing confirmation before removing - MB
-                                        //if (cost <= card.Owner.MaxMemoryCost)
-                                        //{
-                                            int evoCost = cost;
+                                        int evoCost = cost;
 
-                                            if(_reducedCost > 0)
-                                                evoCost -= _reducedCost;
+                                        if (_reducedCost > 0)
+                                            evoCost -= _reducedCost;
 
-                                            CostList.Add(evoCost);
-                                        //}
+                                        CostList.Add(evoCost);
                                     } 
                                 }
 
@@ -712,7 +721,7 @@ public class PlayCardClass
                         {
                             if (!isJogress && !IsBurst(card))
                             {
-                                if (!_ignoreLevel && !card.CanPlayCardTargetFrame(targetPermanents[0].PermanentFrame, PayCost, CardEffect, root: Root, fixedCost: -1))
+                                if (!GetIgnoreRequirement(CardEffectCommons.IgnoreRequirement.Level) && !card.CanPlayCardTargetFrame(targetPermanents[0].PermanentFrame, PayCost, CardEffect, root: Root, fixedCost: -1))
                                 {
                                     endPlayCard = true;
                                     playFailed = true;
@@ -3242,7 +3251,8 @@ public class IDestroySecurity
             {
                 yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
                     player: _player,
-                    refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                    refSkillInfos: ref ContinuousController.instance.nullSkillInfos,
+                    cardEffect: _cardEffect).ReduceSecurity());
 
                 #region "When security cards are trashed" effect
 
@@ -3915,13 +3925,15 @@ public class ReturnToLibraryBottomDigivolutionCardsClass
 #region Reduce security
 public class IReduceSecurity
 {
-    public IReduceSecurity(Player player, ref List<SkillInfo> refSkillInfos)
+    public IReduceSecurity(Player player, ref List<SkillInfo> refSkillInfos, ICardEffect cardEffect = null)
     {
         _player = player;
         _refSkillInfos = refSkillInfos;
+        _cardEffect = cardEffect;
     }
     Player _player = null;
     List<SkillInfo> _refSkillInfos = null;
+    ICardEffect _cardEffect = null;
 
     public IEnumerator ReduceSecurity()
     {
@@ -3931,7 +3943,8 @@ public class IReduceSecurity
         Hashtable hashtable = new Hashtable()
         {
             {"Player", _player},
-            {"SkillInfo",_refSkillInfos }
+            {"SkillInfo",_refSkillInfos },
+            {"CardEffect",_cardEffect}
         };
         #endregion
 

+ 6 - 4
Assets/Scripts/CardEffectCommons.cs

@@ -411,7 +411,7 @@ public partial class CardEffectCommons
         {
             fixedCost = fixedCostTuple.Value.fixedCost;
         }
-
+        Debug.Log($"Digivolve into hand or trash: {ignoreDigivolutionRequirement}");
         if (ignoreDigivolutionRequirement)
         {
             fixedCost = ignoreDigivolutionRequirementFixedCost;
@@ -668,10 +668,12 @@ public partial class CardEffectCommons
             root: root,
             activateETB: true);
 
-        if (ignoreRequirements.Equals(IgnoreRequirement.All) || ignoreRequirements.Equals(IgnoreRequirement.Level)) 
-            playCardClass.SetIgnoreLevel();
+        //if (ignoreRequirements.Equals(IgnoreRequirement.All) || ignoreRequirements.Equals(IgnoreRequirement.Level)) 
+        //    playCardClass.SetIgnoreLevel();
+        playCardClass.SetIgnoreRequirements(ignoreRequirements);
 
-        if (!ignoreDigivolutionRequirement && fixedCost >= 0) 
+        //!ignoreRequirements
+        if (fixedCost >= 0) 
             playCardClass.SetFixedCost(fixedCost);
 
         yield return ContinuousController.instance.StartCoroutine(playCardClass.PlayCard());

+ 11 - 3
Assets/Scripts/CardSource.cs

@@ -399,12 +399,14 @@ public class CardSource : MonoBehaviour
                     .Map<EvoCost, Func<Permanent, int>>(evoCost =>
                     (targetPermanent) =>
                     {
-                        if(ignore.Equals(CardEffectCommons.IgnoreRequirement.All))
+                        if(ignore.Equals(CardEffectCommons.IgnoreRequirement.All) && !Owner.CanIgnoreDigivolutionRequirement(targetPermanent, this))
                             return evoCost.MemoryCost;
 
-                        if (ignore.Equals(CardEffectCommons.IgnoreRequirement.Color) || targetPermanent.TopCard.CardColors.Contains(evoCost.CardColor))
+                        if ((ignore.Equals(CardEffectCommons.IgnoreRequirement.Color) && !Owner.CanIgnoreDigivolutionRequirement(targetPermanent, this))
+                            || targetPermanent.TopCard.CardColors.Contains(evoCost.CardColor))
                         {
-                            if (ignore.Equals(CardEffectCommons.IgnoreRequirement.Level) || targetPermanent.Level == evoCost.Level)
+                            if ((ignore.Equals(CardEffectCommons.IgnoreRequirement.Level) && Owner.CanIgnoreDigivolutionRequirement(targetPermanent, this))
+                                || targetPermanent.Level == evoCost.Level)
                             {
                                 return evoCost.MemoryCost;
                             }
@@ -1651,6 +1653,12 @@ public class CardSource : MonoBehaviour
             DataBase.ReplaceToASCII(_cEntity_Base.SecurityEffectDiscription_ENG),
         };
 
+        foreach (string attribute in _cEntity_Base.Attribute_ENG)
+            checkStrings.Add(DataBase.ReplaceToASCII(attribute));
+
+        foreach (string attribute in _cEntity_Base.Type_ENG)
+            checkStrings.Add(DataBase.ReplaceToASCII(attribute));
+
         foreach (string checkString in checkStrings)
         {
             if (!string.IsNullOrEmpty(checkString))

+ 8 - 2
Assets/Scripts/TurnStateMachine.cs

@@ -603,10 +603,16 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
         {
             if (permanent.IsSuspended)
             {
-                if (permanent.TopCard.Owner == gameContext.TurnPlayer)
+                permanent.IsSuspended = false;
+
+                if (permanent.ShowingPermanentCard != null)
                 {
-                    unsuspendPermanents.Add(permanent);
+                    permanent.ShowingPermanentCard.ShowPermanentData(true);
                 }
+                /*if (permanent.TopCard.Owner == gameContext.TurnPlayer)
+                {
+                    unsuspendPermanents.Add(permanent);
+                }*/
             }
         }
 

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a8a452cc62bc7b2ea873d28fbce8bd33b3696e2f1c436299ff206a3faed79cd1
+oid sha256:bff84979492f68d725a4489ca4f27b7eaa0bbdbf721069840b8ee1cc440f1cfc
 size 20167