|
|
|
@ -2830,8 +2830,6 @@ public class HeroLogic {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LOGGER.info("============================1{}",heroAllAttribute);
|
|
|
|
|
|
|
|
|
|
// 主角本身给英雄的加成
|
|
|
|
|
SPlayerLevelConfig playerLevelConfig = SPlayerLevelConfig.sPlayerLevelConfigMap.get(user.getPlayerInfoManager().getLevel());
|
|
|
|
|
if (playerLevelConfig != null){
|
|
|
|
@ -2847,8 +2845,6 @@ public class HeroLogic {
|
|
|
|
|
calPlayerCardAttribute(heroAllAttribute, info.getCardId(), info.getStar(), info.getLevel());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LOGGER.info("============================2{}",heroAllAttribute);
|
|
|
|
|
|
|
|
|
|
//化身之力提供的属性
|
|
|
|
|
// Map<Integer, SChangingForce> SChangingForce = STableManager.getConfig(SChangingForce.class);
|
|
|
|
|
// if(SChangingForce.get(user.getHeroManager().getTransformationForce()) != null){
|
|
|
|
@ -2882,7 +2878,6 @@ public class HeroLogic {
|
|
|
|
|
int tempStar = hero.getEspecialEquipLevelByHongmeng(user.getHeroManager(), hero.getId());
|
|
|
|
|
Map<Integer, Map<Integer, SEquipTalismana>> equipTalismanaMap = SEquipTalismana.equipTalismanaStarMap;
|
|
|
|
|
SEquipTalismana equipTali = equipTalismanaMap.get(equipTempId).get(tempStar);
|
|
|
|
|
|
|
|
|
|
combinedAttribute(equipTali.getProperty(), heroAllAttribute);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2897,7 +2892,7 @@ public class HeroLogic {
|
|
|
|
|
equipMap = hero.getCreateType() == 1 ? user.getExpeditionManager().getEquipMap() : user.getEquipManager().getEquipMap();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//宝器加成
|
|
|
|
|
//宝器加成 魂灵宝
|
|
|
|
|
Set<String> jewelInfo = hero.getJewelInfo();
|
|
|
|
|
boolean flashing = jewelInfo.size() == 2;
|
|
|
|
|
int minLevel = -1;
|
|
|
|
@ -3010,19 +3005,11 @@ public class HeroLogic {
|
|
|
|
|
Map<Integer, SEquipConfig> equipConfigMap = STableManager.getConfig(SEquipConfig.class);
|
|
|
|
|
|
|
|
|
|
//魂印
|
|
|
|
|
Map<Integer, Integer> soulEquipByPositionMap = hero.getSoulEquipByPositionMap();
|
|
|
|
|
soulEquipByPositionMap.forEach((k, v) -> {
|
|
|
|
|
SEquipConfig sEquipConfig = equipConfigMap.get(v);
|
|
|
|
|
int[][] property = sEquipConfig.getProperty();
|
|
|
|
|
if (property != null && property.length > 0 && property[0].length > 0) {
|
|
|
|
|
combinedAttribute(property, heroAllAttribute);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
ArrayList<Integer> list = new ArrayList<>(hero.getSoulEquipByPositionMap().values());
|
|
|
|
|
//神印
|
|
|
|
|
Map<Integer, Integer> godSealByPositionMap = hero.getGodSealByPositionMap();
|
|
|
|
|
for (Map.Entry<Integer, Integer> entry : godSealByPositionMap.entrySet()) {
|
|
|
|
|
SEquipConfig sEquipConfig = equipConfigMap.get(entry.getValue());
|
|
|
|
|
list.addAll(hero.getGodSealByPositionMap().values());
|
|
|
|
|
for (Integer id : list) {
|
|
|
|
|
SEquipConfig sEquipConfig = equipConfigMap.get(id);
|
|
|
|
|
int[][] property = sEquipConfig.getProperty();
|
|
|
|
|
if (property != null && property.length > 0 && property[0].length > 0) {
|
|
|
|
|
combinedAttribute(property, heroAllAttribute);
|
|
|
|
@ -3183,8 +3170,6 @@ public class HeroLogic {
|
|
|
|
|
* @param heroAllAttribute 总属性
|
|
|
|
|
*/
|
|
|
|
|
private void getEquipSuiteAttr(Hero hero, Map<Integer, Long> heroAllAttribute){
|
|
|
|
|
//装备总战力评分
|
|
|
|
|
long equipForce = 0;
|
|
|
|
|
Iterator<Map.Entry<Integer, Integer>> iterator = hero.getEquipByPositionMap().entrySet().iterator();
|
|
|
|
|
|
|
|
|
|
Map<Integer, SEquipStrengthen> strengthenMap = SEquipStrengthen.lvMap;
|
|
|
|
@ -3215,7 +3200,6 @@ public class HeroLogic {
|
|
|
|
|
propertyValueByIdMap.put(prop[0], value);
|
|
|
|
|
}
|
|
|
|
|
combinedAttribute(propertyValueByIdMap, heroAllAttribute);
|
|
|
|
|
equipForce += sEquipConfig.getScore();
|
|
|
|
|
// 添加到套装list
|
|
|
|
|
suiteNumList.add(sEquipConfig);
|
|
|
|
|
}
|
|
|
|
@ -3242,8 +3226,6 @@ public class HeroLogic {
|
|
|
|
|
num -= 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//魂印战力保存
|
|
|
|
|
heroAllAttribute.put(HeroAttributeEnum.EquipForce.getPropertyId(), equipForce);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -3367,31 +3349,27 @@ public class HeroLogic {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 计算应用战力
|
|
|
|
|
*/
|
|
|
|
|
public long calHeoForce(User user, Hero hero, int teamId) {
|
|
|
|
|
Map<Integer, Long> heroAllAttribute;
|
|
|
|
|
heroAllAttribute = calHeroNotBufferAttribute(user, hero, true, teamId);
|
|
|
|
|
//战力保存
|
|
|
|
|
Map<Integer, Long> heroAllAttribute = calHeroNotBufferAttribute(user, hero, true, teamId);
|
|
|
|
|
// 基础属性战力
|
|
|
|
|
int force = calForce(heroAllAttribute);
|
|
|
|
|
Map<Integer, SEquipConfig> config = STableManager.getConfig(SEquipConfig.class);
|
|
|
|
|
// 魂印装备战力评分
|
|
|
|
|
Map<Integer, Integer> soulEquipByPositionMap = hero.getSoulEquipByPositionMap();
|
|
|
|
|
for (int sign : soulEquipByPositionMap.values()) {
|
|
|
|
|
SEquipConfig sEquipConfig = config.get(sign);
|
|
|
|
|
// 额外评分战力
|
|
|
|
|
Map<Integer, SEquipConfig> config = SEquipConfig.equipConfigMap;
|
|
|
|
|
ArrayList<Integer> equipId = new ArrayList<>();
|
|
|
|
|
equipId.addAll(hero.getEquipByPositionMap().values());// 装备
|
|
|
|
|
equipId.addAll(hero.getSoulEquipByPositionMap().values());// 魂印
|
|
|
|
|
equipId.addAll(hero.getGodSealByPositionMap().values());// 神印
|
|
|
|
|
for (Integer id : equipId) {
|
|
|
|
|
SEquipConfig sEquipConfig = config.get(id);
|
|
|
|
|
if (sEquipConfig == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
force += sEquipConfig.getScore();
|
|
|
|
|
}
|
|
|
|
|
// 神印装备战力评分
|
|
|
|
|
Map<Integer, Integer> godSealByPositionMap = hero.getGodSealByPositionMap();
|
|
|
|
|
for (int sign : godSealByPositionMap.values()) {
|
|
|
|
|
SEquipConfig sEquipConfig = config.get(sign);
|
|
|
|
|
if (sEquipConfig == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
force += sEquipConfig.getScore();
|
|
|
|
|
}
|
|
|
|
|
return force + heroAllAttribute.get(HeroAttributeEnum.EquipForce.getPropertyId());
|
|
|
|
|
return force;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
///获取最高战斗力
|
|
|
|
@ -3431,49 +3409,6 @@ public class HeroLogic {
|
|
|
|
|
}
|
|
|
|
|
result=forceNum+(forceNum*forceAdd);
|
|
|
|
|
|
|
|
|
|
// 新战力计算2021 9 17
|
|
|
|
|
// 面板最大生命值
|
|
|
|
|
// SPropertyConfig sPropertyConfigHP = SPropertyConfig.getsPropertyConfigByPID(HeroAttributeEnum.Hp.getPropertyId());
|
|
|
|
|
// float hpScore = sPropertyConfigHP.getScore();
|
|
|
|
|
// SPropertyConfig sPropertyConfigAttack = SPropertyConfig.getsPropertyConfigByPID(HeroAttributeEnum.Attack.getPropertyId());
|
|
|
|
|
// float attackScore = sPropertyConfigAttack.getScore();
|
|
|
|
|
// SPropertyConfig sPropertyConfigPhysicalDefence = SPropertyConfig.getsPropertyConfigByPID(HeroAttributeEnum.PhysicalDefence.getPropertyId());
|
|
|
|
|
// float pdScore = sPropertyConfigPhysicalDefence.getScore();
|
|
|
|
|
// SPropertyConfig sPropertyConfigMagicDefence = SPropertyConfig.getsPropertyConfigByPID(HeroAttributeEnum.MagicDefence.getPropertyId());
|
|
|
|
|
// float mdScore = sPropertyConfigMagicDefence.getScore();
|
|
|
|
|
//
|
|
|
|
|
// float xishu = 10000;
|
|
|
|
|
// float finalHp = heroAllAttribute.getOrDefault(HeroAttributeEnum.Hp.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 面板攻击
|
|
|
|
|
// float finalAttack = heroAllAttribute.getOrDefault(HeroAttributeEnum.Attack.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 面板护甲
|
|
|
|
|
// float finalPhysicalDefence = heroAllAttribute.getOrDefault(HeroAttributeEnum.PhysicalDefence.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 面板魔抗
|
|
|
|
|
// float magicDefence = heroAllAttribute.getOrDefault(HeroAttributeEnum.MagicDefence.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 伤害加成
|
|
|
|
|
// float damageBocusFactor = heroAllAttribute.getOrDefault(HeroAttributeEnum.DamageBocusFactor.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 伤害减免
|
|
|
|
|
// float damageReduceFactor = heroAllAttribute.getOrDefault(HeroAttributeEnum.DamageReduceFactor.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 命中几率
|
|
|
|
|
// float hit = heroAllAttribute.getOrDefault(HeroAttributeEnum.Hit.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 闪避几率
|
|
|
|
|
// float dodge = heroAllAttribute.getOrDefault(HeroAttributeEnum.Dodge.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 暴击几率
|
|
|
|
|
// float critFactor = heroAllAttribute.getOrDefault(HeroAttributeEnum.CritFactor.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 抗暴几率
|
|
|
|
|
// float antiCritDamageFactor = heroAllAttribute.getOrDefault(HeroAttributeEnum.AntiCritDamageFactor.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 暴伤加成
|
|
|
|
|
// float critDamageFactor = heroAllAttribute.getOrDefault(HeroAttributeEnum.CritDamageFactor.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 暴伤减免
|
|
|
|
|
// float critDamageReduceFactor = heroAllAttribute.getOrDefault(HeroAttributeEnum.CritDamageReduceFactor.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 受疗加成
|
|
|
|
|
// float cureFacter = heroAllAttribute.getOrDefault(HeroAttributeEnum.CureFacter.getPropertyId(), 0L).floatValue();
|
|
|
|
|
// // 治疗加成
|
|
|
|
|
// float treatFacter = heroAllAttribute.getOrDefault(HeroAttributeEnum.TreatFacter.getPropertyId(), 0L).floatValue();
|
|
|
|
|
//
|
|
|
|
|
// result = (finalHp * hpScore + finalAttack * attackScore + finalPhysicalDefence * pdScore + magicDefence * mdScore)
|
|
|
|
|
// * (1 + (damageBocusFactor + damageReduceFactor + hit + dodge + critFactor +
|
|
|
|
|
// antiCritDamageFactor + critDamageFactor + critDamageReduceFactor + cureFacter + treatFacter) / 2 / xishu);
|
|
|
|
|
return (int)result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|