Remove type:revisit
This commit is contained in:
parent
1faad822fb
commit
8c5fc76d8c
@ -336,7 +336,6 @@ action
|
|||||||
| trigger_s
|
| trigger_s
|
||||||
| insert_1_s
|
| insert_1_s
|
||||||
| insert_2_s
|
| insert_2_s
|
||||||
| revisit_s
|
|
||||||
| exit_s
|
| exit_s
|
||||||
| setBlock_s
|
| setBlock_s
|
||||||
| showFloorImg_s
|
| showFloorImg_s
|
||||||
@ -780,18 +779,6 @@ var code = '{"type": "insert", "loc": ['+PosString_0+','+PosString_1+']'+Event_L
|
|||||||
return code;
|
return code;
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
revisit_s
|
|
||||||
: '重启当前事件' Newline
|
|
||||||
|
|
||||||
|
|
||||||
/* revisit_s
|
|
||||||
tooltip : revisit: 立即重启当前事件
|
|
||||||
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=revisit%EF%BC%9A%E7%AB%8B%E5%8D%B3%E9%87%8D%E5%90%AF%E5%BD%93%E5%89%8D%E4%BA%8B%E4%BB%B6
|
|
||||||
colour : this.eventColor
|
|
||||||
var code = '{"type": "revisit"},\n';
|
|
||||||
return code;
|
|
||||||
*/;
|
|
||||||
|
|
||||||
exit_s
|
exit_s
|
||||||
: '立刻结束当前事件' Newline
|
: '立刻结束当前事件' Newline
|
||||||
|
|
||||||
@ -3509,10 +3496,6 @@ ActionParser.prototype.parseAction = function() {
|
|||||||
this.next = MotaActionBlocks['waitAsync_s'].xmlText([
|
this.next = MotaActionBlocks['waitAsync_s'].xmlText([
|
||||||
this.next]);
|
this.next]);
|
||||||
break;
|
break;
|
||||||
case "revisit": // 立刻重新执行该事件
|
|
||||||
this.next = MotaActionBlocks['revisit_s'].xmlText([
|
|
||||||
this.next]);
|
|
||||||
break;
|
|
||||||
case "callBook": // 呼出怪物手册
|
case "callBook": // 呼出怪物手册
|
||||||
this.next = MotaActionBlocks['callBook_s'].xmlText([
|
this.next = MotaActionBlocks['callBook_s'].xmlText([
|
||||||
this.next]);
|
this.next]);
|
||||||
|
|||||||
@ -149,7 +149,6 @@ editor_blockly = function () {
|
|||||||
MotaActionBlocks['dowhile_s'].xmlText(),
|
MotaActionBlocks['dowhile_s'].xmlText(),
|
||||||
MotaActionBlocks['break_s'].xmlText(),
|
MotaActionBlocks['break_s'].xmlText(),
|
||||||
MotaActionBlocks['continue_s'].xmlText(),
|
MotaActionBlocks['continue_s'].xmlText(),
|
||||||
MotaActionBlocks['revisit_s'].xmlText(),
|
|
||||||
MotaActionBlocks['exit_s'].xmlText(),
|
MotaActionBlocks['exit_s'].xmlText(),
|
||||||
MotaActionBlocks['trigger_s'].xmlText(),
|
MotaActionBlocks['trigger_s'].xmlText(),
|
||||||
MotaActionBlocks['insert_1_s'].xmlText(),
|
MotaActionBlocks['insert_1_s'].xmlText(),
|
||||||
@ -242,6 +241,7 @@ editor_blockly = function () {
|
|||||||
}),
|
}),
|
||||||
'<label text="商店购买属性/钥匙"></label>',
|
'<label text="商店购买属性/钥匙"></label>',
|
||||||
MotaActionFunctions.actionParser.parse([
|
MotaActionFunctions.actionParser.parse([
|
||||||
|
{"type": "while", "condition": "true", "data": [
|
||||||
{"type": "choices", "text": "\\t[老人,man]少年,你需要钥匙吗?\\n我这里有大把的!",
|
{"type": "choices", "text": "\\t[老人,man]少年,你需要钥匙吗?\\n我这里有大把的!",
|
||||||
"choices": [
|
"choices": [
|
||||||
{"text": "黄钥匙(\\\${9+flag:shop_times}金币)", "color": [255,255,0,1], "action": [
|
{"text": "黄钥匙(\\\${9+flag:shop_times}金币)", "color": [255,255,0,1], "action": [
|
||||||
@ -252,20 +252,19 @@ editor_blockly = function () {
|
|||||||
],
|
],
|
||||||
"false": [
|
"false": [
|
||||||
"\\t[老人,man]你的金钱不足!",
|
"\\t[老人,man]你的金钱不足!",
|
||||||
{"type": "revisit"}
|
{"type": "continue"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]},
|
]},
|
||||||
{"text": "蓝钥匙(\\\${18+2*flag:shop_times}金币)", "color": [0,0,255,1], "action": [
|
{"text": "蓝钥匙(\\\${18+2*flag:shop_times}金币)", "color": [0,0,255,1], "action": [
|
||||||
]},
|
]},
|
||||||
{"text": "离开", "action": [
|
{"text": "离开", "action": [
|
||||||
{"type": "exit"}
|
{"type": "break"}
|
||||||
]}
|
]}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{"type": "setValue", "name": "flag:shop_times", "operator": "+=", "value": "1"},
|
{"type": "setValue", "name": "flag:shop_times", "operator": "+=", "value": "1"}
|
||||||
{"type": "revisit"}
|
]}], 'event'),
|
||||||
], 'event'),
|
|
||||||
'<label text="战前剧情"></label>',
|
'<label text="战前剧情"></label>',
|
||||||
MotaActionFunctions.actionParser.parse({
|
MotaActionFunctions.actionParser.parse({
|
||||||
"trigger": "action",
|
"trigger": "action",
|
||||||
@ -750,12 +749,12 @@ function omitedcheckUpdateFunction(event) {
|
|||||||
'hide_s',
|
'hide_s',
|
||||||
'setValue_s',
|
'setValue_s',
|
||||||
'if_s',
|
'if_s',
|
||||||
|
'while_s',
|
||||||
'battle_s',
|
'battle_s',
|
||||||
'openDoor_s',
|
'openDoor_s',
|
||||||
'choices_s',
|
'choices_s',
|
||||||
'setText_s',
|
'setText_s',
|
||||||
'exit_s',
|
'exit_s',
|
||||||
'revisit_s',
|
|
||||||
'sleep_s',
|
'sleep_s',
|
||||||
'setBlock_s',
|
'setBlock_s',
|
||||||
'insert_1_s'
|
'insert_1_s'
|
||||||
|
|||||||
@ -2063,13 +2063,6 @@ events.prototype._action_waitAsync = function (data, x, y, prefix) {
|
|||||||
}, 50);
|
}, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
events.prototype._action_revisit = function (data, x, y, prefix) {
|
|
||||||
var block = core.getBlock(x, y);
|
|
||||||
if (block != null && block.block.event.trigger == 'action')
|
|
||||||
this.setEvents(block.block.event.data);
|
|
||||||
core.doAction();
|
|
||||||
}
|
|
||||||
|
|
||||||
events.prototype._action_callBook = function (data, x, y, prefix) {
|
events.prototype._action_callBook = function (data, x, y, prefix) {
|
||||||
if (core.isReplaying() || !core.hasItem('book')) {
|
if (core.isReplaying() || !core.hasItem('book')) {
|
||||||
core.doAction();
|
core.doAction();
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
main.floors.MT0=
|
main.floors.MT0=
|
||||||
{
|
{
|
||||||
"floorId": "MT0",
|
"floorId": "MT0",
|
||||||
"title": "主塔 0 层",
|
"title": "主塔 0 层",
|
||||||
"name": "0",
|
"name": "0",
|
||||||
"canFlyTo": true,
|
"canFlyTo": true,
|
||||||
"canUseQuickShop": true,
|
"canUseQuickShop": true,
|
||||||
"cannotViewMap": false,
|
"cannotViewMap": false,
|
||||||
"defaultGround": "ground",
|
"defaultGround": "ground",
|
||||||
"images": [],
|
"images": [],
|
||||||
"item_ratio": 1,
|
"item_ratio": 1,
|
||||||
"map": [
|
"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],
|
||||||
@ -24,18 +24,21 @@ main.floors.MT0=
|
|||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||||
],
|
],
|
||||||
"firstArrive": [],
|
"firstArrive": [],
|
||||||
"parallelDo": "",
|
"parallelDo": "",
|
||||||
"events": {},
|
"events": {},
|
||||||
"changeFloor": {},
|
"changeFloor": {},
|
||||||
"afterBattle": {},
|
"afterBattle": {},
|
||||||
"afterGetItem": {},
|
"afterGetItem": {},
|
||||||
"afterOpenDoor": {},
|
"afterOpenDoor": {},
|
||||||
"cannotMove": {},
|
"cannotMove": {},
|
||||||
"bgmap": [
|
"bgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
"fgmap": [
|
"fgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
"width": 13,
|
||||||
|
"height": 13,
|
||||||
|
"autoEvent": {}
|
||||||
}
|
}
|
||||||
@ -1,15 +1,15 @@
|
|||||||
main.floors.sample0=
|
main.floors.sample0=
|
||||||
{
|
{
|
||||||
"floorId": "sample0",
|
"floorId": "sample0",
|
||||||
"title": "样板 0 层",
|
"title": "样板 0 层",
|
||||||
"name": "0",
|
"name": "0",
|
||||||
"canFlyTo": true,
|
"canFlyTo": true,
|
||||||
"canUseQuickShop": true,
|
"canUseQuickShop": true,
|
||||||
"defaultGround": "ground",
|
"defaultGround": "ground",
|
||||||
"images": [],
|
"images": [],
|
||||||
"bgm": "bgm.mp3",
|
"bgm": "bgm.mp3",
|
||||||
"item_ratio": 1,
|
"item_ratio": 1,
|
||||||
"map": [
|
"map": [
|
||||||
[ 0, 0,220, 0, 0, 20, 87, 3, 65, 64, 44, 43, 42],
|
[ 0, 0,220, 0, 0, 20, 87, 3, 65, 64, 44, 43, 42],
|
||||||
[ 0,246, 0,246, 0, 20, 0, 3, 58, 59, 60, 61, 41],
|
[ 0,246, 0,246, 0, 20, 0, 3, 58, 59, 60, 61, 41],
|
||||||
[219, 0, 0, 0,219, 20, 0, 3, 57, 26, 62, 63, 40],
|
[219, 0, 0, 0,219, 20, 0, 3, 57, 26, 62, 63, 40],
|
||||||
@ -24,7 +24,7 @@ main.floors.sample0=
|
|||||||
[ 87, 11, 12, 13, 14, 4, 4, 2, 2, 2,122, 2, 2],
|
[ 87, 11, 12, 13, 14, 4, 4, 2, 2, 2,122, 2, 2],
|
||||||
[ 88, 89, 90, 91, 92, 93, 94, 2, 81, 82, 83, 84, 86]
|
[ 88, 89, 90, 91, 92, 93, 94, 2, 81, 82, 83, 84, 86]
|
||||||
],
|
],
|
||||||
"firstArrive": [
|
"firstArrive": [
|
||||||
{
|
{
|
||||||
"type": "setText",
|
"type": "setText",
|
||||||
"background": "winskin.png",
|
"background": "winskin.png",
|
||||||
@ -34,8 +34,8 @@ main.floors.sample0=
|
|||||||
"\t[hero]\b[up,hero]我是谁?我从哪来?我又要到哪去?",
|
"\t[hero]\b[up,hero]我是谁?我从哪来?我又要到哪去?",
|
||||||
"\t[仙子,fairy]你问我...?我也不知道啊...",
|
"\t[仙子,fairy]你问我...?我也不知道啊...",
|
||||||
"本层主要对道具、门、怪物等进行介绍,有关事件的各种信息在下一层会有更为详细的说明。"
|
"本层主要对道具、门、怪物等进行介绍,有关事件的各种信息在下一层会有更为详细的说明。"
|
||||||
],
|
],
|
||||||
"events": {
|
"events": {
|
||||||
"10,9": [
|
"10,9": [
|
||||||
"\t[老人,man]这些是本样板支持的所有的道具。\n\n道具分为四类:items, constants, tools,equips。\nitems 为即捡即用类道具,例如宝石、血瓶、剑盾等。\nconstants 为永久道具,例如怪物手册、楼层传送器、幸运金币等。\ntools 为消耗类道具,例如破墙镐、炸弹、中心对称飞行器等。\nequips 为装备,例如剑盾等。",
|
"\t[老人,man]这些是本样板支持的所有的道具。\n\n道具分为四类:items, constants, tools,equips。\nitems 为即捡即用类道具,例如宝石、血瓶、剑盾等。\nconstants 为永久道具,例如怪物手册、楼层传送器、幸运金币等。\ntools 为消耗类道具,例如破墙镐、炸弹、中心对称飞行器等。\nequips 为装备,例如剑盾等。",
|
||||||
"\t[老人,man]\b[up]有关道具效果,定义在items.js中。\n目前大多数道具已有默认行为,如有自定义的需求则需在items.js中修改代码。",
|
"\t[老人,man]\b[up]有关道具效果,定义在items.js中。\n目前大多数道具已有默认行为,如有自定义的需求则需在items.js中修改代码。",
|
||||||
@ -96,8 +96,8 @@ main.floors.sample0=
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeFloor": {
|
"changeFloor": {
|
||||||
"6,0": {
|
"6,0": {
|
||||||
"floorId": "sample1",
|
"floorId": "sample1",
|
||||||
"stair": "downFloor"
|
"stair": "downFloor"
|
||||||
@ -162,13 +162,13 @@ main.floors.sample0=
|
|||||||
"direction": "left",
|
"direction": "left",
|
||||||
"time": 1000
|
"time": 1000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"afterBattle": {
|
"afterBattle": {
|
||||||
"2,6": [
|
"2,6": [
|
||||||
"\t[ghostSkeleton]不可能,你怎么可能打败我!\n(一个打败怪物触发的事件)"
|
"\t[ghostSkeleton]不可能,你怎么可能打败我!\n(一个打败怪物触发的事件)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"afterGetItem": {
|
"afterGetItem": {
|
||||||
"11,8": [
|
"11,8": [
|
||||||
"由于状态栏放不下,绿钥匙和铁门钥匙均视为tools,放入工具栏中。\n碰到绿门和铁门仍然会自动使用开门。"
|
"由于状态栏放不下,绿钥匙和铁门钥匙均视为tools,放入工具栏中。\n碰到绿门和铁门仍然会自动使用开门。"
|
||||||
],
|
],
|
||||||
@ -206,17 +206,20 @@ main.floors.sample0=
|
|||||||
"12,5": [
|
"12,5": [
|
||||||
"装备的种类由全塔属性中的equipName决定,type的值就是该类型在equipName中的位次,例如默认情况下equiptype为0代表武器,同时只有type为0的装备的animate属性生效"
|
"装备的种类由全塔属性中的equipName决定,type的值就是该类型在equipName中的位次,例如默认情况下equiptype为0代表武器,同时只有type为0的装备的animate属性生效"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"afterOpenDoor": {
|
"afterOpenDoor": {
|
||||||
"11,12": [
|
"11,12": [
|
||||||
"你开了一个绿门,触发了一个afterOpenDoor事件"
|
"你开了一个绿门,触发了一个afterOpenDoor事件"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"cannotMove": {},
|
"cannotMove": {},
|
||||||
"bgmap": [
|
"bgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
"fgmap": [
|
"fgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
"width": 13,
|
||||||
|
"height": 13,
|
||||||
|
"autoEvent": {}
|
||||||
}
|
}
|
||||||
@ -1,25 +1,25 @@
|
|||||||
main.floors.sample1=
|
main.floors.sample1=
|
||||||
{
|
{
|
||||||
"floorId": "sample1",
|
"floorId": "sample1",
|
||||||
"title": "样板 1 层",
|
"title": "样板 1 层",
|
||||||
"name": "1",
|
"name": "1",
|
||||||
"canFlyTo": true,
|
"canFlyTo": true,
|
||||||
"canUseQuickShop": true,
|
"canUseQuickShop": true,
|
||||||
"defaultGround": "grass",
|
"defaultGround": "grass",
|
||||||
"images": [
|
"images": [
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
"bg.jpg",
|
"bg.jpg",
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"weather": [
|
"weather": [
|
||||||
"snow",
|
"snow",
|
||||||
6
|
6
|
||||||
],
|
],
|
||||||
"item_ratio": 1,
|
"item_ratio": 1,
|
||||||
"map": [
|
"map": [
|
||||||
[ 7,131, 8,152, 9,130, 10,152,166,165,132,165,166],
|
[ 7,131, 8,152, 9,130, 10,152,166,165,132,165,166],
|
||||||
[ 0, 0, 0, 0, 0, 0, 0,152,165,164, 0,162,165],
|
[ 0, 0, 0, 0, 0, 0, 0,152,165,164, 0,162,165],
|
||||||
[152,152,152,152,121,152,152,152, 0, 0,229, 0, 0],
|
[152,152,152,152,121,152,152,152, 0, 0,229, 0, 0],
|
||||||
@ -34,14 +34,14 @@ main.floors.sample1=
|
|||||||
[ 1, 0,123, 1, 0, 20,124, 0,121, 0,122, 0,126],
|
[ 1, 0,123, 1, 0, 20,124, 0,121, 0,122, 0,126],
|
||||||
[ 1, 0, 0, 1, 88, 20, 86, 0, 0, 0, 0, 0, 0]
|
[ 1, 0, 0, 1, 88, 20, 86, 0, 0, 0, 0, 0, 0]
|
||||||
],
|
],
|
||||||
"firstArrive": [],
|
"firstArrive": [],
|
||||||
"events": {
|
"events": {
|
||||||
"4,10": [
|
"4,10": [
|
||||||
"\t[样板提示]本层楼将会对各类事件进行介绍。",
|
"\t[样板提示]本层楼将会对各类事件进行介绍。",
|
||||||
"左边是一个仿50层的陷阱做法,上方是商店、快捷商店的使用方法,右上是一个典型的杀怪开门的例子,右下是各类可能的NPC事件。",
|
"左边是一个仿50层的陷阱做法,上方是商店、快捷商店的使用方法,右上是一个典型的杀怪开门的例子,右下是各类可能的NPC事件。",
|
||||||
"本样板目前支持的事件列表大致有:\ntext: 显示一段文字(比如你现在正在看到的)\ntip: 左上角显示提示\nshow: 使一个事件有效(可见、可被交互)\nhide: 使一个事件失效(不可见、不可被交互)\ntrigger: 触发另一个地点的事件\nanimate: 显示动画\nbattle: 强制和某怪物战斗\nopenDoor: 无需钥匙开门(例如机关门、暗墙)",
|
"本样板目前支持的事件列表大致有:\ntext: 显示一段文字(比如你现在正在看到的)\ntip: 左上角显示提示\nshow: 使一个事件有效(可见、可被交互)\nhide: 使一个事件失效(不可见、不可被交互)\ntrigger: 触发另一个地点的事件\nanimate: 显示动画\nbattle: 强制和某怪物战斗\nopenDoor: 无需钥匙开门(例如机关门、暗墙)",
|
||||||
"openShop: 打开一个全局商店\ndisableShop: 禁用一个全局商店\nchangeFloor: 传送勇士到某层某位置\nchangePos: 传送勇士到当层某位置;转向\nshowImage: 显示图片\nsetFg: 更改画面色调\nsetWeather: 更改天气\nmove: 移动事件效果\nmoveHero: 移动勇士效果\nplayBgm: 播放某个背景音乐\npauseBgm: 暂停背景音乐\nresumeBgm: 恢复背景音乐的播放\nplaySound: 播放某个音频",
|
"openShop: 打开一个全局商店\ndisableShop: 禁用一个全局商店\nchangeFloor: 传送勇士到某层某位置\nchangePos: 传送勇士到当层某位置;转向\nshowImage: 显示图片\nsetFg: 更改画面色调\nsetWeather: 更改天气\nmove: 移动事件效果\nmoveHero: 移动勇士效果\nplayBgm: 播放某个背景音乐\npauseBgm: 暂停背景音乐\nresumeBgm: 恢复背景音乐的播放\nplaySound: 播放某个音频",
|
||||||
"if: 条件判断\nchoices: 提供选项\nsetValue: 设置勇士属性道具,或某个变量/flag\nupdate: 更新状态栏和地图显伤\nwin: 获得胜利(游戏通关)\nlose: 游戏失败\nsleep: 等待多少毫秒\nexit: 立刻结束当前事件\nrevisit: 立刻结束事件并重新触发\nfunction: 自定义JS脚本\n\n更多支持的事件还在编写中,欢迎您宝贵的意见。",
|
"if: 条件判断\nchoices: 提供选项\nsetValue: 设置勇士属性道具,或某个变量/flag\nupdate: 更新状态栏和地图显伤\nwin: 获得胜利(游戏通关)\nlose: 游戏失败\nsleep: 等待多少毫秒\nexit: 立刻结束当前事件\nfunction: 自定义JS脚本\n\n更多支持的事件还在编写中,欢迎您宝贵的意见。",
|
||||||
"有关各事件的样例,可参见本层一些NPC的写法。\n所有事件样例本层都有介绍。\n\n一个自定义事件处理完后,需要调用{\"type\": \"hide\"}该事件才不会再次出现。",
|
"有关各事件的样例,可参见本层一些NPC的写法。\n所有事件样例本层都有介绍。\n\n一个自定义事件处理完后,需要调用{\"type\": \"hide\"}该事件才不会再次出现。",
|
||||||
{
|
{
|
||||||
"type": "hide"
|
"type": "hide"
|
||||||
@ -409,18 +409,24 @@ main.floors.sample1=
|
|||||||
],
|
],
|
||||||
"10,11": [
|
"10,11": [
|
||||||
{
|
{
|
||||||
"type": "if",
|
"type": "while",
|
||||||
"condition": "flag:woman_times==0",
|
"condition": "true",
|
||||||
"true": [
|
"data": [
|
||||||
|
{
|
||||||
|
"type": "switch",
|
||||||
|
"condition": "flag:woman_times",
|
||||||
|
"caseList": [
|
||||||
|
{
|
||||||
|
"case": "0",
|
||||||
|
"action": [
|
||||||
"\t[老人,woman]这是个很复杂的例子,它将教会你如何使用if 语句进行条件判断,以及 choices 提供选项来供用户进行选择。",
|
"\t[老人,woman]这是个很复杂的例子,它将教会你如何使用if 语句进行条件判断,以及 choices 提供选项来供用户进行选择。",
|
||||||
"\t[老人,woman]第一次访问我将显示这段文字;从第二次开始将会向你出售钥匙。\n钥匙价格将随着访问次数递增。\n当合计出售了七把钥匙后,将送你一把大黄门钥匙,并消失不再出现。",
|
"\t[老人,woman]第一次访问我将显示这段文字;从第二次开始将会向你出售钥匙。\n钥匙价格将随着访问次数递增。\n当合计出售了七把钥匙后,将送你一把大黄门钥匙,并消失不再出现。",
|
||||||
"\t[老人,woman]这部分的逻辑比较长,请细心看样板的写法,是很容易看懂并理解的。"
|
"\t[老人,woman]这部分的逻辑比较长,请细心看样板的写法,是很容易看懂并理解的。"
|
||||||
],
|
]
|
||||||
"false": [
|
},
|
||||||
{
|
{
|
||||||
"type": "if",
|
"case": "8",
|
||||||
"condition": "flag:woman_times==8",
|
"action": [
|
||||||
"true": [
|
|
||||||
"\t[老人,woman]你购买的钥匙已经够多了,再继续卖给你的话我会有危险的。",
|
"\t[老人,woman]你购买的钥匙已经够多了,再继续卖给你的话我会有危险的。",
|
||||||
"\t[老人,woman]看在你贡献给我这么多钱的份上,送你一把大黄门钥匙吧,希望你能好好用它。",
|
"\t[老人,woman]看在你贡献给我这么多钱的份上,送你一把大黄门钥匙吧,希望你能好好用它。",
|
||||||
{
|
{
|
||||||
@ -437,8 +443,11 @@ main.floors.sample1=
|
|||||||
{
|
{
|
||||||
"type": "exit"
|
"type": "exit"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"false": [
|
},
|
||||||
|
{
|
||||||
|
"case": "default",
|
||||||
|
"action": [
|
||||||
{
|
{
|
||||||
"type": "choices",
|
"type": "choices",
|
||||||
"text": "\t[老人,woman]少年,你需要钥匙吗?\n我这里有大把的!",
|
"text": "\t[老人,woman]少年,你需要钥匙吗?\n我这里有大把的!",
|
||||||
@ -464,10 +473,7 @@ main.floors.sample1=
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"false": [
|
"false": [
|
||||||
"\t[老人,woman]你的金钱不足!",
|
"\t[老人,woman]你的金钱不足!"
|
||||||
{
|
|
||||||
"type": "revisit"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -490,13 +496,13 @@ main.floors.sample1=
|
|||||||
"name": "item:blueKey",
|
"name": "item:blueKey",
|
||||||
"operator": "+=",
|
"operator": "+=",
|
||||||
"value": "1"
|
"value": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "continue"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"false": [
|
"false": [
|
||||||
"\t[老人,woman]你的金钱不足!",
|
"\t[老人,woman]你的金钱不足!"
|
||||||
{
|
|
||||||
"type": "revisit"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -524,7 +530,7 @@ main.floors.sample1=
|
|||||||
"false": [
|
"false": [
|
||||||
"\t[老人,woman]你的金钱不足!",
|
"\t[老人,woman]你的金钱不足!",
|
||||||
{
|
{
|
||||||
"type": "revisit"
|
"type": "continue"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -549,9 +555,8 @@ main.floors.sample1=
|
|||||||
"name": "flag:woman_times",
|
"name": "flag:woman_times",
|
||||||
"operator": "+=",
|
"operator": "+=",
|
||||||
"value": "1"
|
"value": "1"
|
||||||
},
|
}
|
||||||
{
|
]
|
||||||
"type": "revisit"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"12,11": [
|
"12,11": [
|
||||||
@ -580,9 +585,9 @@ main.floors.sample1=
|
|||||||
"false": []
|
"false": []
|
||||||
},
|
},
|
||||||
"\t[老人,womanMagician]具体可参见样板中本事件的写法。"
|
"\t[老人,womanMagician]具体可参见样板中本事件的写法。"
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
"changeFloor": {
|
"changeFloor": {
|
||||||
"4,12": {
|
"4,12": {
|
||||||
"floorId": "sample0",
|
"floorId": "sample0",
|
||||||
"loc": [
|
"loc": [
|
||||||
@ -596,8 +601,8 @@ main.floors.sample1=
|
|||||||
"direction": "up"
|
"direction": "up"
|
||||||
},
|
},
|
||||||
"10,12": null
|
"10,12": null
|
||||||
},
|
},
|
||||||
"afterBattle": {
|
"afterBattle": {
|
||||||
"9,6": [
|
"9,6": [
|
||||||
{
|
{
|
||||||
"type": "setValue",
|
"type": "setValue",
|
||||||
@ -614,17 +619,17 @@ main.floors.sample1=
|
|||||||
"value": "1"
|
"value": "1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"afterGetItem": {},
|
"afterGetItem": {},
|
||||||
"afterOpenDoor": {},
|
"afterOpenDoor": {},
|
||||||
"cannotMove": {},
|
"cannotMove": {},
|
||||||
"bgmap": [
|
"bgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
"fgmap": [
|
"fgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
"autoEvent": {
|
"autoEvent": {
|
||||||
"10,5": {
|
"10,5": {
|
||||||
"0": {
|
"0": {
|
||||||
"condition": "flag:door==2",
|
"condition": "flag:door==2",
|
||||||
@ -636,9 +641,10 @@ main.floors.sample1=
|
|||||||
{
|
{
|
||||||
"type": "openDoor"
|
"type": "openDoor"
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"width": 13,
|
||||||
|
"height": 13
|
||||||
}
|
}
|
||||||
@ -1,15 +1,15 @@
|
|||||||
main.floors.sample2=
|
main.floors.sample2=
|
||||||
{
|
{
|
||||||
"floorId": "sample2",
|
"floorId": "sample2",
|
||||||
"title": "样板 2 层",
|
"title": "样板 2 层",
|
||||||
"name": "2",
|
"name": "2",
|
||||||
"canFlyTo": true,
|
"canFlyTo": true,
|
||||||
"canUseQuickShop": true,
|
"canUseQuickShop": true,
|
||||||
"cannotViewMap": false,
|
"cannotViewMap": false,
|
||||||
"defaultGround": "ground",
|
"defaultGround": "ground",
|
||||||
"images": [],
|
"images": [],
|
||||||
"item_ratio": 1,
|
"item_ratio": 1,
|
||||||
"map": [
|
"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, 1,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[ 0, 0, 1,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
@ -37,18 +37,18 @@ main.floors.sample2=
|
|||||||
[ 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0],
|
[ 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0],
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||||
],
|
],
|
||||||
"width": 26,
|
"width": 26,
|
||||||
"height": 26,
|
"height": 26,
|
||||||
"firstArrive": [],
|
"firstArrive": [],
|
||||||
"events": {
|
"events": {
|
||||||
"3,2": [
|
"3,2": [
|
||||||
"123"
|
"123"
|
||||||
],
|
],
|
||||||
"12,12": [
|
"12,12": [
|
||||||
"234"
|
"234"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"changeFloor": {
|
"changeFloor": {
|
||||||
"6,10": {
|
"6,10": {
|
||||||
"floorId": "sample1",
|
"floorId": "sample1",
|
||||||
"stair": "upFloor"
|
"stair": "upFloor"
|
||||||
@ -57,16 +57,17 @@ main.floors.sample2=
|
|||||||
"floorId": "sample3",
|
"floorId": "sample3",
|
||||||
"stair": "downFloor"
|
"stair": "downFloor"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"afterBattle": {},
|
"afterBattle": {},
|
||||||
"afterGetItem": {},
|
"afterGetItem": {},
|
||||||
"afterOpenDoor": {},
|
"afterOpenDoor": {},
|
||||||
"cannotMove": {},
|
"cannotMove": {},
|
||||||
"upFloor": null,
|
"upFloor": null,
|
||||||
"bgmap": [
|
"bgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
"fgmap": [
|
"fgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
"autoEvent": {}
|
||||||
}
|
}
|
||||||
@ -1,25 +1,25 @@
|
|||||||
main.floors.sample3=
|
main.floors.sample3=
|
||||||
{
|
{
|
||||||
"floorId": "sample3",
|
"floorId": "sample3",
|
||||||
"title": "主塔 40 层",
|
"title": "主塔 40 层",
|
||||||
"name": "40",
|
"name": "40",
|
||||||
"canFlyTo": false,
|
"canFlyTo": false,
|
||||||
"canUseQuickShop": true,
|
"canUseQuickShop": true,
|
||||||
"defaultGround": "snowGround",
|
"defaultGround": "snowGround",
|
||||||
"images": [],
|
"images": [],
|
||||||
"color": [
|
"color": [
|
||||||
255,
|
255,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0.3
|
0.3
|
||||||
],
|
],
|
||||||
"weather": [
|
"weather": [
|
||||||
"rain",
|
"rain",
|
||||||
10
|
10
|
||||||
],
|
],
|
||||||
"bgm": "bgm.mp3",
|
"bgm": "bgm.mp3",
|
||||||
"item_ratio": 1,
|
"item_ratio": 1,
|
||||||
"map": [
|
"map": [
|
||||||
[ 5, 5, 5, 5, 5, 5, 87, 5, 5, 5, 5, 5, 5],
|
[ 5, 5, 5, 5, 5, 5, 87, 5, 5, 5, 5, 5, 5],
|
||||||
[ 5, 4, 4, 4, 4, 1, 0, 1, 4, 4, 4, 4, 5],
|
[ 5, 4, 4, 4, 4, 1, 0, 1, 4, 4, 4, 4, 5],
|
||||||
[ 5, 4, 4, 4, 4, 1, 85, 1, 4, 4, 4, 4, 5],
|
[ 5, 4, 4, 4, 4, 1, 85, 1, 4, 4, 4, 4, 5],
|
||||||
@ -34,10 +34,10 @@ main.floors.sample3=
|
|||||||
[ 5, 4, 4, 4, 4, 4, 85, 4, 4, 4, 4, 4, 5],
|
[ 5, 4, 4, 4, 4, 4, 85, 4, 4, 4, 4, 4, 5],
|
||||||
[ 5, 5, 5, 5, 5, 5, 88, 5, 5, 5, 5, 5, 5]
|
[ 5, 5, 5, 5, 5, 5, 88, 5, 5, 5, 5, 5, 5]
|
||||||
],
|
],
|
||||||
"firstArrive": [
|
"firstArrive": [
|
||||||
"\t[实战!]本楼将尝试复刻《宿命的旋律》40F剧情。"
|
"\t[实战!]本楼将尝试复刻《宿命的旋律》40F剧情。"
|
||||||
],
|
],
|
||||||
"events": {
|
"events": {
|
||||||
"6,11": {
|
"6,11": {
|
||||||
"enable": false,
|
"enable": false,
|
||||||
"data": []
|
"data": []
|
||||||
@ -906,8 +906,8 @@ main.floors.sample3=
|
|||||||
"enable": false,
|
"enable": false,
|
||||||
"data": []
|
"data": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeFloor": {
|
"changeFloor": {
|
||||||
"6,0": {
|
"6,0": {
|
||||||
"floorId": "sample3",
|
"floorId": "sample3",
|
||||||
"stair": "upFloor"
|
"stair": "upFloor"
|
||||||
@ -916,8 +916,8 @@ main.floors.sample3=
|
|||||||
"floorId": "sample2",
|
"floorId": "sample2",
|
||||||
"stair": "upFloor"
|
"stair": "upFloor"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"afterBattle": {
|
"afterBattle": {
|
||||||
"6,4": [
|
"6,4": [
|
||||||
"\t[blackMagician]天真!你以为这样就能战胜我吗?",
|
"\t[blackMagician]天真!你以为这样就能战胜我吗?",
|
||||||
{
|
{
|
||||||
@ -992,14 +992,17 @@ main.floors.sample3=
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"afterGetItem": {},
|
"afterGetItem": {},
|
||||||
"afterOpenDoor": {},
|
"afterOpenDoor": {},
|
||||||
"cannotMove": {},
|
"cannotMove": {},
|
||||||
"bgmap": [
|
"bgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
"fgmap": [
|
"fgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
"width": 13,
|
||||||
|
"height": 13,
|
||||||
|
"autoEvent": {}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user