battle & fix export excel
parent
b1ebb94ab9
commit
fab234e810
|
@ -279,7 +279,7 @@ function BattleUtil.CalDamage(atkRole, defRole, damageType, baseFactor, ignoreDe
|
||||||
atkEle == 3 and defEle == 1 or
|
atkEle == 3 and defEle == 1 or
|
||||||
atkEle == 5 and defEle == 6 or
|
atkEle == 5 and defEle == 6 or
|
||||||
atkEle == 6 and defEle == 5
|
atkEle == 6 and defEle == 5
|
||||||
baseDamage = restrain and floor(max(baseDamage*1.5, 0.1*attack)) or floor(max(baseDamage, 0.1*attack))
|
baseDamage = restrain and floor(max(baseDamage*1.25, 0.1*attack)) or floor(max(baseDamage, 0.1*attack))
|
||||||
|
|
||||||
for i=1, atkRole.exCalDmgList.size do
|
for i=1, atkRole.exCalDmgList.size do
|
||||||
local func = atkRole.exCalDmgList.buffer[i]
|
local func = atkRole.exCalDmgList.buffer[i]
|
||||||
|
|
|
@ -113,7 +113,6 @@ public class GameApplication {
|
||||||
CoreLogic.getInstance().checkCoreCdk();
|
CoreLogic.getInstance().checkCoreCdk();
|
||||||
ThriftPoolUtils.getInstance().initContext(configurableApplicationContext);
|
ThriftPoolUtils.getInstance().initContext(configurableApplicationContext);
|
||||||
GlobalDataManaager.getInstance().whenServerStart(configurableApplicationContext);
|
GlobalDataManaager.getInstance().whenServerStart(configurableApplicationContext);
|
||||||
HeroLogic.getInstance().afterSet();
|
|
||||||
URL resource = HeroLogic.class.getClassLoader().getResource("mingan.txt");
|
URL resource = HeroLogic.class.getClassLoader().getResource("mingan.txt");
|
||||||
if(resource!=null){
|
if(resource!=null){
|
||||||
LOGGER.info(resource.getFile());
|
LOGGER.info(resource.getFile());
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.ljsd.jieling.config.clazzStaticCfg;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||||
|
import config.SArenaRobotConfig;
|
||||||
|
import config.SWorkShopTechnology;
|
||||||
|
import manager.AbstractClassStaticConfig;
|
||||||
|
import manager.STableManager;
|
||||||
|
import manager.Table;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public class SArenaRobotStaticConfig extends AbstractClassStaticConfig {
|
||||||
|
@Override
|
||||||
|
public void registConfigs(Set<String> registConfigs) {
|
||||||
|
registConfigs.add(SArenaRobotConfig.class.getAnnotation(Table.class).name());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void figureConfigs() {
|
||||||
|
Map<Integer, SArenaRobotConfig> integerSArenaRobotConfigMap = SArenaRobotConfig.getsArenaRobotConfigMap();
|
||||||
|
for(SArenaRobotConfig sArenaRobotConfig : integerSArenaRobotConfigMap.values()){
|
||||||
|
List<Integer> heroList = sArenaRobotConfig.getHeroList();
|
||||||
|
int heroLevel = sArenaRobotConfig.getRobotLevel();
|
||||||
|
Map<Integer,Integer> starHeroMap = new HashMap<>();
|
||||||
|
for(Integer heroTid :heroList){
|
||||||
|
int heroBreakId = HeroLogic.getInstance().calRobotStarByLevel(heroTid, heroLevel,starHeroMap);
|
||||||
|
sArenaRobotConfig.setBreakId(heroBreakId);
|
||||||
|
sArenaRobotConfig.setStarOfHeroMap(starHeroMap);
|
||||||
|
}
|
||||||
|
sArenaRobotConfig.setTotalForce(HeroLogic.getInstance().calRobotTotalForce(sArenaRobotConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
int[][] returnMaterials = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting().getReturnMaterials();
|
||||||
|
Map<Integer, Map<Integer, SWorkShopTechnology>> sWorkTechMapByTechIdAndLevel = STableManager.getFigureConfig(CommonStaticConfig.class).getsWorkTechMapByTechIdAndLevelTmp();
|
||||||
|
for(Map<Integer, SWorkShopTechnology> item : sWorkTechMapByTechIdAndLevel.values()){
|
||||||
|
for(SWorkShopTechnology sWorkShopTechnology:item.values()){
|
||||||
|
if(sWorkShopTechnology.getWillReturn() == null){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
HeroLogic.getInstance().calPercent(returnMaterials,sWorkShopTechnology.getWillReturn());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1819,33 +1819,6 @@ public class HeroLogic {
|
||||||
return totalForce;
|
return totalForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void afterSet() {
|
|
||||||
Map<Integer, SArenaRobotConfig> integerSArenaRobotConfigMap = SArenaRobotConfig.getsArenaRobotConfigMap();
|
|
||||||
for(SArenaRobotConfig sArenaRobotConfig : integerSArenaRobotConfigMap.values()){
|
|
||||||
List<Integer> heroList = sArenaRobotConfig.getHeroList();
|
|
||||||
int heroLevel = sArenaRobotConfig.getRobotLevel();
|
|
||||||
Map<Integer,Integer> starHeroMap = new HashMap<>();
|
|
||||||
for(Integer heroTid :heroList){
|
|
||||||
int heroBreakId = calRobotStarByLevel(heroTid, heroLevel,starHeroMap);
|
|
||||||
sArenaRobotConfig.setBreakId(heroBreakId);
|
|
||||||
sArenaRobotConfig.setStarOfHeroMap(starHeroMap);
|
|
||||||
}
|
|
||||||
sArenaRobotConfig.setTotalForce(calRobotTotalForce(sArenaRobotConfig));
|
|
||||||
}
|
|
||||||
|
|
||||||
int[][] returnMaterials = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting().getReturnMaterials();
|
|
||||||
Map<Integer, Map<Integer, SWorkShopTechnology>> sWorkTechMapByTechIdAndLevel = STableManager.getFigureConfig(CommonStaticConfig.class).getsWorkTechMapByTechIdAndLevelTmp();
|
|
||||||
for(Map<Integer, SWorkShopTechnology> item : sWorkTechMapByTechIdAndLevel.values()){
|
|
||||||
for(SWorkShopTechnology sWorkShopTechnology:item.values()){
|
|
||||||
if(sWorkShopTechnology.getWillReturn() == null){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
calPercent(returnMaterials,sWorkShopTechnology.getWillReturn());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void calPercent(int[][] otherAttriMap,Map<Integer,Integer> heroAttributeMap){
|
public void calPercent(int[][] otherAttriMap,Map<Integer,Integer> heroAttributeMap){
|
||||||
for(int[] item : otherAttriMap){
|
for(int[] item : otherAttriMap){
|
||||||
int propertyId = item[0];
|
int propertyId = item[0];
|
||||||
|
|
|
@ -367,7 +367,7 @@ public class ExcelUtils {
|
||||||
//判断cell类型
|
//判断cell类型
|
||||||
switch (cell.getCellType()) {
|
switch (cell.getCellType()) {
|
||||||
case Cell.CELL_TYPE_NUMERIC: {
|
case Cell.CELL_TYPE_NUMERIC: {
|
||||||
if (cellType != null && cellType.toString().equals("float")){
|
if (cellType != null && cellType.toString().contains("float")){
|
||||||
cellValue = cell.getNumericCellValue();
|
cellValue = cell.getNumericCellValue();
|
||||||
}else{
|
}else{
|
||||||
cellValue = (int) cell.getNumericCellValue();
|
cellValue = (int) cell.getNumericCellValue();
|
||||||
|
|
Loading…
Reference in New Issue