版本比较
小游戏
正文
增加 98 行删除 76 行
11234533 行未改动39404142434344454647128 行未改动全部展开17617717817918018118218318414 行未改动199200201202203204205206207113 行未改动全部展开32132232332432332432532632732532632732832933033133233333433533633733833934034134234373 行未改动41741841942041742142242342442542 行未改动46846947047147247347447547647747880 行未改动55956056156255655755855956056156256356456556656756856956356457156556656756856957057157257357457557657757857958057358158258358457557657758557857958658758858158959059159258359359459559659759859960060160260360460560660760860961061161261361458558658758858959059159259359459559659759859960060160261561661761860760860961061161261361461561661761861961962062162262362462562662762862963063163263363463562163663763863964064164264364464564664764864965065165262362462562662762862963063163263363465365465565617 行未改动6746756766776786796806816826839 行未改动693694695696677697698699## 0.1.4beta版## 0.1.5beta版### 代码```cpp#include <bits/stdc++.h>
33 行未改动 int bl_v; int enemy_at_power; }; enemykind kind[1000]={{" natural",500,100}, enemykind kind[1000]={{" natural",200,50}, {}, };
int Enemy_Unit_Combination[10000][10]={{1,1,1,1,1}};128 行未改动全部展开 // 步骤3:拼接成百分数(比如num1=9, num2=5 → 95% → 0.95) double percentage = (num1 * 10 + num2) / 100.0; percentage*=en_o.at_power[bianhao]; *player_data-=percentage; cout<<"-"<<percentage<<endl; } void attack_2(int* player_date,int bianhao) override{//从玩家能量中选择最大的一个数,拼和成一个百分数,此次攻击会吸取玩家能量,大小为攻击力与这个百分数乘算的结果,此次攻击后玩家不会获得手机 int p_l = *player_date; // 步骤1:提取玩家能量的每一位数字14 行未改动 num1 = every_b_l[0]; // 最大的数字 // 步骤3:拼接成百分数(比如num1=9, num2=5 → 95% → 0.95) double percentage = (num1) / 100.0; *player_date-=percentage*en_o.at_power[bianhao]; cout<<"-"<<percentage*en_o.at_power[bianhao]<<endl; }};
class The_lost//玩家113 行未改动全部展开 queue <int>numberqueue;//编号队列 //行动队列中的单位会轮换行动 int select(int rs)//选择角色 { for(int i=1;i<=5;i++) { actionqueue.push(en_o.enemy_name[i]); numberqueue.push(i); } for(int i=1;i<=rs;i++) { string rolename; cout<<"踏上前来,你是:(me)"<<endl; cin>>rolename; actionqueue.push(rolename); numberqueue.push(i); }
for(int i=1;i<=5;i++) { actionqueue.push(en_o.enemy_name[i]); numberqueue.push(i); }
int if_vitcter=0; while (1)//回合轮换 { // int o;73 行未改动 cout<<endl; } lost.update_recovery_state(); } else if(role==" natural") else if(role==" natural"&&en_o.e[numberqueue.front()]>0) { Natural_Number natural_number; CLEAR_SCREEN; en_o.print();42 行未改动 } return 0; } //养成
};
class display//显示类{80 行未改动 // 显示角色 string name; int page=1; int max_page=2;
cout<<screen_stirp[0]<<endl; cout<<"|所有角色: |"<<endl; cout<<screen_stirp[5]<<"1."<<nameye[page-1][0]<<" "<<screen_stirp[6]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[0]<<endl; cout<<"输入角色序号1~9 z:上一页 x:下一页"<<endl; name=GETCH; if(name=="z") while (1) { if(page==1) cout<<screen_stirp[0]<<endl; cout<<"|所有角色: |"<<endl; cout<<screen_stirp[5]<<"1."<<nameye[page-1][0]<<" "<<screen_stirp[6]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[0]<<endl; cout<<"输入角色序号1~9 z:上一页 x:下一页 q:退出"<<endl; name=GETCH; if(name=="z") { if(page==1) { page=max_page; page=max_page; } page--; } page--; } else if(name=="x") else if(name=="x") { if(page==max_page) { if(page==max_page) { page=1; page=1; } page++; } page++; else if(name=="q") { CLEAR_SCREEN; return 0; } else if(nameye[page-1][stoi(name)-1]=="me") { CLEAR_SCREEN; cout<<"角色名称:"<<nameye[page-1][stoi(name)-1]<<endl; cout<<"角色技能:"<<endl; cout << screen_stirp[7] + "天赋:探索者 羁绊:独行者" << endl; cout << screen_stirp[7] + screen_stirp[7] + "天赋: 作为独行于此的你,步步为艰,你将探索此地,学习便是你最好的武器,(经过学习你将会获得新的一套技能)" << endl; cout << screen_stirp[7] + "形态:无知 初来乍到,你一无所知" << endl; cout << screen_stirp[7] + screen_stirp[7] + "普攻a: 回复一个理性点,对指定敌方单体造成80%攻击力的伤害,回复20能量" << endl; cout << screen_stirp[7] + screen_stirp[7] + "E技能e: 消耗一个理性点,对指定敌方单体造成200%攻击力的伤害,回复30能量" << endl; cout << screen_stirp[7] + screen_stirp[7] + "Q技能q: 消耗180能量,回复两个理性点,进入「回复」状态,持续三回合,此状态下记录角色造成的伤害,在状态中,每回合结束后将记录的伤害的50%转化为血量回复量" << endl; cout << "按任意键以返回" << endl; string returnq; returnq=GETCH; } CLEAR_SCREEN; } else if(nameye[page-1][stoi(name)-1]=="me") { cout<<"角色名称:"<<nameye[page-1][stoi(name)-1]<<endl; cout<<"角色技能:"<<endl; cout << screen_stirp[7] + "天赋:探索者 羁绊:独行者" << endl; cout << screen_stirp[7] + screen_stirp[7] + "天赋: 作为独行于此的你,步步为艰,你将探索此地,学习便是你最好的武器,(经过学习你将会获得新的一套技能)" << endl; cout << screen_stirp[7] + "形态:无知 初来乍到,你一无所知" << endl; cout << screen_stirp[7] + screen_stirp[7] + "普攻a: 回复一个理性点,对指定敌方单体造成80%攻击力的伤害,回复20能量" << endl; cout << screen_stirp[7] + screen_stirp[7] + "E技能e: 消耗一个理性点,对指定敌方单体造成200%攻击力的伤害,回复30能量" << endl; cout << screen_stirp[7] + screen_stirp[7] + "Q技能q: 消耗180能量,回复两个理性点,进入「回复」状态,持续三回合,此状态下记录角色造成的伤害,在状态中,每回合结束后将记录的伤害的50%转化为血量回复量" << endl;
} else { cout<<"(请勿重复进行无效输入,否则电脑堆栈将爆炸)木有欧"<<endl; display_role(); } return 0; }
int choose_look_or_fight() { cout<<screen_stirp[0]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<"| 输入“c”查看角色 |"<<endl; cout<<"| 输入“f”开始战斗 |"<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[0]<<endl; string a; a=GETCH; if(a=="c") while(1) { cout<<screen_stirp[0]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<"| 输入“c”查看角色 |"<<endl; cout<<"| 输入“f”开始战斗 |"<<endl; cout<<"| 输入“g”养成角色 |"<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[1]<<endl; cout<<screen_stirp[0]<<endl; string a; a=GETCH; if(a=="c") { CLEAR_SCREEN; display_role(); display_role(); } else if(a=="f") { operate fight; fight.generate(); fight.select(1);//只有一个角色 } else if(a=="g") { } else { CLEAR_SCREEN; } } else if(a=="f") { operate fight; fight.generate(); fight.select(1);//只有一个角色 } else { system("./game"); return 0; } return 0; }
};17 行未改动 return 0;}
```
### 更新细则1. 多端适应2. 更新的交互3. 一堆bug9 行未改动- [ ] ...### bug修复- [x] 受攻击后血量异常变化or不扣血 注释:现在的你终于可以被打死了- [ ] 敌人第一次攻击时会打你两轮- [x] 敌人第一次攻击时会打你两轮注释:你终于不怕在开局被打个半死了- [ ] 大招