feat(gvg): 动态

This commit is contained in:
luying
2023-02-17 10:58:06 +08:00
parent 72a25640aa
commit aab08f7ed5
14 changed files with 191 additions and 41 deletions
+8 -8
View File
@@ -5,21 +5,21 @@ import { readFileAndParse } from '../util'
export interface DicGVGCityAdd {
// 城池类型 1-大城 2-中城 3-小城
cityType: number;
// dic_zyz_GVGResourceBase的type
resourceType: number;
// 联盟币的加成
coinAdd: number;
// 产量加成
outputAdd: number;
// 粮食加成
foodAdd: number;
// 矿物加成
mineralAdd: number;
// 木头加成
woodAdd: number;
}
export const dicGVGCityAdd = new Map<string, DicGVGCityAdd>();
export const dicGVGCityAdd = new Map<number, DicGVGCityAdd>();
export function loadGVGCityAdd() {
dicGVGCityAdd.clear();
let arr = readFileAndParse(FILENAME.DIC_GVG_CITY_ADD);
arr.forEach(o => {
dicGVGCityAdd.set(`${o.cityType}_${o.resourceType}`, o);
dicGVGCityAdd.set(o.cityType, o);
});
arr = undefined;
}