伊欧菲斯:冥想决斗收益计算器
昆特牌吧
全部回复
仅看楼主
level 7
直接放链接:
runjs.cn/detail/qrqc0lpd
--------
随手做了一个伊欧菲斯貂蝉计算器。
目前支持计算敌对敌决斗收益,我对敌决斗收益,支持护甲计算,可显示双方剩余战力。
其中收益加上了貂蝉自己的两点。
欢迎提供意见,我有空的话会更新。
2017年12月22日 08点12分 1
level 7
[滑稽]还可以加一个决斗后最后双方点数结果
2017年12月22日 08点12分 2
[滑稽]你也忒懒了
2017年12月22日 08点12分
2017年12月22日 08点12分
level 10
滋瓷滋瓷,昆特乔布斯
2017年12月22日 08点12分 3
level 9
路过帮顶
2017年12月22日 09点12分 4
level 7
[滑稽]感觉差不多已经是最终版了 你要是不怕麻烦 就再弄个决斗数值变化排列显示
2017年12月22日 09点12分 5
还可以优化成多数值输入自动寻求最优解
2017年12月22日 12点12分
@大李豪 这个有用
2017年12月22日 12点12分
@大李豪 就是比较麻烦[滑稽]
2017年12月22日 12点12分
@黑卡塔雷亚 学软件的咸鱼,只能提需求
2017年12月22日 12点12分
level 1
刚写了个Matlab code,不过既然楼主把计算器都弄出来了,那我就发这吧。没算伊欧菲斯的两点。
Code:
clear all;
close all;
clc;
Dp=25; Da=3; %Defender_power & Defender_armor
Ap=10; Aa=10; %Attacker_power & Attacker_armor
Api=Ap;Dpi=Dp;%record initial power
Death=Ap*Dp;
while Death>0
%A attacks D
DamageToD=Ap;
if Da>0
DamageToD=max(Ap-Da,0);
Da=max(Da-Ap,0)
end
Dp=max(Dp-DamageToD,0)
%D attacks A
DamageToA=Dp;
if Aa>0
DamageToA=max(Dp-Aa,0);
Aa=max(Aa-Dp,0)
end
Ap=max(Ap-DamageToA,0)
%check
Death=Ap*Dp;
end
%when attacker is enemy
Value_enemy=Api+Dpi-Ap-Dp
%when attacker is ally
Value_ally=(Dpi-Dp)-(Api-Ap)
以此为基础,就能画出下面这些图:
令两个敌军决斗(假设均无护甲):横轴为攻击者与防御者战力之比,纵轴为收益与防御者战力之比
令友军与敌军决斗(假设均无护甲):横轴为攻击者与防御者战力之比,纵轴为收益与防御者战力之比
关于塞尔奇克的收益,要算上多站场的塞尔奇克的点数,
假设塞尔奇克7力3甲:横轴为敌军与塞尔奇克战力之比,纵轴为收益,线上的数字为敌军护甲数
2017年12月22日 09点12分 6
[真棒]
2017年12月22日 11点12分
[惊哭]
2017年12月22日 14点12分
[惊哭]大佬
2017年12月22日 17点12分
人均985
2017年12月23日 03点12分
level 12
准备做个手机app计算随意两个打架
2017年12月22日 09点12分 7
level 10
滋瓷[真棒]
2017年12月22日 10点12分 8
level 8
666
2017年12月22日 11点12分 9
大佬啊
2017年12月22日 11点12分
level 9
。。。。大佬[喷]
2017年12月22日 12点12分 10
level 8
无脑强预计与25姐活不过一个月
2017年12月22日 12点12分 11
[滑稽]25噩梦 一个你
2017年12月22日 13点12分
@欲坠听风 北方有三个终结技:约翰吹号角、压缩牌库迪胖定向拉、25姐:就问你怕不怕
2017年12月22日 13点12分
@寰宇天王许嵩 [滑稽]我玩间谍的时候帮很多北方拉出2张3点
2017年12月22日 13点12分
北方最强终结技是那个吸食全卡组buff的吸血鬼,我妹控四十北最高打出过单卡43
2017年12月22日 14点12分
level 11
现在打昆特还要计算器拉[喷]
2017年12月22日 15点12分 12
level 8
玩了两天松鼠党头发掉光(雾),现在基本上看到场面就知道怎么斗了[笑尿]
2017年12月22日 17点12分 14
level 1
要从输入的多组数据中找最优解也简单,就是模拟输入的数据两两对决,再从中找出最优。那么把原来模拟一组对决的code套两个loop,检查是否有多个最优解再找出来就好了。就写了敌对敌的,友对敌同理就不写了。不过这code只能在matlab上跑...楼主想做个这种计算器的话或许能参考下。
Code:
clear all;
close all;
clc;
%input data of units
EnemyPower=[25,20,15,11,12,16];
EnemyArmor=[0,0,2,0,7,0];
n=length(EnemyPower);%count the number of enemy
AL=[];%Attacker location
DL=[];%Defender location
V=[];%Value
for i=1:1:n
for j=1:1:n
if i~=j
Dp=EnemyPower(j); Da=EnemyArmor(j); %Defender_power & Defender_armor
Ap=EnemyPower(i); Aa=EnemyArmor(i); %Attacker_power & Attacker_armor
Api=Ap;Dpi=Dp;%record initial power
Death=Ap*Dp;
while Death>0
%A attacks D
DamageToD=Ap;
if Da>0
DamageToD=max(Ap-Da,0);
Da=max(Da-Ap,0);
end
Dp=max(Dp-DamageToD,0);
%D attacks A
DamageToA=Dp;
if Aa>0
DamageToA=max(Dp-Aa,0);
Aa=max(Aa-Dp,0);
end
Ap=max(Ap-DamageToA,0);
%check
Death=Ap*Dp;
end
AL=[AL,i];DL=[DL,j]; %record attacker & defender location
Value_enemy=Api+Dpi-Ap-Dp;
V=[V,Value_enemy];%record value
end
end
end
Vmax=max(V);%maximum value
l=length(V);%number of combinations
ComboNum=0;%number of optimal combinations
OL=[];%optimal attacker & defender locations
%get location & check multiple maximum
for k=1:1:l
if V(k)==Vmax
ComboNum=ComboNum+1;
OL=[OL,k];
end
end
%output results
ComboNum
for i=1:1:ComboNum
Combo=i
AttackerNum=AL(OL(i))
DefenderNum=DL(OL(i))
MaximumValue=Vmax
AttackerPower=EnemyPower(AL(OL(i)))
AttackerArmor=EnemyArmor(AL(OL(i)))
DefenderPower=EnemyPower(DL(OL(i)))
DefenderArmor=EnemyArmor(DL(OL(i)))
end
2017年12月23日 00点12分 15
主要是一下子没想通ui该怎么设计,就没写
2017年12月23日 02点12分
写好了
2017年12月23日 06点12分
@黑卡塔雷亚 Nice[滑稽]不过当最优解有多个时这只能给出一个,虽然这功能大部分时候应该用不上
2017年12月23日 09点12分
@láng 我自己摆了个速查表在边上,还是这样比较方便
2017年12月23日 10点12分
level 9
2017年12月23日 02点12分 16
1 2 尾页