#include <bits/stdc++.h>
#include <windows.h>
#include <conio.h>
using namespace std;
int main()
{
int hp=100000;
system("color 07");
cout<<"全民砸键盘\n";
cout<<"Press any key to continue...";
getch();
system("cls");
while(1)
{
cout<<"(╯°□°)╯︵ ┻━┻\n键盘生命值:"<<hp;
getch();
if(!(rand()%10))
{
hp-=9;
cout<<"暴击!!!";
system("color 4c");
Sleep(50);
system("color 07");
}
hp--;
if(hp<=0)
{
system("cls");
cout<<"你把键盘砸坏了!游戏结束";
getch();
break;
}
system("color f7");
Sleep(50);
system("color 07");
system("cls");
cout<<"┳━┳ ノ( ゜-゜ノ)\n键盘生命值:"<<hp;
getch();
if(!(rand()%10))
{
hp-=9;
cout<<"暴击!!!";
system("color 4c");
Sleep(50);
system("color 07");
}
hp--;
if(hp<=0)
{
system("cls");
cout<<"你把键盘砸坏了!游戏结束";
getch();
break;
}
system("color f7");
Sleep(50);
system("color 07");
system("cls");
cout<<"(╯‵□′)╯︵┻━┻ \n键盘生命值:"<<hp;
getch();
if(!(rand()%10))
{
hp-=9;
cout<<"暴击!!!";
system("color 4c");
Sleep(50);
system("color 07");
}
hp--;
if(hp<=0)
{
system("cls");
cout<<"你把键盘砸坏了!游戏结束";
getch();
break;
}
system("color f7");
Sleep(50);
system("color 07");
system("cls");
cout<<"┳━┳ ノ( ゜-゜ノ)\n键盘生命值:"<<hp;
getch();
if(!(rand()%10))
{
hp-=9;
cout<<"暴击!!!";
system("color 4c");
Sleep(50);
system("color 07");
}
hp--;
if(hp<=0)
{
system("cls");
cout<<"你把键盘砸坏了!游戏结束";
getch();
break;
}
system("color f7");
Sleep(50);
system("color 07");
system("cls");
}
}