-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.c
More file actions
744 lines (646 loc) · 26 KB
/
client.c
File metadata and controls
744 lines (646 loc) · 26 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
#include "lib/client.h"
#define RED "\x1B[31m"
#define GRN "\x1B[32m"
#define YEL "\x1B[33m"
#define BLU "\x1B[34m"
#define MAG "\x1B[35m"
#define CYN "\x1B[36m"
#define WHT "\x1B[37m"
#define RESET "\x1B[0m"
//VARIAVEIS GLOBAIS DE MAPA
int largura_mapa,altura_mapa,mobs_mapa; //largura, altura e quantidade de mobs do mapa.
//VARIAVEL GLOBAL DE IP
char IP[20];
char ch;
char** openMap(char nomemapa[]);//função que abre o mapa da sessão e aloca memoria para comportá-lo.
void printMap(char **mapa); //função que printa o mapa na tela do jogador.
void printStatus(upd_msg *updt);
void printBattleStatus(upd_msg *player , upd_msg *opp);
int selectClass(void);//Muda a classe do usuario
int menuOptions(clientInfo *info); //função que abre o menu de opções
int menuPrincipal(clientInfo info); //função que abre o menu principal
void readStoredInfos(clientInfo *info);
void menuInstructions(void);//abre o menu
int main()
{
FILE *PVPIMG = fopen("data/fight_frame.txt","rt");
FILE *GAMEOVERSCREEN;
FILE *WINSCREEN;
clientInfo info; //cria uma variavel "info" do tipo clientInfo, que armazena o numero do mapa e o nome do client.
readStoredInfos(&info); //le o que ja tem no clientinfo.bin
info.classe=0;
char msg[BUFFER_SIZE];//512
char **MAPA; //mapa do jogo atual
int mapIsOpen=0;
int falha = 0, comecar = 0, jogando = 1;
int statusMenu=0, statusOptions=0; //variaveis de menu
//int classe=0;
int BATTLE=0;
char quit=0; //variavel para finalizar o jooj
upd_msg updt, PLAYER, OPPONENT; //cria var do tipo upd_msg, que faz atualizações dependendo do tipo (mapa, vida, etc)
mov_msg mov; //cria var do tipo mov_msg (manda w,a,s,d)
do{
do
{
statusMenu=menuPrincipal(info);
statusOptions=0;
switch(statusMenu)
{
case 1: if(info.classe>0)
{
connectToServer(IP);//Start Game
statusOptions++;
}
break;
case 2: info.classe=selectClass(); //Change Class, retorna o valor da classe;
break;
case 3: menuOptions(&info); //Options
break;
case 4: menuInstructions();//Instructions
break;
case 5: exit(1);//Quit
break;
}
}while(statusOptions!=1);//O usuario apertou home no options
sendInfoToServer(info); // primeira mensagem é sempre clientInfo
while(!comecar && !falha) // depois só mensagem de texto até o jogo começar
{
mov.msg=getch();
if(mov.msg>-1)
{
sendMovToServer(mov);
}
if(readTxtFromServer(msg) > 0)
{
if(msg[0] == '+')
comecar = 1;
else if(msg[0] == '-')
falha = 1;
printf("%s\n", msg);
}
}
if(falha)
exit(1);
//receber informações iniciais do jogo(mapa, status inicial, etc...)
//depois desse ponto, todas as mensagens recebidas serão de update, e as enviadas são de movimento.
if(readTxtFromServer(msg) > 0) //verifica se tem uma mensagem chegando
MAPA=openMap(msg); //é o mapa chegando
printMap(MAPA);
//SÓ ENVIA: WASD
//SÓ RECEBE: ATUALIZAÇÕES DE MAPA E STATUS
while(jogando)
{
while(readUpdFromServer(&updt) > 0)
{// recebe todas mensagens
// qual o tipo do update, ex:
//printf("pelo menos aqui ne\n");
switch(updt.tipo)
{
case 0: //Case 0 - Apenas andando pelo mapa
MAPA[updt.x][updt.y]=updt.new;
break;
case 1: //Case 1 - Em batalha
system("clear");
fseek(PVPIMG,0,SEEK_SET);
while((ch =fgetc(PVPIMG)) != EOF)
{
putchar(ch);
}
BATTLE=1; //variavel para dizer q ta em batalha
//printStatus(&PLAYER); //printa o proprio status
OPPONENT.vida = updt.vida;
OPPONENT.x = updt.x;
OPPONENT.y = updt.y;
//printStatus(&OPPONENT); //printa status do oponente
printBattleStatus(&PLAYER,&OPPONENT); //printa ambos os status
if(readTxtFromServer(msg) > 0)
printf("%s\n",msg);
break;
case 2://Case 2 - Recebendo atualizações de status
//system("clear");
//printMap(MAPA);
PLAYER.vida = updt.vida;
PLAYER.x = updt.x;
PLAYER.y = updt.y;
PLAYER.newDex = updt.newDex;
PLAYER.newWis = updt.newWis;
//printStatus(&PLAYER);
break;
case 3: //Case 3 - Saindo Vitorioso da Batalha
//ESPERA?
BATTLE=0;
break;
case 4:
system("clear");
GAMEOVERSCREEN=fopen("data/game_over.txt","rt");
fseek(GAMEOVERSCREEN,0,SEEK_SET);
while((ch=fgetc(GAMEOVERSCREEN)) != EOF)
{
putchar(ch);
}
while(quit <= 0)
{
quit = getch();
jogando=0;
/*if(ch=='T' || ch =='t')
{
printf("Isso devia voltar pro menu principal.\n");
}
if(ch=='Q' || ch =='q')
{
exit(1);
}*/
}
break;
case 5:
comecar = 0;
system("clear");
WINSCREEN=fopen("data/win_frame.txt","rt");
fseek(WINSCREEN,0,SEEK_SET);
while((ch=fgetc(WINSCREEN)) != EOF)
{
putchar(ch);
}
while(quit <= 0)
{
quit = getch();
jogando=0;
}
break;
/*
tipo
= 0 atualiza o mapa, (x,y) é a posição, e new é o novo char
= 1 mesagem para avisar que vai entrar em batalha/atualiza status do oponente vida é a vida do oponente, x é o ataque, y é a defesa
= 2 atualiza a meus status, vida é a minha nova vida, x é meu novo ataque, y é minha nova defesa
= 3 mensagem para avisar que saiu de batalha
= 4 mensagem para avisar que morreu
= 5 mensagem para avisar que venceu o jogo
*/
}
}
if(!BATTLE)
{
system("clear");
printMap(MAPA);
printStatus(&PLAYER);
}
mov.msg = getch();
if(mov.msg != -1) // retorna -1 se demorou muito e nada foi digitado.
sendMovToServer(mov);
}
}while(quit!='q' && quit!='Q');
return 0;
}
char** openMap(char nomemapa[])
{
int i,j;
char **MAPA;
FILE *MAPFILE;
MAPFILE=fopen(nomemapa,"r");
fscanf(MAPFILE,"%d %d %d", &altura_mapa,&largura_mapa,&mobs_mapa);
MAPA=(char**)calloc(altura_mapa,sizeof(char*));
for(i=0;i<altura_mapa;i++)
MAPA[i]=(char*)calloc(largura_mapa+1,sizeof(char));
for(i=0;i<altura_mapa;i++)
for(j=0;j<largura_mapa+1;j++)
MAPA[i][j]=fgetc(MAPFILE);
fclose(MAPFILE);
return MAPA;
}
void printMap(char **MAPA)
{
int i,j;
system("clear");
for(i=0;i<altura_mapa;i++)
for(j=0;j<largura_mapa+1;j++)
if(MAPA[i][j]=='*')
{
printf(CYN"%c",MAPA[i][j] );
printf(RESET);
}
else
if(MAPA[i][j]=='m')
{
printf(RED"%c",MAPA[i][j] );
printf(RESET);
}
else
{
printf(RESET"%c",MAPA[i][j] );
printf(RESET);
}
printf("\n");
//printf("%c",MAPA[i][j]);
//printf("\n");
}
void printStatus(upd_msg *player)
{
printf("\n");
printf("<HERO STATS>\n");
printf(RED"<HP>: %d\n",player->vida);
printf(WHT"<ATK>: %d\n",player->x);
printf(YEL "<DEF>: %d\n",player->y);
printf(MAG"<DEX>: %d\n",player->newDex);
printf(BLU "<WIS>: %d\n",player->newWis);
printf(RESET);
printf("\n");
}
void printBattleStatus(upd_msg *player , upd_msg *opp)
{
printf("\n");
printf("<YOU>\t\t\t\t\t\t <ENEMY>\n");
printf("<HP>: %d\t\t\t\t\t <HP>: %d\n",player->vida, opp->vida);
printf("<ATK>: %d\t\t\t\t\t <ATK>: %d\n",player->x, opp->x);
printf("<DEF>: %d\t\t\t\t\t <DEF>: %d\n",player->y,opp->y);
printf("\n");
}
void readStoredInfos(clientInfo *info)
{
FILE *CLIENTPROFILE;
FILE *LASTIP;
CLIENTPROFILE=fopen("data/clientInfo.bin","r+b");
LASTIP=fopen("data/lastConn.bin","r+b");
fread(info,sizeof(clientInfo),1,CLIENTPROFILE);
fread(IP,sizeof(char)*20,1,LASTIP);
fclose(CLIENTPROFILE);
fclose(LASTIP);
}
int menuOptions(clientInfo *info) //VERIFICAR OS INDICES DO ARQUIVO, EM RELAÇAO AO LOCAL DOS APONTADORES DE OPÇÕES
{
FILE *arq=fopen("data/options.txt", "r+b");
FILE *CLIENTPROFILE=fopen("data/clientInfo.bin","r+b"); //Abre o arquivo para atualizar os dados do client (se necessario)
FILE *LASTIP=fopen("data/lastConn.bin","r+b"); //Abre o arquivo para atualizar o IP (se necessario)
char tipo[2600], ch='w';
int i;//printa o arquivo
long long int num=40001;
fread(tipo, sizeof(char), 2600, arq);
while(1)
{
if(ch=='w'||ch=='s'||ch=='W'||ch=='S'||ch=='d'||ch=='D')
{
if(ch=='s'||ch=='S')
num++;
if(ch=='w'||ch=='W')
num--;
if(ch=='d'||ch=='D')
{
if(num%5==0)//Change Name
{
system("clear");
printf("Digite seu nome\n");
scanf(" %[^\n]", info->nome);
}
if(num%5==1)//Change Map
{
system("clear");
printf("Digite o numero do mapa\n");
scanf("%d", &info->mapa);
}
if(num%5==2)//Change Server IP
{
system("clear");
printf("Digite o IP que deseja se conectar: ");
scanf("%s",IP);
}
if(num%5==3)//Creat Random Map
;
if(num%5==4)//home
{
fwrite(info,sizeof(clientInfo),1,CLIENTPROFILE);
fwrite(IP,sizeof(char)*20,1,LASTIP);
fclose(CLIENTPROFILE);
fclose(LASTIP);
return 1;
}
}
system("clear");
if(num%5==0)
{
tipo[2290]=' '; tipo[2128]=' '; tipo[1966]=' '; tipo[1804]=' '; tipo[1642]='>';
}
if (num%5==1)
{
tipo[2290]=' '; tipo[2128]=' '; tipo[1966]=' '; tipo[1804]='>'; tipo[1642]=' ';
}
if (num%5==2)
{
tipo[2290]=' '; tipo[2128]=' '; tipo[1966]='>'; tipo[1804]=' '; tipo[1642]=' ';
}
if (num%5==3)
{
tipo[2290]=' '; tipo[2128]='>'; tipo[1966]=' '; tipo[1804]=' '; tipo[1642]=' ';
}
if (num%5==4)
{
tipo[2290]='>'; tipo[2128]=' '; tipo[1966]=' '; tipo[1804]=' '; tipo[1642]=' ';
}
for ( i = 0; i < 2592; i++)
{
if(tipo[i]=='*')
{
printf(BLU"%c", tipo[i]);
}
else
if(tipo[i]=='>')
{
printf(YEL"%c", tipo[i]);
}
else
if (tipo[i]==':'||tipo[i]=='\\'||tipo[i]=='/'||tipo[i]=='.'||tipo[i]=='('||tipo[i]==')'||tipo[i]=='_'||tipo[i]=='-'||tipo[i]=='`')
{
printf(RED"%c", tipo[i]);
}
else
{
printf(RED"%c", tipo[i]);
}
}
printf(RESET"\n");
ch='\0';
}
ch=getch();
usleep(200);
}
}
int menuPrincipal(clientInfo info/*clientInfo info->nome, clientInfo info->mapa TALVEZ PRECISE DE ARGUMENTOS*/) // NAO SEI SE ISSO FUNCIONA
{
FILE *arq=fopen("data/tela_inicial.txt", "r+b");
char tipo[2592], ch='w';
int i;
long long int num=40001;
fread(tipo, sizeof(char), 2592, arq);
while(1)
{
if(ch=='w'||ch=='s'||ch=='W'||ch=='S'||ch=='d'||ch=='D')
{
if(ch=='s'||ch=='S')
num++;
if(ch=='w'||ch=='W')
num--;
if(ch=='d'||ch=='D')
{
if(num%5==0)//start game
return 1;
if(num%5==1)//selecte class
return 2;
if(num%5==2)//options
return 3;
if(num%5==3)//instruction
return 4;
if(num%5==4)//quit
return 5;
}
system("clear");
if(num%5==0)
{
tipo[2290]=' '; tipo[2128]=' '; tipo[1966]=' '; tipo[1804]=' '; tipo[1642]='>';
}
if (num%5==1)
{
tipo[2290]=' '; tipo[2128]=' '; tipo[1966]=' '; tipo[1804]='>'; tipo[1642]=' ';
}
if (num%5==2)
{
tipo[2290]=' '; tipo[2128]=' '; tipo[1966]='>'; tipo[1804]=' '; tipo[1642]=' ';
}
if (num%5==3)
{
tipo[2290]=' '; tipo[2128]='>'; tipo[1966]=' '; tipo[1804]=' '; tipo[1642]=' ';
}
if (num%5==4)
{
tipo[2290]='>'; tipo[2128]=' '; tipo[1966]=' '; tipo[1804]=' '; tipo[1642]=' ';
}
for ( i = 0; i < 2592; i++)
{
if(tipo[i]=='*')
{
printf(BLU"%c", tipo[i]);
}
else
if(tipo[i]=='>')
{
printf(YEL"%c", tipo[i]);
}
else
if (tipo[i]==':'||tipo[i]=='\\'||tipo[i]=='/'||tipo[i]=='.'||tipo[i]=='('||tipo[i]==')'||tipo[i]=='_'||tipo[i]=='-'||tipo[i]=='`')
{
printf(RED"%c", tipo[i]);
}
else
{
printf(RED"%c", tipo[i]);
}
}
printf(RESET"\n");
ch='\0';
printf("Username: %s\n",info.nome);
printf("Map Selected: %d\n",info.mapa);
printf("Connect to: %s\n",IP);
if(info.classe > 0)
switch(info.classe)
{
case 1: printf("Class Chosen: ");
printf(CYN"PALADINO");
printf(RESET"\n");
break;
case 2: printf("Class Chosen: ");
printf(CYN"LADRÃO");
printf(RESET"\n");
break;
case 3: printf("Class Chosen: ");
printf(CYN"CAÇADOR");
printf(RESET"\n");
break;
case 4: printf("Class Chosen: ");
printf(CYN"MAGO");
printf(RESET"\n");
break;
case 5: printf("Class Chosen: ");
printf(CYN"GUERREIRO");
printf(RESET"\n");
break;
}
else
{
printf(RED"Please Select a Class Before Starting!");
printf(RESET"\n");
}
}
ch=getch();
usleep(200);
}
fclose(arq);
}
int selectClass()
{
FILE *arq;
int num=2000, i;
long int TamArq;
char tipo[4031];
char teste='u';
while(1)
{
switch(teste)
{
case 'a':
case 'A':
num--;
break;
case 'd':
case 'D':num++;
break;
default: break;
}
if(num%5==0)
{
system("clear");
arq=fopen("data/paladino.txt", "r+b");
fread(tipo, sizeof(char), 1196, arq);
TamArq=1196;
for ( i = 0; i<TamArq; i++)
printf(GRN"%c", tipo[i]);
printf("\n\n");
printf(RED"\n\t\t\t*********************************\n");
printf("\t\t\t*");
printf(BLU);
printf(" guerreiro");
printf(YEL" <-PALADINO-> ");
printf(BLU"ladrao ");
printf(RED"*\n");
printf(RED"\t\t\t*********************************");
printf(RESET"\n");
fclose(arq);
}
if(num%5==1)
{
system("clear");
arq=fopen("data/ladrao.txt", "r+b");
fread(tipo, sizeof(char), 1047, arq);
TamArq=1047;
for ( i = 0; i<TamArq; i++)
printf(GRN"%c", tipo[i]);
printf(RED"\n\t\t\t*********************************\n");;
printf("\t\t\t*");
printf(BLU);
printf(" paladino ");
printf(YEL" <-LADRAO->");
printf(BLU" cacador ");
printf(RED"*\n");
printf(RED"\t\t\t*********************************");
printf(RESET"\n");
fclose(arq);
}
if(num%5==2)
{
system("clear");
arq=fopen("data/cacador.txt", "r+b");
fread(tipo, sizeof(char), 1608, arq);
TamArq=1608;
for ( i = 0; i<TamArq; i++)
printf(GRN"%c", tipo[i]);
printf(RED"\n\t\t\t*********************************\n");
printf("\t\t\t*");
printf(BLU);
printf(" ladrao");
printf(YEL" <-CAÇADOR-> ");
printf(BLU"mago ");
printf(RED"*\n");
printf(RED"\t\t\t*********************************");
printf(RESET"\n");
fclose(arq);
}
if(num%5==3)
{
system("clear");
arq=fopen("data/guerreiro.txt", "r+b");
fread(tipo, sizeof(char), 1525, arq);
TamArq=1531;
printf("\n");
for ( i = 0; i<TamArq; i++)
printf(GRN"%c", tipo[i]);
printf(RED"\n\t\t\t*********************************\n");
printf("\t\t\t*");
printf(BLU);
printf(" cacador");
printf(YEL" <-MAGO-> ");
printf(BLU"guerreiro ");
printf(RED"*\n");
printf(RED"\t\t\t*********************************");
printf(RESET"\n");
fclose(arq);
}
if(num%5==4)
{
system("clear");
arq=fopen("data/mago.txt", "r+b");
fread(tipo, sizeof(char), 1209, arq);
TamArq=1203;
for ( i = 0; i<TamArq; i++)
printf(GRN"%c", tipo[i]);
printf("\n\n");
printf(RED"\n\t\t\t*********************************\n");
printf(RED"\t\t\t*");
printf(BLU" mago");
printf(YEL" <-GUERREIRO-> ");
printf(BLU"paladino ");
printf(RED"*\n");
printf("\t\t\t*********************************");
printf(RESET"\n");
fclose(arq);
}
usleep(500);
printf(RESET);
teste=getch();
if (teste=='\n')
if (num%5==0)
return 1; //Retorna 1 se escolher PALADINO
else
if (num%5==1)
return 2; //Retorna 2 se escolher LADRAO
else
if (num%5==2)
return 3; //Retorna 3 se escolher CACADOR
else
if (num%5==3) //Retorna 4 se escolher GUERREIRO
return 4;
else
return 5; //Retorna 5 se escolher MAGO
printf(RESET);
}
printf(RESET);
}
void menuInstructions()
{
char controleDeSaida='a';
system("clear");
printf(RED"\n\t\t\t\t\t> INSTRUCOES DE JOGO <\n\n"RESET);
printf("\t-> Digite seu nome em Options\n");
printf("\t-> Digite o mapa desejado em Options\n");
printf("\t-> Digite o IP do server em Options\n");
printf("\t-> Escolha uma classe\n");
printf("\t-> Teclas de movimentacao: 'w', 'a, 's', 'd'\n");
printf("\t-> Teclas na batalha: 'd' -> Ataque Basico, 'w','s,' -> Habilidades\n");
printf(RED"\n\t\t\t\t\t> Seja bem vindo a arena <\n"RESET);
printf("\tVocê foi escolhido para participar da arena entre os grandes, prepare-se.\nOs monstros serão liberados, preparando armadilhas, clones e preparados para matar \nquaisquer um que entrem em seus caminhos, e os conpetidores entrarao na arena, \npreparados para lutar pelas recompensas mas apenas um pode sobreviver.\nSeja o vencedor de recompensas inimaginaveis, gloria e ouro que nenhum homem imaginou.\nPerca e você será impiedosamente executado, então boa sorte!\n");
printf(RED"\n\t\t\t\t\t> CLASSES <\n"RESET);
printf("\nCACADOR -> Desde cedo, o chamado das selvas incita alguns aventureiros a deixarem a comodidade\nde seus lares para adentrarem o impiedoso mundo selvagem. Aqueles que sobrevivem acabam se\ntornando CACADORES. Senhores de seu dominio, os cacadores são capazes de deslizar como fantasmas\n por entre as arvores e colocar armadilhas.\n");
printf("\n - HABILIDADES -\nTiro Concentrado-> O cacador concentra um tiro certeiro num ponto vital do oponente\nArapuca->O cacador prepara uma armadilha e causa dano e pode atordoar o oponente\n");
printf("\nMAGO-> Estudantes privilegiados com intelecto agucado e disciplina inabalavel, este e o MAGO\nA magia e igualmente incrivel como perigosa, Magos sao capazes de evocar bolas de fogo para\nexplodir seus inimigos, bem como rajadas de gelo, para congela-los.\n");
printf("\n - HABILIDADES -\nBola de Fogo-> Uma enorme bola de fogo para explodir seus oponentes\nSopro de Gelo-> Um nevoa congelante que causa dano e pode congelar seus oponentes\n");
printf("\nGUERREIRO-> GUERREIROS combinam força, liderança e vasto conhecimenhto em armas e armaduras para\ncriar o caos no campo de batalha. As vezes protegendo a linha de frente com seus escudos, as\nvezes liberando sua furia na ameaca mais proxima, com armas letais.\n");
printf("\n - HABILIDADES -\nEscudada-> O guerreiro bate como escudo no oponente\nFuria-> O guerreiro entra em estado de furia, causando mais dano por alguns turnos\n");
printf("\nPALADINO-> Este e o dever do PALADINO: proteger os fracos, trazer justica aos injustos e exterminar\n o mal nos confins mais sombrios do mundo. Este guerreiro sagrado equipado com armas divinas e adepto\nda bencao da luz que lhe permite curar feridas.\n");
printf("\n - HABILIDADES -\nCura Divina-> O paladino pede ajuda aos divinos, curando suas feridas e ficando mais forte\nMartelo Sagrado-> O paladino lanca seu martelo embuido com encatamentos sagrados\n");
printf("\nLADINO-> Para os LADINOS, o unico codigo que existe e o contrato e sua honra pode ser comprada. \nLivre de escrupulos, estes mercenarios empregam o uso de taticas brutais e eficientes. \nAssassinos letais e mestres da furtividade, usam as taticas mais sujas ao seu alcance.\n");
printf("\n - HABILIDADES -\nVeneno-> O ladino aplica veneno em suas laminas, causando mais dano\nOlhos de Aguia-> O ladino prepara ataques criticos contra seu oponente\n");
printf(RED"\n*********");
printf(GRN"\n> ");
printf(YEL"QUIT");
printf(RED" *\n");
printf("*********");
printf(RESET"\n");
while(controleDeSaida!='d')
controleDeSaida=getch();
return;
}