301 lines
6.9 KiB
Java
301 lines
6.9 KiB
Java
package config;
|
|
|
|
import manager.STableManager;
|
|
import manager.Table;
|
|
import util.CellUtil;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
@Table(name ="BloodyBattleSetting")
|
|
public class SBloodyBattleSetting implements BaseConfig {
|
|
|
|
private int id;
|
|
|
|
private int matchTime;
|
|
|
|
private int battleTime;
|
|
|
|
private int countDown;
|
|
|
|
private int invincible;
|
|
|
|
private int[] settleTime;
|
|
|
|
private int[][] playerSscore;
|
|
|
|
private int[] danIntegral;
|
|
|
|
private int[][] dropPoints;
|
|
|
|
private int[] price;
|
|
|
|
private int[] seasonPass;
|
|
|
|
private int[][][] seasonReward;
|
|
|
|
private int[][][] seasonTokenReward;
|
|
|
|
private int[][] point;
|
|
|
|
private int pointInterval;
|
|
|
|
private int[][] monster;
|
|
|
|
private int[][][] monsterPatrol;
|
|
|
|
private int[][] buildingBuff;
|
|
|
|
private int[][] mineralCeiling;
|
|
|
|
private int collectingInterval;
|
|
|
|
private int[][] debuff;
|
|
|
|
private int monsterSpeed;
|
|
|
|
public static SBloodyBattleSetting sBloodyBattleSetting;
|
|
|
|
private int[][] initializeMine;
|
|
private Map<Integer,Integer> initializeMineMap;
|
|
private Map<Integer, List<Integer>> monsterPotrolPaths;
|
|
private Map<Integer,int[]> mineralCeilingMap;
|
|
|
|
private int playerSpeed;
|
|
|
|
private int[] fightTime;
|
|
|
|
private int[] monsterDrop;
|
|
|
|
private int playerMaxSpeed;
|
|
|
|
private int playerMinSpeed;
|
|
|
|
private int[][] mineralId;
|
|
|
|
private int baseScore;
|
|
private int extraDiscount;
|
|
|
|
private Map<Integer,int[]> debuffMap;
|
|
private Map<Integer,int[]> monsterIndexMap;
|
|
|
|
private int[][] openPeriod;
|
|
|
|
private int[][] scoreConversion;
|
|
|
|
private int reloadTime;
|
|
|
|
|
|
@Override
|
|
public void init() throws Exception {
|
|
|
|
SBloodyBattleSetting sBloodyBattleSettingTmp = STableManager.getConfig(SBloodyBattleSetting.class).get(1);
|
|
int[][] initializeMine = sBloodyBattleSettingTmp.getInitializeMine();
|
|
Map<Integer,Integer> initializeMineMapTmp = new HashMap<>(initializeMine.length);
|
|
for(int[] initializeMineSingle : initializeMine ){
|
|
initializeMineMapTmp.put(initializeMineSingle[0],initializeMineSingle[1]);
|
|
}
|
|
|
|
int[][][] monsterPatrol = sBloodyBattleSettingTmp.getMonsterPatrol();
|
|
// int[][] monster = sBloodyBattleSettingTmp.getMonster();
|
|
Map<Integer, List<Integer>> monsterPotrolPaths = new HashMap<>(monsterPatrol.length);
|
|
for(int i=0;i<monsterPatrol.length;i++){
|
|
|
|
int[][] monsterPotrolPath = monsterPatrol[i];
|
|
List<Integer> paths = new ArrayList<>(monsterPotrolPath.length);
|
|
for(int j=0;j<monsterPotrolPath.length;j++){
|
|
paths.add(CellUtil.xy2Pos(monsterPotrolPath[j][0],monsterPotrolPath[j][1]));
|
|
}
|
|
monsterPotrolPaths.put(i+1,paths);
|
|
}
|
|
Map<Integer,int[]> mineralCeilingMapTmp = new HashMap<>(2);
|
|
for(int[] mineralCeilingSingle : sBloodyBattleSettingTmp.getMineralCeiling()){
|
|
mineralCeilingMapTmp.put(mineralCeilingSingle[0],mineralCeilingSingle);
|
|
}
|
|
Map<Integer,int[]> debuffMapTmp = new HashMap<>();
|
|
for(int[] debuffItem : sBloodyBattleSettingTmp.getDebuff()){
|
|
debuffMapTmp.put(debuffItem[0],debuffItem);
|
|
}
|
|
|
|
Map<Integer,int[]> monsterIndexMapTmp = new HashMap<>();
|
|
int i=1;
|
|
for(int[] monsterItem : sBloodyBattleSettingTmp.getMonster()){
|
|
monsterIndexMapTmp.put(i++,monsterItem);
|
|
}
|
|
sBloodyBattleSettingTmp.setMonsterIndexMap(monsterIndexMapTmp);
|
|
sBloodyBattleSettingTmp.setDebuffMap(debuffMapTmp);
|
|
sBloodyBattleSettingTmp.setMonsterPotrolPaths(monsterPotrolPaths);
|
|
sBloodyBattleSettingTmp.setInitializeMineMap(initializeMineMapTmp);
|
|
sBloodyBattleSettingTmp.setMineralCeilingMap(mineralCeilingMapTmp);
|
|
sBloodyBattleSetting = sBloodyBattleSettingTmp;
|
|
}
|
|
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public int getMatchTime() {
|
|
return matchTime;
|
|
}
|
|
|
|
public int getBattleTime() {
|
|
return battleTime;
|
|
}
|
|
|
|
public int getCountDown() {
|
|
return countDown;
|
|
}
|
|
|
|
public int getInvincible() {
|
|
return invincible;
|
|
}
|
|
|
|
public int[] getSettleTime() {
|
|
return settleTime;
|
|
}
|
|
|
|
public int[][] getPlayerSscore() {
|
|
return playerSscore;
|
|
}
|
|
|
|
public int[] getDanIntegral() {
|
|
return danIntegral;
|
|
}
|
|
|
|
public int[][] getDropPoints() {
|
|
return dropPoints;
|
|
}
|
|
|
|
public int[] getPrice() {
|
|
return price;
|
|
}
|
|
|
|
public int[] getSeasonPass() {
|
|
return seasonPass;
|
|
}
|
|
|
|
public int[][][] getSeasonReward() {
|
|
return seasonReward;
|
|
}
|
|
|
|
public int[][][] getSeasonTokenReward() {
|
|
return seasonTokenReward;
|
|
}
|
|
|
|
public int[][] getPoint() {
|
|
return point;
|
|
}
|
|
|
|
public int getPointInterval() {
|
|
return pointInterval;
|
|
}
|
|
|
|
public int[][] getMonster() {
|
|
return monster;
|
|
}
|
|
|
|
public int[][][] getMonsterPatrol() {
|
|
return monsterPatrol;
|
|
}
|
|
|
|
public int[][] getBuildingBuff() {
|
|
return buildingBuff;
|
|
}
|
|
|
|
public int[][] getMineralCeiling() {
|
|
return mineralCeiling;
|
|
}
|
|
|
|
public int getCollectingInterval() {
|
|
return collectingInterval;
|
|
}
|
|
|
|
public int[][] getDebuff() {
|
|
return debuff;
|
|
}
|
|
|
|
public int[][] getInitializeMine() {
|
|
return initializeMine;
|
|
}
|
|
|
|
public Map<Integer, Integer> getInitializeMineMap() {
|
|
return initializeMineMap;
|
|
}
|
|
|
|
public void setInitializeMineMap(Map<Integer, Integer> initializeMineMap) {
|
|
this.initializeMineMap = initializeMineMap;
|
|
}
|
|
|
|
public void setMonsterPotrolPaths(Map<Integer, List<Integer>> monsterPotrolPaths) {
|
|
this.monsterPotrolPaths = monsterPotrolPaths;
|
|
}
|
|
|
|
public Map<Integer, List<Integer>> getMonsterPotrolPaths() {
|
|
return monsterPotrolPaths;
|
|
}
|
|
|
|
public Map<Integer, int[]> getMineralCeilingMap() {
|
|
return mineralCeilingMap;
|
|
}
|
|
|
|
public void setMineralCeilingMap(Map<Integer, int[]> mineralCeilingMap) {
|
|
this.mineralCeilingMap = mineralCeilingMap;
|
|
}
|
|
|
|
public int getMonsterSpeed() {
|
|
return monsterSpeed;
|
|
}
|
|
|
|
public int getPlayerSpeed() {
|
|
return playerSpeed;
|
|
}
|
|
|
|
public int[] getFightTime() {
|
|
return fightTime;
|
|
}
|
|
|
|
public int[] getMonsterDrop() {
|
|
return monsterDrop;
|
|
}
|
|
|
|
|
|
public Map<Integer, int[]> getDebuffMap() {
|
|
return debuffMap;
|
|
}
|
|
|
|
public void setDebuffMap(Map<Integer, int[]> debuffMap) {
|
|
this.debuffMap = debuffMap;
|
|
}
|
|
|
|
public int getPlayerMaxSpeed() {
|
|
return playerMaxSpeed;
|
|
}
|
|
|
|
public int getPlayerMinSpeed() {
|
|
return playerMinSpeed;
|
|
}
|
|
|
|
|
|
public Map<Integer, int[]> getMonsterIndexMap() {
|
|
return monsterIndexMap;
|
|
}
|
|
|
|
public void setMonsterIndexMap(Map<Integer, int[]> monsterIndexMap) {
|
|
this.monsterIndexMap = monsterIndexMap;
|
|
}
|
|
|
|
public int[][] getOpenPeriod() {
|
|
return openPeriod;
|
|
}
|
|
|
|
public int[][] getScoreConversion() {
|
|
return scoreConversion;
|
|
}
|
|
|
|
public int getReloadTime() {
|
|
return reloadTime;
|
|
}
|
|
} |