-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPokemon.cpp
More file actions
51 lines (40 loc) · 1.25 KB
/
Pokemon.cpp
File metadata and controls
51 lines (40 loc) · 1.25 KB
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
#include <iostream>
#include <stdio.h>
#include <string>
#include "pkm_obj.h"
using namespace std;
int main (int argc, char* argv[])
{
// Pokemon *Noze0 = new Pokemon("Noze_Zelle",50);
// Pokemon *Noze1 = new Pokemon("Nosepass",100);
cout << "Battle!!!" << endl;
/* cout << Noze0->get_nick() << " vs " << Noze1->get_nick() << endl;
Noze0->battle();
Noze1->battle();
cout << Noze0->get_nick() << "\tHP: " << Noze0->get_battle_stat(0) << endl;
cout << Noze1->get_nick() << "\tHP: " << Noze1->get_battle_stat(0) << endl;
while (true) {
cout << endl << "What will you do?" << endl << "1) FIGHT\n2) RUN" << endl;
int choice;
cin >> choice;
choice = choice % 2;
switch (choice) {
case 0:
cout << "Got away safely!" << endl;
return 0;
case 1:
cout << "What move will " << Noze0->get_nick() << " use?" << endl;
for (int m = 0; m < 4; m++) {
cout << m+1 << ") " << Noze0->get_current_move(m).get_name() << endl;
}
}
cin >> choice;
Noze1->get_hit(Noze0->use_move(choice - 1));
cout << Noze0->get_nick() << "\tHP: " << Noze0->get_battle_stat(0) << endl;
cout << Noze1->get_nick() << "\tHP: " << Noze1->get_battle_stat(0) << endl;
if (Noze0->get_battle_stat(0) <= 0 || Noze1->get_battle_stat(0) <= 0) {
break;
}
}*/
return 0;
}