40 lines
589 B
Plaintext
40 lines
589 B
Plaintext
#pragma once
|
|||
|
|
#include <iostream>
|
||
|
|
#include <fstream>
|
||
|
|
#include <string.h>
|
||
|
|
#include <memory>
|
||
|
|
#include <vector>
|
||
|
|
#include "Extern/json.hpp"
|
||
|
|
#include "Creature.h"
|
||
|
|
|
||
|
|
struct PlayerE : Creature
|
||
|
|
{
|
||
|
|
|
||
|
|
int id;
|
||
|
|
int level;
|
||
|
|
std::vector<Stat> stats;
|
||
|
|
std::string name;
|
||
|
|
std::string description;
|
||
|
|
|
||
|
|
void Init();
|
||
|
|
void LevelUp();
|
||
|
|
void Die();
|
||
|
|
void TakeDamage(int damageType, float damage);
|
||
|
|
float GetHealth();
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
class PlayerEditor
|
||
|
|
{
|
||
|
|
private:
|
||
|
|
Player *toEdit;
|
||
|
|
std::vector<PlayerE> players;
|
||
|
|
|
||
|
|
std::vector<std::string> commands;
|
||
|
|
public:
|
||
|
|
void Create();
|
||
|
|
void Edit();
|
||
|
|
|
||
|
|
bool Save();
|
||
|
|
};
|