山河社稷技能buffer

back_recharge
xuexinpeng 2021-05-17 18:55:19 +08:00
parent c509ed8444
commit bc9bb14dda
3 changed files with 24 additions and 18 deletions

View File

@ -150,10 +150,14 @@ public class HardStageLogic {
user.getTeamPosManager().setCurTeamPosId(teamId);
List<CommonProto.FightUnitInfo> heroFightInfos = new ArrayList<>();
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
//只能使用一个神将 复制为6个神将
if(nodeConfig.getHardStageBuff() == 1011){
//只能使用一个神将 复制为6个神将 TODO
if(nodeConfig.getHardStageBuff() == 12 &&teamPosHeroInfos.size() == 1){
int position = teamPosHeroInfos.get(0).getPosition();
for(int i =1;i<=6;i++){
if(position!= i){
teamPosHeroInfos.add(new TeamPosHeroInfo(teamPosHeroInfos.get(0).getHeroId(),i));
}
}
}
for (TeamPosHeroInfo teamPosHeroInfo : teamPosHeroInfos) {
Hero hero;
@ -162,6 +166,15 @@ public class HardStageLogic {
if (hero == null) {
continue;
}
SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId());
if(nodeConfig.getHardStageBuff()!=0){
SHardStageBuff buff = SHardStageBuff.getConfigMap().get(nodeConfig.getHardStageBuff());
if(buff != null&& buff.getType()==101) {//TODO
if (!Arrays.stream(buff.getVocation()).boxed().anyMatch(n->n.equals(Integer.valueOf(scHero.getPropertyName())))) {
continue;
}
}
}
Map<Integer, Long> heroAttributeMap = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero, false, teamId);
StringBuilder skillSb = new StringBuilder();
StringBuilder propertySb = new StringBuilder();

View File

@ -772,7 +772,7 @@ public class CBean2Proto {
return CommonProto.TeamSimpleInfo.newBuilder().setHeroid(pokemon.getId()).setHeroTid(pokemon.getTmpId()).setLevel(pokemon.getLevel()).setStar(pokemon.getStar()).setPosition(position).build();
}
public static CommonProto.HardStagePlayerInfo getHardStagePlayerInfo(ArenaRecord arenaRecord,int type)throws Exception{
public static CommonProto.HardStagePlayerInfo getHardStagePlayerInfo(ArenaRecord arenaRecord,int type)throws Exception {
CommonProto.FightData fightDataProto = CommonProto.FightData.parseFrom(arenaRecord.getFightData());
return CommonProto.HardStagePlayerInfo.newBuilder()
.setUid(arenaRecord.getAttackId())
@ -782,7 +782,7 @@ public class CBean2Proto {
.setHeadFrame(arenaRecord.getHeadFrame())
.setFightData(fightDataProto).setPower(arenaRecord.getAttackForce()).setType(type).build();
}
/**
* list by proto
* @param user

View File

@ -11,6 +11,7 @@ public class SHardStageBuff implements BaseConfig {
private int id;
private int type;
private int passiveSkillLogic;
private int[] vocation;
private static Map<Integer,SHardStageBuff> configMap ;
@ -27,27 +28,19 @@ public class SHardStageBuff implements BaseConfig {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getPassiveSkillLogic() {
return passiveSkillLogic;
}
public void setPassiveSkillLogic(int passiveSkillLogic) {
this.passiveSkillLogic = passiveSkillLogic;
}
public static Map<Integer, SHardStageBuff> getConfigMap() {
return configMap;
}
public int[] getVocation() {
return vocation;
}
}