社区讨论
极简原神·英文版
灌水区参与者 1已保存回复 0
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 0 条
- 当前快照
- 1 份
- 快照标识符
- @lqhdgft2
- 此快照首次捕获于
- 2023/12/23 09:18 2 年前
- 此快照最后确认于
- 2023/12/23 09:20 2 年前
最近翻灌水区发到了一个原神的c++,闲着没事干就整了个英文版的,但再看的时候找不到哪位大佬了,就只能发这了。希望大佬能看见。 另外,在空莹选择那,无论选择1还是2都只会是判定为选择空希望能改一下,谢谢!
CPP#include <bits/stdc++.h>
#include <windows.h>
#include <conio.h>
#include <stdlib.h>
#include <time.h>
#define Space 0
#define Road 1
#define Post 2
#define Door 3
#define Shine 4
#define Thunder 5
#define Water 6
#define Fire 7
#define Wind 8
#define Grass 9
#define Ice 10
#define Cliff 11
#define Grit 12
#define Tree 13
#define Traveller 10001
#define Kong 10002
#define Ying 10003
#define Tianli 10004
#define Paimeng 10005
#define Sward 20001
#define Loading 1
#define Waiting 2
using namespace std;
const int N=1000;
const int W=20,H=10;
int word[N+5][N+5];
int status;
int view[H+5][W+5];
void coutview(int time)
{
if(status==1) printf(" loading... ");
if(status==2) printf(" Please press any key to continue ");
printf("\n");
for(int i=1;i<=H;i++){
for(int j=1;j<=W;j++){
if(view[i][j]==Space) printf(" ");
else if(view[i][j]==Post) printf("column");
else if(view[i][j]==Door) printf("door");
else if(view[i][j]==Shine) printf("light");
else if(view[i][j]==Road) printf("road");
else if(view[i][j]==Thunder) printf("lightning ");
else if(view[i][j]==Water) printf("water ");
else if(view[i][j]==Fire) printf("fire ");
else if(view[i][j]==Wind) printf("wind ");
else if(view[i][j]==Grass) printf("grass ");
else if(view[i][j]==Ice) printf("ice ");
else if(view[i][j]==Cliff) printf("stone ");
else if(view[i][j]==Grit) printf("sand");
else if(view[i][j]==Tree) printf("tree");
else if(view[i][j]==Kong) printf("Kong");
else if(view[i][j]==Ying) printf("Ying");
else if(view[i][j]==Tianli) printf("Tian Li");
else if(view[i][j]==Paimeng) printf("Pai Meng");
else if(view[i][j]==Sward) printf("sword");
else if(view[i][j]==Traveller) printf("tourist");
}
printf("\n");
}
Sleep(time);
}
char read() {
if(kbhit()!=0){
char in;
while(!kbhit()==0)
in=getch();
return in;
}
return 0;
}
struct Role
{
int sex;
int x,y;
bool display;
int godeye;
int blood;
string name;
} role[100];
void wait()
{
while(kbhit()==0){}
}
void clearview()
{
for(int i=1;i<=H;i++)
{
for(int j=1;j<=W;j++)
{
view[i][j]=Space;
}
}
}
void getview(int x,int y){
clearview();
for(int i=-4;i<=4;i++){
for(int j=-9;j<=9;j++){
int sx=x+i;
int sy=y+j;
if(sx<=0 || sx>=31 || sy<=0 || sy>=31) continue;
view[i+5][j+10]=word[sx][sy];
}
}
for(int i=1;i<=100;i++){
int sx=x-role[i].x+5;
int sy=y-role[i].y+10;
if(sx<=0 || sx>=11 || sy<=0 || sy>=21) continue;
view[sx][sy]=i+10000;
}
}
void begin(){
printf("# # # # # # # # # # # # # # # # # # # # # #\n");
printf("# #\n");
printf("# #\n");
printf("# #\n");
printf("# #\n");
printf("# MiHuYou #\n");
printf("# Made By Pineappler #\n");
printf("# #\n");
printf("# #\n");
printf("# #\n");
printf("# #\n");
printf("# # # # # # # # # # # # # # # # # # # # # #\n");
Sleep(3000);
system("cls");
printf("# # # # # # # # # # # # # # # # # # # # # #\n");
printf("# #\n");
printf("# #\n");
printf("# #\n");
printf("# Genshin Impact #\n");
printf("# #\n");
printf("# #\n");
printf("# Resist bad games and support #\n");
printf("# conscientious masterpieces #\n");
printf("#Genshin Impact will not fall all day long#\n");
printf("# and we will not leave all day long #\n");
printf("# # # # # # # # # # # # # # # # # # # # # #\n");
Sleep(3000);
system("cls");
printf("# # # # # # # # # # # # # # # # # # # # # #\n");
printf("# Warning: Read carefully #\n");
printf("# before playing the game #\n");
printf("# ----------------------------------- #\n");
printf("# The author is just a Konjac high school #\n");
printf("# student, not a technical expert. #\n");
printf("# Please don't have any hope for this #\n");
printf("# Genshin Impact program that #\n");
printf("# doesn't even have graphics. #\n");
printf("# Please identify the official platform #\n");
printf("# of Woomi when visiting Genshin Impact #\n");
printf("# # # # # # # # # # # # # # # # # # # # # #\n");
Sleep(4000);
system("cls");
status=1;
for(int i=5;i<=H;i++)
for(int j=9;j<=11;j++)
view[i][j]=Road;
for(int t=1;t<=50;t++){
for(int j=9;j<=11;j++){
view[5][j]=Road;
if(rand()%2) view[4][j]=Road;
}
if(t%4==0){
int rand1=10;
while(6<=rand1 && rand1<=13){
rand1=rand()%(W-1)+1;
}
view[0][rand1]=Post;
}
for(int i=10;i>=1;i--){
for(int j=1;j<=W;j++){
view[i][j]=view[i-1][j];
}
}
for(int i=1;i<=W;i++){
view[0][i]=Space;
}
coutview(200);
system("cls");
}
status=2;
view[5][9]=Road;
view[5][11]=Road;
view[5][10]=Door;
coutview(0);
wait();
status=0;
for(int t=0;t<=20;t++){
for(int i=1;i<=10;i++){
for(int j=1;j<=19;j++){
if(abs(i-5)+abs(j-10)<=t) view[i][j]=Shine;
}
}
system("cls");
coutview(50);
}
clearview();
system("cls");
view[5][7]=Fire;
coutview(300);
system("cls");
view[5][8]=Water;
coutview(300);
system("cls");
view[5][9]=Wind;
coutview(300);
system("cls");
view[5][10]=Thunder;
coutview(300);
system("cls");
view[5][11]=Grass;
coutview(300);
system("cls");
view[5][12]=Ice;
coutview(300);
system("cls");
view[5][13]=Cliff;
coutview(1000);
status=0;
}
void story1()
{
system("cls");
clearview();
coutview(2000);
system("cls");
for(int i=1;i<=5;i++) printf("\n");
printf(" So, are you drifting from outside the world?\n");
Sleep(3000);
system("cls");
for(int i=1;i<=5;i++) printf("\n");
printf(" But when you want to leave here and head to the next world...\n");
Sleep(3000);
system("cls");
for(int i=1;i<=5;i++) printf("\n");
printf(" But there is a strange deity blocking in front of you?\n");
Sleep(3000);
system("cls");
Sleep(1000);
view[3][11]=Tianli;
view[9][12]=Ying;
view[9][10]=Kong;
coutview(0);
printf("??:Outsiders, your journey ends here.\n");
Sleep(3000);
system("cls");
view[3][12]=view[3][10]=view[4][11]=view[2][11]=Shine;
coutview(500);
system("cls");
view[3][5]=view[3][6]=view[3][7]=view[3][8]=view[3][9]=view[3][10]=Shine;
view[3][12]=view[3][13]=view[3][14]=view[3][15]=view[3][16]=view[3][17]=Shine;
coutview(500);
system("cls");
view[2][6]=view[4][6]=view[2][16]=view[4][16]=Shine;
coutview(500);
system("cls");
view[1][11]=view[5][11]=view[2][10]=view[2][12]=view[4][10]=view[4][12]=Shine;
coutview(0);
printf("Ying: Who is that?");
Sleep(1500);
system("cls");
coutview(0);
printf("??: The maintainer of heavenly principles, here comes an end to the usurpation of the Son of Man.");
Sleep(3500);
system("cls");
for(int i=8;i<=10;i++)
for(int j=10;j<=12;j++)
view[i][j]=Shine;
view[9][9]=Kong;
view[9][13]=Ying;
coutview(200);
system("cls");
view[9][9]=Space;
view[9][13]=Space;
view[9][8]=Kong;
view[9][14]=Ying;
coutview(600);
system("cls");
view[9][8]=Space;
view[9][14]=Space;
view[7][9]=Kong;
view[7][13]=Ying;
coutview(400);
system("cls");
clearview();
view[3][11]=Tianli;
view[5][12]=Ying;
view[5][10]=Kong;
view[4][12]=Sward;
view[4][10]=Sward;
coutview(0);
printf("Please choose one person from the Gemini list:\n");
printf("1:Kong 2:Ying\n");
int in=0;
while(!(in==1||in==2)){
scanf("%d",&in);
}
role[Traveller-10000].sex=in;
system("cls");
coutview(0);
printf("Enter name (English only):\n");
cin>>role[Traveller-10000].name;
system("cls");
view[4][10]=Shine;
coutview(500);
system("cls");
view[5][10]=Space;
view[5][9]=view[6][8]=Shine;
view[8][6]=Kong;
coutview(500);
system("cls");
view[4][12]=Shine;
coutview(500);
system("cls");
view[5][11]=Shine;
view[5][13]=Shine;
view[6][12]=Shine;
coutview(0);
printf("Kong:Ying!!");
Sleep(700);
system("cls");
view[5][12]=Shine;
coutview(300);
system("cls");
view[4][7]=Kong;
view[6][8]=Space;
view[8][6]=Space;
view[6][12]=Space;
coutview(300);
system("cls");
view[5][11]=Space;
view[5][12]=Space;
view[5][13]=Space;
view[5][9]=Space;
view[2][8]=Kong;
view[4][7]=Space;
coutview(300);
system("cls");
view[5][9]=view[4][10]=Space;
view[1][9]=Kong;
view[2][8]=Space;
view[1][10]=Sward;
coutview(300);
system("cls");
for(int i=1;i<=2;i++)
for(int j=8;j<=10;j++)
view[i][j]=Shine;
coutview(1000);
system("cls");
for(int t=15;t>=0;t--){
for(int i=1;i<=10;i++){
for(int j=1;j<=19;j++){
if(abs(i-5)+abs(j-10)>=t) view[i][j]=Shine;
}
}
coutview(100);
system("cls");
}
clearview();
for(int i=1;i<=5;i++) printf("\n");
printf(" Wait! Don't leave!! \n");
Sleep(1000);
system("cls");
for(int i=1;i<=5;i++) printf("\n");
printf(" Take my sister......\n");
Sleep(3000);
system("cls");
Sleep(2000);
system("cls");
clearview();
printf("# # # # # # # # # # # # # # # # # # # # # #\n");
printf("# #\n");
printf("# So, the unfamiliar deity took away #\n");
printf("# my sister #\n");
printf("# #\n");
printf("# I have also been sealed by God #\n");
printf("# losing my original strength #\n");
printf("# #\n");
printf("# We, who have crossed many worlds before #\n");
printf("# Trapped here... #\n");
printf("# #\n");
printf("# # # # # # # # # # # # # # # # # # # # # #\n");
Sleep(10000);
}
void walk(){
int in=read();
if(in=='w') role[Traveller-10000].x--;
else if(in=='a') role[Traveller-10000].y--;
else if(in=='s') role[Traveller-10000].x++;
else if(in=='d') role[Traveller-10000].y++;
}
int main(){
begin();
story1();
freopen("word.in","r",stdin);
srand((unsigned)time(NULL));
for(int i=1;i<=30;i++){
for(int j=1;j<=30;j++){
scanf("%d",&word[i][j]);
}
}
role[Traveller-10000].x=10;
role[Traveller-10000].y=10;
role[Traveller-10000].display=true;
int lastx=role[Traveller-10000].x,lasty=role[Traveller-10000].y;
while(1){
walk();
if(lastx != role[Traveller-10000].x || lasty != role[Traveller-10000].y){
system("cls");
getview(role[Traveller-10000].x,role[Traveller-10000].y);
coutview(0);
printf("%d %d",role[Traveller-10000].x,role[Traveller-10000].y);
lastx=role[Traveller-10000].x;lasty=role[Traveller-10000].y;
if(role[Traveller-10000].x <= 5){
printf("Pai Meng: The area ahead, come explore again in the next life!");
role[Traveller-10000].x=7;
Sleep(2000);
}
else if(role[Traveller-10000].x >= 26){
printf("Pai Meng: The area ahead, come explore again in the next life!");
role[Traveller-10000].x=23;
Sleep(2000);
}
else if(role[Traveller-10000].y <= 5){
printf("Pai Meng: The area ahead, come explore again in the next life!");
role[Traveller-10000].y=7;
Sleep(2000);
}
else if(role[Traveller-10000].y >=26){
printf("Pai Meng: The area ahead, come explore again in the next life!");
role[Traveller-10000].y=23;
Sleep(2000);
}
}
}
}
回复
共 0 条回复,欢迎继续交流。
正在加载回复...