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();
|
||||||
|
|||||||
@ -38,4 +38,7 @@ main.floors.MT0=
|
|||||||
"fgmap": [
|
"fgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
"width": 13,
|
||||||
|
"height": 13,
|
||||||
|
"autoEvent": {}
|
||||||
}
|
}
|
||||||
@ -219,4 +219,7 @@ main.floors.sample0=
|
|||||||
"fgmap": [
|
"fgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
"width": 13,
|
||||||
|
"height": 13,
|
||||||
|
"autoEvent": {}
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@ main.floors.sample1=
|
|||||||
"左边是一个仿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,7 +585,7 @@ main.floors.sample1=
|
|||||||
"false": []
|
"false": []
|
||||||
},
|
},
|
||||||
"\t[老人,womanMagician]具体可参见样板中本事件的写法。"
|
"\t[老人,womanMagician]具体可参见样板中本事件的写法。"
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
"changeFloor": {
|
"changeFloor": {
|
||||||
"4,12": {
|
"4,12": {
|
||||||
@ -636,9 +641,10 @@ main.floors.sample1=
|
|||||||
{
|
{
|
||||||
"type": "openDoor"
|
"type": "openDoor"
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"width": 13,
|
||||||
|
"height": 13
|
||||||
}
|
}
|
||||||
@ -69,4 +69,5 @@ main.floors.sample2=
|
|||||||
"fgmap": [
|
"fgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
"autoEvent": {}
|
||||||
}
|
}
|
||||||
@ -1002,4 +1002,7 @@ main.floors.sample3=
|
|||||||
"fgmap": [
|
"fgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
"width": 13,
|
||||||
|
"height": 13,
|
||||||
|
"autoEvent": {}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user