Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
dungeonmaster.hpp
Go to the documentation of this file.
1#pragma once
2
7#include <chrono>
8
9class Weapon;
10
11class DungeonMaster : public Creature {
12public:
15
16 DungeonMaster(glm::vec3 corner, glm::vec3 facing);
18
19 virtual SharedObject toShared() override;
20
24 int getPlacedTraps();
25
30 void setPlacedTraps(int placedTraps);
31
36 void useMana(int mana);
37
41 void manaRegen();
42
51 void setParalysis(bool isParalyzed, double paralysis_duration);
52
57 bool isParalyzed() const;
58
66 double getParalysisDuration() const;
67
74 std::chrono::time_point<std::chrono::system_clock> getParalysisStartTime() const;
75
80
81private:
86 double paralysisDuration;
87
92 std::chrono::time_point<std::chrono::system_clock> paralysis_start_time;
93
97 int placedTraps;
98
99 std::chrono::system_clock::time_point mana_used;
100};
Definition: creature.hpp:7
Definition: dungeonmaster.hpp:11
void setPlacedTraps(int placedTraps)
set the number of traps the DM currently has placed
Definition: dungeonmaster.cpp:54
SharedTrapInventory sharedTrapInventory
Definition: dungeonmaster.hpp:13
void useMana(int mana)
For lightning and light-cut usage.
Definition: dungeonmaster.cpp:58
void manaRegen()
mana regeneration function
Definition: dungeonmaster.cpp:65
SharedDMInfo dmInfo
Definition: dungeonmaster.hpp:14
void setParalysis(bool isParalyzed, double paralysis_duration)
Sets the whether the DungeonMaster is paralyzed. If isParalyzed is true, then this sets the paralysis...
Definition: dungeonmaster.cpp:82
virtual SharedObject toShared() override
Generates a SharedObject representation of this object.
Definition: dungeonmaster.cpp:6
Weapon * lightning
The DM's lightning weapon.
Definition: dungeonmaster.hpp:79
double getParalysisDuration() const
Getter for the DungeonMaster's paralysis duration. (this value should be ignored if the DungeonMaster...
Definition: dungeonmaster.cpp:97
bool isParalyzed() const
Getter for whether the DungeonMaster is paralyzed.
Definition: dungeonmaster.cpp:93
std::chrono::time_point< std::chrono::system_clock > getParalysisStartTime() const
Getter for the timestamp of the last time the DungeonMaster was paralyzed.
Definition: dungeonmaster.cpp:101
~DungeonMaster()
Definition: dungeonmaster.cpp:78
int getPlacedTraps()
get the number of traps the DM currently has placed
Definition: dungeonmaster.cpp:50
Representation of the Object class used by ServerGameState, containing exactly the subset of Object d...
Definition: sharedobject.hpp:302
Definition: weapon.hpp:18
Definition: sharedobject.hpp:272
Definition: sharedobject.hpp:125