Exemplo n.º 1
0
        public void CombatEnd(Player player, Monster monster)
        {
            this.TurnOrder.Clear();
            this.RoundCount = 1;
            if (player.HP <= 0)
            {
                Interpreter.DisplayOutput($"Bummer {player.Name}, you died to {monster.Name}!");
                player.Status.Dead = true;
                Interpreter.DisplayOutput("<size=100>***** GAME OVER *****</size>");
                Game   newGame = GameInit.GetGame();
                Player player1 = newGame.AddPlayer("P name", "P race", "P class", 1, 0, 10, 10, 0, new List <Item>(), 10, 10, 10, 10, 10, 10, 10);
                newGame.Environments[0].Players.Add(player1);
                newGame.Players.Add(player1);
                TerminalManager.game = newGame;

                return;
            }
            else if (monster.HP <= 0)
            {
                Interpreter.DisplayOutput($"Congrats {player.Name}, you killed {monster.Name}!");
                // GAIN XP
                int XP = monster.Level * 100;
                player.XP += XP;
                Interpreter.DisplayOutputColor($"You gained {XP} experiance points!", "#85FF82");
                monster.Status.Dead = true;
                this.Corpsification(monster);
            }
        }
        private void Start()
        {
            game = GameInit.GetGame();
              Player player1 = game.AddPlayer("Zorb", "Elf", "Ranger", 1, 0, 10, 10, 0, new List<Item>(), 12, 14, 16, 14, 8, 18, 8);
              game.Environments[0].Players.Add(player1);
              game.Players.Add(player1);

              interpreter = GetComponent<Interpreter>();
              Action.Look("");
              UpdatePlayerStats();
        }