计算异妖战力问题
parent
5b977ec2ae
commit
56455fefbe
|
@ -1315,6 +1315,20 @@ public class HeroLogic {
|
||||||
|
|
||||||
public int calPokenmonForce(Pokemon pokemon){
|
public int calPokenmonForce(Pokemon pokemon){
|
||||||
Map<Integer,Integer> pokemonAttributeMap = new HashMap<>();
|
Map<Integer,Integer> pokemonAttributeMap = new HashMap<>();
|
||||||
|
combinePokemonAttribute(pokemonAttributeMap, pokemon);
|
||||||
|
return calForce(pokemonAttributeMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int calAllPokenmonForce(User user){
|
||||||
|
Map<Integer,Integer> pokemonAttributeMap = new HashMap<>();
|
||||||
|
Map<Integer, Pokemon> pokemonMap = user.getPokemonManager().getPokemonMap();
|
||||||
|
for(Pokemon pokemon : pokemonMap.values()){
|
||||||
|
combinePokemonAttribute(pokemonAttributeMap, pokemon);
|
||||||
|
}
|
||||||
|
return calForce(pokemonAttributeMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void combinePokemonAttribute(Map<Integer, Integer> pokemonAttributeMap, Pokemon pokemon) {
|
||||||
Map<Integer, Integer> comonpentsLevelMap = pokemon.getComonpentsLevelMap();
|
Map<Integer, Integer> comonpentsLevelMap = pokemon.getComonpentsLevelMap();
|
||||||
for (Map.Entry<Integer, Integer> comonpentsLevelItem : comonpentsLevelMap.entrySet()) {
|
for (Map.Entry<Integer, Integer> comonpentsLevelItem : comonpentsLevelMap.entrySet()) {
|
||||||
Integer comonpentId = comonpentsLevelItem.getKey();
|
Integer comonpentId = comonpentsLevelItem.getKey();
|
||||||
|
@ -1329,7 +1343,6 @@ public class HeroLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return calForce(pokemonAttributeMap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int calEquipForce(Equip equip){
|
public int calEquipForce(Equip equip){
|
||||||
|
|
|
@ -120,10 +120,7 @@ public class MissionLoigc {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case POKEMON_ALL_FORCE:
|
case POKEMON_ALL_FORCE:
|
||||||
Map<Integer, Pokemon> pokemonMap = user.getPokemonManager().getPokemonMap();
|
count = HeroLogic.getInstance().calAllPokenmonForce(user);
|
||||||
for(Pokemon pokemon : pokemonMap.values()){
|
|
||||||
count = HeroLogic.getInstance().calPokenmonForce(pokemon);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ARENA_CHALLENEGE_NUMS:
|
case ARENA_CHALLENEGE_NUMS:
|
||||||
count = cumulationData.getArenaFightNums();
|
count = cumulationData.getArenaFightNums();
|
||||||
|
|
Loading…
Reference in New Issue