跳到正文

个人记录

翁法罗斯模拟器

winter_war约 2 分钟
原文
文章信息与版本

文章信息

发布
2026年1月18日
收录
2026年1月18日
更新
2026年11月13日
篇幅
约 2 分钟
获赞
1

版本

  1. v3当前
  2. v2
  3. v1
C++
#include<bits/stdc++.h>
using namespace std;
long long mm=0,hzl=1,lhl=0,ndcs,fz,i[20];
char sw[20][100]{"「记忆」昔涟","「救世主」白厄","「纷争」万敌","「浪漫」阿格莱雅","「死亡」遐蝶","「智慧」那刻夏","「天空」风堇","「诡计」","「同谐」缇宝","「秩序」刻律德拉","「海洋」海瑟音","「大地」","「长夜」"};
char sy[5][100]{"死于献祭","死于黑潮","死于盗火行者"};
int main(){
	freopen("翁法罗斯.out","w",stdout);
	cout<<"请问要几次轮回?\n"; 
	cin>>ndcs;
	srand((int)time(0));
	while(1){
		for(int j=1;j<=11;j++){
			i[j]=0;
		}
		for(int j=1;j<=11;j++){
			fz=rand()%(11-j+1)+1;
			while(i[fz]!=0){
				fz=fz%11+1; 
			}
			i[fz]=j;
		}
    	int nd=0;
    	for(int j=1;j<=11;j++){
    		for(int k=j+1;k<=11;k++){
    			if(i[j]==i[k]){
    				nd=1;
    				break;
				}
			}
			if(nd==1){
				break;
			}
		}
		if(nd==0){
			lhl++;
			printf("第%lld次轮回\n",lhl);
			printf("    %s%s\n",sw[0],sy[0]);
			mm+=rand()%2+1;
			for(int j=1;j<=11;j++){
				if(j<=mm){
					hzl++;
					printf("    %s%s\n",sw[i[j]+1],sy[2]);
				}
				else{
					printf("    %s%s\n",sw[i[j]+1],sy[1]);
				}
			}
		}
		if(lhl==ndcs) {break;}
	}
	cout<<"盗火行者收集了"<<hzl<<"颗火种"; 
	return 0;
}
原文