-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSpace17.cpp
82 lines (74 loc) · 1.99 KB
/
Space17.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* Program Name: Sword Quest
Author: Centaurus Team 1
Date: October 9, 2018
Description: Space 17 of 25 in the game
*/
#include "Space17.hpp"
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <stdio.h>
using namespace std;
Space17::Space17()
{
name = "volcano foothills";
shortForm = "You are at the base of a large volcano.\n"
"In the middle of the path there is a small ornate fountain.\n\n"
"To the north is a path sloping down and away from the volcano through the foothills back to the Crossroads \n"
"To west is a trail leading up to the Volcano Base\n";
longForm = "You are at the base of a large volcano. Its shadow looms over you. There is a faint \n"
"smell of sulfur in the air. In the middle of the path there is a small ornate fountain. \n\n"
"To the north is a path sloping down and away from the volcano through the foothills back to the Crossroads \n"
"To west is a trail leading up to the Volcano Base\n";
id = 17;
obj = NULL;
combatEncounter = false;
visited = false;
fountianUsed = false;
}
Space17::~Space17()
{}
void Space17::look(const char* thing)
{
if (strcmp(thing, "fountain") == 0)
{
if(fountianUsed)
{
cout << "The fountain is dry" << endl;
}
else
{
cout << "The fountain is filled with water. It looks very refreshing" << endl;
}
}
else if(strcmp(thing, "volcano") == 0)
{
cout << "Its a volcano… in a dungeon? Anyways, it seems to be still active. Maybe there's " << endl;
cout << "something that will help up there?" << endl;
}
else
{
cout << "You can't do that" << endl;
}
}
void Space17::drink(const char* thing)
{
if (strcmp(thing, "fountain") == 0)
{
if(!fountianUsed)
{
cout << "You feel strength return to your body as you drink. You quickly consume all" << endl;
cout << "of the water with in the fountain. The fountain is now dry." << endl;
fountianUsed = true;
}
else
{
cout << "The fountain is dry" << endl;
}
}
else
{
cout << "You can't do that" << endl;
}
}