// KILL
#include <iostream>
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <Wincon.h>
using namespace std;
void AltEnter()
{
keybd_event(VK_MENU,
0x38,
0,
0);
keybd_event(VK_RETURN,
0x1c,
0,
0);
keybd_event(VK_RETURN,
0x1c,
KEYEVENTF_KEYUP,
0);
keybd_event(VK_MENU,
0x38,
KEYEVENTF_KEYUP,
0);
}
int main()
{
char aa = 160; //á
char aaa= 132; //ä
char cc = 159; //è
char ss = 231; //š
char yy = 236; //ý
char ee = 130; //é
char ii = 161; //í
char zz = 167; //ž
char uu = 163; //ú
char ll = 150; //¾
char lll= 229; //å
char tt = 156; //
char ooo= 224; //ó
char oo = 147; //ô
char nn = 229; //ò
char dd = 212; //ï
char SS = 230; //Š
char CC = 172; //È
char ZZ = 166; //Ž
char TT = 155; //
char u;
char vyberzbrane;
int c;
srand((unsigned) time(NULL));
AltEnter();
back:
cout << "Vyber si zbra" << nn << " :\n";
cout << "A:Vo vrecku m" << aa << ss << " boxera.\n"; // poskodenie max 45 %
cout << "B:Ako spr" << aa << "vny frajer ho zml" << aa << "ti" << ss << " pes" << tt << "ami.\n"; // poskodenie max 30%
cout << "C:Zobra" << tt << " si n" << oo << zz << endl; // poskodenie max 60%
cin >> vyberzbrane;
system("CLS");
cout << "\n\n\n\n\n\n\n FIGHT!!!" << endl;
cin.get();
cin.get();
switch (vyberzbrane)
{
default :
cout << "Zadal si zl" << ee << "p" << ii << "smenko\n\n";
goto back;
break;
case 'a':
case 'A':
cout << "Vytiahol si boxera\n\n";
for (int i=100,int i2=100;i1 >0,i2>0)
{
damage = rand() % 45;
damage2 = rand() % 45;
cout << "Nap" << ii << ss << " \"u\" ako utok\n\n\n" << endl;
cin >> u;
if (damage < 10)
{
cout << "Netrafil si ho" << endl;
if (damage2 < 10)
{ cout << "Ani on " << tt << "a netrafil\n";
i2--;
}
else
{
i2 = i2 - damage2;
cout << "Zobral ti " << c << " % " << zz << "ivota\n";
cout << "Ost" << aa << "va" << " ti " << i << " % " << zz << "ivota\n\n";
}
i--;
}
else
{
i = i - damage;
cout << "Zobral si mu " << c << " % " << zz << "ivota\n";
cout << "Ost" << aa << "va" << " mu " << i << " % " << zz << "ivota\n\n";
if (damage2 < 10)
{ cout << "On" << tt << "a netrafil\n";
i2--;
}
else
{
i2 = i2 - damage2;
cout << "Zobral ti " << c << " % " << zz << "ivota\n";
cout << "Ost" << aa << "va" << " ti " << i << " % " << zz << "ivota\n\n";
}
}
}
if (i == 0 and i2 != 0)
{
cout << "\nZabil si ho!!!";
}
else
{ cout << "Zomrel si (V" << ss << "ak vie" << ss << " je b" << yy << "val" << ii << " vojak";
}
break;
case 'b':
case 'B':
cout << "Ide" << ss << " na" << nn << "ho pes" << tt << "ami\n\n";
for (int i=100,int i2=100;i1>0,i2>0)
{
damage = rand() % 30;
damage2 = rand() % 45;
cout << "Nap" << ii << ss << " \"u\" ako utok\n\n\n" << endl;
cin >> u;
if (damage < 10)
{
cout << "Netrafil si ho" << endl;
if (damage2 < 10)
{ cout << "Ani on " << tt << "a netrafil\n";
i2--;
}
else
{
i2 = i2 - damage2;
cout << "Zobral ti " << c << " % " << zz << "ivota\n";
cout << "Ost" << aa << "va" << " ti " << i << " % " << zz << "ivota\n\n";
}
i--;
}
else
{
i = i - damage;
cout << "Zobral si mu " << c << " % " << zz << "ivota\n";
cout << "Ost" << aa << "va" << " mu " << i << " % " << zz << "ivota\n\n";
if (damage2 < 10)
{ cout << "On" << tt << "a netrafil\n";
i2--;
}
else
{
i2 = i2 - damage2;
cout << "Zobral ti " << c << " % " << zz << "ivota\n";
cout << "Ost" << aa << "va" << " ti " << i << " % " << zz << "ivota\n\n";
}
}
}
if (i == 0 and i2 != 0)
{
cout << "\nZabil si ho!!!";
}
else
{ cout << "Zomrel si (V" << ss << "ak vie" << ss << " je b" << yy << "val" << ii << " vojak";
}
break;
case 'c':
case 'C':
cout << "Vytiahol si n" << oo << zz << endl << endl;
for (int i=100,int i2=100;i1 >0,i2>0)
{
damage = rand() % 60;
damage2 = rand() % 45;
cout << "Nap" << ii << ss << " \"u\" ako utok\n\n\n" << endl;
cin >> u;
if (damage < 10)
{
cout << "Netrafil si ho" << endl;
if (damage2 < 10)
{ cout << "Ani on " << tt << "a netrafil\n";
i2--;
}
else
{
i2 = i2 - damage2;
cout << "Zobral ti " << c << " % " << zz << "ivota\n";
cout << "Ost" << aa << "va" << " ti " << i << " % " << zz << "ivota\n\n";
}
i--;
}
else
{
i = i - damage;
cout << "Zobral si mu " << c << " % " << zz << "ivota\n";
cout << "Ost" << aa << "va" << " mu " << i << " % " << zz << "ivota\n\n";
if (damage2 < 10)
{ cout << "On" << tt << "a netrafil\n";
i2--;
}
else
{
i2 = i2 - damage2;
cout << "Zobral ti " << c << " % " << zz << "ivota\n";
cout << "Ost" << aa << "va" << " ti " << i << " % " << zz << "ivota\n\n";
}
}
}
if (i == 0 and i2 != 0)
{
cout << "\nZabil si ho!!!";
}
else
{ cout << "Zomrel si (V" << ss << "ak vie" << ss << " je b" << yy << "val" << ii << " vojak";
}
}
cin.get();
cin.get();
end:
return 0;
}
KDE MAM CHYBU???