阈值修改

back_recharge
lvxinran 2021-03-10 16:56:08 +08:00
parent 5d7fad815e
commit dbcb1f98f9
5 changed files with 30 additions and 26 deletions

View File

@ -207,16 +207,16 @@ public class CommonStaticConfig extends AbstractClassStaticConfig {
professByTechIdMapTmp.put(sWorkShopTechnology.getTechId(), sWorkShopTechnology.getProfession()); professByTechIdMapTmp.put(sWorkShopTechnology.getTechId(), sWorkShopTechnology.getProfession());
SWorkShopTechnology sWorkShopTechnologyTmp = sWorkTechMapByTechIdAndLevelTmp.get(techId).get(level - 1); SWorkShopTechnology sWorkShopTechnologyTmp = sWorkTechMapByTechIdAndLevelTmp.get(techId).get(level - 1);
if (sWorkShopTechnologyTmp != null) { // if (sWorkShopTechnologyTmp != null) {
Map<Integer, Integer> mineWillReturn = new HashMap<>(); // Map<Integer, Integer> mineWillReturn = new HashMap<>();
Map<Integer, Integer> willReturn = sWorkShopTechnologyTmp.getWillReturn(); // Map<Integer, Integer> willReturn = sWorkShopTechnologyTmp.getWillReturn();
if (willReturn != null) { // if (willReturn != null) {
mineWillReturn.putAll(willReturn); // mineWillReturn.putAll(willReturn);
} // }
int[][] consume = sWorkShopTechnologyTmp.getConsume(); // int[][] consume = sWorkShopTechnologyTmp.getConsume();
HeroLogic.getInstance().combinedAttribute(consume, mineWillReturn); // HeroLogic.getInstance().combinedAttribute(consume, mineWillReturn);
sWorkShopTechnology.setWillReturn(mineWillReturn); // sWorkShopTechnology.setWillReturn(mineWillReturn);
} // }
} }
sChampionshipSetting = STableManager.getConfig(SChampionshipSetting.class).get(1); sChampionshipSetting = STableManager.getConfig(SChampionshipSetting.class).get(1);

View File

@ -183,7 +183,7 @@ public class BattleNode extends AbstractExpedition {
// 玩家等级超上限,取表里最大值 // 玩家等级超上限,取表里最大值
property = config.get(config.values().size()); property = config.get(config.values().size());
} }
// 英雄属性 // 机器人属性
Map<Integer, Integer> robotHeroAttribute = HeroLogic.getInstance().calRobotHeroAttribute(property); Map<Integer, Integer> robotHeroAttribute = HeroLogic.getInstance().calRobotHeroAttribute(property);
// 位置坐标 // 位置坐标
@ -197,8 +197,10 @@ public class BattleNode extends AbstractExpedition {
fightInfo.updateHeroSkill(id.toString(), skills.substring(0, skills.length() - 1)); fightInfo.updateHeroSkill(id.toString(), skills.substring(0, skills.length() - 1));
// 需要赋值 // 需要赋值
bossHP.put(id.toString(), 1D); bossHP.put(id.toString(), 1D);
force+=HeroLogic.getInstance().calForce(robotHeroAttribute); Map<Integer,Long> longAttribute = new HashMap<>();
heroAllAttribute.put(id.toString(), new FamilyHeroInfo(id, property.getId(), property.getStar(), robotHeroAttribute,innerPosition++)); robotHeroAttribute.forEach((k,v)->longAttribute.put(k,(long)v));
force+=HeroLogic.getInstance().calForce(longAttribute);
heroAllAttribute.put(id.toString(), new FamilyHeroInfo(id, property.getId(), property.getStar(), longAttribute,innerPosition++));
} }
fightInfo.setForce(force); fightInfo.setForce(force);

View File

@ -64,10 +64,13 @@ public class SpecialNode extends AbstractExpedition {
//组装 //组装
String skills = robot.getSkill() + robot.getPassiveSkill(); String skills = robot.getSkill() + robot.getPassiveSkill();
bossHP.put(Integer.toString(heroId),1d); bossHP.put(Integer.toString(heroId),1d);
int force = HeroLogic.getInstance().calForce(robot.getRobotHeroAttribute()); Map<Integer,Long> longAttribute = new HashMap<>();
robot.getRobotHeroAttribute().forEach((k,v)->longAttribute.put(k,(long)v));
int force = HeroLogic.getInstance().calForce(longAttribute);
fightInfo.setForce(force); fightInfo.setForce(force);
//试炼节点 放到第二个位置上 //试炼节点 放到第二个位置上
heroAllAttribute.put(Integer.toString(heroId), new FamilyHeroInfo(heroId,level,robot.getStar(),robot.getRobotHeroAttribute(),2)); heroAllAttribute.put(Integer.toString(heroId), new FamilyHeroInfo(heroId,level,robot.getStar(),longAttribute,2));
fightInfo.updateHeroSkill(String.valueOf(heroId),skills.substring(0,skills.length()-1)); fightInfo.updateHeroSkill(String.valueOf(heroId),skills.substring(0,skills.length()-1));
// 获取灵兽信息 // 获取灵兽信息
SRobotProperty property = STableManager.getConfig(SRobotProperty.class).get(level); SRobotProperty property = STableManager.getConfig(SRobotProperty.class).get(level);

View File

@ -1179,9 +1179,9 @@ public class HeroLogic{
result.put(attributeType, (long) value); result.put(attributeType, (long) value);
} }
if(!isForce){ if(!isForce){
Map<Integer, Long> secondaryFactorMap = scHero.getSecondaryFactorMap(); Map<Integer, Integer> secondaryFactorMap = scHero.getSecondaryFactorMap();
if(secondaryFactorMap!=null && !secondaryFactorMap.isEmpty()){ if(secondaryFactorMap!=null && !secondaryFactorMap.isEmpty()){
result.putAll(secondaryFactorMap); secondaryFactorMap.forEach((k,v)->result.put(k,(long)v));
} }
} }
return result; return result;
@ -1217,9 +1217,9 @@ public class HeroLogic{
result.put(attributeType, (long) value); result.put(attributeType, (long) value);
} }
if(!isForce){ if(!isForce){
Map<Integer, Long> secondaryFactorMap = scHero.getSecondaryFactorMap(); Map<Integer, Integer> secondaryFactorMap = scHero.getSecondaryFactorMap();
if(secondaryFactorMap!=null && !secondaryFactorMap.isEmpty()){ if(secondaryFactorMap!=null && !secondaryFactorMap.isEmpty()){
result.putAll(secondaryFactorMap); secondaryFactorMap.forEach((k,v)->result.put(k,(long)v));
} }
} }
return result; return result;
@ -2004,6 +2004,7 @@ public class HeroLogic{
return heroAllAttribute; return heroAllAttribute;
} }
//策划说这里不会超int
public Map<Integer,Integer> calRobotHeroAttribute(SRobotProperty property){ public Map<Integer,Integer> calRobotHeroAttribute(SRobotProperty property){
int[][] property1 = property.getProperty(); int[][] property1 = property.getProperty();
if (property1 == null){ if (property1 == null){

View File

@ -58,11 +58,9 @@ public class SCHero implements BaseConfig{
private int job; private int job;
private Map<Integer,Long> secondaryFactorMap;
private int maxLevel; private int maxLevel;
// private Map<Integer,Integer> secondaryFactorMap; private Map<Integer,Integer> secondaryFactorMap;
private Map<Integer, List<Integer>> skillListByStar; private Map<Integer, List<Integer>> skillListByStar;
@ -110,11 +108,11 @@ public class SCHero implements BaseConfig{
int[][] secondaryFactor = scHero.getSecondaryFactor(); int[][] secondaryFactor = scHero.getSecondaryFactor();
if(secondaryFactor!=null && secondaryFactor.length>0){ if(secondaryFactor!=null && secondaryFactor.length>0){
Map<Integer,Long> secondaryFactorMapTmp = new HashMap<>(secondaryFactor.length); Map<Integer,Integer> secondaryFactorMapTmp = new HashMap<>(secondaryFactor.length);
for(int[] secondaryFactorItem : secondaryFactor){ for(int[] secondaryFactorItem : secondaryFactor){
int property = secondaryFactorItem[0]; int property = secondaryFactorItem[0];
int propertyValue = secondaryFactorItem[1]; int propertyValue = secondaryFactorItem[1];
secondaryFactorMapTmp.put(property, (long) propertyValue); secondaryFactorMapTmp.put(property, propertyValue);
scHero.setSecondaryFactorMap(secondaryFactorMapTmp); scHero.setSecondaryFactorMap(secondaryFactorMapTmp);
} }
} }
@ -276,11 +274,11 @@ public class SCHero implements BaseConfig{
return secondaryFactor; return secondaryFactor;
} }
public Map<Integer, Long> getSecondaryFactorMap() { public Map<Integer, Integer> getSecondaryFactorMap() {
return secondaryFactorMap; return secondaryFactorMap;
} }
public void setSecondaryFactorMap(Map<Integer, Long> secondaryFactorMap) { public void setSecondaryFactorMap(Map<Integer, Integer> secondaryFactorMap) {
this.secondaryFactorMap = secondaryFactorMap; this.secondaryFactorMap = secondaryFactorMap;
} }