private Dungeon GetRexsHouse(int id, int stam, bool isAvailable)
 {
     var dungeon = new Dungeon(id, "Rex's House", stam);
     dungeon.IsAvailable = isAvailable;
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("Rex")));
     return dungeon;
 }
        public void OnDungeonSelected(object sender, GestureEventArgs e)
        {
            var selectedGrid = sender as Grid;
            var dungeonId = (int)selectedGrid.Tag;
            _selectedDungeon = GetDungeon(dungeonId);

            var heroRepository = new HeroRepository();
            _heroesOwnedByPlayer = heroRepository.GetHeroesOwnedByPlayer().Count;

            var playerRepository = new PlayerRepository();
            _player = playerRepository.GetPlayer();

            if (PlayerCanEnterDungeon())
            {
                _player.Stam.Current = _player.Stam.Current - _selectedDungeon.StaminaCost;
                playerRepository.SavePlayer(_player);
                MessageBus.Default.Notify("EnterDungeon", new Object(), new NotificationEventArgs(dungeonId.ToString()));
            }
            else
            {
                var errorModalControl = GetErrorMessage();
                var errorModal = new ModalContainer(errorModalControl);
                errorModal.Show();
            }
        }
 private Dungeon GetOrcVilla(int id, int stam)
 {
     var dungeon = new Dungeon(id, "Orc Villa", stam);
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("WoodOrc")));
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("StoneOrc")));
     return dungeon;
 }
 private Dungeon GetDragonsDen(int id, int stam)
 {
     var dungeon = new Dungeon(id, "Dragons Den", stam);
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("GreenDragon")));
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("BlueDragon")));
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("RedDragon")));
     return dungeon;
 }
 private Dungeon GetGreenDragonsDen(int id, int stam)
 {
     var dungeon = new Dungeon(id, "Green Dragons Den", stam);
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("WoodOrc")));
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("WoodOrc")));
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("Turtle")));
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("GreenDragon")));
     return dungeon;
 }
 private Dungeon GetBlueDragonsDen(int id, int stam)
 {
     var dungeon = new Dungeon(id, "Blue Dragons Den", stam);
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("StoneOrc")));
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("StoneOrc")));
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("BigBlue")));
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("BlueDragon")));
     return dungeon;
 }
Esempio n. 7
0
        public MonsterGrid(MonsterWithHealthBar monsterUI, Dungeon dungeon)
        {
            _monsterUI = monsterUI;
            MonsterHealth = _monsterUI.MonsterHealth;

            _dungeon = dungeon;
            _activeFloor = _dungeon.Floors[0];
            ActivateMonster(_activeFloor.Monsters);
        }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            MessageBus.Default.Register("EndGame", OnEndGame);

            string queryStringParam = "";
            if (NavigationContext.QueryString.TryGetValue("dungeonToEnter", out queryStringParam))
            {
                var idOfDungeon = Convert.ToInt32(queryStringParam);
                _activeDungeon = _dungeonDatabase.AllDungeons.Single(d => d.Id == idOfDungeon);
                AppGlobals.ActiveDungeonScore = new DungeonScore(_activeDungeon);
            }
        }
 private Dungeon GetTurtleShore(int id, int stam)
 {
     var dungeon = new Dungeon(id, "Turtle Shore", stam);
     dungeon.Floors.Add(new DungeonFloor(MonsterDatabase.GetMonster("Turtle")));
     return dungeon;
 }
Esempio n. 10
0
 public DungeonDefeater(Dungeon defeatedDungeon)
 {
     _defeatedDungeon = defeatedDungeon;
 }
Esempio n. 11
0
 public DungeonScore(Dungeon activeDungeon)
 {
     ActiveDungeon = activeDungeon;
     MonstersSlain = new List<Monster>();
 }