-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPokemon.h
81 lines (79 loc) · 2.11 KB
/
Pokemon.h
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
#ifndef POKEMON_H
#define POKEMON_H
#include "GameObject.h"
#include "Point2D.h"
#include "Vector2D.h"
#include "PokemonGym.h"
#include "PokemonCenter.h"
#include <string>
#include "Rival.h"
#include "BattleArena.h"
enum PokemonStates {
STOPPED = 0,
MOVING = 1,
EXHAUSTED = 2,
IN_GYM = 3,
IN_CENTER = 4,
MOVING_TO_GYM = 5,
MOVING_TO_CENTER = 6,
TRAINING_IN_GYM = 7,
RECOVERING_STAMINA = 8,
IN_ARENA = 9,
MOVING_TO_ARENA = 10,
BATTLE = 11,
FAINTED = 12
};
class Pokemon : public GameObject {
public:
Pokemon();
Pokemon(char in_code);
Pokemon(string name, int in_id, char in_code, unsigned int in_speed, Point2D in_loc);
Pokemon(string in_name, double speed, double hp, double phys_dmg, double
magic_dmg, double def, int in_id, char in_code, Point2D in_loc);
~Pokemon();
void StartMoving(Point2D dest);
void StartMovingToCenter(PokemonCenter* center);
void StartMovingToGym(PokemonGym* gym);
void StartTraining(unsigned int num_training_units);
void StartRecoveringStamina(
unsigned int num_stamina_points);
void Stop();
void ShowStatus();
bool Update();
string GetName();
bool IsExhausted();
bool ShouldBeVisible();
bool IsAlive();
void TakeHit( double physical_damage, double magical_damage, double defense);
void StartMovingToArena(BattleArena* arena);
void ReadyBattle(Rival* in_target);
bool StartBattle();
protected:
bool UpdateLocation();
void SetupDestination(Point2D dest);
double health;
double store_health;
double physical_damage;
double magical_damage;
double defense;
Rival* target;
bool is_in_arena;
BattleArena* current_arena;
private:
double speed;
Vector2D delta;
Point2D destination;
protected:
double pokemon_dollars;
unsigned int experience_points;
bool is_in_gym;
bool is_in_center;
unsigned int stamina;
unsigned int training_units_to_buy;
unsigned int stamina_points_to_buy;
PokemonCenter* current_center;
PokemonGym* current_gym;
string name;
};
double GetRandomAmountOfPokemonDollars();
#endif