Selaa lähdekoodia

assorted bug fixes

huckmon, ginryumon, hisyaryumon, kazuchimon, raptordramon, grademon, ferniloogamon takemikazuchi, singularity of chaos and zephagamon ACE.
Joe Delia 1 vuosi sitten
vanhempi
sitoutus
81d5e0335f

+ 2 - 3
Assets/CardEffect/BT20/Black/BT20_051.cs

@@ -16,9 +16,8 @@ namespace DCGO.CardEffects.BT20
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.EqualsCardName("Dorumon") ||
-                           targetPermanent.TopCard.IsLevel3 &&
-                           targetPermanent.TopCard.HasXAntibodyTraits;
+                    return (targetPermanent.TopCard.EqualsCardName("Dorumon")) ||
+                           (targetPermanent.TopCard.IsLevel3 && targetPermanent.TopCard.EqualsTraits("Chronicle"));
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(

+ 2 - 3
Assets/CardEffect/BT20/Black/BT20_053.cs

@@ -15,9 +15,8 @@ namespace DCGO.CardEffects.BT20
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.EqualsCardName("Raptordramon") ||
-                           targetPermanent.TopCard.IsLevel4 &&
-                           targetPermanent.TopCard.HasXAntibodyTraits;
+                    return (targetPermanent.TopCard.EqualsCardName("Raptordramon")) ||
+                           (targetPermanent.TopCard.IsLevel4 && targetPermanent.TopCard.EqualsTraits("Chronicle"));
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(

+ 10 - 10
Assets/CardEffect/BT20/Green/BT20_101.cs

@@ -113,9 +113,9 @@ namespace DCGO.CardEffects.BT20
                     return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent);
                 }
 
-                bool OpponentsDigimon(Permanent permanent)
+                bool SuspendedDigimon(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                    return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent) &&
                            permanent.IsSuspended;
                 }
 
@@ -153,15 +153,15 @@ namespace DCGO.CardEffects.BT20
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     }
 
-                    if (CardEffectCommons.MatchConditionPermanentCount(DigimonCondition) >= 2)
+                    if (CardEffectCommons.MatchConditionPermanentCount(SuspendedDigimon) >= 2)
                     {
-                        int maxCount = Math.Min(1, Mathf.FloorToInt(CardEffectCommons.MatchConditionPermanentCount(OpponentsDigimon)/2));
+                        int maxCount = Math.Max(0, Mathf.FloorToInt(CardEffectCommons.MatchConditionPermanentCount(SuspendedDigimon)/2));
 
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
-                            canTargetCondition: OpponentsDigimon,
+                            canTargetCondition: SuspendedDigimon,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,
@@ -198,9 +198,9 @@ namespace DCGO.CardEffects.BT20
                     return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent);
                 }
 
-                bool OpponentsDigimon(Permanent permanent)
+                bool SuspendedDigimon(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                    return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent) &&
                            permanent.IsSuspended;
                 }
 
@@ -239,15 +239,15 @@ namespace DCGO.CardEffects.BT20
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     }
 
-                    if (CardEffectCommons.MatchConditionPermanentCount(DigimonCondition) >= 2)
+                    if (CardEffectCommons.MatchConditionPermanentCount(SuspendedDigimon) >= 2)
                     {
-                        int maxCount = Math.Min(1, Mathf.FloorToInt(CardEffectCommons.MatchConditionPermanentCount(OpponentsDigimon) / 2));
+                        int maxCount = Math.Max(0, Mathf.FloorToInt(CardEffectCommons.MatchConditionPermanentCount(SuspendedDigimon)/2));
 
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
-                            canTargetCondition: OpponentsDigimon,
+                            canTargetCondition: SuspendedDigimon,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,

+ 1 - 1
Assets/CardEffect/BT20/Purple/BT20_081.cs

@@ -168,7 +168,7 @@ namespace DCGO.CardEffects.BT20
                         }
                     }
 
-                    if(card.PermanentOfThisCard().DigivolutionCards.Count(IsTamerCard) >= 0)
+                    if (card.PermanentOfThisCard().DigivolutionCards.Count(IsTamerCard) > 0)
                     {
                         if (CardEffectCommons.HasMatchConditionPermanent(Is10KOrLess))
                         {

+ 1 - 8
Assets/CardEffect/BT20/Red/BT20_008.cs

@@ -36,14 +36,7 @@ namespace DCGO.CardEffects.BT20
 
                 bool CanSelect(CardSource cardSource)
                 {
-                    if (cardSource.IsDigimon)
-                    {
-                        if (cardSource.ContainsCardName("Sistermon") || cardSource.ContainsCardName("Huckmon") || cardSource.HasRoyalKnightTraits)
-                        {
-                            return true;
-                        }
-                    }
-                    return false;
+                    return cardSource.ContainsCardName("Sistermon") || cardSource.ContainsCardName("Huckmon") || cardSource.HasRoyalKnightTraits;
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 2 - 3
Assets/CardEffect/BT20/Red/BT20_012.cs

@@ -15,9 +15,8 @@ namespace DCGO.CardEffects.BT20
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.EqualsCardName("Ryudamon") ||
-                           targetPermanent.TopCard.IsLevel3 &&
-                           targetPermanent.TopCard.HasXAntibodyTraits;
+                    return (targetPermanent.TopCard.EqualsCardName("Ryudamon")) ||
+                           (targetPermanent.TopCard.IsLevel3 && targetPermanent.TopCard.EqualsTraits("Chronicle"));
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(

+ 2 - 3
Assets/CardEffect/BT20/Red/BT20_015.cs

@@ -15,9 +15,8 @@ namespace DCGO.CardEffects.BT20
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.EqualsCardName("Ginryumon") ||
-                           targetPermanent.TopCard.IsLevel4 &&
-                           targetPermanent.TopCard.HasXAntibodyTraits;
+                    return (targetPermanent.TopCard.EqualsCardName("Ginryumon")) ||
+                           (targetPermanent.TopCard.IsLevel4 && targetPermanent.TopCard.EqualsTraits("Chronicle"));
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(

+ 1 - 1
Assets/CardEffect/BT20/White/BT20_099.cs

@@ -21,7 +21,7 @@ namespace DCGO.CardEffects.BT20
 
                 bool IgnoreColorConditions(Permanent permanent)
                 {
-                    return permanent.TopCard.ContainsCardName("Chaoson") || permanent.TopCard.EqualsTraits("ACCEL");
+                    return permanent.TopCard.ContainsCardName("Chaosmon") || permanent.TopCard.EqualsTraits("ACCEL");
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 12 - 20
Assets/CardEffect/BT20/Yellow/BT20_035.cs

@@ -41,12 +41,12 @@ namespace DCGO.CardEffects.BT20
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Suspend 1 Digimon or Tamer", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
                 cardEffects.Add(activateClass);
 
-                string EffectDiscription()
+                string EffectDescription()
                 {
-                    return "[When Digivolving] Suspend 1 of your opponent's Digimon or Tamers. Then, 1 of their Digimon can't unsuspend until the end of their turn.";
+                    return "[When Digivolving] Suspend 1 of your opponent's Digimon or Tamers. Then, 1 of their Digimon or Tamers can't unsuspend until the end of their turn.";
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
@@ -55,11 +55,6 @@ namespace DCGO.CardEffects.BT20
                            (permanent.IsDigimon || permanent.IsTamer);
                 }
 
-                bool IsOpponentsDigimon(Permanent permanent)
-                {
-                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
-                }
-
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
@@ -75,9 +70,9 @@ namespace DCGO.CardEffects.BT20
                 {
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                        SelectPermanentEffect selectPermanentToSuspend = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                        selectPermanentEffect.SetUp(
+                        selectPermanentToSuspend.SetUp(
                             selectPlayer: card.Owner,
                             canTargetCondition: CanSelectPermanentCondition,
                             canTargetCondition_ByPreSelecetedList: null,
@@ -90,16 +85,13 @@ namespace DCGO.CardEffects.BT20
                             mode: SelectPermanentEffect.Mode.Tap,
                             cardEffect: activateClass);
 
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                    }
-
-                    if (CardEffectCommons.HasMatchConditionPermanent(IsOpponentsDigimon))
-                    {
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentToSuspend.Activate());
+                        
+                        SelectPermanentEffect selectPermanentToNotUnsuspend = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                        selectPermanentEffect.SetUp(
+                        selectPermanentToNotUnsuspend.SetUp(
                             selectPlayer: card.Owner,
-                            canTargetCondition: IsOpponentsDigimon,
+                            canTargetCondition: CanSelectPermanentCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: 1,
@@ -110,9 +102,9 @@ namespace DCGO.CardEffects.BT20
                             mode: SelectPermanentEffect.Mode.Custom,
                             cardEffect: activateClass);
 
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get unable to unsuspend.", "The opponent is selecting 1 Digimon that will get unable to unsuspend.");
+                        selectPermanentToNotUnsuspend.SetUpCustomMessage("Select 1 Digimon or Tamer that will be unable to unsuspend.", "The opponent is selecting 1 Digimon or Tamer that will be unable to unsuspend.");
 
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentToNotUnsuspend.Activate());
 
                         IEnumerator SelectPermanentCoroutine(Permanent permanent)
                         {