逃离番茄先生(原创禁止抄袭)
2025-08-08 13:47:57
发布于:陕西
自制游戏,不喜勿喷,谢谢,喜欢就点个赞吧。(玩游戏之前不要看代码,不然就没意思了)
1.0 初始游戏代码
#include<iostream>
#include<string>
using namespace std;
int main() {
int a, b, c, d, e, f;
int choice, reviveChoice, rc3, rc4;
string rc2;
string hugeInput;
cout << "此游戏由ACGO C++好还是MC好工作室发布 " << endl;
cout << "想进工作室在浏览器搜\"https://www.acgo.cn/application/1941707591331131392\"团主同意后即可加入!我们在团队里面等着你,快来加入!" << endl;
cout << "团队里面有超多资料帮你上分!" << endl;
cout << "要进的抓紧进!" << endl;
for(int i = 0; i < 4; i++) {
cout << " " << endl;
}
cout << "开始游戏" << endl;
cout << "你被番茄先生逮捕了,你要答对几道题才能通关" << endl;
// 第一关
cout << "1+1=" << endl;
cin >> a;
if (a == 2) {
cout << "你答对了" << endl;
} else {
cout << "你死了,达成结局1:错误,坏结局" << endl;
return 0;
}
cout << "45+89=" << endl;
cin >> b;
if (b == 134) {
cout << "你答对了" << endl;
cout << "你通过了第1关" << endl;
} else {
cout << "你死了,达成结局1:错误,坏结局" << endl;
return 0;
}
// 第二关
cout << "3×8=" << endl;
cin >> c;
if (c == 24) {
cout << "你答对了" << endl;
} else {
cout << "你死了,达成结局1:错误,坏结局" << endl;
return 0;
}
cout << "230×30=" << endl;
cin >> d;
if (d == 6900) {
cout << "你答对了" << endl;
cout << "你通过了第2关" << endl;
} else {
cout << "你死了,达成结局1:错误,坏结局" << endl;
return 0;
}
// 第三关
cout << "3×9+45=" << endl;
cin >> e;
if (e == 72) {
cout << "你答对了,但是番茄先生神经错乱,他感觉你有点慢,番茄先生愤怒值+5" << endl;
} else {
cout << "你死了,达成结局1:错误,坏结局" << endl;
return 0;
}
cout << "84658944659346578465786846836457884678675844575678752345+4765774567466547367856578632786543675474378 = ?" << endl;
cin >> f;
cout << "你答的太慢了" << endl;
cout << "番茄先生给你了一枪!" << endl;
cout << "你醒过来之后,你发现自己在一个牢房里" << endl;
cout << "牢房四周都是昏暗的墙壁" << endl;
cout << "外面还有个番茄先生在巡逻" << endl;
cout << "你需要逃出去! ! !你要找到合适的物品" << endl;
escape:
cout << "你要选择" << endl;
cout << "1.去床底下翻翻 2.去上个人的尸体旁边翻" << endl;
cin >> choice;
if(choice == 1){
cout << "你翻到了一张纸条上面写着:钥匙在床头,你发现写的人竟然是上一个没有逃出去的人给你留下来的" << endl;
} else {
cout << "番茄先生看到了你奇怪的行为,把你杀了,输入1看广告复活" << endl;
cin >> reviveChoice;
if(reviveChoice == 1){
cout << "美团拼好饭价格便宜又实惠,现在进入拼好饭搜索拼好饭2001,领取>=100元福利! ! !" << endl;
cout << "复活成功!请重新选择..." << endl;
goto escape;
} else {
cout << "你死了,达成结局3:恶魔选项,坏结局" << endl;
return 0;
}
}
cout << "你现在要去床头翻吗?" << endl;
cout << "回答要或不要的拼音" << endl;
cin >> rc2; // 接收字符串输入
if(rc2 == "yao"){ // 比较字符串
cout << "你成功翻到了钥匙" << endl;
cout << "你打开了门逃了出来" << endl;
cout << "幸好番茄先生没有发现你" << endl;
cout << "你发现这里竟然是一个迷宫" << endl;
cout << "你要走出迷宫! ! !" << endl;
cout << "滴答滴答" << endl;
cout << "你听到了水滴的声音,好像是从下水道那边传来的" << endl;
cout << "你要过去吗(输入拼音)" << endl;
string goChoice;
cin >> goChoice;
if(goChoice == "yao") {
cout << "你毫不犹豫选择要,为了逃出去,你只能这样做了" << endl;
cout << "你发现他们正在做某种实验" << endl;
cout << "你要去查看吗?" << endl;
cout << "1.去 2.不去" << endl;
cin >> rc3;
if(rc3 == 1){
cout << "他们发现了你,并且给你做了人体实验" << endl;
cout << "达成结局4:畸变,中等结局(至少你还活着,所以是中等结局)" << endl;
} else {
cout << "你放轻脚步向前走去,他们没有发现你" << endl;
cout << "你进入了一个地方,发现里面有很多番茄先生" << endl;
cout << "这些番茄先生都没有发现你" << endl;
cout << "有个番茄先生发现了你,他希望与你成为队友一起逃出去,因为这个番茄先生就是上一个被抓去的人! ! !(他至少还保持一点人的模样,所以你认出来了)" << endl;
cout << "你要和他成为朋友吗?" << endl;
string friendChoice;
cin >> friendChoice;
if(friendChoice == "yao"){
cout << "于是你和他继续冒险,他也表现的对你很有诚意" << endl;
cout << "你们的脚步声很大,被番茄先生听到了" <<endl;
cout << "番茄先生要将你们至于死刑" << endl;
cout << "情急之下你的朋友把你推了下去,你死了,番茄先生见此情况,把你朋友放了,达成结局4:诚信?,坏结局" << endl;
} else {
cout << "你选择了独立冒险" << endl;
cout << "你的脚步声很小,他们没有发现你,你成功逃出去了,达成结局5:逃脱,好结局" << endl;
}
}
}
else{
cout<<"你在这个过道停留了一会儿番茄先生发现了你,把你杀了,达成结局6:等待并不是最佳选择,坏结局"<<endl;
}
} else if(rc2 == "buyao") { // 比较字符串
cout << "无聊正在逐渐消磨你的意识,你死了!" << endl;
cout << "达成结局2:消磨,坏结局" << endl;
return 0;
} else {
cout << "无效选择!" << endl;
return 0;
}
return 0;
}
全部评论 4
此游戏windows鸿蒙系统都可以(因为我就是鸿蒙系统拿windows我自己都玩不了,更别说测试了)
5天前 来自 陕西
1666,你可以把人变成符拉迪沃克,他会吃小孩,和夏老师一样
3天前 来自 河北
0有bug找我@天之神_mac_adile
4天前 来自 陕西
0求关注
4天前 来自 陕西
0
没有使用AI(确信)。如果要改编的话,原创(我)同意就可以
5天前 来自 陕西
0
有帮助,赞一个