wangyuan 2020-04-22 15:07:02 +08:00
parent 8f247ddff2
commit 653579444f
4 changed files with 24 additions and 1 deletions

View File

@ -233,6 +233,7 @@ public class BehaviorUtil {
.setUnitId(Integer.toString(hero.getTemplateId())) .setUnitId(Integer.toString(hero.getTemplateId()))
.setUnitSkillIds(heroSkill.substring(0,heroSkill.length()-1)) .setUnitSkillIds(heroSkill.substring(0,heroSkill.length()-1))
.setProperty(property.substring(0, property.length()-1)) .setProperty(property.substring(0, property.length()-1))
.setPosition(teamPosHeroInfo.getPosition())
.build(); .build();
heroFightInfos.add(heroFightInfo); heroFightInfos.add(heroFightInfo);
} }

View File

@ -1021,10 +1021,26 @@ public class HeroLogic{
return skillList; return skillList;
} }
public void coverSkill(List<Integer> heroSkillList){
Set<Integer> coverSkillIds = new HashSet<>();
heroSkillList.forEach(skill->{
SPassiveSkillLogicConfig config = SPassiveSkillLogicConfig.getConfig(skill);
if(config!=null &&config.getCoverID()!=0){
coverSkillIds.add(config.getCoverID());
}
});
heroSkillList.removeAll(coverSkillIds);
}
public StringBuilder getHeroSkills(User user,Hero hero, StringBuilder sb){ public StringBuilder getHeroSkills(User user,Hero hero, StringBuilder sb){
List<Integer> heroSkillList = getHeroSkillList(user, hero); List<Integer> heroSkillList = getHeroSkillList(user, hero);
for(int i=2;i<heroSkillList.size();i++){ coverSkill(heroSkillList);
for(int i=0;i<heroSkillList.size();i++){
Integer skill = heroSkillList.get(i); Integer skill = heroSkillList.get(i);
if(i<2){
sb.append(skill).append(DIVISION);
continue;
}
SPassiveSkillLogicConfig config = SPassiveSkillLogicConfig.getConfig(skill); SPassiveSkillLogicConfig config = SPassiveSkillLogicConfig.getConfig(skill);
if(config!=null &&config.getEffectiveRange()==1){ if(config!=null &&config.getEffectiveRange()==1){
sb.append(skill).append(DIVISION); sb.append(skill).append(DIVISION);

View File

@ -80,6 +80,7 @@ public class FightDataUtil {
unitData.set("professionId", sMonster.getProfession()); unitData.set("professionId", sMonster.getProfession());
unitData.set("camp", 1); unitData.set("camp", 1);
unitData.set("type", sMonster.getType()); unitData.set("type", sMonster.getType());
unitData.set("position", i+1);
unitData.set("quality", sMonster.getQuality()); unitData.set("quality", sMonster.getQuality());
unitData.set("element",sMonster.getPropertyName()); unitData.set("element",sMonster.getPropertyName());
if (unitSkill.length==1){ if (unitSkill.length==1){
@ -249,6 +250,7 @@ public class FightDataUtil {
unitData.set("camp", postion); unitData.set("camp", postion);
unitData.set("type", 1); unitData.set("type", 1);
unitData.set("quality", 1); unitData.set("quality", 1);
unitData.set("position", data.getPosition());
unitData.set("element", hero.getPropertyName()); unitData.set("element", hero.getPropertyName());
unitData.set("skill", getSkill(skillIds[0])); unitData.set("skill", getSkill(skillIds[0]));

View File

@ -56,4 +56,8 @@ public class SPassiveSkillLogicConfig implements BaseConfig {
public int getEffectiveRange() { public int getEffectiveRange() {
return effectiveRange; return effectiveRange;
} }
public int getCoverID() {
return coverID;
}
} }