作者不写,我写(修改)
2024-10-22 16:33:23
发布于:浙江
服了,贴字数到上限了
具体见:传送门
167行后:
void zd(string diren) {
system("cls");
srand(time(NULL));
node a[3];
a[0] = juese["开拓者"];
a[1] = juese["丹恒"];
a[2] = juese["娜塔莎"];
noder d = dir[diren];
int winner = 0, zhanjidian = 3;
d.gongj = max(max(a[0].fangy + 1, a[1].fangy + 1), max(a[2].fangy + 1, d.gongj));
for (int n = 0;; n++) {
cout << "开拓者" << (a[0].xuel < 0 ? 0 : a[0].xuel) << "/" << juese["开拓者"].xuel << endl;
cout << "丹恒" << (a[1].xuel < 0 ? 0 : a[1].xuel) << "/" << juese["丹恒"].xuel << endl;
cout << "娜塔莎" << (a[2].xuel < 0 ? 0 : a[2].xuel) << "/" << juese["娜塔莎"].xuel << endl;
cout << diren << "剩余血量" << (d.xuel < 0 ? 0 : d.xuel) << endl;
cout << "目前战技点:";
for (int i = 1; i <= zhanjidian; i++)cout << "◆";
for (int i = zhanjidian + 1; i <= 5; i++)cout << "◇";
cout << endl;
if (a[0].xuel <= 0 && a[1].xuel <= 0 && a[2].xuel <= 0)break;
else if (d.xuel <= 0) {
winner = 1;
break;
}
if (n % 4 == 3) {
int _ = rand() % 3;
while (a[_].xuel <= 0 && (a[0].xuel > 0 || a[1].xuel > 0 || a[2].xuel > 0))_ = rand() % 3;
cout << diren << "对" << dw[_] << "造成了" << d.gongj*5 - a[_].fangy*2 << "点伤害\n";
a[_].xuel -= d.gongj*5 - a[_].fangy*2;
Sleep(1000);
_ = rand() % 3;
while (a[_].xuel <= 0 && (a[0].xuel > 0 || a[1].xuel > 0 || a[2].xuel > 0))_ = rand() % 3;
cout << diren << "对" << dw[_] << "造成了" << d.gongj*2 - a[_].fangy*1.2 << "点伤害\n";
a[_].xuel -= d.gongj*2 - a[_].fangy*1.2;
Sleep(1000);
system("cls");
} else {
int _ = n % 4;
cout << "轮到" << dw[_] << "行动\n";
cout << "使用 1.普攻 2.战技\n";
if (a[_].xuel <= 0) {
system("cls");
continue;
}
while (1) {
int bj = rand() % 100 - 1;
char c;
cin >> c;
if (c == '2' && zhanjidian == 0)cout << "战技点不够,请重新输入\n";
else if (c == '2') {
if (dw[_] == "娜塔莎") {
cout << "对谁使用\n";
cout << "1." << dw[0] << "\n2." << dw[1] << "\n3." << dw[2] << "\n4.返回\n";
char c;
cin >> c;
if (c == '1') {
cout << dw[0] << "回复了" << int(juese["娜塔莎"].xuel * 0.2) << "点血量\n";
a[0].xuel += int(juese["娜塔莎"].xuel * 0.2);
a[0].xuel = min(a[0].xuel, juese[dw[0]].xuel);
zhanjidian--;
Sleep(1000);
system("cls");
break;
} else if (c == '2') {
cout << dw[1] << "回复了" << int(juese["娜塔莎"].xuel * 0.2) << "点血量\n";
a[1].xuel += int(juese["娜塔莎"].xuel * 0.2);
a[1].xuel = min(a[1].xuel, juese[dw[1]].xuel);
zhanjidian--;
Sleep(1000);
system("cls");
break;
} else if (c == '3') {
cout << dw[2] << "回复了" << int(juese["娜塔莎"].xuel * 0.2) << "点血量\n";
a[2].xuel += int(juese["娜塔莎"].xuel * 0.2);
a[2].xuel = min(a[2].xuel, juese[dw[2]].xuel);
zhanjidian--;
Sleep(1000);
system("cls");
break;
} else if (c == '4') {
cout << "轮到" << dw[_] << "行动\n";
cout << "使用 1.普攻 2.战技\n";
continue;
} else {
cout << "不是哥们,重输\n";
cout << "轮到" << dw[_] << "行动\n";
cout << "使用 1.普攻 2.战技\n";
continue;
}
}
if (bj <= juese[dw[_]].baol) {
cout << "暴击! " << dw[_] << "对" << diren << "造成了" << int(juese[dw[_]].gongj * 1.5 * (1 + juese[dw[_]].baos)) << "点伤害";
d.xuel -= int(juese[dw[_]].gongj * 1.5 * (1 + juese[dw[_]].baos));
} else {
cout << dw[_] << "对" << diren << "造成了" << int(juese[dw[_]].gongj * 1.5) << "点伤害";
d.xuel -= int(juese[dw[_]].gongj * 1.5);
}
zhanjidian--;
Sleep(1000);
system("cls");
break;
} else if (c == '1') {
if (bj <= juese[dw[_]].baol) {
cout << "暴击! " << dw[_] << "对" << diren << "造成了" << int(juese[dw[_]].gongj * (1 + juese[dw[_]].baos)) << "点伤害";
d.xuel -= int(juese[dw[_]].gongj * (1 + juese[dw[_]].baos));
} else {
cout << dw[_] << "对" << diren << "造成了" << juese[dw[_]].gongj << "点伤害";
d.xuel -= juese[dw[_]].gongj;
}
if (zhanjidian < 5)zhanjidian++;
Sleep(1000);
system("cls");
break;
}
}
}
}
if (winner) {
int _ = rand() % 5 + 1, __ = rand() % 1500 + 100;
cout << "你成功战胜了 " << diren << "\n获得 " << d.cail << "*" << _ << " 信用点*" << __ << endl;
cout << "你成功战胜了 " << diren << "\n获得 " << 2 << "*" << _ << " 星*" << __ << endl;
beibao[d.cail] += _;
beibao["信用点"] += __;
c=c+rand() % 1000 + 100;
return;
} else {
cout << "(),就多练";
c-=1;
return;
}
}
void zd2(string diren) {
system("cls");
srand(time(NULL));
node a[3];
a[0] = juese["开拓者"];
a[1] = juese["丹恒"];
a[2] = juese["娜塔莎"];
noder d = dir[diren];
int winner = 0, zhanjidian = 3;
d.gongj = max(max(a[0].fangy + 1, a[1].fangy + 1), max(a[2].fangy + 1, d.gongj));
for (int n = 0;; n++) {
cout << "开拓者" << (a[0].xuel < 0 ? 0 : a[0].xuel) << "/" << juese["开拓者"].xuel << endl;
cout << "丹恒" << (a[1].xuel < 0 ? 0 : a[1].xuel) << "/" << juese["丹恒"].xuel << endl;
cout << "娜塔莎" << (a[2].xuel < 0 ? 0 : a[2].xuel) << "/" << juese["娜塔莎"].xuel << endl;
cout << diren << "剩余血量" << (d.xuel < 0 ? 0 : d.xuel) << endl;
cout << "目前战技点:";
for (int i = 1; i <= zhanjidian; i++)cout << "◆";
for (int i = zhanjidian + 1; i <= 5; i++)cout << "◇";
cout << endl;
if (a[0].xuel <= 0 && a[1].xuel <= 0 && a[2].xuel <= 0)break;
else if (d.xuel <= 0) {
winner = 1;
break;
}
if (n % 4 == 3) {
int _ = rand() % 3;
while (a[_].xuel <= 0 && (a[0].xuel > 0 || a[1].xuel > 0 || a[2].xuel > 0))_ = rand() % 3;
cout << diren << "对" << dw[_] << "造成了" << d.gongj*5 - a[_].fangy*2 << "点伤害\n";
a[_].xuel -= d.gongj*5 - a[_].fangy*2;
Sleep(1000);
_ = rand() % 3;
while (a[_].xuel <= 0 && (a[0].xuel > 0 || a[1].xuel > 0 || a[2].xuel > 0))_ = rand() % 3;
cout << diren << "对" << dw[_] << "造成了" << d.gongj*2 - a[_].fangy*1.2 << "点伤害\n";
a[_].xuel -= d.gongj*2 - a[_].fangy*1.2;
Sleep(1000);
system("cls");
} else {
int _ = n % 4;
cout << "轮到" << dw[_] << "行动\n";
cout << "使用 1.普攻 2.战技\n";
if (a[_].xuel <= 0) {
system("cls");
continue;
}
while (1) {
int bj = rand() % 100 - 1;
char c;
cin >> c;
if (c == '2' && zhanjidian == 0)cout << "战技点不够,请重新输入\n";
else if (c == '2') {
if (dw[_] == "娜塔莎") {
cout << "对谁使用\n";
cout << "1." << dw[0] << "\n2." << dw[1] << "\n3." << dw[2] << "\n4.返回\n";
char c;
cin >> c;
if (c == '1') {
cout << dw[0] << "回复了" << int(juese["娜塔莎"].xuel * 0.2) << "点血量\n";
a[0].xuel += int(juese["娜塔莎"].xuel * 0.2);
a[0].xuel = min(a[0].xuel, juese[dw[0]].xuel);
zhanjidian--;
Sleep(1000);
system("cls");
break;
} else if (c == '2') {
cout << dw[1] << "回复了" << int(juese["娜塔莎"].xuel * 0.2) << "点血量\n";
a[1].xuel += int(juese["娜塔莎"].xuel * 0.2);
a[1].xuel = min(a[1].xuel, juese[dw[1]].xuel);
zhanjidian--;
Sleep(1000);
system("cls");
break;
} else if (c == '3') {
cout << dw[2] << "回复了" << int(juese["娜塔莎"].xuel * 0.2) << "点血量\n";
a[2].xuel += int(juese["娜塔莎"].xuel * 0.2);
a[2].xuel = min(a[2].xuel, juese[dw[2]].xuel);
zhanjidian--;
Sleep(1000);
system("cls");
break;
} else if (c == '4') {
cout << "轮到" << dw[_] << "行动\n";
cout << "使用 1.普攻 2.战技\n";
continue;
} else {
cout << "不是哥们,重输\n";
cout << "轮到" << dw[_] << "行动\n";
cout << "使用 1.普攻 2.战技\n";
continue;
}
}
if (bj <= juese[dw[_]].baol) {
cout << "暴击! " << dw[_] << "对" << diren << "造成了" << int(juese[dw[_]].gongj * 1.5 * (1 + juese[dw[_]].baos))/2 << "点伤害";
d.xuel -= int(juese[dw[_]].gongj * 1.5 * (1 + juese[dw[_]].baos))/2;
} else {
cout << dw[_] << "对" << diren << "造成了" << int(juese[dw[_]].gongj * 1.5)/2 << "点伤害";
d.xuel -= int(juese[dw[_]].gongj * 1.5)/2;
}
zhanjidian--;
Sleep(1000);
system("cls");
break;
} else if (c == '1') {
if (bj <= juese[dw[_]].baol) {
cout << "暴击! " << dw[_] << "对" << diren << "造成了" << int(juese[dw[_]].gongj * (1 + juese[dw[_]].baos))/2 << "点伤害";
d.xuel -= int(juese[dw[_]].gongj * (1 + juese[dw[_]].baos))/2;
} else {
cout << dw[_] << "对" << diren << "造成了" << juese[dw[_]].gongj/2 << "点伤害";
d.xuel -= juese[dw[_]].gongj/2;
}
if (zhanjidian < 5)zhanjidian++;
Sleep(1000);
system("cls");
break;
}
}
}
}
if (winner) {
int _ = rand() % 5 + 1, __ = rand() % 1500 + 100;
cout << "你成功战胜了 " << diren << "\n获得 " << d.cail << "*" << _ << " 信用点*" << __ << endl;
cout << "你成功战胜了 " << diren << "\n获得 " << 2 << "*" << _ << " 星*" << __ << endl;
beibao[d.cail] += _;
beibao["信用点"] += __;
c=c+rand() % 1000 + 100;
return;
} else {
cout << "(),就多练";
c-=1;
return;
}
}
在756行的zd改成zd2:
if (c >= '1' && c <= '3')zd2(dr3[c - '0' - 1]);
全部评论 20
导尿管
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0导尿管
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0刚上超级凤凰的我
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0顶顶
顶顶
顶顶
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
02024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0顶
2024-10-22 来自 浙江
0
有帮助,赞一个