Example #1
0
 public bool TakeDmg(int amount, Player player)
 {
     CurrentHP -= amount;
     if (CurrentHP <= 0)
     {
         CurrentHP = 0;
         player.GetExp(Exp);
         player.Gold += Gold;
         return true;
     }
     return false;
 }
Example #2
0
        //private List<Item> itemList;
        

        public Game(frmGame form)
        {
            Weapon w = new Weapon();

            var property = w.GetType().GetProperty("Str");

            Player = new Player("b", 1, 1, 1, 1, 1, this);
            GameForm = form;
            if (DB.ConnectionTest())
            {
                Floor = 1;
                //currentMap = LoadMap();
                //MobGeneration();
                //Player.Spawn(currentMap);
            }
            else
            {
                MessageBox.Show("Could not load game data.");
            }

            //Maze m = new Maze(16,16);
            //m.Generation();
            //currentMap = m.GetMaze();
        }