最近很流行pokemon go啊 楼主最喜欢和智爷人兽合一的忍蛙啊。。希望下一季塞妹还在智爷身边
大街小巷都在玩,自从靖国神社在第一天就被中国万家占领后,楼主一个朋友在马路上玩,被日本人问,你们中国人都开作弊器的吧,真是五味杂呈
哎,老任要是解锁,我想大多数玩家还是乐意感受这个游戏本来的用意的。。。也不能怪老任,当年在内地小神游事件惭遭滑铁卢。。。。50下载一次游戏都卖不出去。。后话了
言归正传
发现大家有个很严重的误区,不是cp越高宠越好,看到很多攻略都这么说,不是坑人么。。。
首先大家要了解下完美度是个什么东西,举个例子
现在你抓到一只aaa cp为760 dust为800
对于不同的宠 都有一个不同的成长列表
比如这制aaa在dust为800的时候 一共可以升级四次 给出数据,每次
dust minCp maxCp hp
800 680 740 38~44
800 700 780 40~50
800 740 820 45~55
800 750 840 50~60
800 780 860 55~65
因为go中宠物等级是隐藏的,所以你只能根据数据去大概判断你的宠属于哪个区间
现在给出的例子是最极端的,正好有三个区间都符合你的概率,所以这个时候你的完美度就可能会有3种,分别是
(yourCp-minCp) /(maxCp-minCp)
(760-700)/(780-700) 0.75
(760-740)/(820-740) 0.34
(760-750)/(840-750) 0.11
看到这里大家都懂了吧,对于同一组数据碰到极端情况是会同时符合三个区间,这个时候根本算不出你的宠到底是什么完美度,可能是凤姐,也可能是松岛枫!!!
给出一个网站有数据的 http://pokemongo.gamepress.gg/pokemon/54
好了 现在开始贴代码
首先建出basicValue的属性类
package lobs.jibunn.mb.pokemon;
public class BasicValue {
protected int dust;
protected double MaxCp;
protected double MinCp;
protected double CurrentCp;
public int getDust() {
return dust;
}
public void setDust(int dust) {
this.dust = dust;
}
public double getMaxCp() {
return MaxCp;
}
public void setMaxCp(double maxCp) {
MaxCp = maxCp;
}
public double getMinCp() {
return MinCp;
}
public void setMinCp(double minCp) {
MinCp = minCp;
}
public double getCurrentCp() {
return CurrentCp;
}
public void setCurrentCp(double currentCp) {
CurrentCp = currentCp;
}
public BasicValue(int dust,double fuck,double minCp, double maxCp) {
setMaxCp(maxCp);
setMinCp(minCp);
setDust(dust);
setCurrentCp(fuck);
}
}
然后给出pokemon的工厂抽象类,对于每个不同的我们都再分别建模
package lobs.jibunn.mb.pokemon;
import java.util.ArrayList;
import java.util.List;
public abstract class Pokemon {
List<BasicValue> bvList;
public void initialPokemon() {
<span style="white-space:pre"> </span>bvList = null;
}
public abstract List getBvList();
}
建出火伊布实体类,继承工厂类
<pre name="code" class="java">package lobs.jibunn.mb.pokemon;
import java.util.ArrayList;
import java.util.List;
public class Flareon extends Pokemon {
List<BasicValue> bvList;
public Flareon() {
bvList = new ArrayList<BasicValue>();
}
@Override
public List getBvList() {
bvList.add(new BasicValue(200, 1, 31.99, 37.40));
bvList.add(new BasicValue(200, 1.5, 66.12, 77.29));
bvList.add(new BasicValue(200, 2, 100.24, 117.19));
bvList.add(new BasicValue(200, 2.5, 134.37, 157.08));
bvList.add(new BasicValue(400, 3, 168.50, 196.98));
bvList.add(new BasicValue(400, 3.5, 202.62, 236.87));
bvList.add(new BasicValue(400, 4, 236.75, 276.77));
bvList.add(new BasicValue(400, 4.5, 270.88, 316.66));
bvList.add(new BasicValue(600, 5, 305.00, 356.56));
bvList.add(new BasicValue(600, 5.5, 339.13, 396.45));
bvList.add(new BasicValue(600, 6, 373.26, 436.35));
bvList.add(new BasicValue(600, 6.5, 407.38, 476.24));
bvList.add(new BasicValue(800, 7, 441.51, 516.14));
bvList.add(new BasicValue(800, 7.5, 475.64, 556.03));
bvList.add(new BasicValue(800, 8, 509.76, 595.92));
bvList.add(new BasicValue(800, 8.5, 543.89, 635.82));
bvList.add(new BasicValue(1000, 9, 578.01, 675.71));
bvList.add(new BasicValue(1000, 9.5, 612.14, 715.61));
bvList.add(new BasicValue(1000, 10, 646.27, 755.50));
bvList.add(new BasicValue(1000, 10.5, 678.56, 793.25));
bvList.add(new BasicValue(1300, 11, 710.85, 831.00));
bvList.add(new BasicValue(1300, 11.5, 743.14, 868.75));
bvList.add(new BasicValue(1300, 12, 775.43, 906.50));
bvList.add(new BasicValue(1300, 12.5, 807.72, 944.25));
bvList.add(new BasicValue(1600, 13, 840.01, 982.00));
bvList.add(new BasicValue(1600, 13.5, 872.30, 1019.74));
bvList.add(new BasicValue(1600, 14, 904.59, 1057.49));
bvList.add(new BasicValue(1600, 14.5, 936.88, 1095.24));
bvList.add(new BasicValue(1900, 15, 969.17, 1132.99));
bvList.add(new BasicValue(1900, 15.5, 1001.46, 1170.74));
bvList.add(new BasicValue(1900, 16, 1033.75, 1208.49));
bvList.add(new BasicValue(1900, 16.5, 1066.04, 1246.24));
bvList.add(new BasicValue(2200, 17, 1098.34, 1283.98));
bvList.add(new BasicValue(2200, 17.5, 1130.63, 1321.73));
bvList.add(new BasicValue(2200, 18, 1162.92, 1359.48));
bvList.add(new BasicValue(2200, 18.5, 1195.21, 1397.23));
bvList.add(new BasicValue(2500, 19, 1227.50, 1434.98));
bvList.add(new BasicValue(2500, 19.5, 1259.79, 1472.73));
bvList.add(new BasicValue(2500, 20, 1292.08, 1510.48));
bvList.add(new BasicValue(2500, 20.5, 1324.37, 1548.22));
bvList.add(new BasicValue(3000, 21, 1356.70, 1586.02));
bvList.add(new BasicValue(3000, 21.5, 1388.99, 1623.77));
bvList.add(new BasicValue(3000, 22, 1421.33, 1661.57));
bvList.add(new BasicValue(3000, 22.5, 1453.62, 1699.32));
bvList.add(new BasicValue(3500, 23, 1485.95, 1737.12));
bvList.add(new BasicValue(3500, 23.5, 1518.24, 1774.86));
bvList.add(new BasicValue(3500, 24, 1550.57, 1812.66));
bvList.add(new BasicValue(3500, 24.5, 1582.86, 1850.41));
bvList.add(new BasicValue(4000, 25, 1615.20, 1888.21));
bvList.add(new BasicValue(4000, 25.5, 1647.49, 1925.96));
bvList.add(new BasicValue(4000, 26, 1679.82, 1963.76));
bvList.add(new BasicValue(4000, 26.5, 1712.11, 2001.51));
bvList.add(new BasicValue(4500, 27, 1744.45, 2039.30));
bvList.add(new BasicValue(4500, 27.5, 1776.74, 2077.05));
bvList.add(new BasicValue(4500, 28, 1809.07, 2114.85));
bvList.add(new BasicValue(4500, 28.5, 1841.36, 2152.60));
bvList.add(new BasicValue(5000, 29, 1873.69, 2190.40));
bvList.add(new BasicValue(5000, 29.5, 1905.98, 2228.15));
bvList.add(new BasicValue(5000, 30, 1938.32, 2265.94));
bvList.add(new BasicValue(5000, 30.5, 1954.46, 2284.82));
bvList.add(new BasicValue(6000, 31, 1970.61, 2303.69));
bvList.add(new BasicValue(6000, 31.5, 1986.75, 2322.57));
bvList.add(new BasicValue(6000, 32, 2002.90, 2341.44));
bvList.add(new BasicValue(6000, 32.5, 2019.04, 2360.31));
bvList.add(new BasicValue(7000, 33, 2035.19, 2379.19));
bvList.add(new BasicValue(7000, 33.5, 2051.33, 2398.06));
bvList.add(new BasicValue(7000, 34, 2067.48, 2416.94));
bvList.add(new BasicValue(7000, 34.5, 2083.62, 2435.81));
bvList.add(new BasicValue(8000, 35, 2099.77, 2454.69));
bvList.add(new BasicValue(8000, 35.5, 2115.91, 2473.56));
bvList.add(new BasicValue(8000, 36, 2132.06, 2492.43));
bvList.add(new BasicValue(8000, 36.5, 2148.20, 2511.31));
bvList.add(new BasicValue(9000, 37, 2164.35, 2530.18));
bvList.add(new BasicValue(9000, 37.5, 2180.49, 2549.06));
bvList.add(new BasicValue(9000, 38, 2196.64, 2567.93));
bvList.add(new BasicValue(9000, 38.5, 2212.78, 2586.80));
bvList.add(new BasicValue(10000, 39, 2228.93, 2605.68));
bvList.add(new BasicValue(10000, 39.5, 2245.07, 2624.55));
bvList.add(new BasicValue(10000, 40, 2261.22, 2643.43));
return bvList;
}
}
好了,万事齐全,就等开撸
具体算法也在这里实现,两个循环搞定~就这么暴力~最后输出所有的可能性
蓝色加大加粗的地方日后大家可以自己喂颗糖获取更精确数据,就是这样~当然当一组数据出现三次以后,你懂的~就他了~至于为什么是三~自己动脑子~
package lobs.jibunn.mb.jp.suanfa;
import java.util.ArrayList;
import java.util.List;
import lobs.jibunn.mb.pokemon.BasicValue;
import lobs.jibunn.mb.pokemon.Flareon;
import lobs.jibunn.mb.pokemon.Pokemon;
public class EviCalculator {
static double[] possiblePerferction = new double[9];
public static void main (String args[]) {
Pokemon pokemon = new Flareon();
List calList =pokemon.getBvList();
List <BasicValue>calValue = new <BasicValue>ArrayList();
<span style="font-size:24px;color:#6633ff;"><strong><em><u>calValue.add(new BasicValue(941,1300,0,0));</u></em></strong></span>
getPossibleCp(calValue,calList);
}
public static void getPossibleCp(List <BasicValue>calValue, List<BasicValue> calList) {
for(BasicValue bv : calList ) {
for(int i = 0; i < calValue.size();i++) {
if (bv.getDust() == calValue.get(i).getDust()
&& bv.getMaxCp() > calValue.get(i).getCurrentCp()
&& bv.getMinCp() < calValue.get(i).getCurrentCp()
) {
possiblePerferction[i] = (calValue.get(i).getCurrentCp() - bv.getMinCp())/(bv.getMaxCp()-bv.getMinCp()) ;
System.out.println(possiblePerferction[i]);
}
}
}
}
}