fix: 构建问题

This commit is contained in:
unanmed 2025-10-12 13:15:05 +08:00
parent 2d613a2de6
commit f940d8eaad
12 changed files with 57 additions and 1242 deletions

View File

@ -633,9 +633,7 @@ export class DamageEnemy implements IDamageEnemy {
if ( if (
block && block &&
block.event.noPass && block.event.noPass &&
block.event.cls !== 'enemys' && block.event.cls !== 'enemys'
block.id !== 141 &&
block.id !== 151
) { ) {
break; break;
} }
@ -874,7 +872,7 @@ export class DamageEnemy implements IDamageEnemy {
} }
// 霜冻 // 霜冻
if (info.special.has(20) && !core.hasEquip('I589')) { if (info.special.has(20)) {
return ( return (
info.def + info.def +
info.hp / (1 - this.enemy.ice! / 100) - info.hp / (1 - this.enemy.ice! / 100) -
@ -951,7 +949,7 @@ export function calDamageWith(
} }
// 霜冻 // 霜冻
if (special.has(20) && !core.hasEquip('I589')) { if (special.has(20)) {
heroPerDamage *= 1 - info.ice! / 100; heroPerDamage *= 1 - info.ice! / 100;
} }

View File

@ -558,19 +558,11 @@ export class HeroMover extends ObjectMoverBase {
const showDir = toDir(this.faceDir); const showDir = toDir(this.faceDir);
// 前方不能移动 // 前方不能移动
if ( if (code === HeroMoveCode.CannotMove || code === HeroMoveCode.Hit) {
code === HeroMoveCode.CannotMove ||
code === HeroMoveCode.Hit ||
code === HeroMoveCode.LoopHit
) {
controller.stop(); controller.stop();
this.onCannotMove(showDir); this.onCannotMove(showDir);
if (code === HeroMoveCode.Hit) { if (code === HeroMoveCode.Hit) {
core.trigger(nx, ny); core.trigger(nx, ny);
} else if (code === HeroMoveCode.LoopHit) {
const floor = core.status.thisMap;
if (x === 0) core.trigger(floor.width - 1, y);
else core.trigger(0, y);
} }
core.checkRouteFolding(); core.checkRouteFolding();
return; return;

View File

@ -4,11 +4,7 @@ const potionItems: AllIdsOf<'items'>[] = [
'redPotion', 'redPotion',
'bluePotion', 'bluePotion',
'yellowPotion', 'yellowPotion',
'greenPotion', 'greenPotion'
'I482',
'I484',
'I487',
'I491'
]; ];
export function createHook() { export function createHook() {

View File

@ -13,8 +13,11 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"bear.png", "bear.png",
"bg.jpg", "bg.jpg",
"brave.png", "brave.png",
"cloud.png",
"dragon.png", "dragon.png",
"fog.png",
"hero.png", "hero.png",
"sun.png",
"winskin.png" "winskin.png"
], ],
"tilesets": [ "tilesets": [

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

@ -130,9 +130,9 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"canUseItemEffect": "true" "canUseItemEffect": "true"
}, },
"sword0": { "sword0": {
"cls": "items", "cls": "equips",
"name": "破旧的剑", "name": "破旧的剑",
"text": "一把已经生锈的剑", "text": "可装备道具,记得至少留一个可装备道具,不然会构建失败。",
"equip": { "equip": {
"type": 0, "type": 0,
"animate": "sword", "animate": "sword",
@ -214,9 +214,9 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"itemEffectTip": ",攻击+100" "itemEffectTip": ",攻击+100"
}, },
"shield0": { "shield0": {
"cls": "items", "cls": "equips",
"name": "破旧的盾", "name": "破旧的盾",
"text": "一个很破旧的铁盾", "text": "可装备道具,记得至少留一个可装备道具,不然会构建失败。",
"equip": { "equip": {
"type": 1, "type": 1,
"value": { "value": {

View File

@ -166,20 +166,20 @@ export async function splitResource(
while (index < files.length) { while (index < files.length) {
let total = 0; let total = 0;
const start = index; const start = index;
for (let i = index; i < files.length; i++) { let i = index;
for (; i < files.length; i++) {
const file = files[i]; const file = files[i];
if (file.exceed) { if (file.exceed) {
if (i === index) i = index + 1; if (i === index) i = index + 1;
index = i;
break; break;
} else { } else {
total += file.stats.size; total += file.stats.size;
} }
if (total > limit) { if (total > limit) {
index = i;
break; break;
} }
} }
index = i;
const toZip = files.slice(start, index); const toZip = files.slice(start, index);
result.push(await compressFiles(toZip)); result.push(await compressFiles(toZip));
} }

View File

@ -10,56 +10,26 @@ type ImageIds =
| 'bear.png' | 'bear.png'
| 'bg.jpg' | 'bg.jpg'
| 'brave.png' | 'brave.png'
| 'cloud.png'
| 'dragon.png' | 'dragon.png'
| 'fog.png'
| 'hero.png' | 'hero.png'
| 'sun.png'
| 'winskin.png' | 'winskin.png'
type AnimationIds = type AnimationIds =
| 'amazed'
| 'angry'
| 'angry2'
| 'bulb'
| 'emm'
| 'explosion1'
| 'explosion2'
| 'explosion3'
| 'explosion4'
| 'fire'
| 'focus'
| 'fret'
| 'hand' | 'hand'
| 'ice'
| 'jianji'
| 'luv'
| 'magicAtk'
| 'stone'
| 'sweat'
| 'sweat2'
| 'sword' | 'sword'
| 'zone' | 'zone'
type SoundIds = type SoundIds =
| '008-System08.opus'
| '015-Jump01.opus'
| '050-Explosion03.opus'
| '051-Explosion04.opus'
| '087-Action02.opus'
| '094-Attack06.opus'
| '118-Fire02.opus'
| '119-Fire03.opus'
| '120-Ice01.opus'
| 'arrow.opus'
| 'attack.opus' | 'attack.opus'
| 'bomb.opus' | 'bomb.opus'
| 'cancel.opus' | 'cancel.opus'
| 'centerFly.opus' | 'centerFly.opus'
| 'chapter.opus'
| 'confirm.opus' | 'confirm.opus'
| 'cursor.opus' | 'cursor.opus'
| 'danger.opus'
| 'door.opus' | 'door.opus'
| 'drink.opus'
| 'electron.opus'
| 'equip.opus' | 'equip.opus'
| 'error.opus' | 'error.opus'
| 'floor.opus' | 'floor.opus'
@ -69,15 +39,10 @@ type SoundIds =
| 'jump.opus' | 'jump.opus'
| 'load.opus' | 'load.opus'
| 'open_ui.opus' | 'open_ui.opus'
| 'paper.opus'
| 'pickaxe.opus' | 'pickaxe.opus'
| 'quake.opus'
| 'recovery.opus' | 'recovery.opus'
| 'save.opus' | 'save.opus'
| 'shake.opus'
| 'shop.opus' | 'shop.opus'
| 'thunder.opus'
| 'tree.opus'
| 'zone.opus' | 'zone.opus'
type BgmIds = type BgmIds =

View File

@ -10,20 +10,19 @@ interface ItemDeclaration {
bluePotion: 'items'; bluePotion: 'items';
yellowPotion: 'items'; yellowPotion: 'items';
greenPotion: 'items'; greenPotion: 'items';
sword0: 'items'; sword0: 'equips';
sword1: 'equips'; sword1: 'items';
sword2: 'equips'; sword2: 'items';
sword3: 'items'; sword3: 'items';
sword4: 'items'; sword4: 'items';
sword5: 'items'; sword5: 'items';
shield0: 'items'; shield0: 'equips';
shield1: 'equips'; shield1: 'items';
shield2: 'equips'; shield2: 'items';
shield3: 'items'; shield3: 'items';
shield4: 'items'; shield4: 'items';
shield5: 'items'; shield5: 'items';
superPotion: 'items'; superPotion: 'items';
silverCoin: 'items';
book: 'constants'; book: 'constants';
fly: 'constants'; fly: 'constants';
coin: 'constants'; coin: 'constants';
@ -37,7 +36,7 @@ interface ItemDeclaration {
pickaxe: 'tools'; pickaxe: 'tools';
icePickaxe: 'tools'; icePickaxe: 'tools';
bomb: 'tools'; bomb: 'tools';
centerFly: 'constants'; centerFly: 'tools';
upFly: 'tools'; upFly: 'tools';
downFly: 'tools'; downFly: 'tools';
earthquake: 'tools'; earthquake: 'tools';
@ -49,150 +48,6 @@ interface ItemDeclaration {
lifeWand: 'tools'; lifeWand: 'tools';
jumpShoes: 'tools'; jumpShoes: 'tools';
skill1: 'constants'; skill1: 'constants';
wand: 'constants'; wand: 'items';
I319: 'items'; pack: 'items';
I320: 'items';
I321: 'items';
I322: 'constants';
I323: 'items';
I324: 'items';
I325: 'items';
I326: 'items';
I327: 'items';
I328: 'items';
I329: 'items';
I330: 'constants';
I376: 'items';
I377: 'items';
I378: 'items';
I379: 'items';
I380: 'items';
I381: 'items';
I382: 'items';
I383: 'items';
I384: 'items';
I385: 'items';
I386: 'items';
I387: 'items';
I388: 'items';
I389: 'items';
I390: 'items';
I391: 'items';
I392: 'items';
I393: 'items';
I394: 'items';
I395: 'items';
I396: 'items';
I397: 'items';
I398: 'items';
I399: 'items';
I400: 'items';
I401: 'items';
I402: 'items';
I403: 'items';
I404: 'items';
I405: 'items';
I406: 'items';
I407: 'items';
I408: 'items';
I409: 'items';
I410: 'items';
I411: 'items';
I412: 'items';
I413: 'items';
I414: 'items';
I415: 'items';
I416: 'items';
I417: 'items';
I418: 'items';
I419: 'items';
I420: 'items';
I421: 'items';
I422: 'items';
I423: 'items';
I424: 'items';
I425: 'items';
I426: 'items';
I427: 'items';
I428: 'items';
I429: 'items';
I430: 'items';
I431: 'items';
I432: 'items';
I433: 'items';
I434: 'items';
I435: 'items';
I436: 'items';
I437: 'items';
I438: 'items';
I439: 'items';
I440: 'items';
I441: 'items';
I442: 'items';
I443: 'items';
I444: 'items';
I445: 'items';
I446: 'items';
I447: 'items';
I448: 'items';
I449: 'items';
I450: 'items';
I451: 'items';
I452: 'items';
I453: 'items';
I454: 'items';
I455: 'items';
I456: 'items';
I457: 'items';
I458: 'items';
I459: 'items';
I460: 'items';
I461: 'items';
I462: 'items';
I463: 'items';
I464: 'items';
I465: 'items';
I466: 'items';
I467: 'items';
I468: 'items';
I469: 'items';
I470: 'items';
I471: 'items';
I472: 'items';
I473: 'items';
I474: 'items';
I475: 'items';
I476: 'items';
I477: 'items';
I478: 'items';
I479: 'items';
I480: 'items';
I481: 'items';
I482: 'items';
I483: 'items';
I484: 'items';
I485: 'items';
I486: 'items';
I487: 'items';
I488: 'items';
I489: 'items';
I490: 'items';
I491: 'items';
I558: 'constants';
I559: 'constants';
I560: 'constants';
I565: 'constants';
I574: 'items';
I575: 'equips';
I589: 'equips';
I641: 'equips';
I642: 'constants';
I662: 'equips';
I663: 'equips';
I664: 'equips';
I665: 'equips';
I694: 'items';
I695: 'items';
I696: 'items';
I697: 'items';
} }

File diff suppressed because it is too large Load Diff