Dungeon.cpp 956 Bytes
Newer Older
Aaron Sturtevant's avatar
Commit  
Aaron Sturtevant committed
1 2
#include <iomanip>
#include <iostream>
Aaron Sturtevant's avatar
Aaron Sturtevant committed
3
#include <string>
Aaron Sturtevant's avatar
Aaron Sturtevant committed
4 5 6 7
#include "Player.h"
#include "Boss.h"
#include "Inventory.h"
#include "Monster.h"
Aaron Sturtevant's avatar
Commit  
Aaron Sturtevant committed
8
using namespace std;
Aaron Sturtevant's avatar
Aaron Sturtevant committed
9
    
Aaron Sturtevant's avatar
Commit  
Aaron Sturtevant committed
10 11 12 13 14
    int Dungeon::rollRoom() {
        int roll = rand() % 100 + 1;
        return roll;
    }
    
Aaron Sturtevant's avatar
Aaron Sturtevant committed
15
    void Dungeon::getMonster(int encounterNum) {
Aaron Sturtevant's avatar
Aaron Sturtevant committed
16 17 18
        Monster.summon(encounterNum);
    }
    
Aaron Sturtevant's avatar
Aaron Sturtevant committed
19 20
    void Dungeon::monsterResponse(int encounterNum, bool playerWon) {
        Monster.monsterResponse(encounterNum, playerWon);
Aaron Sturtevant's avatar
Aaron Sturtevant committed
21 22 23
    }
    
    void Dungeon::getBoss(int floorNum) {
Aaron Sturtevant's avatar
Aaron Sturtevant committed
24
        Boss.summonBoss(floorNum);
Aaron Sturtevant's avatar
Aaron Sturtevant committed
25 26
    }
    
Aaron Sturtevant's avatar
Aaron Sturtevant committed
27
    void Dungeon::bossResponse(int floorNum, bool playerWon) {
Aaron Sturtevant's avatar
Aaron Sturtevant committed
28
        Boss.bossResponse(floorNum, playerWon);
Aaron Sturtevant's avatar
Aaron Sturtevant committed
29 30 31 32 33 34 35
    }
    
    void giveBossItems(int encounterNum, Inventory inventory) {
        Boss.giveItems(floorNum, inventory);
    }
    
    void giveMonsterItems(int encounterNum, Inventory inventory) {
Aaron Sturtevant's avatar
Aaron Sturtevant committed
36
        Monster.giveItems(encounterNum, inventory);
Aaron Sturtevant's avatar
Aaron Sturtevant committed
37
    }