文字游戏(未完成)

发布于:2024-07-22 ⋅ 阅读:(56) ⋅ 点赞:(0)

做了一半,成就系统完善,纯英文

#include <bits/stdc++.h>
#include <windows.h>
#include <Windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
using namespace std;
long long Tell_a_lie=0;
long long Honest=5;
long long Achievement=0;
long long Etiquette=5;
long long Achievement_Sum_Great=0;
long long Achievement_Sum_Bad=0;
double Time=0;
long long Humorous=5,l=0;
double Frighten=0;
void slow(char *p){
	while(1){
		if(*p!=0){
			int a=rand()%760+23;
			int b=rand()%300+27;
			Sleep(a);printf("%c",*p++);Sleep(b);
		}else break; Sleep(100);
	}
}void slowout(string a){
	int b=a.length();
	for(int i=1;i<=b+1;i++){
		int c=rand()%1000+150;
		int d=rand()%1500+450;
		Sleep(c);cout<<a[i];Sleep(d);
	}
}void HideCursor(){
    CONSOLE_CURSOR_INFO curInfo;
    curInfo.dwSize=1,curInfo.bVisible=FALSE;    
    HANDLE handle=GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorInfo(handle,&curInfo);
}void main_first(){
	HideCursor();
	/
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
	cout<<"Wait a moment."<<endl;
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
	slow("#######################");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
	cout<<endl<<"Proofreading in progress";
	slowout(".......");Sleep(1000);
	cout<<endl<<endl;
	/
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
	cout<<"Validation is successful!"<<endl<<endl;	Sleep(1000);Achievement++;
	/
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);Frighten+=0.1;
	cout<<"Now, let's invite Arnie."<<endl;	Sleep(1000);
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),11);Frighten+=0.3;
	cout<<"*Hello! I'm Arnie. I'll take care of your life in the future."<<endl;
	Sleep(1000);	cout<<"*What a pleasant good news."<<endl;
	/
	Sleep(1000);	cout<<"All right, all right,I'm going to ask you a few questions."<<endl;
	Sleep(1000);	cout<<"Are you ready?"<<endl<<endl;
	/
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
	Sleep(1000);	cout<<"First of all, what month is your birthday?"<<endl;
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),9);
	cout<<"Birthday Month: ";Time+=0.01;
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
	int birthday_month;cin>>birthday_month;
	if(birthday_month>12||birthday_month<1){
		Sleep(1000);Humorous++;Frighten-=0.02;
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
		cout<<"Fart! There is no this month at all."<<endl;
		Sleep(1000);Time+=0.07;
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);	
	}if(birthday_month>=1&&birthday_month<=12){
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
		cout<<"Very good, next question"<<endl;
	}else{
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
		cout<<".....I'll let you go this time."<<endl;
	}
	/
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
	Sleep(1000);	cout<<"How old are you?"<<endl;
	SetConsole

网站公告

今日签到

点亮在社区的每一天
去签到