Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
potion.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <chrono>
6
7/*
8 * Different types of potions
9 */
10enum class PotionType {
11 Health,
12 Nausea,
15};
16
17class Potion : public Item {
18public:
24 Potion(glm::vec3 corner, glm::vec3 dimensions, PotionType type);
25
29
30 void useItem(Object* other, ServerGameState& state, int itemSelected) override;
31 bool timeOut();
32 UsedItemsMap::iterator revertEffect(ServerGameState& state);
33
34private:
35 std::chrono::time_point<std::chrono::system_clock> used_time;
36 Player* usedPlayer;
37};
Definition: item.hpp:20
Definition: object.hpp:95
Definition: player.hpp:9
Definition: potion.hpp:17
int effectScalar
Definition: potion.hpp:27
int duration
Definition: potion.hpp:26
bool timeOut()
Definition: potion.cpp:109
PotionType potType
Definition: potion.hpp:28
UsedItemsMap::iterator revertEffect(ServerGameState &state)
Definition: potion.cpp:120
void useItem(Object *other, ServerGameState &state, int itemSelected) override
Definition: potion.cpp:43
The ServerGameState class contains all abstract game state data and logic for a single game state ins...
Definition: servergamestate.hpp:43
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glad.h:1531
PotionType
Definition: potion.hpp:10