Compare commits

..

No commits in common. "b3bfb467d067706765655869307cb7fb79f13017" and "c1004a7f3b819a82e8f46f2c8988acf0bdbd1fad" have entirely different histories.

5 changed files with 279 additions and 64 deletions

View File

@ -49,6 +49,10 @@ main.floors.MT21=
{
"type": "if",
"condition": "core.isReplaying()",
"true": [
{
"type": "if",
"condition": "switch:A",
"true": [
{
"type": "moveHero",
@ -57,6 +61,8 @@ main.floors.MT21=
]
}
]
}
]
},
{
"type": "setValue",

View File

@ -99,7 +99,238 @@ main.floors.MT34=
}
]
},
"afterOpenDoor": {},
"afterOpenDoor": {
"5,4": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"9,4": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"9,6": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"9,8": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"9,10": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"10,9": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"8,9": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"6,9": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"4,9": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"5,10": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"5,8": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"5,6": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"4,5": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"6,5": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"8,5": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"10,5": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"7,4": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"7,6": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"7,8": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"7,10": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"6,7": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"10,7": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
],
"4,7": [
{
"type": "insert",
"name": "34door"
},
{
"type": "hide",
"remove": true
}
]
},
"cannotMove": {},
"ratio": 8,
"bgmap": [

View File

@ -438,47 +438,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
},
"afterOpenDoor": function (doorId, x, y) {
// 开一个门后触发的事件
if (core.status.floorId == "MT34") {
let doorInfo = {
"5,4": 1,
"7,4": 2,
"9,4": 0,
"4,5": 2,
"6,5": 1,
"8,5": 0,
"10,5": 2,
"5,6": 0,
"7,6": 1,
"9,6": 2,
"4,7": 1,
"6,7": 2,
"8,7": 1,
"10,7": 1,
"5,8": 0,
"7,8": 0,
"9,8": 2,
"4,9": 1,
"6,9": 1,
"8,9": 1,
"10,9": 1,
"5,10": 2,
"7,10": 0,
"9,10": 1
},
doorIds = ['A538', 'A539', 'A540'];
core.addFlag("_MT34OpenDoors_", 1);
for (let loc in doorInfo) {
let [dx, dy] = loc.split(',');
dx = parseInt(dx)
dy = parseInt(dy)
if (x == dx && y == dy) continue;
let calIndex = (core.getFlag("_MT34OpenDoors_", 0) + doorInfo[loc]) % doorIds.length;
core.setBlock(doorIds[calIndex], dx, dy);
}
}
var todo = [];
// 检查该点的开门后事件
if (core.status.floorId) {

View File

@ -423,9 +423,9 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"535": {"cls":"items","id":"I535"},
"536": {"cls":"items","id":"I536"},
"537": {"cls":"items","id":"I537"},
"538": {"cls":"animates","id":"A538","doorInfo":{"time":160,"openSound":"door.ogg","closeSound":"door.ogg","keys":{"yellowKey":1}},"trigger":"openDoor","animate":1,"script":""},
"539": {"cls":"animates","id":"A539","doorInfo":{"time":160,"openSound":"door.ogg","closeSound":"door.ogg","keys":{"blueKey":1}},"trigger":"openDoor","animate":1,"script":""},
"540": {"cls":"animates","id":"A540","doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"redKey":1}},"trigger":"openDoor","animate":1,"script":""},
"538": {"cls":"animates","id":"A538","doorInfo":{"time":160,"openSound":"door.ogg","closeSound":"door.ogg","keys":{"yellowKey":1}},"trigger":"openDoor","animate":1,"script":"if (core.itemCount('yellowKey') > 0) {\n\tcore.mydoor34();\n\tflags.door_34 = { x: core.nextX(), y: core.nextY(), door: core.getBlockId(core.nextX(), core.nextY()) }\n}"},
"539": {"cls":"animates","id":"A539","doorInfo":{"time":160,"openSound":"door.ogg","closeSound":"door.ogg","keys":{"blueKey":1}},"trigger":"openDoor","animate":1,"script":"if (core.itemCount('blueKey') > 0) {\n\tcore.mydoor34();\n\tflags.door_34 = { x: core.nextX(), y: core.nextY(), door: core.getBlockId(core.nextX(), core.nextY()) }\n}"},
"540": {"cls":"animates","id":"A540","doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"redKey":1}},"trigger":"openDoor","animate":1,"script":"if (core.itemCount('redKey') > 0) {\n\tcore.mydoor34();\n\tflags.door_34 = { x: core.nextX(), y: core.nextY(), door: core.getBlockId(core.nextX(), core.nextY()) }\n}"},
"541": {"cls":"animates","id":"A541"},
"542": {"cls":"animates","id":"A542"},
"543": {"cls":"animates","id":"A543"},

View File

@ -1545,8 +1545,26 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
return ids.indexOf(blockId) >= 0;
}
core.mydoor34 = function () {
if (flags.door_34) {
var x = flags.door_34.x,
y = flags.door_34.y;
switch (flags.door_34.door) {
case 'A538':
core.setBlock('A539', x, y);
break;
case 'A539':
core.setBlock('A540', x, y);
break;
case 'A540':
core.setBlock('A538', x, y);
break;
}
}
}
},
"drawLight": function () {