mbunch_kascope 8 mesi fa
parent
commit
94959beb6e

+ 1 - 0
Assets/CardEffect/BT23/Black/BT23_055.cs

@@ -209,6 +209,7 @@ namespace DCGO.CardEffects.BT23
                 bool RemovedPermanent(Permanent permanent)
                 {
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           permanent == card.PermanentOfThisCard() &&
                            (permanent.TopCard.ContainsCardName("Cyberdramon") || permanent.TopCard.ContainsCardName("Justimon") || permanent.TopCard.HasCSTraits);
                 }
 

+ 2 - 2
Assets/CardEffect/BT23/Black/BT23_057.cs

@@ -28,8 +28,8 @@ namespace DCGO.CardEffects.BT23
 
             bool CanSelectReturnCardCondition(CardSource cardSource)
             {
-                return cardSource.ContainsCardName("Huckmon") &&
-                       cardSource.ContainsCardName("Sistermon") &&
+                return cardSource.ContainsCardName("Huckmon") ||
+                       cardSource.ContainsCardName("Sistermon") ||
                        cardSource.ContainsCardName("Jesmon");
             }
 

+ 2 - 1
Assets/CardEffect/BT23/Black/BT23_060.cs

@@ -288,7 +288,8 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                           CardEffectCommons.HasMatchConditionOwnersSecurity(card, CanSelectCardCondition, false);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 57 - 41
Assets/CardEffect/BT23/Blue/BT23_025.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using UnityEngine;
 
 // MarineAngemon
 namespace DCGO.CardEffects.BT23
@@ -262,68 +263,83 @@ namespace DCGO.CardEffects.BT23
             {
                 cardEffects.Add(CardEffectFactory.PlaySelfDigimonAfterBattleSecurityEffect(card: card));
 
-                #region Delete Digimon Played
-
-                Permanent playedDigimon = card.PermanentOfThisCard();
-
-                ActivateClass activateClass1 = new ActivateClass();
-                activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, card);
-                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
-                activateClass1.SetEffectSourcePermanent(playedDigimon);
-                playedDigimon.UntilOpponentTurnEndEffects.Add(GetCardEffect);
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("", CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, "");
+                activateClass.SetIsBackgroundProcess(true);
+                cardEffects.Add(activateClass);
 
-                string EffectDiscription1()
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    return "[End of Opponents Turn] Delete this Digimon.";
+                    return CardEffectCommons.IsExistOnBattleArea(card) &&
+                           CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
-                bool CanUseCondition2(Hashtable hashtable1)
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsOpponentTurn(card))
+                    yield return new WaitForSeconds(0.2f);
+
+                    #region Delete Digimon Played
+                    Permanent playedDigimon = card.PermanentOfThisCard();
+
+                    ActivateClass activateClass1 = new ActivateClass();
+                    activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, card);
+                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                    activateClass1.SetEffectSourcePermanent(playedDigimon);
+                    playedDigimon.UntilOpponentTurnEndEffects.Add(GetCardEffect);
+
+                    string EffectDiscription1()
+                    {
+                        return "[End of Opponents Turn] Delete this Digimon.";
+                    }
+
+                    bool CanUseCondition2(Hashtable hashtable1)
                     {
-                        if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedDigimon, playedDigimon.TopCard))
+                        if (CardEffectCommons.IsOpponentTurn(card))
                         {
-                            return true;
+                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedDigimon, playedDigimon.TopCard))
+                            {
+                                return true;
+                            }
                         }
-                    }
 
-                    return false;
-                }
+                        return false;
+                    }
 
-                bool CanActivateCondition1(Hashtable hashtable1)
-                {
-                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
+                    bool CanActivateCondition1(Hashtable hashtable1)
                     {
-                        if (!playedDigimon.TopCard.CanNotBeAffected(activateClass1))
+                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
                         {
-                            return true;
+                            if (!playedDigimon.TopCard.CanNotBeAffected(activateClass1))
+                            {
+                                return true;
+                            }
                         }
-                    }
 
-                    return false;
-                }
+                        return false;
+                    }
 
-                IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
-                {
-                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
+                    IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
                     {
-                        yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
-                        new List<Permanent>() { playedDigimon },
-                        CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                            new List<Permanent>() { playedDigimon },
+                            CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                        }
                     }
-                }
 
-                ICardEffect GetCardEffect(EffectTiming _timing)
-                {
-                    if (_timing == EffectTiming.OnEndTurn)
+                    ICardEffect GetCardEffect(EffectTiming _timing)
                     {
-                        return activateClass1;
-                    }
+                        if (_timing == EffectTiming.OnEndTurn)
+                        {
+                            return activateClass1;
+                        }
 
-                    return null;
+                        return null;
+                    }
+                    #endregion
                 }
-
-                #endregion
             }
             #endregion
 

+ 1 - 1
Assets/CardEffect/BT23/Green/BT23_040.cs

@@ -117,7 +117,7 @@ namespace DCGO.CardEffects.BT23
                             bool SelectSourceCard(CardSource cardSource)
                             {
                                 return cardSource.IsDigimon
-                                    && cardSource.HasHudieTraits
+                                    && cardSource.EqualsCardName("Hudiemon")
                                     && cardSource.CanPlayCardTargetFrame(thisPermament.PermanentFrame, true, activateClass);
                             }
 

+ 3 - 2
Assets/CardEffect/BT23/Green/BT23_043.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using System.Linq;
 
 // CannonBeemon
 namespace DCGO.CardEffects.BT23
@@ -149,14 +150,14 @@ namespace DCGO.CardEffects.BT23
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card)
+                        && CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, CanSelectPermanentCondition)
                         && !CardEffectCommons.IsByEffect(hashtable, cardEffect => CardEffectCommons.IsOwnerEffect(cardEffect, card));
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.HasMatchConditionOwnersSecurity(card, null, false);
+                        && card.Owner.SecurityCards.Count(source => !source.IsFlipped) > 0;
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)

+ 1 - 0
Assets/CardEffect/BT23/Purple/BT23_062.cs

@@ -130,6 +130,7 @@ namespace DCGO.CardEffects.BT23
                 activateClass.SetUpICardEffect("Digivolve 1 of your Digimon into [Undead] or [Dark Animal] Digimon in trash", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("WA_BT23-062");
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 2 - 1
Assets/CardEffect/BT23/Purple/BT23_068.cs

@@ -305,7 +305,8 @@ namespace DCGO.CardEffects.BT23
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Delete opponent's lowest level Digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
+                activateClass.SetHashString("AT_BT23-068");
                 cardEffects.Add(activateClass);
 
                 string EffectDescription()

+ 1 - 1
Assets/CardEffect/BT23/Red/BT23_012.cs

@@ -143,7 +143,7 @@ namespace DCGO.CardEffects.BT23
             {
                 return cardSource.IsDigimon
                     && cardSource.HasLevel && cardSource.Level <= 4
-                    && cardSource.HasAvianBeastAnimalTraits
+                    && (cardSource.HasCSTraits || cardSource.HasAvianBeastAnimalTraits)
                     && CardEffectCommons.CanPlayAsNewPermanent(cardSource, false, activateClass);
             }
 

+ 18 - 10
Assets/CardEffect/BT23/Red/BT23_013.cs

@@ -108,6 +108,7 @@ namespace DCGO.CardEffects.BT23
                 }
 
                 bool playToken = false;
+                bool playSistermon = false;
                 bool playFromHand = false;
                 bool playFromTrash = false;
 
@@ -124,8 +125,7 @@ namespace DCGO.CardEffects.BT23
                 if (playOptions.Count == 1)
                 {
                     if (playOptions[0].Message.Contains("Token")) playToken = true;
-                    else if (canSelectHand) playFromHand = true;
-                    else playFromTrash = true;
+                    else playSistermon = true;
                 }
 
                 if (playOptions.Count == 2)
@@ -138,9 +138,12 @@ namespace DCGO.CardEffects.BT23
                     var selectedOption = GManager.instance.userSelectionManager.SelectedBoolValue;
 
                     if (selectedOption) playToken = true;
-                    else if (!selectedOption && canSelectHand && !canSelectTrash) playFromHand = true;
-                    else if (!selectedOption && canSelectTrash && !canSelectHand) playFromTrash = true;
-                    else
+                    else playSistermon = true;
+                }
+
+                if (playSistermon)
+                {
+                    if (canSelectHand && canSelectTrash)
                     {
                         List<SelectionElement<bool>> selectionElements1 = new List<SelectionElement<bool>>()
                         {
@@ -152,12 +155,17 @@ namespace DCGO.CardEffects.BT23
                         string notSelectPlayerMessage1 = "The opponent is choosing from which area to select a card.";
 
                         GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements1, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage1, notSelectPlayerMessage: notSelectPlayerMessage1);
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
-
-                        var handOrTrashSelection = GManager.instance.userSelectionManager.SelectedBoolValue;
-                        if (handOrTrashSelection) playFromHand = true;
-                        else playFromTrash = true;
                     }
+                    else
+                    {
+                        GManager.instance.userSelectionManager.SetBool(canSelectHand);
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+
+                    var handOrTrashSelection = GManager.instance.userSelectionManager.SelectedBoolValue;
+                    if (handOrTrashSelection) playFromHand = true;
+                    else playFromTrash = true;
                 }
 
                 #endregion

+ 3 - 8
Assets/CardEffect/BT23/Yellow/BT23_028.cs

@@ -181,18 +181,13 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnField(card)
-                        && CardEffectCommons.CanTriggerWhenLinking(hashtable, PermanentCondition, null);
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
+                        && CardEffectCommons.CanTriggerWhenLinking(hashtable, null, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnField(card);
-                }
-
-                bool PermanentCondition(Permanent permanent)
-                {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/BT23/Yellow/BT23_035.cs

@@ -59,7 +59,7 @@ namespace DCGO.CardEffects.BT23
 
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDPPlayerEffect(
                         permanentCondition: PermanentCondition,
-                        changeValue: -5000,
+                        changeValue: -6000,
                         effectDuration: EffectDuration.UntilOpponentTurnEnd,
                         activateClass: activateClass));
                 }

+ 1 - 1
ProjectSettings/ProjectSettings.asset

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