Forráskód Böngészése

Merge branch 'develop' into hooperk-BT25-042

x89rt2 3 hónapja
szülő
commit
5bfa450228

+ 24 - 19
Assets/Scripts/CardEffect/BT25/Blue/BT25_087.cs

@@ -23,7 +23,8 @@ namespace DCGO.CardEffects.BT25
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Suspend to may place top 2 from deck face down under this tamer", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                activateClass.SetIsSkippable(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDescription()
@@ -45,30 +46,34 @@ namespace DCGO.CardEffects.BT25
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SuspendPeremanentAndProcessAccordingToResult(
-                        new List<Permanent>() { card.PermanentOfThisCard() },
-                        activateClass,
-                        SuccessProcess,
-                        null));
-
-                    IEnumerator SuccessProcess(List<Permanent> suspendedPermaments)
+                    List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>
                     {
-                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>
-                        {
-                            new(message: $"Yes", value: 1, spriteIndex: 0),
-                            new(message: $"No", value: 2, spriteIndex: 1)
-                        };
+                        new(message: $"Suspend and place 2 cards from deck under this card", value: 1, spriteIndex: 0),
+                        new(message: $"Only suspend without placing cards", value: 2, spriteIndex: 0),
+                        new(message: $"No", value: 3, spriteIndex: 1)
+                    };
+
+                    string selectPlayerMessage = "Will you suspend this tamer to place the top 2 cards from your deck under this Tamer face down?";
+                    string notSelectPlayerMessage = "The opponent is choosing whether to place the top 2 cards from their deck under their Tamer face down.";
 
-                        string selectPlayerMessage = "Will you place the top 2 cards from your deck under this Tamer face down?";
-                        string notSelectPlayerMessage = "The opponent is choosing whether to place the top 2 cards from their deck under their Tamer face down.";
+                    GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
 
-                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
 
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                    int answer = GManager.instance.userSelectionManager.SelectedIntValue;
 
-                        bool Yes = GManager.instance.userSelectionManager.SelectedIntValue == 1;
+                    if (answer != 3)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SuspendPeremanentAndProcessAccordingToResult(
+                            new List<Permanent>() { card.PermanentOfThisCard() },
+                            activateClass,
+                            SuccessProcess,
+                            null));
+                    }
 
-                        if (Yes)
+                    IEnumerator SuccessProcess(List<Permanent> suspendedPermaments)
+                    {
+                        if (answer == 1)
                         {
                             yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(
                                     new List<CardSource> { card.Owner.LibraryCards[0], card.Owner.LibraryCards[1] }, activateClass, isFacedown: true));

+ 23 - 19
Assets/Scripts/CardEffect/BT25/Green/BT25_090.cs

@@ -23,7 +23,7 @@ namespace DCGO.CardEffects.BT25
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Suspend to may place top 2 from deck face down under this tamer", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
                 activateClass.SetIsSkippable(true);
                 cardEffects.Add(activateClass);
 
@@ -51,30 +51,34 @@ namespace DCGO.CardEffects.BT25
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SuspendPeremanentAndProcessAccordingToResult(
-                        new List<Permanent>() { card.PermanentOfThisCard() },
-                        activateClass,
-                        SuccessProcess,
-                        null));
-
-                    IEnumerator SuccessProcess(List<Permanent> suspendedPermaments)
+                    List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>
                     {
-                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>
-                        {
-                            new(message: $"Yes", value: 1, spriteIndex: 0),
-                            new(message: $"No", value: 2, spriteIndex: 1)
-                        };
+                        new(message: $"Suspend and place 2 cards from deck under this card", value: 1, spriteIndex: 0),
+                        new(message: $"Only suspend without placing cards", value: 2, spriteIndex: 0),
+                        new(message: $"No", value: 3, spriteIndex: 1)
+                    };
+
+                    string selectPlayerMessage = "Will you suspend this tamer to place the top 2 cards from your deck under this Tamer face down?";
+                    string notSelectPlayerMessage = "The opponent is choosing whether to place the top 2 cards from their deck under their Tamer face down.";
 
-                        string selectPlayerMessage = "Will you place the top 2 cards from your deck under this Tamer face down?";
-                        string notSelectPlayerMessage = "The opponent is choosing whether to place the top 2 cards from their deck under their Tamer face down.";
+                    GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
 
-                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
 
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                    int answer = GManager.instance.userSelectionManager.SelectedIntValue;
 
-                        bool Yes = GManager.instance.userSelectionManager.SelectedIntValue == 1;
+                    if (answer != 3)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SuspendPeremanentAndProcessAccordingToResult(
+                            new List<Permanent>() { card.PermanentOfThisCard() },
+                            activateClass,
+                            SuccessProcess,
+                            null));
+                    }
 
-                        if (Yes)
+                    IEnumerator SuccessProcess(List<Permanent> suspendedPermaments)
+                    {
+                        if (answer == 1)
                         {
                             yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(
                                     new List<CardSource> { card.Owner.LibraryCards[0], card.Owner.LibraryCards[1] }, activateClass, isFacedown: true));

+ 1 - 1
Assets/Scripts/CardEffect/BT25/Yellow/BT25_038.cs

@@ -234,7 +234,7 @@ namespace DCGO.CardEffects.BT25
                                             isShowOpponent: true,
                                             mode: SelectCardEffect.Mode.Custom,
                                             root: SelectCardEffect.Root.DigivolutionCards,
-                                            customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
+                                            customRootCardList: selectedPermanent[0].DigivolutionCards,
                                             canLookReverseCard: true,
                                             selectPlayer: card.Owner,
                                             cardEffect: activateClass);

+ 2 - 2
Assets/Scripts/CardEffect/BT25/Yellow/BT25_040.cs

@@ -202,12 +202,12 @@ namespace DCGO.CardEffects.BT25
                 activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
 
-                string EffectDescription() => "[All Turns] (Once Per Turn) When security stacks are removed from, 1 of your opponent's Digimon gets -4000 DP for the turn.";
+                string EffectDescription() => "[All Turns] [Once Per Turn] When your security stack is removed from, 1 of your opponent's Digimon gets -4000 DP for the turn.";
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
-                           CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, _ => true);
+                           CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, player => player == card.Owner);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)

+ 4 - 5
Assets/Scripts/CardEffect/BT25/Yellow/BT25_042.cs

@@ -109,7 +109,7 @@ namespace DCGO.CardEffects.BT25
             if (timing == EffectTiming.OnLoseSecurity)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Play 1 level 4 or lower [Angel]/[Illad] trait card from hand without cost, then 2 digimon gain reboot & blocker until opponent turn end", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Play 1 level 4 or lower [Angel]/[Iliad] trait card from hand without cost, then 2 digimon gain reboot & blocker until opponent turn end", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
                 activateClass.SetHashString("BT25_042_AT");
                 cardEffects.Add(activateClass);
@@ -160,14 +160,13 @@ namespace DCGO.CardEffects.BT25
                             cardEffect: activateClass);
 
                         yield return ContinuousController.instance.StartCoroutine(selectHandEffect.Activate());
-
                     }
 
                     List<Permanent> selectedPermaments = new List<Permanent>(); ;
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsOwnedDigimon))
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsOwnedDigimon))
                     {
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-                        int maxCount = Math.Min(2, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsOwnedDigimon));
+                        int maxCount = Math.Min(2, CardEffectCommons.MatchConditionPermanentCount(IsOwnedDigimon));
 
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
@@ -188,7 +187,7 @@ namespace DCGO.CardEffects.BT25
                             yield break;
                         }
 
-                        selectPermanentEffect.SetUpCustomMessage($"Select 2 digimon to gain reboot and blocker.", $"The opponent is selecting 2 digimon to gain reboot and blocker.");
+                        selectPermanentEffect.SetUpCustomMessage("Select 2 digimon to gain reboot and blocker.", "The opponent is selecting 2 digimon to gain reboot and blocker.");
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     }
 

+ 25 - 20
Assets/Scripts/CardEffect/BT25/Yellow/BT25_088.cs

@@ -23,7 +23,8 @@ namespace DCGO.CardEffects.BT25
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Suspend to may place top 2 from deck face down under this tamer", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                activateClass.SetIsSkippable(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDescription()
@@ -43,32 +44,36 @@ namespace DCGO.CardEffects.BT25
                         && CardEffectCommons.CanActivateSuspendCostEffect(card);
                 }
 
-                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SuspendPeremanentAndProcessAccordingToResult(
-                        new List<Permanent>() { card.PermanentOfThisCard() },
-                        activateClass,
-                        SuccessProcess,
-                        null));
-
-                    IEnumerator SuccessProcess(List<Permanent> suspendedPermaments)
+                    List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>
                     {
-                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>
-                        {
-                            new(message: $"Yes", value: 1, spriteIndex: 0),
-                            new(message: $"No", value: 2, spriteIndex: 1)
-                        };
+                        new(message: $"Suspend and place 2 cards from deck under this card", value: 1, spriteIndex: 0),
+                        new(message: $"Only suspend without placing cards", value: 2, spriteIndex: 0),
+                        new(message: $"No", value: 3, spriteIndex: 1)
+                    };
 
-                        string selectPlayerMessage = "Will you place the top 2 cards from your deck under this Tamer face down?";
-                        string notSelectPlayerMessage = "The opponent is choosing whether to place the top 2 cards from their deck under their Tamer face down.";
+                    string selectPlayerMessage = "Will you suspend this tamer to place the top 2 cards from your deck under this Tamer face down?";
+                    string notSelectPlayerMessage = "The opponent is choosing whether to place the top 2 cards from their deck under their Tamer face down.";
 
-                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                    GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
 
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
 
-                        bool Yes = GManager.instance.userSelectionManager.SelectedIntValue == 1;
+                    int answer = GManager.instance.userSelectionManager.SelectedIntValue;
 
-                        if (Yes)
+                    if (answer != 3)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SuspendPeremanentAndProcessAccordingToResult(
+                            new List<Permanent>() { card.PermanentOfThisCard() },
+                            activateClass,
+                            SuccessProcess,
+                            null));
+                    }
+
+                    IEnumerator SuccessProcess(List<Permanent> suspendedPermaments)
+                    {
+                        if (answer == 1)
                         {
                             yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(
                                     new List<CardSource> { card.Owner.LibraryCards[0], card.Owner.LibraryCards[1] }, activateClass, isFacedown: true));

+ 1 - 1
Assets/Scripts/CardEffect/ST24/Green/ST24_10.cs

@@ -97,7 +97,7 @@ namespace DCGO.CardEffects.ST24
 
                     if (selectedPermanent != null)
                     {
-                        yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(_targetPermanents, hashtable).Tap());
+                        yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(_targetPermanents, CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
 
                         CanNotUnsuspendClass canNotUnsuspendClass = new CanNotUnsuspendClass();
                         canNotUnsuspendClass.SetUpICardEffect("Can't Unsuspend", CanUseCondition1, card);