-
Notifications
You must be signed in to change notification settings - Fork 0
/
Character.cpp
46 lines (41 loc) · 1.02 KB
/
Character.cpp
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
#include "stdafx.h"
#include"Character.h"
#include"Character.h"
void Character::BeHit(int hurt)
{
i_Hp = i_Hp - hurt;
}
int Character::Hit()
{
return i_Atk;
}
void Character::IsDead()
{
if (i_Hp <= 0)
{
SetCoord(44, 28);
cout << str_Name << "[落荒而逃]\n";
Dead = true;
}
}
void Character::Gothrough()
{
SetCoord(35, 5);
cout << "名称:" << str_Name<<" " ;
SetCoord(35, 6);
cout<< "种族:" << str_Race<<" " ;
SetCoord(35, 7);
cout<< "性别:" << str_Sex<<" " ;
SetCoord(35, 8);
cout<< "攻击力:" << i_Atk<<" " ;
SetCoord(35, 9);
cout<< "生命值:" << i_Hp<<" " ;
SetCoord(35, 10);
cout<< "经验值:" << i_Exp<<" " ;
SetCoord(35, 11);
cout<< "金币:" << i_Money<<" " ;
SetCoord(35, 12);
cout<< "防御力:" << i_Def<<" " ;
SetCoord(35, 13);
cout<< "等级:" << i_Level<<" " ;
}