全部评论 2

  • <<"点伤害"<<endl;
    coin+=5;
    }
    break;
    }
    }
    cout<<"请按下 4 键使用大招\n";
    while(true){
    if (isKeyPressed('4')) {
    if(player==0){
    cout<<"我方使用大招 水来土掩,造成了敌方"<<20+kill
    <<"点伤害"<<endl;
    }
    else if(player1){
    cout<<"我方使用大招 摄魂余生,使敌方造成了每秒2点的持续性伤害"<<endl;
    }
    break;
    }
    }
    system("pause");
    }
    system("cls");
    cout<<"你的角色为:"<<name<<endl;
    choice=rand()%3;
    cout<<"敌方的角色为:";
    if(choice
    0){
    cout<<"法兰西玫瑰\n";
    }
    else if(choice1){
    cout<<"复仇者_黑客_ZDZL\n";
    }
    else if(choice
    2){
    cout<<"陈臻武\n";
    }
    system("pause");
    while(true){
    f++;
    f2++;
    system("cls");
    cout<<"我方血量:"<<x<<endl;
    cout<<"敌方血量:"<<ox<<endl;
    cout<<"普攻CD:"<<p<<endl;
    cout<<"1技能CD:"<<p1<<endl;
    cout<<"2技能CD:"<<p2<<endl;
    cout<<"大招CD:"<<p3<<endl;
    if (isKeyPressed('1')) {
    if(p<=0){
    cout<<"我方使用普攻,造成了敌方1点伤害"<<endl;
    p=1;
    ox-=1;
    }
    }
    else if (isKeyPressed('2')) {
    if(p1<=0){
    if(player0){
    cout<<"我方使用一技能 滔滔火海,造成了敌方"<<10+kill_<<"点伤害"<<endl;
    ox-=10+kill_;
    }
    else if(player
    1){
    cout<<"我方使用一技能 眩晕药水,使敌方眩晕2秒"<<endl;
    f-=20;
    }
    p1=6-cd_;
    }
    }
    else if (isKeyPressed('3')) {
    if(p2<=0){
    if(player0){
    cout<<"我方使用二技能 暴力破解,造成了敌方"<<12+kill_<<"点伤害"<<endl;
    ox-=12+kill_;
    }
    else if(player
    1){
    cout<<"我方使用二技能 绝命毒师,使敌方掉落了5枚金币,并造成了"<<5+kill_<<"点伤害"<<endl;
    ox-=5+kill_;
    coin+=5;
    }
    p2=8-cd_;
    }
    }
    else if (isKeyPressed('4')) {
    if(p3<=0){
    if(player0){
    cout<<"我方使用大招 水来土掩,造成了敌方"<<20+kill_<<"点伤害"<<endl;
    ox-=20+kill_;
    }
    else if(player
    1){
    cout<<"我方使用大招 摄魂余生,使敌方造成了每秒2点的持续性伤害"<<endl;
    m_kill*=2;
    }
    p3=12-cd_;
    }
    }
    if(f2%10==0){
    ox-=m_kill;
    cout<<"我方造成了"<<m_kill<<"点的持续性伤害\n";
    }
    if(ox<=0){
    cout<<"胜利!";
    cout<<"\n你获得了100金币\n";

    2025-03-15 来自 浙江

    1
  • #include<iostream>
    #include<cstdlib>
    #include<ctime>
    #include<string>
    #include<windows.h>
    #include<cstdio>
    #include<cmath>
    #include<fstream>
    using namespace std;
    int x=100,coin=100,buy_time,cd_=0,buy[1010],kill_=0,player=0,game=0;
    string name="花似雪",shop[10]={"血量(10血)","血量(20血)","血量(30血)","血量(50血)","缩短CD 1秒","缩短CD 2秒","伤害(1血)","伤害(2血)","角色(一只姜)"};
    bool isKeyPressed(int key) {
    return (GetAsyncKeyState(key)&0x8000)!=0;
    }
    bool fight_into(int x,int ox,string per,string oer){
    cout<<"你的角色为:"<<per<<endl;
    cout<<"敌方的角色为:"<<oer;
    system("pause");
    int p=0,p1=0,p2=0,p3=0;
    while(true){
    if (isKeyPressed('1')) {
    if(p<=0){
    cout<<"我方使用普攻,造成了敌方1点伤害"<<endl;
    p=1;
    ox-=1;
    }
    }
    if (isKeyPressed('1')) {
    if(p<=0){
    cout<<"我方使用一技能 滔滔大浪,造成了敌方"<<5+kill_<<"点伤害,"<<endl;
    p=1;
    ox-=1;
    }
    }
    Sleep(100);
    if(p>0){
    p-=0.1;
    }
    if(p1>0){
    p1-=0.1;
    }
    if(p2>0){
    p2-=0.1;
    }
    if(p3>0){
    p3-=0.1;
    }
    }
    }
    void Slowsay(string a) {
    int l=a.size();
    for(int i=0;i<l;i++){
    cout<<a[i];
    Sleep(20);
    }
    cout<<endl;
    Sleep(100);
    }
    void play_mode(){
    srand(static_cast<unsigned int>(time(0)));
    int n,ox=rand()%30+x-10,j=x,kill,choice,f=0,m_kill=0,f2=0;
    string g;
    double p=0,p1=0,p2=0,p3=0;
    system("cls");
    cout<<"是否参加新手教程\n1.是 2.否\n";
    cin>>n;
    if(n1){
    system("cls");
    cout<<"新手引导:\n请按下 1 键使用普攻\n";
    while(true){
    if (isKeyPressed('1')) {
    cout<<"我方使用普攻,造成了敌方1点伤害"<<endl;
    break;
    }
    }
    cout<<"请按下 2 键使用一技能\n";
    while(true){
    if (isKeyPressed('2')) {
    if(player
    0){
    cout<<"我方使用一技能 滔滔火海,造成了敌方"<<10+kill_<<"点伤害"<<endl;
    }
    else if(player1){
    cout<<"我方使用一技能 眩晕药水,使敌方眩晕2秒"<<endl;
    }
    break;
    }
    }
    cout<<"请按下 3 键使用二技能\n";
    while(true){
    if (isKeyPressed('3')) {
    if(player
    0){
    cout<<"我方使用二技能 暴力破解,造成了敌方"<<12+kill_<<"点伤害"<<endl;
    }
    else if(player==1){
    cout<<"我方使用二技能 绝命毒师,使敌方掉落了5枚金币,并造成了"<<5+kill

    2025-03-15 来自 浙江

    0

热门讨论