Exemplo n.º 1
0
        public void Cancel()
        {
            if (TargetSystem.Showing)
            {
                TargetSystem.Hide();
                if (ActionMenu.ActiveAction.Options.Count() == 1)
                {
                    ActionMenu.Show();
                    HealthCounter.Show();
                }
                else
                {
                    OptionsListMenu.Show(ActionMenu.ActiveAction.Options);
                }

                /*
                 * ActionMenu.Hide();
                 * OptionsListMenu.Show(ActionMenu.ActiveAction.Options);
                 * ActiveOption = OptionsListMenu.Active;
                 *
                 *  ActiveOption = OptionsListMenu.Active;
                 * OptionsListMenu.Hide();
                 * TargetSystem.Show(ActiveOption);
                 *
                 */
            }
            else if (OptionsListMenu.Showing)
            {
                OptionsListMenu.Hide();
                ActionMenu.Start();
                HealthCounter.Show();
            }
        }
Exemplo n.º 2
0
        public void ConfirmTarget()
        {
            var move       = ActiveOption;
            var target     = TargetSystem.Actives;
            var activeHero = TurnSystem.Active;

            Console.WriteLine($"ExecuteOption - {move}");
            TargetSystem.Hide();
            move.Execute(this, activeHero, target, (justDamaged) =>
            {
                if (target[0] is EnvironmentTarget environmentTarget)
                {
                    environmentTarget.ExecuteEffect(this);
                }

                HashSet <BattleEvent> battleEventsCompleted = new HashSet <BattleEvent>();
                events.Where((ev) => ev is BattleEvent);

                events.Where(ev => ev.IsReady(this)).ToList().ForEach(battleEvent => battleEvent.Execute(this));
                justDamaged?.ToList().ForEach((damaged) =>
                {
                    var sequence = damaged.Item1.PostDamagePhase(damaged.Item2);
                });
                if (!TextBubbleSystem.Showing)
                {
                    EndTurn();
                }
            });
        }