版本比较
太阳计划(日计)
正文
增加 80 行删除 9 行
123456678910111213141516171819202122232411252627281516171819293031323 行未改动363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889329091929394959697989910010110210310410510610710810935 行未改动145146147148791491501511521531545 行未改动# 有月季,有日记,有月计,为什么不能有日计呢?```#include<bits/stdc++.h>#include<windows.h>#include<conio.h>/*version -1.0version:-0.9.0*/using namespace std;#define cls system("cls")#define sleep Sleepstruct skill{ string name; short wth,sklk[100]; double exatt[100],exdef[100],exbuf[100],sp1; int sp2,sp3;}sklist[]={"打我",0,{5,5,5},{},{},{},0,0,0};struct enemy{ string name; double behp,besan,esld,eprd,ebtd,ermd,eslsd,eprsd,ebtsd,ermsd,beatt,bedef,bebuf,bemp,beap,bemr; //基础生命,基础精神,四种抗性,四种精神抗性,基准攻击,基准防守,基准效果量,基础蓝条,基础黄条,基础回蓝 int skn,skl[100];}enml[]={{"教程假人",100,-100,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,{0}}};double hp=50,san=0,sld=1,prd=1,btd=1,rmd=1,slsd=1,prsd=1,btsd=1,rmsd=1;void setColor(int textColor, int bgColor = 0) {void setColor(int textColor=7, int bgColor = 0) { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, bgColor * 16 + textColor);}void setSize(int col, int row) { char cmd[64]; sprintf(cmd, "mode con cols=%d lines=%d", col, row); system(cmd);}/*颜色代号:0=黑色 8=灰色1=蓝色 9=淡蓝色3 行未改动5=紫色 13=淡紫色6=黄色 14=淡黄色7=白色 15=亮白色*/void setSize(int col, int row) { char cmd[64]; sprintf(cmd, "mode con cols=%d lines=%d", col, row); system(cmd);}void sout(string s,int slp=50,int rslp=500){ for(int i=0;i<s.size();i++){ cout<<s[i]; sleep(s[i]=='\n'?rslp:slp); }}void pause(string tipt="点击任意键继续......"){ cout<<'\n'<<tipt; while(!kbhit()){ } cls;}int choose(string ctt,string c1=">",string c2=">",string c3=">"){ string cl[3]={c1,c2,c3}; int poc=0,cn=0,cf,cs; for(int i=0;i<3;i++){ if(cl[i][0]!='>') cn++; } while(1){ cls; cout<<ctt<<'\n'; for(int i=0;i<3;i++){ if(cl[i][0]=='>') continue; cout<<'\n'<<(i==poc?'>':'-')<<cl[i]<<'\n'; } cf=getch(); if(cf==224||cf==0){ cs=getch(); if(cs==80){ poc++;poc%=cn; }if(cs==72){ poc+=cn-1;poc%=cn; } }if(cf==13) break; } return poc;}void Fight(int eid,long long elvl){ setSize(80,30); enemy thise=enml[eid],stthise=enml[eid]; while(1){ printf("敌方生命:%lf/%lf"); } }void startGame(){ setSize(201,20); setSize(50,20); while(1){ }}void Teach(){ cls; int chs=choose("是否需要新手教程?","需要,我不会玩","不用,我已经会玩"); if(chs==1) goto SkipTeach; setSize(60,30); sout("在这里,你所需要注意的,只有生命与精神\n其中生命裁决生死\n精神可以影响能力\n具体的,精神可以带来减/易伤\n具体数值为 -0.2(x>=75) -0.004*x+0.1(75>x>=25) 0(25>x>-25)\n-0.005*x(-25>=x>-50) -0.01*x+0.25(-50>=x>=-90) 1(-90>x)\n其中x为理智值,最高为100,最低-100\n需要注意的是,精神伤害结算是会/10\n剩下的会在战斗中解释。"); pause(); Fight(0,1); SkipTeach:; startGame();}void SunProjectPNG(bool sp=0){ cls; setSize(22,12); cout<<" ██ ██ \n";35 行未改动 sleep(80); setColor(6); SunProjectPNG(); cls; startGame(); setColor(); Teach();}int main(){ HWND hwnd = GetConsoleWindow(); SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~WS_SIZEBOX & ~WS_MAXIMIZEBOX & ~WS_MINIMIZEBOX);5 行未改动