更新地图,配置插件

This commit is contained in:
unanmed 2023-02-27 20:39:59 +08:00
parent dd81779960
commit 8ab10d5612
21 changed files with 1188 additions and 23 deletions

6
babel.config.json Normal file
View File

@ -0,0 +1,6 @@
{
"presets": [["@babel/preset-env"]],
"sourceType": "script",
"minified": true,
"comments": false
}

1
components.d.ts vendored
View File

@ -18,6 +18,5 @@ declare module '@vue/runtime-core' {
Colomn: typeof import('./src/components/colomn.vue')['default'] Colomn: typeof import('./src/components/colomn.vue')['default']
EnemyOne: typeof import('./src/components/enemyOne.vue')['default'] EnemyOne: typeof import('./src/components/enemyOne.vue')['default']
Scroll: typeof import('./src/components/scroll.vue')['default'] Scroll: typeof import('./src/components/scroll.vue')['default']
TextedProgress: typeof import('./src/components/textedProgress.vue')['default']
} }
} }

View File

@ -25,6 +25,9 @@
"vue": "^3.2.47" "vue": "^3.2.47"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.21.0",
"@babel/core": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"@types/fontmin": "^0.9.0", "@types/fontmin": "^0.9.0",
"@types/fs-extra": "^9.0.13", "@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.14.191", "@types/lodash": "^4.14.191",

File diff suppressed because it is too large Load Diff

View File

@ -279,6 +279,12 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_docs": "火焰之核", "_docs": "火焰之核",
"_data": "火焰之核" "_data": "火焰之核"
}, },
"paleShield": {
"_leaf": true,
"_type": "textarea",
"_docs": "苍蓝刻",
"_data": "苍蓝刻"
},
"value": { "value": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",

View File

@ -18,6 +18,13 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_docs": "楼层列表", "_docs": "楼层列表",
"_data": "在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器、浏览地图和上/下楼器的顺序" "_data": "在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器、浏览地图和上/下楼器的顺序"
}, },
"plugin": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Array",
"_docs": "插件列表",
"_data": "在这里按顺序放所有的插件,顺序会影响到插件的加载,越靠前越早加载"
},
"floorPartitions": { "floorPartitions": {
"_leaf": true, "_leaf": true,
"_type": "event", "_type": "event",

View File

@ -4,6 +4,7 @@ function main() {
this.version = '2.10.0'; // 游戏版本号如果更改了游戏内容建议修改此version以免造成缓存问题。 this.version = '2.10.0'; // 游戏版本号如果更改了游戏内容建议修改此version以免造成缓存问题。
this.useCompress = false; // 是否使用压缩文件 this.useCompress = false; // 是否使用压缩文件
this.pluginUseCompress = false; // 仅限于gh-pages使用
// 当你即将发布你的塔时请使用“JS代码压缩工具”将所有js代码进行压缩然后将这里的useCompress改为true。 // 当你即将发布你的塔时请使用“JS代码压缩工具”将所有js代码进行压缩然后将这里的useCompress改为true。
// 请注意只有useCompress是false时才会读取floors目录下的文件为true时会直接读取libs目录下的floors.min.js文件。 // 请注意只有useCompress是false时才会读取floors目录下的文件为true时会直接读取libs目录下的floors.min.js文件。
// 如果要进行剧本的修改请务必将其改成false。 // 如果要进行剧本的修改请务必将其改成false。

View File

@ -313,7 +313,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
], ],
"font": "normal" "font": "normal"
}, },
"splitImages": [] "splitImages": [],
"plugin": []
}, },
"firstData": { "firstData": {
"title": "人类:开天辟地", "title": "人类:开天辟地",

View File

@ -143,7 +143,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
"E591": {"name":"新敌人","hp":10000,"atk":2000,"def":1000,"money":0,"exp":0,"point":0,"special":[]}, "E591": {"name":"新敌人","hp":10000,"atk":2000,"def":1000,"money":0,"exp":0,"point":0,"special":[]},
"E592": {"name":"冰封巨兽","hp":10000,"atk":2000,"def":1000,"money":2,"exp":85,"point":0,"special":[20,21],"iceHalo":20,"ice":50}, "E592": {"name":"冰封巨兽","hp":10000,"atk":2000,"def":1000,"money":2,"exp":85,"point":0,"special":[20,21],"iceHalo":20,"ice":50},
"E593": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E593": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E594": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E594": {"name":"苍蓝骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E595": {"name":"寒冰兽人","hp":12500,"atk":1800,"def":800,"money":2,"exp":100,"point":0,"special":[7],"hungry":25}, "E595": {"name":"寒冰兽人","hp":12500,"atk":1800,"def":800,"money":2,"exp":100,"point":0,"special":[7],"hungry":25},
"E596": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E596": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E597": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E597": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
@ -166,5 +166,6 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
"E615": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E615": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E616": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}, "E616": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E617": {"name":"冰封雕像","hp":12500,"atk":2500,"def":2000,"money":2,"exp":150,"point":0,"special":[]}, "E617": {"name":"冰封雕像","hp":12500,"atk":2500,"def":2000,"money":2,"exp":150,"point":0,"special":[]},
"E618": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]} "E618": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E643": {"name":"苍蓝史莱姆","hp":17500,"atk":2800,"def":2000,"money":3,"exp":175,"point":0,"special":[28],"paleShield":30}
} }

View File

@ -52,6 +52,13 @@ main.floors.MT39=
3, 3,
14 14
] ]
},
"7,0": {
"floorId": "MT43",
"loc": [
7,
14
]
} }
}, },
"beforeBattle": {}, "beforeBattle": {},
@ -63,7 +70,7 @@ main.floors.MT39=
"cannotMoveIn": {}, "cannotMoveIn": {},
"map": [ "map": [
[ 0, 0, 0, 0, 0,604,604, 91,604,604, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0,604,604, 91,604,604, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,472,604,609,604,472, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0,472,604,611,604,472, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,613,420,608,430,614, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0,613,420,608,430,614, 0, 0, 0, 0, 0],
[604, 21,390,403,482,584,584,584,584,584,600,403,396,482, 94], [604, 21,390,403,482,584,584,584,584,584,600,403,396,482, 94],
[484,587, 34, 34,617, 0, 0, 0, 0, 0, 0,70022,70023,70022,70023], [484,587, 34, 34,617, 0, 0, 0, 0, 0, 0,70022,70023,70022,70023],

View File

@ -96,17 +96,17 @@ main.floors.MT42=
[ 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[604, 21,617,604, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [604, 21,617,604, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 92,611,604,604,482, 0, 0, 0, 0,543, 0, 27, 28,482, 94], [ 92,611,604,604,482, 0, 0, 0, 0,543, 0, 27, 28,482, 94],
[604, 0,376,378,403, 28, 0,604,390,396,588,588,588,614,584], [604, 0,376,378,403, 28, 0,604,390,396,588,588,492,614,584],
[584,584,584,584,584, 34, 29,604,484,441, 34,592, 33,376,584], [584,584,584,584,584, 34, 29,604,484,441, 34,592, 33,376,584],
[ 0, 0, 0, 0, 0,595,604,604,608,604,584,588,403,584,584], [ 0, 0, 0, 0, 0,595,604,604,608,604,584,588,403,584,584],
[ 0, 0, 0, 0, 0,381, 0,274, 34, 0, 0,588, 0, 0, 0], [ 0, 0, 0, 0, 0,381, 0,274, 34, 0, 0,588, 0, 0, 0],
[ 92, 0, 27, 0,617, 34,587,587, 0, 0,586,588,617,586,586], [ 92, 0, 27, 0,617, 34,587,587, 0, 0,586,588,617,586,586],
[584,584,617,70022,70023,611,70022,70023, 0,600,587,376,482,378,586], [584,584,617,70022,70023,611,70022,70023, 0,600,492,376,482,378,586],
[584, 28, 34,584,608,482,608,584, 0, 33,587,587,587,614,586], [584, 28, 34,584,608,482,608,584, 0, 33,587,587,587,614,586],
[584, 34,403,584,584, 85,584,584, 0,602, 0, 27,381, 0,586], [584, 34,403,584,584, 85,584,584, 0,602, 0, 27,381, 0,586],
[584,584,584,584,466,484,467,584,602, 0,604,604,604,277,586], [584,584,584,584,466,484,467,584,602, 0,604,604,604,277,586],
[584, 0, 0,584,584,468,585,585, 0, 28,604,378,604,468,586], [584, 0, 0,584,584,468,585,585, 0, 28,604,378,604,468,586],
[ 0, 0, 0,584,584,497,585,585, 0, 0,600,403,604, 0, 94], [ 0, 0, 0,584,584,497,585,585, 0, 0,600,403,494, 0, 94],
[ 0, 0, 0,584,584, 93,585,585, 93,584,584,584,584,584,584] [ 0, 0, 0,584,584, 93,585,585, 93,584,584,584,584,584,584]
], ],
"bgmap": [ "bgmap": [

View File

@ -31,6 +31,13 @@ main.floors.MT43=
0, 0,
2 2
] ]
},
"7,14": {
"floorId": "MT39",
"loc": [
7,
0
]
} }
}, },
"beforeBattle": {}, "beforeBattle": {},
@ -42,20 +49,20 @@ main.floors.MT43=
"cannotMoveIn": {}, "cannotMoveIn": {},
"map": [ "map": [
[70031,70031,70031, 0, 0,70029,70029,70029,70029,70029,70029, 0, 0, 0, 0], [70031,70031,70031, 0, 0,70029,70029,70029,70029,70029,70029, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,586,586,586, 0, 0, 0, 0, 0,604], [ 0, 0, 0, 0,617, 0,586,586,586, 0, 0, 0,611, 0,604],
[ 0, 0,585,585,585, 0, 0, 0, 0, 0, 0,604,604, 0, 94], [ 0,492,585,585,585,610, 0, 0,274, 0, 0,604,604,595, 94],
[70031, 0,585, 0,585, 0, 0, 0, 0,588,588,588, 0, 0,604], [70031, 0,585, 0,585, 0, 0, 0, 0,588,588,592, 0, 0,604],
[70031, 0, 0, 0,610, 0, 0, 0, 0,588, 0, 0, 0,584,584], [70031, 0,595, 0,610, 0, 0, 0, 0,588, 0, 0,588,584,584],
[70031, 0,584,584,584,617, 0, 0, 0, 0, 0,588,588, 0, 0], [70031,600,584,584,584,608, 0, 0, 0,617, 0,588,588, 0, 0],
[ 0, 0, 0, 0,584, 0, 0, 0,584,584,584,584,584, 0, 0], [ 0, 0, 0, 0,584, 0, 0, 0,584,584,584,584,584, 0, 0],
[ 0,586,586, 0,584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94], [ 0,586,586,614,584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94],
[70030, 0, 0, 0,584, 0,602,584, 0, 0, 0, 0, 0, 0,584], [70030, 0, 0, 0,584, 0,602,584, 0, 0, 0, 0, 0, 34,584],
[70030,584,584,584,584,584, 0,584,584, 0, 0, 0, 0, 0,584], [70030,584,584,584,584,584, 0,584,584, 0,608, 0,614, 0,584],
[70030, 0, 0, 0, 0, 0, 0, 0, 0, 0,584,584,584, 0,584], [70030, 0, 0, 0, 0, 0, 0, 0, 0, 0,584,584,584, 0,584],
[70030, 0, 0, 0, 0, 0, 0,604,604, 0, 0, 0, 0, 0,584], [70030, 0, 0, 0, 0, 0,643,604,604,602, 0, 0, 0,600,584],
[584,584,584,584,584,584, 0, 0,604, 0,584,584,584,584,584], [584,584,584,584,584,584, 0, 0,604, 0,584,584,584,584,584],
[ 0, 0, 0, 0, 0,584, 0, 0,604, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0,584, 0, 0,604, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,604,604, 0,604,604, 0, 0, 0, 0, 0] [ 0, 0, 0, 0, 0,604,604, 93,604,604, 0, 0, 0, 0, 0]
], ],
"bgmap": [ "bgmap": [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70072,70073,70073,70073], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70072,70073,70073,70073],

View File

@ -712,6 +712,14 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
`怪物拥有灼热的火焰使周围5*5范围内的怪物攻击增加${enemy.fireCore}%`, `怪物拥有灼热的火焰使周围5*5范围内的怪物攻击增加${enemy.fireCore}%`,
'#ff6f0a', '#ff6f0a',
1 1
],
[
28,
'苍蓝刻',
enemy =>
`怪物使用苍蓝之灵的力量,使自身受到的伤害减少${enemy.paleShield}%`,
'#ff6f0a',
1
] ]
]; ];
}, },
@ -1042,6 +1050,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
hero_per_damage *= 1 - enemyInfo.iceDecline / 100; hero_per_damage *= 1 - enemyInfo.iceDecline / 100;
if (core.hasSpecial(mon_special, 28)) {
hero_per_damage *= 1 - enemy.paleShield / 100;
}
// 勇士的攻击回合数;为怪物生命除以每回合伤害向上取整 // 勇士的攻击回合数;为怪物生命除以每回合伤害向上取整
let turn = Math.ceil(mon_hp / hero_per_damage); let turn = Math.ceil(mon_hp / hero_per_damage);

View File

@ -403,7 +403,8 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
"E615": 159, "E615": 159,
"E616": 160, "E616": 160,
"E617": 161, "E617": 161,
"E618": 162 "E618": 162,
"E643": 163
}, },
"enemy48": { "enemy48": {
"angel": 0, "angel": 0,

View File

@ -571,6 +571,7 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"640": {"cls":"terrains","id":"T640","canPass":true}, "640": {"cls":"terrains","id":"T640","canPass":true},
"641": {"cls":"items","id":"I641"}, "641": {"cls":"items","id":"I641"},
"642": {"cls":"items","id":"I642"}, "642": {"cls":"items","id":"I642"},
"643": {"cls":"enemys","id":"E643"},
"20032": {"cls":"tileset","id":"X20032","cannotOut":["up","left"],"cannotIn":["up","left"]}, "20032": {"cls":"tileset","id":"X20032","cannotOut":["up","left"],"cannotIn":["up","left"]},
"20033": {"cls":"tileset","id":"X20033","cannotOut":["up"],"cannotIn":["up"]}, "20033": {"cls":"tileset","id":"X20033","cannotOut":["up"],"cannotIn":["up"]},
"20034": {"cls":"tileset","id":"X20034","cannotOut":["up","right"],"cannotIn":["up","right"]}, "20034": {"cls":"tileset","id":"X20034","cannotOut":["up","right"],"cannotIn":["up","right"]},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 163 KiB

View File

@ -0,0 +1,51 @@
/**
* 滑动数组
* @param {any[]} arr
* @param {number} delta
*/
function slide(arr, delta) {
if (delta === 0) return arr;
delta %= arr.length;
if (delta > 0) {
arr.unshift(...arr.splice(arr.length - delta, delta));
return arr;
}
if (delta < 0) {
arr.push(...arr.splice(0, -delta));
return arr;
}
}
function backDir(dir) {
return {
up: 'down',
down: 'up',
left: 'right',
right: 'left'
}[dir];
}
function has(v) {
return v !== null && v !== void 0;
}
function maxGameScale(n = 0) {
const index = core.domStyle.availableScale.indexOf(core.domStyle.scale);
core.control.setDisplayScale(
core.domStyle.availableScale.length - 1 - index - n
);
if (!core.isPlaying() && core.flags.enableHDCanvas) {
core.domStyle.ratio = Math.max(
window.devicePixelRatio || 1,
core.domStyle.scale
);
core.resize();
}
}
core.plugin.utils = {
slide,
backDir,
has,
maxGameScale
};

View File

@ -2,6 +2,7 @@ import fs from 'fs/promises';
import fss from 'fs'; import fss from 'fs';
import fse from 'fs-extra'; import fse from 'fs-extra';
import Fontmin from 'fontmin'; import Fontmin from 'fontmin';
import { exec } from 'child_process';
(async function () { (async function () {
// 1. 去除未使用的文件 // 1. 去除未使用的文件
@ -37,6 +38,8 @@ import Fontmin from 'fontmin';
}); });
}) })
); );
await fse.remove('./dist/maps/');
await fse.remove('./dist/extensions/');
} catch {} } catch {}
// 2. 压缩字体 // 2. 压缩字体
@ -91,4 +94,23 @@ import Fontmin from 'fontmin';
} catch (e) { } catch (e) {
await fse.copy('./public/project/fonts', './dist/project/fonts'); await fse.copy('./public/project/fonts', './dist/project/fonts');
} }
// 3. 压缩js插件
try {
exec(
'babel ./dist/project/plugin --out-file ./dist/project/plugin.min.js'
).on('close', async () => {
const main = await fs.readFile('./dist/main.js', 'utf-8');
await fs.writeFile(
'./dist/main.js',
main.replace(
/this.pluginUseCompress\s*=\s*false\;/,
'this.pluginUseCompress = true;'
)
);
await fse.remove('./dist/project/plugin/');
});
} catch {
console.log('压缩插件失败');
}
})(); })();

View File

@ -49,6 +49,8 @@
"<br>", "<br>",
"样板版本V2.10.0", "样板版本V2.10.0",
"<br>", "<br>",
"游戏版本V1.0.0",
"<br>",
"游戏开源地址:<a href=\"https://github.com/unanmed/HumanBreak\" target=\"_blank\">", "游戏开源地址:<a href=\"https://github.com/unanmed/HumanBreak\" target=\"_blank\">",
"https://github.com/unanmed/HumanBreak</a>", "https://github.com/unanmed/HumanBreak</a>",
"<br>", "<br>",

1
src/source/cls.d.ts vendored
View File

@ -570,6 +570,7 @@ interface IdToCls {
T640: 'terrains'; T640: 'terrains';
I641: 'items'; I641: 'items';
I642: 'items'; I642: 'items';
E643: 'enemys';
X20032: 'tileset'; X20032: 'tileset';
X20033: 'tileset'; X20033: 'tileset';
X20034: 'tileset'; X20034: 'tileset';

View File

@ -570,6 +570,7 @@ interface IdToNumber {
T640: 640; T640: 640;
I641: 641; I641: 641;
I642: 642; I642: 642;
E643: 643;
X20032: 20032; X20032: 20032;
X20033: 20033; X20033: 20033;
X20034: 20034; X20034: 20034;
@ -1223,6 +1224,7 @@ interface NumberToId {
640: 'T640'; 640: 'T640';
641: 'I641'; 641: 'I641';
642: 'I642'; 642: 'I642';
643: 'E643';
20032: 'X20032'; 20032: 'X20032';
20033: 'X20033'; 20033: 'X20033';
20034: 'X20034'; 20034: 'X20034';