#include<iostream>
#include<string>
using namespace std;
int main()
{
signed int a;
double atk, pf, hx, hx1;
cout << "本程序用于测试藏剑大风车伤害收益:\n默认奇穴点出:\n孤鸾(加大风车10%会心10%会效)\n莺鸣柳(加20%会心)\n夜风(不动情况下加30%伤害)\n";
cout << "请选择你要计算的方式,输入属性等级or输入实际百分比" << endl;
string aa;
cout << "你要使用预设属性么?2595攻击力,19.93%会心,209.65%会心效果,29%破防。\nYes(输入Y)or No(输入N).";
cin >> aa;
if (aa == "Y") {
atk = 2595;
pf = 29;
hx = 19.93;
hx1 = 209.65;
atk = atk + 129;
pf = pf / 100;
hx = hx / 100 + 0.3;
hx1 = hx1 / 100 + 0.1;
goto eee; }
cout << "0.输入属性等级\n1.输入属性百分比" << endl;
cin >> a;
while (a > 1)
{
cout << "输入错误,请重新输入:";
cin >> a;
}
if (a == 0)
{
cout << "请输入你的外功攻击力:";
cin >> atk;
cout << "请输入你的外功破防等级:";
cin >> pf;
cout << "请输入你的外功会心等级:";
cin >> hx;
cout << "请输入你的外功会心效果等级(请输入最终外破等级):";
cin >> hx1;
atk = atk + 129;
pf = pf / (4.667 * 85 * 9.12);
hx = hx / (5.347 * 85 * 9.12) + 0.3;
hx1 = hx1 / (1.944 * 85 * 9.12) + 1.75 + 0.1;
}
if (a == 1)
{
cout << "请输入你的外功攻击力:";
cin >> atk;
cout << "请输入你的外功破防百分比(注:输入百分号前面的数字):";
cin >> pf;
cout << "请输入你的外功会心百分比(注:输入百分号前面的数字):";
cin >> hx;
cout << "请输入你的外功会心效果百分比(注:输入百分号前面的数字):";
cin >> hx1;
atk = atk + 129;
pf = pf / 100;
hx = hx / 100 + 0.3;
hx1 = hx1 / 100 + 0.1;
}
eee:
cout << endl;
cout << "你的风车属性为:\n面板伤害(不含附加100%的武器伤害):" << atk << "\n外功破防对风车的增伤:" << pf
<< "\n风车会心率:" << hx * 100 << "%\n风车会心效果:" << hx1 * 100 << "%" << endl << endl;
cout << "\n在不考虑免伤的情况下,你的大风车的单次未会心平均伤害为:" << atk*1.3*(1 + pf) << "点(不包含武器伤害)" << endl;
cout << "会心伤害为:" << atk*hx1*1.3*(1 + pf) << endl;
int dps = atk*(hx*hx1 + (1 - hx))*(1 + pf)*1.3;
cout << "风车每一跳预期平均伤害为:" << dps << endl;
cout << "风车全部伤害(8次对目标伤害为):" << 8 * dps << endl;
cout << endl << endl;
cout << "请问你是否需要测试更换准备后的情况?\n1.是\n2.否\n";
signed int b;
cin >> b;
if (b == 0) { cout << "输入错误,请重新输入";cin >> b; }
if (b >2) { cout << "输入错误,请重新输入";cin >> b; }
if (b == 2) { cout << "谢谢你的使用,本计算器作者为:零零水\nQQ:20004604\n版本号1.0";system("pause");return 0; }
double SF, ATK, PF, HX, HX1;
double SF1, ATK1, PF1, HXA, HX1A;
if (b == 1)
{
cout << "请按照要求输入装备的属性等级,如果是0,请填写0。\n";
cout << "请输入更换前装备的身法:";
cin >> SF;
cout << "请输入新装备的身法:";
cin >> SF1;
cout << "请输入更换前装备的外功攻击力:";
cin >> ATK;
cout << "请输入新装备的外功攻击力:";
cin >> ATK1;
cout << "请输入更换前装备的外功破防等级:";
cin >> PF;
cout << "请输入新装备的外功破防等级:";
cin >> PF1;
cout << "请输入更换前装备的外功会心等级:";
cin >> HX;
cout << "请输入新装备的外功会心等级:";
cin >> HXA;
cout << "请输入更换前装备的外功会心效果等级:";
cin >> HX1;
cout << "请输入新装备的外功会心效果等级:";
cin >> HX1A;
SF = SF1 - SF;
ATK = ATK1 - ATK;
PF = (PF1 - PF + 0.12*SF) / (4.667 * 85 * 9.12);
HX = (HXA - HX + 0.3*SF) / (5.347 * 85 * 9.12);
HX1 = (HX1A - HX1 + 0.18*SF) / (1.944 * 85 * 9.12);
}
cout << endl;
cout << "在新属性的情况下,你的属性变化为:" << endl;
cout << "攻击力变化:" << ATK << endl;
cout << "会心率变化:" << HX * 100 << "%" << endl;
cout << "会心效果变化:" << HX1 * 100 << "%" << endl;
atk = atk + ATK;
pf = pf + PF;
hx = hx + HX;
hx1 = hx1 + HX1;
cout << "——————————————————————" << endl;
cout << "你的风车属性为:\n面板伤害(不含附加100%的武器伤害):" << atk << "\n外功破防对风车的增伤:" << pf
<< "\n风车会心率:" << hx * 100 << "%\n风车会心效果:" << hx1 * 100 << "%" << endl << endl;
cout << "\n在不考虑免伤的情况下,你的大风车的单次未会心平均伤害为:" << atk*1.3*(1 + pf) << "点(不包含武器伤害)" << endl;
cout << "会心伤害为:" << atk*hx1*1.3*(1 + pf) << endl;
int dps1 = atk*(hx*hx1 + (1 - hx))*(1 + pf)*1.3;
cout << "风车每一跳预期平均伤害为:" << dps1 << endl;
cout << "风车全部伤害(8次对目标伤害为):" << 8 * dps1 << endl;
cout << "换装备前的风车伤害为:" << dps << endl;
cout << "更换后的dps为更换前的:" << double(dps1) / double(dps)*100-100 << "%" << endl;
system("Pause");
return 0;
}