diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-03-29 08:48:52 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-03-29 08:48:52 -0400 |
commit | a9a9777190086bd2ce2aa54e20a1101509614463 (patch) | |
tree | dfd754e45f2d8fc4cf955470681c39c502cde1b4 /include/quest.h | |
parent | 82c178d797b9a23c31d7dad1cc8cac29d27c6eb1 (diff) |
began reworking indoors
Diffstat (limited to 'include/quest.h')
-rw-r--r-- | include/quest.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/include/quest.h b/include/quest.h new file mode 100644 index 0000000..4da38bf --- /dev/null +++ b/include/quest.h @@ -0,0 +1,66 @@ +/** @file Quest.h
+ * @brief The quest handling system.
+ *
+ * This file contains Quest and QuestHandler, used to manage quests inside the
+ * game.
+ */
+
+#ifndef QUEST_H
+#define QUEST_H
+
+#include <string>
+
+#include <inventory.h>
+
+/**
+ * When defined, DEBUG allows extra messages to be printed to the terminal for
+ * debugging purposes.
+ */
+
+#define DEBUG
+
+typedef struct {
+ std::string title;
+ std::string desc;
+ struct item_t reward;
+ std::vector<std::pair<std::string,int>> need;
+} Quest;
+
+/**
+ * The Quest Handler class.
+ *
+ * This class handles quests, including the assigning, dropping, and completing
+ * of the quests.
+ */
+
+class QuestHandler {
+public:
+ std::vector<Quest>current;
+
+ /**
+ * Adds a quest to the current quest vector by its title.
+ */
+
+ int assign(std::string title,std::string desc,std::string req);
+
+ /**
+ * Drops a quest through its title.
+ */
+
+ int drop(std::string title);
+
+ /**
+ * Finishes a quest through it's title, also giving a pointer to the Entity
+ * that gave the quest originally.
+ */
+
+ int finish(std::string t);
+
+ /**
+ * Returns true if this handler is currently taking the quest.
+ */
+
+ bool hasQuest(std::string t);
+};
+
+#endif // QUEST_H
|