Esempio n. 1
0
        public static void ComputerSequence2(int id, Move computerMove)
        {
            Battle  player      = Battle.FindPlayer();
            Battle  computer    = Battle.FindComputer();
            Mon     playerMon   = Mon.Find(player.GetMon_Id());
            Mon     computerMon = Mon.Find(computer.GetMon_Id());
            Move    playerMove  = Move.Find(id);
            Message newMessage  = new Message(computerMove.GetDescription());

            newMessage.Save();
            double otherHP      = (double)player.GetHitpoints() - (double)Battle.Damage(computerMove, computer, computerMon, playerMon);
            int    roundOtherHP = (int)otherHP;

            if (roundOtherHP > 0)
            {
                player.SetNewHP(roundOtherHP);
            }
            else
            {
                player.SetNewHP(0);
            }
        }