robot force

back_recharge
wangyuan 2019-07-26 14:29:31 +08:00
parent 3347c2f92a
commit f74badcd6d
1 changed files with 10 additions and 8 deletions

View File

@ -661,7 +661,7 @@ public class HeroLogic {
return result; return result;
} }
private Map<Integer,Integer> calRobotHeroAllAttribute(int templateId,int heroLevl,int heroBreakId){ private Map<Integer,Integer> calRobotHeroAllAttribute(int templateId,int heroLevl,int heroBreakId,boolean isForce){
Map<Integer,Integer> result = new HashMap<>(); Map<Integer,Integer> result = new HashMap<>();
SCHero scHero = SCHero.getsCHero().get(templateId); SCHero scHero = SCHero.getsCHero().get(templateId);
SHeroLevlConfig sHeroLevlConfig = SHeroLevlConfig.getsCHero().get(heroLevl); SHeroLevlConfig sHeroLevlConfig = SHeroLevlConfig.getsCHero().get(heroLevl);
@ -682,9 +682,11 @@ public class HeroLogic {
result.put(attributeType,(int)(heroBaseValue * ( 1 + paraForHero.get(GlobalsDef.RANKUP_PARA_TYPE)/10000.f) * characterLevelPara + heroBaseValue * paraForHero.get(GlobalsDef.BREAK_PARA_TYPE)/10000.f)); result.put(attributeType,(int)(heroBaseValue * ( 1 + paraForHero.get(GlobalsDef.RANKUP_PARA_TYPE)/10000.f) * characterLevelPara + heroBaseValue * paraForHero.get(GlobalsDef.BREAK_PARA_TYPE)/10000.f));
} }
} }
Map<Integer, Integer> secondaryFactorMap = scHero.getSecondaryFactorMap(); if(!isForce){
if(secondaryFactorMap!=null && !secondaryFactorMap.isEmpty()){ Map<Integer, Integer> secondaryFactorMap = scHero.getSecondaryFactorMap();
result.putAll(secondaryFactorMap); if(secondaryFactorMap!=null && !secondaryFactorMap.isEmpty()){
result.putAll(secondaryFactorMap);
}
} }
return result; return result;
} }
@ -835,7 +837,7 @@ public class HeroLogic {
int[] differDemonsId = sArenaRobotConfig.getDifferDemonsId(); int[] differDemonsId = sArenaRobotConfig.getDifferDemonsId();
int differDemonsLv = sArenaRobotConfig.getDifferDemonsLv(); int differDemonsLv = sArenaRobotConfig.getDifferDemonsLv();
int robotLevel = sArenaRobotConfig.getRoleLv(); int robotLevel = sArenaRobotConfig.getRoleLv();
Map<Integer, Integer> robotHeroAttribute = calRobotHeroAttribute(scHero, robotLevel, sArenaRobotConfig.getBreakId(), differDemonsId, differDemonsLv); Map<Integer, Integer> robotHeroAttribute = calRobotHeroAttribute(scHero, robotLevel, sArenaRobotConfig.getBreakId(), differDemonsId, differDemonsLv,false);
sb.append(robotLevel).append(DIVISION); sb.append(robotLevel).append(DIVISION);
List<Integer> templatePropetyIds = transTemplateByHeroPropertyName.get(scHero.getPropertyName()); List<Integer> templatePropetyIds = transTemplateByHeroPropertyName.get(scHero.getPropertyName());
for(Integer templatePropetyId:templatePropetyIds){ for(Integer templatePropetyId:templatePropetyIds){
@ -984,8 +986,8 @@ public class HeroLogic {
} }
public Map<Integer,Integer> calRobotHeroAttribute(SCHero scHero,int heroLevel,int heroBrekId,int[] pokemonIds,int pokemonLevel){ public Map<Integer,Integer> calRobotHeroAttribute(SCHero scHero,int heroLevel,int heroBrekId,int[] pokemonIds,int pokemonLevel,boolean isForce){
Map<Integer, Integer> heroAllAttribute = calRobotHeroAllAttribute(scHero.getId(),heroLevel,heroBrekId); Map<Integer, Integer> heroAllAttribute = calRobotHeroAllAttribute(scHero.getId(),heroLevel,heroBrekId,isForce);
heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE)); heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE));
if(pokemonIds!=null){ if(pokemonIds!=null){
int profession = scHero.getProfession(); int profession = scHero.getProfession();
@ -1431,7 +1433,7 @@ public class HeroLogic {
for(Integer heroTid :heroList){ for(Integer heroTid :heroList){
int heroBreakId = sArenaRobotConfig.getBreakId(); int heroBreakId = sArenaRobotConfig.getBreakId();
SCHero scHero = SCHero.getsCHero().get(heroTid); SCHero scHero = SCHero.getsCHero().get(heroTid);
Map<Integer, Integer> robotHeroAttribute = calRobotHeroAttribute(scHero, heroLevel, heroBreakId, differDemonsId, differDemonsLv); Map<Integer, Integer> robotHeroAttribute = calRobotHeroAttribute(scHero, heroLevel, heroBreakId, differDemonsId, differDemonsLv,true);
totalForce+=calForce(robotHeroAttribute); totalForce+=calForce(robotHeroAttribute);
} }
return totalForce; return totalForce;