private IEnumerator ActivateAegisOfZeusCoroutine()
        {
            Visual.instance.disableInput(true);
            float             timeMovement    = Const.mediumCardTimeMovement;
            HelmOfHadesTarget targetcomponent = target.GetComponent <HelmOfHadesTarget>();

            HelmOfHadesTarget[] targetsarray = GameObject.FindObjectsOfType <HelmOfHadesTarget>();
            foreach (var VARIABLE in targetsarray)
            {
                if (VARIABLE != targetcomponent)
                {
                    GameObject.DestroyImmediate(VARIABLE);
                }
            }



            HelmOfHadesActivated[] arractivated = GameObject.FindObjectsOfType <HelmOfHadesActivated>();
            HelmOfHadesActivated   activated    = arractivated[0];
            OneCardManager         helmcm       = activated.GetComponent <OneCardManager>();


            VisualTool.DiscardCardToWinningPile(helmcm);
            VisualTool.DiscardCardToDiscardPile(target);

            GameLogicEvents.eventUpdateCurrentEncounter.Invoke();
            GameLogicEvents.eventUpdateLossCounter.Invoke();

            yield return(Const.mediumCardTimeMovement + EndTurn.SmallAmountOfTime);

            VisualTool.SwitchAllControls(true);
            Visual.instance.disableInput(false);
            Command.CommandExecutionComplete();
        }
    private IEnumerator ActivateEffectCoroutine()
    {
        Visual.instance.disableInput(true);
        float firstTimeDuration = .7f;

        GameLogicEvents.eventCardVisual.Invoke(this.activatedCard);
        GameLogicEvents.eventNewEffect.Invoke(this.activatedCard.cardAsset.effecttype);
        yield return(new WaitForSeconds(firstTimeDuration));

        VisualTool.DiscardCardToWinningPile(this.activatedCard);
        yield return(new WaitForSeconds(.2f));

        Visual.instance.disableInput(false);
    }
        private IEnumerator ActivateOrpheusLyreCoroutine()
        {
            Visual.instance.disableInput(true);
            float          timeMovement  = Const.mediumCardTimeMovement;
            OneCardManager orpheusLyreCM =
                Visual.instance.GetOneCardManagerByName(Const.orpheuslyre, Visual.instance.TreasureHand.transform);

            VisualTool.DiscardCardToDiscardPile(target);
            VisualTool.DiscardCardToWinningPile(orpheusLyreCM);

            yield return(Const.mediumCardTimeMovement + EndTurn.SmallAmountOfTime);

            CardListChooser.instance.Hide();
            VisualTool.SwitchAllControls(true);
            Visual.instance.disableInput(false);
            Command.CommandExecutionComplete();
        }
Example #4
0
            private IEnumerator DoCasualtiesCoroutine()
            {
                yield return(new WaitForSeconds(.2f));

                GameLogicEvents.eventRemoveSingleEffects.Invoke();
                if (Game.instance.Casualties > 0)
                {
                    Vector2 pos = Visual.instance.LossCounter.transform.localPosition;
                    DamageEffect.CreateDamageEffect(pos, Game.instance.Casualties);
                }


                List <OneCardManager> curEnc = Visual.instance.GetCurrentEncounter();

                foreach (OneCardManager cm in curEnc)
                {
                    yield return(new WaitForSeconds(EndTurn.SmallAmountOfTime));

                    bool isResolved = cm.cardAsset.resolved == ResolvedType.resolved_win;
                    if (isResolved)
                    {
                        VisualTool.DiscardCardToWinningPile(cm);
                    }
                    else
                    {
                        VisualTool.DiscardCardToDiscardPile(cm);
                    }
                }
                yield return(new WaitForSeconds(TimeMovement1 + DelayTime));

                Debug.Log("CommandDoCasualties");
                GameLogicModifyGame.DoCasualties();
                GameLogicEvents.eventUpdateLossCounter.Invoke();
                GameLogicEvents.eventUpdateCrewCounter.Invoke();
                Command.CommandExecutionComplete();
            }