var events_c12a15a8_c380_4b28_8144_256cba95f760 = 
{
	"commonEvent": {
		"加点事件": [
			{
				"type": "comment",
				"text": "通过传参，flag:arg1 表示当前应该的加点数值"
			},
			{
				"type": "choices",
				"choices": [
					{
						"text": "攻击+${1*flag:arg1}",
						"action": [
							{
								"type": "setValue",
								"name": "status:atk",
								"operator": "+=",
								"value": "1*flag:arg1"
							}
						]
					},
					{
						"text": "防御+${2*flag:arg1}",
						"action": [
							{
								"type": "setValue",
								"name": "status:def",
								"operator": "+=",
								"value": "2*flag:arg1"
							}
						]
					},
					{
						"text": "生命+${200*flag:arg1}",
						"action": [
							{
								"type": "setValue",
								"name": "status:hp",
								"operator": "+=",
								"value": "200*flag:arg1"
							}
						]
					}
				]
			}
		],
		"回收钥匙商店": [
			{
				"type": "comment",
				"text": "此事件在全局商店中被引用了(全局商店keyShop)"
			},
			{
				"type": "comment",
				"text": "解除引用前勿删除此事件"
			},
			{
				"type": "comment",
				"text": "玩家在快捷列表（V键）中可以使用本公共事件"
			},
			{
				"type": "while",
				"condition": "1",
				"data": [
					{
						"type": "choices",
						"text": "\t[商人,trader]你有多余的钥匙想要出售吗？",
						"choices": [
							{
								"text": "黄钥匙（10金币）",
								"color": [
									255,
									255,
									0,
									1
								],
								"action": [
									{
										"type": "if",
										"condition": "item:yellowKey >= 1",
										"true": [
											{
												"type": "setValue",
												"name": "item:yellowKey",
												"operator": "-=",
												"value": "1"
											},
											{
												"type": "setValue",
												"name": "status:money",
												"operator": "+=",
												"value": "10"
											}
										],
										"false": [
											"\t[商人,trader]你没有黄钥匙！"
										]
									}
								]
							},
							{
								"text": "蓝钥匙（50金币）",
								"color": [
									0,
									0,
									255,
									1
								],
								"action": [
									{
										"type": "if",
										"condition": "item:blueKey >= 1",
										"true": [
											{
												"type": "setValue",
												"name": "item:blueKey",
												"operator": "-=",
												"value": "1"
											},
											{
												"type": "setValue",
												"name": "status:money",
												"operator": "+=",
												"value": "50"
											}
										],
										"false": [
											"\t[商人,trader]你没有蓝钥匙！"
										]
									}
								]
							},
							{
								"text": "离开",
								"action": [
									{
										"type": "exit"
									}
								]
							}
						]
					}
				]
			}
		],
		"迷宫生成": [
			{
				"type": "function",
				"function": "function(){\ncore.nextFloor()\ncore.resetHero()\ncore.createMaze(19, \"MT2\")\ncore.clearMap('shopText')\n}"
			},
			{
				"type": "changeFloor",
				"floorId": "MT2",
				"loc": [
					1,
					1
				]
			}
		],
		"前往商店": [
			{
				"type": "changeFloor",
				"floorId": "MT1",
				"loc": [
					1,
					1
				]
			},
			{
				"type": "function",
				"function": "function(){\ncore.resetHero()\ncore.createShop('MT1')\n}"
			}
		],
		"剩怪检测": [
			{
				"type": "function",
				"function": "function(){\nlet count = 0\nfor (let i = 0; i < core.bigmap.width; i++) {\n\tfor (let j = 0; j < core.bigmap.height; j++) {\n\t\tif (core.getBlockCls(i, j) === 'enemys' || core.getBlockCls(i, j) === 'enemy48') {\n\t\t\tcount++\n\t\t}\n\t}\n}\ncore.setFlag('leftMonster', count)\n}"
			},
			{
				"type": "if",
				"condition": "((flag:leftMonster>=15)&&core.hasItem('I371'))",
				"true": [
					{
						"type": "setValue",
						"name": "flag:permanentMdef",
						"operator": "+=",
						"value": "(item:I371*15)"
					},
					{
						"type": "tip",
						"text": "魔防永久+${item:I371*15}",
						"icon": "I371"
					}
				]
			}
		],
		"攻击灵梦": [
			{
				"type": "insert",
				"name": "怪物攻击"
			},
			{
				"type": "insert",
				"name": "怪物攻击"
			},
			{
				"type": "insert",
				"name": "怪物攻击"
			}
		],
		"怪物攻击": [
			{
				"type": "if",
				"condition": "true",
				"_collapsed": true,
				"true": [
					{
						"type": "if",
						"condition": "(core.getBlockCls(core.status.hero.loc.x+1,core.status.hero.loc.y)==='enemys')",
						"true": [
							{
								"type": "animate",
								"name": "amazed",
								"loc": [
									"core.status.hero.loc.x+1",
									"core.status.hero.loc.y"
								],
								"async": true
							},
							{
								"type": "changePos",
								"direction": "right"
							},
							{
								"type": "moveAction"
							}
						]
					},
					{
						"type": "if",
						"condition": "(core.getBlockCls(core.status.hero.loc.x-1,core.status.hero.loc.y)==='enemys')",
						"true": [
							{
								"type": "animate",
								"name": "amazed",
								"loc": [
									"core.status.hero.loc.x-1",
									"core.status.hero.loc.y"
								],
								"async": true
							},
							{
								"type": "changePos",
								"direction": "left"
							},
							{
								"type": "moveAction"
							}
						]
					},
					{
						"type": "if",
						"condition": "(core.getBlockCls(core.status.hero.loc.x,core.status.hero.loc.y+1)==='enemys')",
						"true": [
							{
								"type": "animate",
								"name": "amazed",
								"loc": [
									"core.status.hero.loc.x",
									"core.status.hero.loc.y+1"
								],
								"async": true
							},
							{
								"type": "changePos",
								"direction": "down"
							},
							{
								"type": "moveAction"
							}
						]
					},
					{
						"type": "if",
						"condition": "(core.getBlockCls(core.status.hero.loc.x,core.status.hero.loc.y-1)==='enemys')",
						"true": [
							{
								"type": "animate",
								"name": "amazed",
								"loc": [
									"core.status.hero.loc.x",
									"core.status.hero.loc.y-1"
								],
								"async": true
							},
							{
								"type": "changePos",
								"direction": "up"
							},
							{
								"type": "moveAction"
							}
						]
					}
				]
			},
			{
				"type": "function",
				"function": "function(){\nfor (let x = 0; x < core.bigmap.width; x++) {\n\tfor (let y = 0; y < core.bigmap.height; y++) {\n\t\tif (core.getBlockCls(x, y) === 'enemys' && !core.hasSpecial(core.getBlockId(x, y), 30)) {\n\t\t\tlet road = core.findMonsterPath(core.exportMapToArray(), y, x, core.status.hero.loc.y, core.status.hero.loc.x)\n\t\t\tif (road === false) continue;\n\t\t\tlet road2 = []\n\t\t\troad2[0] = road[0]\n\t\t\tif (road2[0] === 'up') {\n\t\t\t\tcore.setBlock(331, x, y - 1)\n\t\t\t}\n\t\t\tif (road2[0] === 'down') {\n\t\t\t\tcore.setBlock(331, x, y + 1)\n\t\t\t}\n\t\t\tif (road2[0] === 'left') {\n\t\t\t\tcore.setBlock(331, x - 1, y)\n\t\t\t}\n\t\t\tif (road2[0] === 'right') {\n\t\t\t\tcore.setBlock(331, x + 1, y)\n\t\t\t}\n\t\t\tcore.moveBlock(x, y, road2, 500, true)\n\t\t}\n\t}\n}\n}"
			},
			{
				"type": "waitAsync"
			}
		]
	}
}