Compare commits

...

2 Commits

Author SHA1 Message Date
b3bfb467d0 Merge branch 'noAnimate' into hasAnimate 2023-06-14 23:03:18 +08:00
d6b59f8af2 34层门,21层录像 2023-06-14 23:02:22 +08:00
5 changed files with 64 additions and 279 deletions

View File

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

View File

@ -99,238 +99,7 @@ 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": {}, "cannotMove": {},
"ratio": 8, "ratio": 8,
"bgmap": [ "bgmap": [

View File

@ -438,7 +438,47 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
}, },
"afterOpenDoor": function (doorId, x, y) { "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 = []; var todo = [];
// 检查该点的开门后事件 // 检查该点的开门后事件
if (core.status.floorId) { if (core.status.floorId) {

View File

@ -423,9 +423,9 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"535": {"cls":"items","id":"I535"}, "535": {"cls":"items","id":"I535"},
"536": {"cls":"items","id":"I536"}, "536": {"cls":"items","id":"I536"},
"537": {"cls":"items","id":"I537"}, "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":"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}"}, "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":"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}"}, "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":"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}"}, "540": {"cls":"animates","id":"A540","doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"redKey":1}},"trigger":"openDoor","animate":1,"script":""},
"541": {"cls":"animates","id":"A541"}, "541": {"cls":"animates","id":"A541"},
"542": {"cls":"animates","id":"A542"}, "542": {"cls":"animates","id":"A542"},
"543": {"cls":"animates","id":"A543"}, "543": {"cls":"animates","id":"A543"},

View File

@ -1545,26 +1545,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
return ids.indexOf(blockId) >= 0; 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 () { "drawLight": function () {