Compare commits
	
		
			No commits in common. "5b853dc5a8098d4edd9f0a7f229e9d70f67b2980" and "a6ba26e8b50a44e947e082c3e481a3de854c8795" have entirely different histories.
		
	
	
		
			5b853dc5a8
			...
			a6ba26e8b5
		
	
		
							
								
								
									
										2
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.js
									
									
									
									
									
								
							| @ -276,7 +276,7 @@ main.prototype.init = function (mode, callback) { | |||||||
|           coreData[t] = main[t]; |           coreData[t] = main[t]; | ||||||
|         }); |         }); | ||||||
|         main.core.init(coreData, callback); |         main.core.init(coreData, callback); | ||||||
|         core.resize(); |         main.core.resize(); | ||||||
|         // 自动放缩最大化
 |         // 自动放缩最大化
 | ||||||
|         if (!main.replayChecking) { |         if (!main.replayChecking) { | ||||||
|           if (core.getLocalStorage("autoScale") == null) { |           if (core.getLocalStorage("autoScale") == null) { | ||||||
|  | |||||||
| @ -82,19 +82,19 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = | |||||||
|       }); |       }); | ||||||
|     }, |     }, | ||||||
|         "lose": function (reason) { |         "lose": function (reason) { | ||||||
| 	// 游戏失败事件
 |       // 游戏失败事件
 | ||||||
| 	core.ui.closePanel(); |       core.ui.closePanel(); | ||||||
| 	var replaying = core.isReplaying(); |       var replaying = core.isReplaying(); | ||||||
| 	core.stopReplay(); |       core.stopReplay(); | ||||||
| 	core.waitHeroToStop(function () { |       core.waitHeroToStop(function () { | ||||||
| 		core.drawText( |         core.drawText( | ||||||
| 			["\t[" + (reason || "结局1") + "]你死了。\n如题。"], |           ["\t[" + (reason || "结局1") + "]你死了。\n如题。"], | ||||||
| 			function () { |           function () { | ||||||
| 				core.events.gameOver(null, replaying); |             core.events.gameOver(null, replaying); | ||||||
| 			} |           } | ||||||
| 		); |         ); | ||||||
| 	}); |       }); | ||||||
| }, |     }, | ||||||
|         "changingFloor": function (floorId, heroLoc) { |         "changingFloor": function (floorId, heroLoc) { | ||||||
|       // 正在切换楼层过程中执行的操作;此函数的执行时间是“屏幕完全变黑“的那一刻
 |       // 正在切换楼层过程中执行的操作;此函数的执行时间是“屏幕完全变黑“的那一刻
 | ||||||
|       // floorId为要切换到的楼层ID;heroLoc表示勇士切换到的位置
 |       // floorId为要切换到的楼层ID;heroLoc表示勇士切换到的位置
 | ||||||
| @ -1804,70 +1804,70 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = | |||||||
|       }; |       }; | ||||||
|     }, |     }, | ||||||
|         "moveOneStep": function (callback) { |         "moveOneStep": function (callback) { | ||||||
| 	// 勇士每走一步后执行的操作。callback为行走完毕后的回调
 |       // 勇士每走一步后执行的操作。callback为行走完毕后的回调
 | ||||||
| 	// 这个函数执行在“刚走完”的时候,即还没有检查该点的事件和领域伤害等。
 |       // 这个函数执行在“刚走完”的时候,即还没有检查该点的事件和领域伤害等。
 | ||||||
| 	// 请注意:瞬间移动不会执行该函数。如果要控制能否瞬间移动有三种方法:
 |       // 请注意:瞬间移动不会执行该函数。如果要控制能否瞬间移动有三种方法:
 | ||||||
| 	// 1. 将全塔属性中的cannotMoveDirectly这个开关勾上,即可在全塔中全程禁止使用瞬移。
 |       // 1. 将全塔属性中的cannotMoveDirectly这个开关勾上,即可在全塔中全程禁止使用瞬移。
 | ||||||
| 	// 2, 将楼层属性中的cannotMoveDirectly这个开关勾上,即禁止在该层楼使用瞬移。
 |       // 2, 将楼层属性中的cannotMoveDirectly这个开关勾上,即禁止在该层楼使用瞬移。
 | ||||||
| 	// 3. 将flag:cannotMoveDirectly置为true,即可使用flag控制在某段剧情范围内禁止瞬移。
 |       // 3. 将flag:cannotMoveDirectly置为true,即可使用flag控制在某段剧情范围内禁止瞬移。
 | ||||||
| 
 | 
 | ||||||
| 	// 增加步数
 |       // 增加步数
 | ||||||
| 	core.status.hero.steps++; |       core.status.hero.steps++; | ||||||
| 	// 更新跟随者状态,并绘制
 |       // 更新跟随者状态,并绘制
 | ||||||
| 	core.updateFollowers(); |       core.updateFollowers(); | ||||||
| 	core.drawHero(); |       core.drawHero(); | ||||||
| 	// 检查中毒状态的扣血和死亡
 |       // 检查中毒状态的扣血和死亡
 | ||||||
| 	if (core.hasFlag("poison")) { |       if (core.hasFlag("poison")) { | ||||||
| 		core.status.hero.statistics.poisonDamage += core.values.poisonDamage; |         core.status.hero.statistics.poisonDamage += core.values.poisonDamage; | ||||||
| 		core.status.hero.hp -= core.values.poisonDamage; |         core.status.hero.hp -= core.values.poisonDamage; | ||||||
| 		if (core.status.hero.hp <= 0) { |         if (core.status.hero.hp <= 0) { | ||||||
| 			core.status.hero.hp = 0; |           core.status.hero.hp = 0; | ||||||
| 			core.updateStatusBar(false, true); |           core.updateStatusBar(false, true); | ||||||
| 			core.events.lose(); |           core.events.lose(); | ||||||
| 			return; |           return; | ||||||
| 		} else { |         } else { | ||||||
| 			core.updateStatusBar(false, true); |           core.updateStatusBar(false, true); | ||||||
| 		} |         } | ||||||
| 	} |       } | ||||||
| 
 | 
 | ||||||
| 	// 从v2.7开始,每一步行走不会再刷新状态栏。
 |       // 从v2.7开始,每一步行走不会再刷新状态栏。
 | ||||||
| 	// 如果有特殊要求(如每走一步都加buff之类),可手动取消注释下面这一句:
 |       // 如果有特殊要求(如每走一步都加buff之类),可手动取消注释下面这一句:
 | ||||||
| 	// core.updateStatusBar(true, true);
 |       // core.updateStatusBar(true, true);
 | ||||||
| 
 | 
 | ||||||
| 	// 检查自动事件
 |       // 检查自动事件
 | ||||||
| 	core.checkAutoEvents(); |       core.checkAutoEvents(); | ||||||
| 
 | 
 | ||||||
| 	// ------ 检查目标点事件 ------ //
 |       // ------ 检查目标点事件 ------ //
 | ||||||
| 	// 无事件的道具(如血瓶)需要优先于阻激夹域判定
 |       // 无事件的道具(如血瓶)需要优先于阻激夹域判定
 | ||||||
| 	var nowx = core.getHeroLoc("x"), |       var nowx = core.getHeroLoc("x"), | ||||||
| 		nowy = core.getHeroLoc("y"); |         nowy = core.getHeroLoc("y"); | ||||||
| 	var block = core.getBlock(nowx, nowy); |       var block = core.getBlock(nowx, nowy); | ||||||
| 	var hasTrigger = false; |       var hasTrigger = false; | ||||||
| 	if ( |       if ( | ||||||
| 		block != null && |         block != null && | ||||||
| 		block.event.trigger == "getItem" && |         block.event.trigger == "getItem" && | ||||||
| 		!core.floors[core.status.floorId].afterGetItem[nowx + "," + nowy] |         !core.floors[core.status.floorId].afterGetItem[nowx + "," + nowy] | ||||||
| 	) { |       ) { | ||||||
| 		hasTrigger = true; |         hasTrigger = true; | ||||||
| 		core.trigger(nowx, nowy, callback); |         core.trigger(nowx, nowy, callback); | ||||||
| 	} |       } | ||||||
| 	// 执行目标点的阻激夹域事件
 |       // 执行目标点的阻激夹域事件
 | ||||||
| 	core.checkBlock(); |       core.checkBlock(); | ||||||
| 
 | 
 | ||||||
| 	// 执行目标点的script和事件
 |       // 执行目标点的script和事件
 | ||||||
| 	if (!hasTrigger) core.trigger(nowx, nowy, callback); |       if (!hasTrigger) core.trigger(nowx, nowy, callback); | ||||||
| 
 | 
 | ||||||
| 	// 检查该点是否是滑冰
 |       // 检查该点是否是滑冰
 | ||||||
| 	if (core.onSki()) { |       if (core.onSki()) { | ||||||
| 		// 延迟到事件最后执行,因为这之前可能有阻激夹域动画
 |         // 延迟到事件最后执行,因为这之前可能有阻激夹域动画
 | ||||||
| 		core.insertAction({ type: "moveAction" }, null, null, null, true); |         core.insertAction({ type: "moveAction" }, null, null, null, true); | ||||||
| 	} |       } | ||||||
| 
 | 
 | ||||||
| 	// ------ 检查目标点事件 END ------ //
 |       // ------ 检查目标点事件 END ------ //
 | ||||||
| 
 | 
 | ||||||
| 	// 如需强行终止行走可以在这里条件判定:
 |       // 如需强行终止行走可以在这里条件判定:
 | ||||||
| 	// core.stopAutomaticRoute();
 |       // core.stopAutomaticRoute();
 | ||||||
| }, |     }, | ||||||
|         "moveDirectly": function (x, y, ignoreSteps) { |         "moveDirectly": function (x, y, ignoreSteps) { | ||||||
|       // 瞬间移动;x,y为要瞬间移动的点;ignoreSteps为减少的步数,可能之前已经被计算过
 |       // 瞬间移动;x,y为要瞬间移动的点;ignoreSteps为减少的步数,可能之前已经被计算过
 | ||||||
|       // 返回true代表成功瞬移,false代表没有成功瞬移
 |       // 返回true代表成功瞬移,false代表没有成功瞬移
 | ||||||
|  | |||||||
							
								
								
									
										1729
									
								
								project/plugins.js
									
									
									
									
									
								
							
							
						
						
									
										1729
									
								
								project/plugins.js
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user