Esempio n. 1
0
        public override void Run()
        {
            Initialize();

            _root.Blit(_clearConsole, _clearConsole.Bounds, 4, 4);
            var redControl = _root.GetColorControlString(TCODColor.red);

            _root.PrintString(4, 4, "{0}Reserve Party{1}", redControl, _root.GetStopControl());

            var deadCount        = FrontRowSize - Model.Party.FrontRow.Count;
            var selectedFrontRow = Model.MenuModel.SelectedSwitchIndex;

            for (var i = FrontRowSize - deadCount; i < FrontRowSize; ++i)
            {
                _borderConsole.SetForegroundColour(selectedFrontRow == i ? TCODColor.red : TCODColor.white);
                _borderConsole.DrawBorder();
                _root.Blit(_borderConsole, _borderConsole.Bounds, StartX + ColOffset * i, 30);
            }

            var backSeat = Model.Party.BackSeat;

            for (var i = 0; i < backSeat.Count; ++i)
            {
                _frames[i].AssignCharacter(backSeat[i]);
                _frames[i].Draw();
            }

            ICharacter selectedCharacter = null;
            var        backRowSelected   = false;

            foreach (var character in backSeat.Where(character => character.IsMarked))
            {
                backRowSelected   = true;
                selectedCharacter = character;
                break;
            }

            if (!backRowSelected)
            {
                foreach (var character in Model.Party.FrontRow.Where(character => character.IsMarked))
                {
                    selectedCharacter = character;
                    break;
                }
            }

            if (selectedCharacter == null)
            {
                return;
            }

            _drawer.DrawStats(selectedCharacter);
            _lister.Draw(selectedCharacter);
        }
Esempio n. 2
0
        public override void Run()
        {
            Initialize();

            var battleMenu = _menuModel.BattleMenu;

            if (battleMenu != null)
            {
                _drawer.DrawMenu(battleMenu, 4, 54, 1);
            }

            _root.SetForegroundColour(TCODColor.white);
            _root.PrintString(3, 52, "Action Select:");
            _root.DrawVerticalLine(19, 52, 12);
            _statDrawer.DrawStats(Model.BattleModel.CurrentAttacker);
        }
        public override void Run()
        {
            _root.SetForegroundColour(TCODColor.white);
            _root.PrintString(22, 52, "Choose target for {0}", Model.BattleModel.TargetInfo.Spell.Name);

            var target = Model.BattleModel.TargetInfo.Target;

            if (Model.BattleModel.CharacterIsEnemy(target))
            {
                _descDrawer.DrawSummary(target);
            }
            else
            {
                _statDrawer.DrawStats(target);
            }

            _afflictionLister.ListAfflictions(target, Model);
        }
Esempio n. 4
0
 public void SetForegroundColour(TCODColor colour)
 {
     _console.SetForegroundColour(colour);
 }