|
|
@@ -52,9 +52,9 @@ public partial class CardEffectFactory
|
|
|
return CanActivateGuard(targetPermanent, activateClass);
|
|
|
}
|
|
|
|
|
|
- IEnumerator ActivateCoroutine(Hashtable _hashtable)
|
|
|
+ IEnumerator ActivateCoroutine(Hashtable hashtable)
|
|
|
{
|
|
|
- return CardEffectFactory.GuardProcess(_hashtable, activateClass, targetPermanent);
|
|
|
+ return CardEffectFactory.GuardProcess(hashtable, activateClass, targetPermanent);
|
|
|
}
|
|
|
|
|
|
return activateClass;
|
|
|
@@ -70,14 +70,18 @@ public partial class CardEffectFactory
|
|
|
#endregion
|
|
|
|
|
|
#region Effect process of [Guard]
|
|
|
- public static IEnumerator GuardProcess(Hashtable hashtable, ICardEffect activateClass, Permanent permanent)
|
|
|
+ public static IEnumerator GuardProcess(Hashtable hashtable, ICardEffect activateClass, Permanent guardPermanent)
|
|
|
{
|
|
|
- if (permanent == null) yield break;
|
|
|
- if (permanent.TopCard == null) yield break;
|
|
|
+ if (guardPermanent == null) yield break;
|
|
|
+ if (guardPermanent.TopCard == null) yield break;
|
|
|
|
|
|
- bool PermanentCondition(Permanent otherPermanent) => permanent != otherPermanent && CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(otherPermanent, permanent.TopCard);
|
|
|
+ bool PermanentCondition(Permanent otherPermanent)
|
|
|
+ {
|
|
|
+ return otherPermanent != guardPermanent
|
|
|
+ && CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(otherPermanent, guardPermanent.TopCard);
|
|
|
+ }
|
|
|
|
|
|
- Player owner = permanent.TopCard.Owner;
|
|
|
+ Player owner = guardPermanent.TopCard.Owner;
|
|
|
|
|
|
string selectPlayerMessage = "Will you delete this digimon to prevent the removal?";
|
|
|
string notSelectPlayerMessage = "The opponent is choosing if they will use Guard.";
|
|
|
@@ -94,20 +98,21 @@ public partial class CardEffectFactory
|
|
|
|
|
|
if (GManager.instance.userSelectionManager.SelectedBoolValue)
|
|
|
{
|
|
|
- yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { permanent }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
|
|
|
+ yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { guardPermanent }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
|
|
|
|
|
|
IEnumerator SuccessProcess()
|
|
|
{
|
|
|
List<Permanent> GuardedPermanents = CardEffectCommons.GetPermanentsFromHashtable(hashtable).Filter(PermanentCondition);
|
|
|
|
|
|
- foreach (Permanent guardPermanent in GuardedPermanents)
|
|
|
+ foreach (Permanent otherpermanent in GuardedPermanents)
|
|
|
{
|
|
|
- guardPermanent.willBeRemoveField = false;
|
|
|
- guardPermanent.HideDeleteEffect();
|
|
|
- guardPermanent.HideHandBounceEffect();
|
|
|
- guardPermanent.HideDeckBounceEffect();
|
|
|
- guardPermanent.HideWillRemoveFieldEffect();
|
|
|
+ otherpermanent.willBeRemoveField = false;
|
|
|
+ otherpermanent.HideDeleteEffect();
|
|
|
+ otherpermanent.HideHandBounceEffect();
|
|
|
+ otherpermanent.HideDeckBounceEffect();
|
|
|
+ otherpermanent.HideWillRemoveFieldEffect();
|
|
|
}
|
|
|
+
|
|
|
yield return null;
|
|
|
}
|
|
|
}
|