Merge branch 'master_test_gn' of http://60.1.1.230/backend/jieling_server into master_test_gn
commit
5a4a0b1534
|
|
@ -17,6 +17,7 @@ import com.ljsd.jieling.logic.help.HelpHero;
|
|||
import com.ljsd.jieling.logic.help.HelpHeroLogic;
|
||||
import com.ljsd.jieling.logic.hero.HeroAttributeEnum;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.tools.Utils;
|
||||
import com.ljsd.jieling.util.FightDataUtil;
|
||||
import com.ljsd.jieling.util.MonsterUtil;
|
||||
import config.*;
|
||||
|
|
@ -34,6 +35,7 @@ import java.util.stream.Collectors;
|
|||
* @author hj
|
||||
* 七界试炼挑战
|
||||
*/
|
||||
@SuppressWarnings("ALL")
|
||||
public class SevenWorldFightHandler implements IFightEventProcesor {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(SevenWorldFightHandler.class);
|
||||
|
||||
|
|
@ -168,7 +170,9 @@ public class SevenWorldFightHandler implements IFightEventProcesor {
|
|||
if (positions[2] == 0 || positions[2] == scHero.getProfession()){
|
||||
// 角色位置验证
|
||||
if (positions[3] == 0 || positions[3] == pos){
|
||||
list.add(holyConfig.getBuff());
|
||||
for (int buff : holyConfig.getBuff()) {
|
||||
list.add(buff);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -188,16 +192,26 @@ public class SevenWorldFightHandler implements IFightEventProcesor {
|
|||
int monsterGroup = stage.getMonsterGroup();
|
||||
Map<Integer, List<CommonProto.FightUnitInfo>> monsterByGroup = FightUtil.makeMonsterGroup(monsterGroup);
|
||||
// 技能处理
|
||||
for (List<CommonProto.FightUnitInfo> value : monsterByGroup.values()) {
|
||||
for (CommonProto.FightUnitInfo info : value) {
|
||||
monsterSkills(user,stage,info);
|
||||
Map<Integer, List<CommonProto.FightUnitInfo>> map = new HashMap<>();
|
||||
// 遍历
|
||||
for (Map.Entry<Integer, List<CommonProto.FightUnitInfo>> entry : monsterByGroup.entrySet()) {
|
||||
List<CommonProto.FightUnitInfo> infos = new ArrayList<>();
|
||||
// 队伍信息
|
||||
for (CommonProto.FightUnitInfo info : entry.getValue()) {
|
||||
// 重新打包封装,因为需要处理技能
|
||||
CommonProto.FightUnitInfo.Builder builder = info.toBuilder();
|
||||
monsterSkills(user,stage,builder);
|
||||
infos.add(builder.build());
|
||||
}
|
||||
map.put(entry.getKey(),infos);
|
||||
}
|
||||
monsterByGroup.clear();
|
||||
monsterByGroup = null;
|
||||
// 灵兽
|
||||
List<CommonProto.FightUnitInfo> monsterPokemonByGroup = MonsterUtil.getMonsterPokemonByGroup(monsterGroup);
|
||||
List<CommonProto.FightTeamInfo> monsterTeamList = new ArrayList<>(nums);
|
||||
for(int i=0;i<nums;i++){
|
||||
List<CommonProto.FightTeamInfo> monsterGroupList = BehaviorUtil.getFightTeamInfos(monsterByGroup,monsterPokemonByGroup, i);
|
||||
List<CommonProto.FightTeamInfo> monsterGroupList = BehaviorUtil.getFightTeamInfos(map,monsterPokemonByGroup,i);
|
||||
monsterTeamList.addAll(monsterGroupList);
|
||||
}
|
||||
return monsterTeamList;
|
||||
|
|
@ -208,11 +222,11 @@ public class SevenWorldFightHandler implements IFightEventProcesor {
|
|||
* @param user
|
||||
* @param monster
|
||||
*/
|
||||
private static void monsterSkills(User user,SQijieStage stage, CommonProto.FightUnitInfo monster){
|
||||
private static void monsterSkills(User user,SQijieStage stage, CommonProto.FightUnitInfo.Builder monster){
|
||||
List<Integer> relicSkills = relicSkills(user, Integer.parseInt(monster.getUnitId()), monster.getPosition(), 0);
|
||||
StringBuilder str = new StringBuilder();
|
||||
// 原本的技能
|
||||
str.append(monster.getUnitSkillIds());
|
||||
str.append(monster.getUnitSkillIds().substring(0,monster.getUnitSkillIds().length()-1));
|
||||
// 特性被动
|
||||
for (int i : stage.getBuff()) {
|
||||
SQijieStageBuff stageBuff = STableManager.getConfig(SQijieStageBuff.class).get(i);
|
||||
|
|
@ -224,7 +238,7 @@ public class SevenWorldFightHandler implements IFightEventProcesor {
|
|||
}
|
||||
// 遗物技能
|
||||
relicSkills.forEach(v->str.append(HeroLogic.DIVISION).append(v));
|
||||
monster.toBuilder().setUnitSkillIds(str.toString());
|
||||
monster.setUnitSkillIds(str.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class SQijieHolyConfig implements BaseConfig {
|
|||
|
||||
private int[] position;
|
||||
|
||||
private int buff;
|
||||
private int[] buff;
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
|
@ -54,7 +54,7 @@ public class SQijieHolyConfig implements BaseConfig {
|
|||
return position;
|
||||
}
|
||||
|
||||
public int getBuff() {
|
||||
public int[] getBuff() {
|
||||
return buff;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue