]> jfr.im git - irc/gameservirc.git/blame - gameserv/level.cpp
Finally got level.h/cpp compiling into the project... beginning to store
[irc/gameservirc.git] / gameserv / level.cpp
CommitLineData
e99a4410 1#include "level.h"
2
42106907 3Level::Level()
e99a4410 4{
5 strength.high = 0;
6 strength.low = 0;
7
8 gold.high = 0;
9 gold.low = 0;
10
11 exp.high = 0;
12 exp.low = 0;
13
14 hp.high = 0;
15 hp.low = 0;
16}
17
42106907 18void Level::setStrength(range &s)
e99a4410 19{
20 strength.high = s.high;
21 strength.low = s.low;
22}
23
42106907 24void Level::setGold(range &g)
e99a4410 25{
26 gold.high = g.high;
27 gold.low = g.low;
28}
29
42106907 30void Level::setExp(range &e)
e99a4410 31{
32 exp.high = e.high;
33 exp.low = e.low;
34}
35
42106907 36void Level::setHP(range &h)
e99a4410 37{
38 hp.high = h.high;
39 hp.low = h.low;
40}
42106907 41
42Monster Level::randomMonster()
43{
44 Monster temp(monsters.random());
45 temp.strength = strength.random();
46 temp.gold = gold.random();
47 temp.exp = exp.random();
48 temp.hp = hp.random();
49 temp.maxhp = temp.hp;
50 return temp;
51}