二区 & 修复楼传bug

This commit is contained in:
unanmed 2023-01-09 20:36:40 +08:00
parent c4417977da
commit a85cef79ec
19 changed files with 492 additions and 135 deletions

View File

@ -105,7 +105,7 @@ main.floors.MT14=
"true": [
{
"type": "function",
"function": "function(){\ndelete flags.__bgm__;\n}"
"function": "function(){\ndelete flags.__bgm__;\ndelete flags.MT14Jump;\ndelete flags['MT14@24@7@A'];\ndelete flags.finishChase1;\ndelete flags.cave;\n}"
},
{
"type": "confirm",
@ -359,6 +359,11 @@ main.floors.MT14=
}
]
}
},
"7,1": {
"0": null,
"1": null,
"2": null
}
},
"cannotMove": {},

View File

@ -136,7 +136,7 @@ main.floors.MT21=
"\t[初级智人]\b[up,hero]或许智慧结晶会告诉我答案吧。",
{
"type": "function",
"function": "function(){\ncore.showChapter('第二章 智慧');\ncore.removeMaps('tower1', 'tower7', true);\n}"
"function": "function(){\ncore.showChapter('第二章 智慧');\ncore.removeMaps('tower1', 'tower7', true);\ndelete flags.tower1;\ndelete flags.wordsTimeOut;\ndelete flags.boom;\ndelete flags.booming;\n}"
},
{
"type": "setValue",

View File

@ -40,7 +40,7 @@ main.floors.MT22=
"第二章的加点已开启,可以在技能树的前置技能下方选择",
"注意学习是一个非常重要的技能,需要尽快点开",
"如果你玩过上个版本,直接跳到了本章,记得查看背包里面的各种道具,尤其是百科全书,同时注意左边是你来的方向,那里还有些怪物",
"从现在开始,跳跃技能不再消耗生命值"
"从现在开始,跳跃技能不再消耗生命值,别忘了你还有跳跃技能"
],
"7,9": [
"百科全书中已解锁第二章需要特别说明的怪物属性,你可以在百科全书中查看"

View File

@ -24,11 +24,20 @@ main.floors.MT32=
"events": {
"0,7": [
{
"type": "changeFloor",
"floorId": "MT31",
"loc": [
14,
7
"type": "if",
"condition": "(flag:inWinter2===true)",
"true": [
"\t[初级智人]\b[up,hero]没必要回去了"
],
"false": [
{
"type": "changeFloor",
"floorId": "MT31",
"loc": [
14,
7
]
}
]
}
],

View File

@ -24,6 +24,20 @@ main.floors.MT33=
14,
6
]
},
"14,3": {
"floorId": "MT34",
"loc": [
0,
3
]
},
"9,0": {
"floorId": "MT35",
"loc": [
7,
14
]
}
},
"beforeBattle": {},

View File

@ -1,45 +1,147 @@
main.floors.MT34=
{
"floorId": "MT34",
"title": "冰封雪原",
"name": "冰封雪原",
"width": 15,
"height": 15,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"cannotViewMap": false,
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"floorId": "MT34",
"title": "冰封雪原",
"name": "冰封雪原",
"width": 15,
"height": 15,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"cannotViewMap": false,
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {
"0,3": {
"floorId": "MT33",
"loc": [
14,
3
]
}
},
"beforeBattle": {},
"afterBattle": {
"6,2": [
{
"type": "setValue",
"name": "flag:door_MT34_9_3",
"operator": "+=",
"value": "1"
}
],
"8,2": [
{
"type": "setValue",
"name": "flag:door_MT34_9_3",
"operator": "+=",
"value": "1"
}
],
"8,4": [
{
"type": "setValue",
"name": "flag:door_MT34_9_3",
"operator": "+=",
"value": "1"
}
],
"6,4": [
{
"type": "setValue",
"name": "flag:door_MT34_9_3",
"operator": "+=",
"value": "1"
}
]
},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {
"9,3": {
"0": {
"condition": "flag:door_MT34_9_3==4",
"currentFloor": true,
"priority": 0,
"delayExecute": false,
"multiExecute": false,
"data": [
{
"type": "openDoor"
},
{
"type": "setValue",
"name": "flag:door_MT34_9_3",
"operator": "=",
"value": "null"
}
]
}
}
},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147, 0, 0, 0, 0, 0,514, 0,514,147,420, 21,147,147,147],
[ 92, 0,376,484,378, 0, 0, 0, 0, 85,487,441,147,147,147],
[147, 0, 0, 0, 0, 0,514, 0,514,147,430, 21,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147],
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,147]
],
"bgmap": [
],
"fgmap": [
[584,584,584,584,584,584,584,584,584,584,584,584,584,584, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,584, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,584, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,584, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,584, 0],
[584,584,584,584,584,584,584,584,584,584,584,584,584,584, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0,582,582,582, 0, 0,586, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0,582,582,582, 0, 0, 0,586,586,586, 0,146,146, 0],
[ 0,587,587,587,587,587,587, 0, 0, 0, 0, 0,146,146,146],
[ 0, 0, 0, 0, 0, 0,587,587, 0, 0, 0, 0,146,146,146],
[ 0, 0, 0, 0, 0, 0, 0,587,587, 0, 0,146,146,146,146],
[ 0, 0,581,581,581, 0, 0, 0, 0, 0, 0,146,146,146, 0],
[ 0, 0, 0, 0,581,581, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
],
"bg2map": [
],
"fg2map": [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70182,70183, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70190,70191, 0],
[ 0, 0,70136,70137,70138,70139, 0, 0, 0, 0, 0, 0,70198,70199, 0],
[ 0, 0,70144,70145,70146,70147, 0, 0, 0, 0, 0, 0,70206,70207, 0],
[ 0, 0,70152,70153,70154,70155, 0, 0, 0, 0, 0, 0,70214,70215, 0],
[ 0, 0,70160,70161,70162,70163, 0, 0, 0,70140,70141,70142,70143, 0, 0],
[ 0, 0,70168,70169,70170,70171, 0, 0, 0,70148,70149,70150,70151, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0,70156,70157,70158,70159, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0,70164,70165,70166,70167, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0,70172,70173,70174,70175, 0, 0]
]
}

View File

@ -1,39 +1,219 @@
main.floors.MT35=
{
"floorId": "MT35",
"title": "冰封雪原",
"name": "冰封雪原",
"width": 15,
"height": 15,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"cannotViewMap": false,
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"floorId": "MT35",
"title": "冰封雪原",
"name": "冰封雪原",
"width": 15,
"height": 15,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"cannotViewMap": false,
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {
"10,1": {
"trigger": "action",
"enable": true,
"noPass": null,
"displayDamage": true,
"opacity": 1,
"filter": {
"blur": 0,
"hue": 0,
"grayscale": 0,
"invert": false,
"shadow": 0
},
"data": [
"你来这干什么",
{
"type": "if",
"condition": "core.getBlock(10,1)",
"true": [
"把怪踢到这了,想打?",
"没门!",
"你别想过漏怪检测了,啊哈哈哈哈!"
]
}
]
},
"4,1": {
"trigger": "action",
"enable": true,
"noPass": null,
"displayDamage": true,
"opacity": 1,
"filter": {
"blur": 0,
"hue": 0,
"grayscale": 0,
"invert": false,
"shadow": 0
},
"data": [
"你来这干什么",
{
"type": "if",
"condition": "core.getBlock(4,1)",
"true": [
"把怪踢到这了,想打?",
"没门!",
"你别想过漏怪检测了,啊哈哈哈哈!"
]
}
]
},
"6,13": [
"前方漏怪检测会检测智慧小径的怪物是否清完,之后不可返回智慧小径"
],
"7,1": [
"这里是漏怪检测,会检测\r[gold]智慧小径\r[]区域是否有遗漏怪物",
{
"type": "function",
"function": "function(){\nconst enemy = core.getRemainEnemyString(core.floorIds.slice(30, 40));\nif (enemy.length === 0) {\n\tcore.insertAction(['当前无剩余怪物!', { \"type\": \"hide\", \"remove\": true }, ]);\n} else {\n\tcore.insertAction(enemy);\n}\n}"
}
],
"7,0": [
{
"type": "if",
"condition": "flag:inWinter2===true",
"true": [
{
"type": "changeFloor",
"floorId": "MT36",
"loc": [
7,
14
]
}
],
"false": [
{
"type": "setValue",
"name": "flag:inWinter2",
"value": "true"
},
{
"type": "function",
"function": "function(){\ncore.removeMaps('MT22', 'MT31', true);\n}"
},
{
"type": "changeFloor",
"floorId": "MT36",
"loc": [
7,
14
]
}
]
}
]
},
"changeFloor": {
"7,14": {
"floorId": "MT33",
"loc": [
9,
0
]
}
},
"beforeBattle": {},
"afterBattle": {
"7,9": [
{
"type": "setValue",
"name": "flag:door_MT35_3_9",
"operator": "+=",
"value": "1"
},
{
"type": "setValue",
"name": "flag:door_MT35_11_9",
"operator": "+=",
"value": "1"
}
]
},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {
"3,9": {
"0": {
"condition": "flag:door_MT35_3_9==1",
"currentFloor": true,
"priority": 0,
"delayExecute": false,
"multiExecute": false,
"data": [
{
"type": "openDoor"
},
{
"type": "setValue",
"name": "flag:door_MT35_3_9",
"operator": "=",
"value": "null"
}
]
},
"1": null
},
"11,9": {
"0": {
"condition": "flag:door_MT35_11_9==1",
"currentFloor": true,
"priority": 0,
"delayExecute": false,
"multiExecute": false,
"data": [
{
"type": "openDoor"
},
{
"type": "setValue",
"name": "flag:door_MT35_11_9",
"value": "null"
}
]
},
"1": null
}
},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[585,585,585,585,585,585,585, 91,585,585,585,585,585,585,585],
[ 0, 0, 0, 0, 0, 0,585,516,585, 0, 0, 0, 0, 0, 0],
[70064,70065,70065,70065,70065,70065,585,497,585,70065,70065,70065,70065,70065,70066],
[70072,70073,70073,70073,70073,70073, 0, 0, 0,70073,70073,70073,70073,70073,70074],
[70072,70073,70073,70073,70073,70073, 0, 0, 0,70073,70073,70073,70073,70073,70074],
[70072,70073,70073,70073,70073,70073, 0, 0, 0,70073,70073,70073,70073,70073,70074],
[70072,70073,70073,70073,70073,70073, 0, 0, 0,70073,70073,70073,70073,70073,70074],
[70080,70081,70081,70081,70081,70081, 0, 0, 0,70081,70081,70081,70081,70081,70082],
[147,147,147,147,147,147, 0, 0, 0,147,147,147,147,147,147],
[147,381, 33, 85,592,147,147,595,147,147,592, 85, 33,381,147],
[147, 34,376, 0,494, 34,492, 0,492, 34,494, 0,378, 34,147],
[147,274,147,147,147,147,147, 0,147,147,147,147,147,274,147],
[147, 33,147, 28,595, 34,603, 0,602, 34,590, 27,147, 33,147],
[147, 28,603, 34,147, 28,129, 0,147, 27,147, 34,602, 27,147],
[147,147,147,147,147,147,147, 93,147,147,147,147,147,147,147]
],
"bgmap": [
[70056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70058],
[70056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70058],
[70064,70054,70054,70054,70054,70054,70112,70113,70114,70054,70054,70054,70054,70054,70066],
[ 0, 0, 0, 0, 0, 0,70073,70073,70073, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70073,70073,70073, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70073,70073,70073, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70073,70073,70073, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70081,70081,70081, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
@ -42,4 +222,27 @@ main.floors.MT35=
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
],
"fgmap": [
],
"bg2map": [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70120,70121,70122, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70120,70121,70122, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70120,70121,70122, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70120,70121,70122, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70120,70121,70122, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70128,70129,70130, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
],
"fg2map": [
]
}

View File

@ -5,10 +5,10 @@ main.floors.empty=
"name": "13",
"width": 15,
"height": 15,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"cannotViewMap": false,
"canFlyTo": false,
"canFlyFrom": false,
"canUseQuickShop": false,
"cannotViewMap": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
@ -57,5 +57,6 @@ main.floors.empty=
],
"fg2map": [
]
],
"cannotMoveDirectly": false
}

View File

@ -232,7 +232,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
core.visitFloor(floorId);
}
}
if (floorId.startsWith('tower')) flags.layer = 0;
},
flyTo: function (toId, callback) {
// 楼层传送器的使用从当前楼层飞往toId
@ -403,8 +402,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
var money = guards.reduce(function (curr, g) {
return curr + core.material.enemys[g[2]].money;
}, enemy.money);
if (core.hasItem('coin')) money *= 2; // 幸运金币:双倍
if (core.hasFlag('curse')) money = 0; // 诅咒效果
core.status.hero.money += money;
core.status.hero.statistics.money += money;
@ -412,7 +409,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
var exp = guards.reduce(function (curr, g) {
return curr + core.material.enemys[g[2]].exp;
}, enemy.exp);
if (core.hasFlag('curse')) exp = 0;
core.status.hero.exp += exp;
core.status.hero.statistics.exp += exp;
@ -433,17 +429,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
// 事件的处理
var todo = [];
// 加点事件
var point =
guards.reduce(function (curr, g) {
return curr + core.material.enemys[g[2]].point;
}, enemy.point) || 0;
if (core.flags.enableAddPoint && point > 0) {
core.push(todo, [
{ type: 'insert', name: '加点事件', args: [point] }
]);
}
// 战后事件
if (core.status.floorId != null) {
core.push(
@ -453,26 +438,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
}
core.push(todo, enemy.afterBattle);
// 在这里增加其他的自定义事件需求
/*
if (enemyId=='xxx') {
core.push(todo, [
{"type": "...", ...},
]);
}
*/
// 如果事件不为空,将其插入
if (todo.length > 0) core.insertAction(todo, x, y);
// 因为removeBlock和hideBlock都会刷新状态栏因此将删除部分移动到这里并保证刷新只执行一次以提升效率
if (core.getBlock(x, y) != null) {
// 检查是否是重生怪物;如果是则仅隐藏不删除
if (core.hasSpecial(enemy.special, 23)) {
core.hideBlock(x, y);
} else {
core.removeBlock(x, y);
}
core.removeBlock(x, y);
} else {
core.updateStatusBar();
}
@ -817,8 +788,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
if (typeof enemy === 'string') enemy = core.material.enemys[enemy];
// 饥渴
if (core.hasSpecial(mon_special, 7))
if (core.hasSpecial(mon_special, 7)) {
mon_atk += (hero_atk * (enemy.hungry || 0)) / 100;
}
// 智慧之源
if (core.hasSpecial(mon_special, 14) && flags.hard == 2) {

View File

@ -561,5 +561,12 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"30113": {"cls":"tileset","id":"X30113","canPass":true},
"30121": {"cls":"tileset","id":"X30121","canPass":true},
"30196": {"cls":"tileset","id":"X30196","canPass":true},
"30204": {"cls":"tileset","id":"X30204","canPass":true}
"30204": {"cls":"tileset","id":"X30204","canPass":true},
"70065": {"cls":"tileset","id":"X70065","cannotIn":["down"],"cannotOut":["down"]},
"70112": {"cls":"tileset","id":"X70112","cannotIn":["down"],"cannotOut":["down"]},
"70114": {"cls":"tileset","id":"X70114","cannotIn":["down"],"cannotOut":["down"]},
"70120": {"cls":"tileset","id":"X70120","cannotIn":["up","down","left","right"]},
"70122": {"cls":"tileset","id":"X70122","cannotIn":["up","down","left","right"]},
"70128": {"cls":"tileset","id":"X70128","cannotIn":["up","down","left","right"]},
"70130": {"cls":"tileset","id":"X70130","cannotIn":["up","down","left","right"]}
}

View File

@ -563,6 +563,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
core.status.maps[floorId].forceDelete = true;
flags.__forceDelete__[floorId] = true;
}
deleteFlags(floorId);
deleted = true;
}
if (deleted && !main.replayChecking) {
@ -570,6 +571,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
}
};
function deleteFlags(floorId) {
delete flags[`jump_${floorId}`];
delete flags[`inte_${floorId}`];
delete flags[`loop_${floorId}`];
}
// 恢复楼层
// core.resumeMaps("MT1", "MT300") 恢复MT1~MT300之间的全部层
// core.resumeMaps("MT10") 只恢复MT10层
@ -4306,6 +4313,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
*/
this.slide = function (arr, delta) {
if (delta === 0) return arr;
delta %= arr.length;
if (delta > 0) {
arr.unshift(...arr.splice(arr.length - delta, delta));
return arr;
@ -4596,7 +4604,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
if (!core.getLocalStorage('showHalo', true)) return;
const halo = core.status.checkBlock.halo;
ctx.save();
ctx.globalAlpha = 0.1;
for (const [loc, range] of Object.entries(halo)) {
const [x, y] = loc.split(',').map(v => parseInt(v));
for (const r of range) {
@ -4626,10 +4633,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
ctx.fillStyle = color;
ctx.strokeStyle = border ?? color;
ctx.lineWidth = 1;
ctx.globalAlpha = 0.1;
ctx.fillRect(left * 32, top * 32, n * 32, n * 32);
ctx.globalAlpha = 0.6;
ctx.strokeRect(left * 32, top * 32, n * 32, n * 32);
ctx.globalAlpha = 0.1;
}
}
}

View File

@ -7,7 +7,7 @@
"<br>",
"<br>",
"1. <span style=\"color: yellow; font-weight: 700\">",
"本百科全书字数很多,可以选择性地阅读。</span>",
"本百科全书字数很多,可以选择性地阅读。</span>不过本条目最好可以全部阅读一遍。",
"<br>",
"<br>",
"2. 本百科全书的内容会<span style=\"color: gold\">随着游戏的推进而增加新内容</span>",
@ -34,7 +34,10 @@
"<br>",
"<br>",
"6. 本塔中几乎所有 ui 在打开时都会有一个0.6s的动画,如果不想要,可以在开头捡的系统设置里面关闭(默认关闭)。",
"同时,几乎所有 ui 的退出按钮都在左上角。"
"同时,几乎所有 ui 的退出按钮都在左上角。",
"<br>",
"<br>",
"7. 地图上显示的怪物临界有可能不准,当其与折线图有差异时,<span style=\"color: gold\">请以折线图为准</span>。"
]
},
"about": {

View File

@ -122,7 +122,7 @@ const allDef = ref(originDef);
const addAtk = ref(0);
const addDef = ref(0);
const originDamage = core.getDamageInfo(enemy, void 0, x.value, y.value);
const originDamage = core.getDamageInfo(enemy.id, void 0, x.value, y.value);
// core
const format = core.formatBigNumber;
@ -130,7 +130,7 @@ const ratio = core.status.thisMap.ratio;
const nowDamage = computed(() => {
const dam = core.getDamageInfo(
enemy,
enemy.id,
{
atk: core.getStatus('atk') + addAtk.value * ratio,
def: core.getStatus('def') + addDef.value * ratio

View File

@ -210,6 +210,9 @@ export class Chase {
this.ani.ticker.destroy();
delete flags.onChase;
delete flags.chase;
delete flags.chaseTime;
delete flags.chaseHard;
delete flags.chaseIndex;
flags.__lockViewport__ = false;
core.deleteCanvas('chasePath');
}

View File

@ -6,12 +6,15 @@ export const showFixed = ref(false);
let lastId: EnemyIds;
const show = debounce((ev: MouseEvent, mx: number, my: number, e: AllIds) => {
const show = debounce((ev: MouseEvent) => {
if (!window.flags) return;
if (!flags.mouseLoc) return;
flags.clientLoc = [ev.clientX, ev.clientY];
const [mx, my] = getLocFromMouseLoc(...flags.mouseLoc);
const e = core.getBlockId(mx, my);
if (e !== lastId) showFixed.value = false;
if (!e || !core.getClsFromId(e)?.startsWith('enemy')) return;
lastId = e as EnemyIds;
const enemy = core.material.enemys[e as EnemyIds];
const detail = getDetailedEnemy(enemy, mx, my);
@ -22,14 +25,12 @@ const show = debounce((ev: MouseEvent, mx: number, my: number, e: AllIds) => {
export default function init() {
const data = core.canvas.data.canvas;
data.addEventListener('mousemove', ev => {
if (!core.isPlaying()) return;
const [x, y] = flags.mouseLoc;
const mx = Math.round(x + core.bigmap.offsetX / 32);
const my = Math.round(y + core.bigmap.offsetY / 32);
if (!core.isPlaying() || core.status.lockControl) return;
const [mx, my] = getLocFromMouseLoc(...flags.mouseLoc);
const e = core.getBlockId(mx, my);
if (e !== lastId) showFixed.value = false;
if (!e) return;
show(ev, mx, my, e);
show(ev);
});
return {
@ -37,6 +38,12 @@ export default function init() {
};
}
export function getLocFromMouseLoc(x: number, y: number): LocArr {
const mx = Math.round(x + core.bigmap.offsetX / 32);
const my = Math.round(y + core.bigmap.offsetY / 32);
return [mx, my];
}
export function getDetailedEnemy<I extends EnemyIds>(
enemy: Enemy<I>,
x: number,
@ -45,12 +52,13 @@ export function getDetailedEnemy<I extends EnemyIds>(
): DetailedEnemy<I> {
const ratio = core.status.maps[floorId].ratio;
const enemyInfo = Object.assign(
core.getEnemyInfo(enemy, void 0, x, y),
core.getDamageInfo(enemy, void 0, x, y) ?? {},
enemy
{},
enemy,
core.getEnemyInfo(enemy, void 0, x, y, floorId),
core.getDamageInfo(enemy, void 0, x, y, floorId) ?? {}
);
const critical = core.nextCriticals(enemy, 1, x, y);
const defDamage = core.getDefDamage(enemy, ratio, x, y);
const critical = core.nextCriticals(enemy, 1, x, y, floorId);
const defDamage = core.getDefDamage(enemy, ratio, x, y, floorId);
const specialText = core.getSpecialText(enemyInfo);
let toShowSpecial = cloneDeep(specialText);
if (toShowSpecial.length > 2) {

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

@ -561,4 +561,11 @@ interface IdToCls {
X30121: 'tileset';
X30196: 'tileset';
X30204: 'tileset';
X70065: 'tileset';
X70112: 'tileset';
X70114: 'tileset';
X70120: 'tileset';
X70122: 'tileset';
X70128: 'tileset';
X70130: 'tileset';
}

14
src/source/maps.d.ts vendored
View File

@ -561,6 +561,13 @@ interface IdToNumber {
X30121: 30121;
X30196: 30196;
X30204: 30204;
X70065: 70065;
X70112: 70112;
X70114: 70114;
X70120: 70120;
X70122: 70122;
X70128: 70128;
X70130: 70130;
}
interface NumberToId {
1: 'yellowWall';
@ -1125,4 +1132,11 @@ interface NumberToId {
30121: 'X30121';
30196: 'X30196';
30204: 'X30204';
70065: 'X70065';
70112: 'X70112';
70114: 'X70114';
70120: 'X70120';
70122: 'X70122';
70128: 'X70128';
70130: 'X70130';
}

1
src/types/util.d.ts vendored
View File

@ -249,6 +249,7 @@ interface Utils {
* @param onMap
* @returns
*/
formatBigNumber<T extends string>(x: T, onMap?: number): T;
formatBigNumber(x: number | string, onMap?: number): string;
/**

View File

@ -364,6 +364,7 @@ function drawRight() {
*/
function draw() {
drawedThumbnail = {};
thumbnailLoc = {};
drawMap();
drawRight();
}