Exemplo n.º 1
0
    private static void RoomSelection(Dungeon d, Creature p)
    {
        Utilities.Keypress();
        Console.Clear();
        //Check if you hit the boss room
        if (currentShell == d.shell[d.shell.Length - 1])
        {
            //When you hit last room and boss is alive. FIGHT!
            Monster.opponentList = new List <Monster> {
            };
            Monster.opponentList.Add(d.boss.MonsterCopy());
            Combat.GameCombat(p, Monster.opponentList, d);
        }
        //If not, move on
        bool random   = false;
        bool specific = false;

        for (int i = 0; i < d.randomRoomOptions.Length; i++)
        {
            if (currentShell.assignedRoom.name == d.randomRoomOptions[i].name)
            {
                random = true;
                break;
            }
        }
        if (random == false)
        {
            for (int i = 0; i < d.staticRoomOptions.Length; i++)
            {
                if (currentShell.assignedRoom.name == d.staticRoomOptions[i].name)
                {
                    specific = true;
                    break;
                }
            }
        }
        if (specific)
        {
            int a = d.dungeonID;
            switch (a)
            {
            case 1:
                CastleEvent.Room(d, p, currentShell.assignedRoom.EventArray);
                break;

            case 2:

                break;

            case 3:

                break;

            case 4:

                break;

            case 5:

                break;

            case 6:

                break;
            }
        }
        else if (random)
        {
            Room.RandomRoom(d, p, currentShell.assignedRoom.EventArray);
        }
        else
        {
            Room.RegularRoom(d, p, currentShell);
        }
    }
Exemplo n.º 2
0
    private static void RoomSelection(Dungeon d, Creature p)
    {
        Utilities.Keypress();
        Console.Clear();
        bool random   = false;
        bool specific = false;

        for (int i = 0; i < d.randomRoomOptions.Length; i++)
        {
            if (currentShell.assignedRoom.name == d.randomRoomOptions[i].name)
            {
                random = true;
                break;
            }
        }
        if (random == false)
        {
            for (int i = 0; i < d.staticRoomOptions.Length; i++)
            {
                if (currentShell.assignedRoom.name == d.staticRoomOptions[i].name)
                {
                    specific = true;
                    break;
                }
            }
        }
        if (specific)
        {
            int a = d.dungeonID;
            switch (a)
            {
            case 1:
                StarterEvent.Room(d, p, currentShell.assignedRoom.EventArray);
                break;

            case 2:
                CastleEvent.Room(d, p, currentShell.assignedRoom.EventArray);
                break;

            case 3:

                break;

            case 4:

                break;

            case 5:

                break;

            case 6:

                break;
            }
        }
        else if (random)
        {
            Room.RandomRoom(d, p, currentShell.assignedRoom.EventArray);
        }
        else
        {
            Room.RegularRoom(d, p, currentShell);
        }
    }