远征本主界面及匹配机器人
This commit is contained in:
@@ -30,7 +30,6 @@ function parseTowerData() {
|
||||
}
|
||||
|
||||
function initData (folder) {
|
||||
console.log('加载文件夹:', folder);
|
||||
if(!gamedata.hasOwnProperty(folder)) {
|
||||
gamedata[folder] = {};
|
||||
}
|
||||
@@ -67,8 +66,15 @@ export function getGamedata(key) {
|
||||
}
|
||||
|
||||
// 获取出兵表
|
||||
export function getWarJsons(key: string) {
|
||||
return gamedata['warJsons'][key];
|
||||
export function getWarJsons(key: any) {
|
||||
key = key + '';
|
||||
let arr = key.split('&');
|
||||
let index = Math.floor(Math.random() * arr.length);
|
||||
key = arr[index];
|
||||
return {
|
||||
json: gamedata['warJsons'][key],
|
||||
fileName: key
|
||||
}
|
||||
}
|
||||
|
||||
export function getWarById(warid: number) {
|
||||
|
||||
Reference in New Issue
Block a user