Kaynağa Gözat

1.10.14 (1)

mbunch_kascope 11 ay önce
ebeveyn
işleme
310533470f

+ 21 - 14
Assets/CardEffect/BT17/Red/BT17_095.cs

@@ -436,7 +436,7 @@ namespace DCGO.CardEffects.BT17
 
                             foreach (FieldCardFrame fieldCardFrame in selectedCardSource.Owner.fieldCardFrames)
                             {
-                                if (card.CanPlayCardTargetFrame(fieldCardFrame, false, null))
+                                if (selectedCardSource.CanPlayCardTargetFrame(fieldCardFrame, false, null))
                                 {
                                     if (fieldCardFrame.IsEmptyFrame())
                                     {
@@ -454,23 +454,30 @@ namespace DCGO.CardEffects.BT17
                                     CardObjectController.CreateNewPermanent(playedPermanent, frameID));
                             }
 
-                            int[] jogressEvoRootsFrameIDs =
+                            if (selectedLevel7.CanJogressFromTargetPermanent(selectedPermanent, false))
                             {
-                                selectedPermanent.PermanentFrame.FrameID, selectedCardSource.PermanentOfThisCard().PermanentFrame.FrameID
-                            };
+                                int[] jogressEvoRootsFrameIDs =
+                                {
+                                    selectedPermanent.PermanentFrame.FrameID, selectedCardSource.PermanentOfThisCard().PermanentFrame.FrameID
+                                };
 
-                            PlayCardClass playCard = new PlayCardClass(
-                                cardSources: new List<CardSource>() { selectedLevel7 },
-                                hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
-                                payCost: true,
-                                targetPermanent: null,
-                                isTapped: false,
-                                root: SelectCardEffect.Root.Hand,
-                                activateETB: true);
+                                PlayCardClass playCard = new PlayCardClass(
+                                    cardSources: new List<CardSource>() { selectedLevel7 },
+                                    hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
+                                    payCost: true,
+                                    targetPermanent: null,
+                                    isTapped: false,
+                                    root: SelectCardEffect.Root.Hand,
+                                    activateETB: true);
 
-                            playCard.SetJogress(jogressEvoRootsFrameIDs);
+                                playCard.SetJogress(jogressEvoRootsFrameIDs);
 
-                            yield return ContinuousController.instance.StartCoroutine(playCard.PlayCard());
+                                yield return ContinuousController.instance.StartCoroutine(playCard.PlayCard());
+                            }
+                            else
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddHandCard(selectedCardSource, false));
+                            }
                         }
                     }
                 }

+ 2 - 2
Assets/CardEffect/BT22/Yellow/BT22_002.cs

@@ -38,8 +38,8 @@ namespace DCGO.CardEffects.BT22
                 bool PermanentCondition(Permanent permanent)
                 {
                     return CardEffectCommons.IsOwnerPermanent(permanent, card) &&
-                           permanent.IsToken ||
-                           (permanent.IsDigimon && permanent.TopCard.HasPuppetTraits && permanent != card.PermanentOfThisCard());
+                           (permanent.IsToken ||
+                           (permanent.IsDigimon && permanent.TopCard.HasPuppetTraits && permanent != card.PermanentOfThisCard()));
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 27 - 27
Assets/CardEffect/BT22/Yellow/BT22_034.cs

@@ -67,48 +67,48 @@ namespace DCGO.CardEffects.BT22
 
             IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
             {
-                if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, SharedIsOpponentDigimon))
-                {
-                    bool isTrashingSecurity = false;
-                    int dpChange = 3000;
+                bool isTrashingSecurity = false;
+                int dpChange = 3000;
 
-                    if (card.Owner.SecurityCards.Any())
-                    {
-                        #region Make Selection for Trashing Security
+                if (card.Owner.SecurityCards.Any())
+                {
+                    #region Make Selection for Trashing Security
 
-                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                    List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
                         {
                             new SelectionElement<bool>(message: $"Yes", value : true, spriteIndex: 0),
                             new SelectionElement<bool>(message: $"No", value : false, spriteIndex: 1),
                         };
 
-                        string selectPlayerMessage = "Trash top security to -6K DP instead of 3K?";
-                        string notSelectPlayerMessage = "The opponent is choosing to trash top secuirty.";
+                    string selectPlayerMessage = "Trash top security to -6K DP instead of 3K?";
+                    string notSelectPlayerMessage = "The opponent is choosing to trash top secuirty.";
 
-                        GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
-                        isTrashingSecurity = GManager.instance.userSelectionManager.SelectedBoolValue;
+                    GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                    isTrashingSecurity = GManager.instance.userSelectionManager.SelectedBoolValue;
 
-                        #endregion
-                    }
+                    #endregion
+                }
 
-                    if (isTrashingSecurity)
-                    {
-                        CardSource topSec = card.Owner.SecurityCards.FirstOrDefault();
+                if (isTrashingSecurity)
+                {
+                    CardSource topSec = card.Owner.SecurityCards.FirstOrDefault();
 
-                        #region Trash Top Security
+                    #region Trash Top Security
 
-                        yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
-                        player: card.Owner,
-                        destroySecurityCount: 1,
-                        cardEffect: activateClass,
-                        fromTop: true).DestroySecurity());
+                    yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                    player: card.Owner,
+                    destroySecurityCount: 1,
+                    cardEffect: activateClass,
+                    fromTop: true).DestroySecurity());
 
-                        #endregion
+                    #endregion
 
-                        if (CardEffectCommons.IsExistOnTrash(topSec)) dpChange = 6000;
-                    }
+                    if (CardEffectCommons.IsExistOnTrash(topSec)) dpChange = 6000;
+                }
 
+                if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, SharedIsOpponentDigimon))
+                {
                     Permanent selectedPermament = null;
 
                     #region Select Permanent

+ 1 - 0
Assets/CardEffect/EX3/Green/EX3_041.cs

@@ -59,6 +59,7 @@ namespace DCGO.CardEffects.EX3
                     {
                         if (cardSource != null)
                         {
+                            UnityEngine.Debug.Log($"ADD LEVELS: {cardSource.BaseENGCardNameFromEntity}");
                             if (cardSource.Owner == card.Owner)
                             {
                                 if (cardSource.Owner.HandCards.Contains(cardSource))

+ 22 - 13
Assets/CardEffect/EX6/White/EX6_072.cs

@@ -72,7 +72,8 @@ namespace DCGO.CardEffects.EX6
 
                 bool HasLevel6HandSource(CardSource cardSource)
                 {
-                    return cardSource.IsDigimon;
+                    return cardSource.IsDigimon &&
+                           cardSource.HasLevel && cardSource.Level == 6;
                 }
 
                 bool HasLevel6Permanent(Permanent permanent)
@@ -280,12 +281,13 @@ namespace DCGO.CardEffects.EX6
 
                     if(selectedLevel7 != null && selectedPermanent != null && selectedCardSource != null)
                     {
+                        
                         Permanent playedPermanent;
                         int frameID = -1;
 
                         foreach (FieldCardFrame fieldCardFrame in selectedCardSource.Owner.fieldCardFrames)
                         {
-                            if (card.CanPlayCardTargetFrame(fieldCardFrame, false, null))
+                            if (selectedCardSource.CanPlayCardTargetFrame(fieldCardFrame, false, null))
                             {
                                 if (fieldCardFrame.IsEmptyFrame())
                                 {
@@ -302,20 +304,27 @@ namespace DCGO.CardEffects.EX6
                             yield return ContinuousController.instance.StartCoroutine(CardObjectController.CreateNewPermanent(playedPermanent, frameID));
                         }
 
-                        int[] JogressEvoRootsFrameIDs = { selectedPermanent.PermanentFrame.FrameID, selectedCardSource.PermanentOfThisCard().PermanentFrame.FrameID };
+                        if (selectedLevel7.CanJogressFromTargetPermanent(selectedPermanent, false))
+                        {
+                            int[] JogressEvoRootsFrameIDs = { selectedPermanent.PermanentFrame.FrameID, selectedCardSource.PermanentOfThisCard().PermanentFrame.FrameID };
 
-                        PlayCardClass playCard = new PlayCardClass(
-                            cardSources: new List<CardSource>() { selectedLevel7 },
-                            hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
-                            payCost: true,
-                            targetPermanent: null,
-                            isTapped: false,
-                            root: SelectCardEffect.Root.Hand,
-                            activateETB: true);
+                            PlayCardClass playCard = new PlayCardClass(
+                                cardSources: new List<CardSource>() { selectedLevel7 },
+                                hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
+                                payCost: true,
+                                targetPermanent: null,
+                                isTapped: false,
+                                root: SelectCardEffect.Root.Hand,
+                                activateETB: true);
 
-                        playCard.SetJogress(JogressEvoRootsFrameIDs);
+                            playCard.SetJogress(JogressEvoRootsFrameIDs);
 
-                        yield return ContinuousController.instance.StartCoroutine(playCard.PlayCard());
+                            yield return ContinuousController.instance.StartCoroutine(playCard.PlayCard());
+                        }
+                        else
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddHandCard(selectedCardSource, false));
+                        }
                     }
                 }
             }

+ 8 - 3
Assets/Scripts/CardController.cs

@@ -1226,12 +1226,14 @@ public class PlayPermanentClass
                     {
                         FieldCardFrame digieggFrame = card.Owner.fieldCardFrames.Find(fieldCardFrame =>
                         fieldCardFrame.IsEmptyFrame() &&
-                        !fieldCardFrame.IsBattleAreaFrame() &&
-                        (_isHatching || card.CanPlayCardTargetFrame(fieldCardFrame, false, CardEffect, isBreedingArea: _isBreedingArea)));
+                        !fieldCardFrame.IsBattleAreaFrame());
 
                         if (digieggFrame != null)
                         {
-                            frameId = digieggFrame.FrameID;
+                            if (_isHatching)
+                                frameId = digieggFrame.FrameID;
+                            else if(card.CanPlayCardTargetFrame(digieggFrame, false, CardEffect, isBreedingArea: _isBreedingArea))
+                                    frameId = digieggFrame.FrameID;
                         }
                     }
                 }
@@ -1284,6 +1286,9 @@ public class PlayPermanentClass
                         {
                             played = false;
                         }
+
+                        if(_isHatching)
+                            played = _isHatching;
                     }
 
                     if (played)

+ 9 - 0
Assets/Scripts/CardSource.cs

@@ -2576,22 +2576,31 @@ public class CardSource : MonoBehaviour
 
     public bool CanJogressFromTargetPermanent(Permanent targetPermanent, bool PayCost)
     {
+        UnityEngine.Debug.Log($"CAN JOGRESS: {targetPermanent}");
         if (targetPermanent != null)
         {
+            UnityEngine.Debug.Log($"CAN JOGRESS: {targetPermanent.TopCard}");
             if (targetPermanent.TopCard != null)
             {
+                UnityEngine.Debug.Log($"CAN JOGRESS: {jogressCondition.Count}");
                 foreach (JogressCondition condition in jogressCondition)
                 {
+                    UnityEngine.Debug.Log($"CAN JOGRESS: {targetPermanent.TopCard.Owner.GetBattleAreaDigimons().Contains(targetPermanent)}");
                     if (targetPermanent.TopCard.Owner.GetBattleAreaDigimons().Contains(targetPermanent))
                     {
+                        UnityEngine.Debug.Log($"CAN JOGRESS: {this.CanPlayJogress(PayCost)}");
                         if (this.CanPlayJogress(PayCost))
                         {
+                            UnityEngine.Debug.Log($"CAN JOGRESS: {(condition != null)}");
                             if (condition != null)
                             {
+                                UnityEngine.Debug.Log($"CAN JOGRESS: {(condition.elements.ToList().Count((element) => element.EvoRootCondition(targetPermanent)) >= 1)}");
                                 if (condition.elements.ToList().Count((element) => element.EvoRootCondition(targetPermanent)) >= 1)
                                 {
+                                    UnityEngine.Debug.Log($"CAN JOGRESS: {this.CanNotEvolve(targetPermanent)}");
                                     if (!this.CanNotEvolve(targetPermanent))
                                     {
+                                        UnityEngine.Debug.Log($"CAN JOGRESS: {PayCost}");
                                         if (PayCost)
                                         {
                                             int cost = condition.cost;

+ 4 - 6
Assets/Scripts/ICardEffect.cs

@@ -306,7 +306,6 @@ public abstract class ICardEffect
 
     public bool CanActivate(Hashtable hashtable)
     {
-        UnityEngine.Debug.Log($"CAN ACTIVATE: LINE 1");
         #region Effect availability determined by the maximum number of times it can be used in a turn
 
         if (EffectSourceCard.cEntity_EffectController.isOverMaxCountPerTurn(this, MaxCountPerTurn))
@@ -315,7 +314,7 @@ public abstract class ICardEffect
         }
 
         #endregion
-        UnityEngine.Debug.Log($"CAN ACTIVATE: LINE 2");
+
         #region Determination of availability for each effect
 
         if (CanActivateCondition != null && !CanActivateCondition(hashtable))
@@ -324,7 +323,7 @@ public abstract class ICardEffect
         }
 
         #endregion
-        UnityEngine.Debug.Log($"CAN ACTIVATE: LINE 3");
+
         #region Determination of availability for Inheritated/Linked Effect
 
         if (this is ActivateICardEffect)
@@ -359,7 +358,7 @@ public abstract class ICardEffect
         }
 
         #endregion
-        UnityEngine.Debug.Log($"CAN ACTIVATE: LINE 4");
+
         #region Determination of availability due to be disabled
 
         if (IsDisabled)
@@ -368,7 +367,6 @@ public abstract class ICardEffect
         }
 
         #endregion
-        UnityEngine.Debug.Log($"CAN ACTIVATE: LINE 5");
         //TODO: Look into this for the on deletion General issue
         #region Determination whether the permanent is same as when triggered
 
@@ -397,7 +395,7 @@ public abstract class ICardEffect
         }
 
         #endregion
-        UnityEngine.Debug.Log($"CAN ACTIVATE: LINE 6");
+
         return true;
     }
 

+ 4 - 4
Assets/Scripts/TurnStateMachine.cs

@@ -708,7 +708,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
 
             if (gameContext.TurnPlayer.isYou)
             {
-                #region 孵化できる場合
+                #region If hatching is possible
                 if (gameContext.TurnPlayer.CanHatch || !gameContext.TurnPlayer.CanMove)
                 {
                     GManager.instance.hideCannotSelectObject.SetUpHideCannotSelectObject(new List<FieldPermanentCard>() { null }, true);
@@ -726,7 +726,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
                     }
                 }
                 #endregion
-                #region 移動できる場合
+                #region If you can move
                 else if (!gameContext.TurnPlayer.CanHatch || gameContext.TurnPlayer.CanMove)
                 {
                     //GManager.instance.commandText.OpenCommandText("BreedingPhase : Will you move your Digimon to Battle Area?");
@@ -780,13 +780,13 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
             {
                 if (doAction_BreedingPhase)
                 {
-                    //孵化
+                    //hatching
                     if (gameContext.TurnPlayer.CanHatch || !gameContext.TurnPlayer.CanMove)
                     {
                         yield return ContinuousController.instance.StartCoroutine(new HatchDigiEggClass(player: gameContext.TurnPlayer, hashtable: null).Hatch());
                     }
 
-                    //移動
+                    //move
                     else if (!gameContext.TurnPlayer.CanHatch || gameContext.TurnPlayer.CanMove)
                     {
                         yield return ContinuousController.instance.StartCoroutine(CardObjectController.MovePermanent(gameContext.TurnPlayer.GetBreedingAreaPermanents()[0].PermanentFrame));