昆特牌吧 关注:69,075贴子:1,493,193

伊欧菲斯:冥想决斗收益计算器

只看楼主收藏回复

直接放链接:
runjs.cn/detail/qrqc0lpd
--------
随手做了一个伊欧菲斯貂蝉计算器。
目前支持计算敌对敌决斗收益,我对敌决斗收益,支持护甲计算,可显示双方剩余战力。
其中收益加上了貂蝉自己的两点。
欢迎提供意见,我有空的话会更新。


IP属地:浙江1楼2017-12-22 16:21回复
    还可以加一个决斗后最后双方点数结果


    IP属地:上海2楼2017-12-22 16:25
    收起回复
      滋瓷滋瓷,昆特乔布斯


      IP属地:新疆来自iPhone客户端3楼2017-12-22 16:36
      回复
        路过帮顶


        IP属地:福建来自Android客户端4楼2017-12-22 17:06
        回复
          感觉差不多已经是最终版了 你要是不怕麻烦 就再弄个决斗数值变化排列显示


          IP属地:上海5楼2017-12-22 17:15
          收起回复
            刚写了个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甲:横轴为敌军与塞尔奇克战力之比,纵轴为收益,线上的数字为敌军护甲数


            IP属地:加拿大6楼2017-12-22 17:56
            收起回复
              准备做个手机app计算随意两个打架


              IP属地:浙江来自Android客户端7楼2017-12-22 17:58
              回复
                滋瓷


                IP属地:广东来自Android客户端8楼2017-12-22 18:07
                回复
                  666


                  IP属地:北京来自iPhone客户端9楼2017-12-22 19:46
                  收起回复
                    。。。。大佬


                    IP属地:广东来自Android客户端10楼2017-12-22 20:35
                    回复
                      无脑强预计与25姐活不过一个月


                      IP属地:江苏来自Android客户端11楼2017-12-22 20:54
                      收起回复
                        现在打昆特还要计算器拉


                        IP属地:海南来自Android客户端12楼2017-12-22 23:05
                        回复
                          玩了两天松鼠党头发掉光(雾),现在基本上看到场面就知道怎么斗了


                          IP属地:安徽来自Android客户端14楼2017-12-23 01:50
                          回复
                            要从输入的多组数据中找最优解也简单,就是模拟输入的数据两两对决,再从中找出最优。那么把原来模拟一组对决的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


                            IP属地:加拿大15楼2017-12-23 08:29
                            收起回复


                              IP属地:江苏来自iPhone客户端16楼2017-12-23 10:33
                              回复