Compare commits
	
		
			No commits in common. "362314055806e1aa9fac1f003edd005c6574c3f5" and "2b8e9d25b0e80a4714557e360b4fb9b90d859392" have entirely different histories.
		
	
	
		
			3623140558
			...
			2b8e9d25b0
		
	
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -32,23 +32,6 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { | ||||
| 					"_docs": "道具类别", | ||||
| 					"_data": "items(宝石、血瓶) constants(永久物品) tools(消耗道具) equips(装备)" | ||||
| 				}, | ||||
| 				"equipCls": { | ||||
| 					"_leaf": true, | ||||
| 					"_type": "select", | ||||
| 					"_select": { | ||||
| 						"values": [ | ||||
| 							"单手剑", | ||||
| 							"法杖", | ||||
| 							"双手剑", | ||||
| 							"匕首", | ||||
| 							"盾牌", | ||||
| 							"护具", | ||||
| 							"饰品" | ||||
| 						] | ||||
| 					}, | ||||
| 					"_docs": "装备类别", | ||||
| 					"_data": "单手剑作为副手时主手必须为单手剑,匕首作为副手时主手武器必须为单手剑、法杖、匕首之一,盾牌仅可作为副手使用且主手必须为单手剑、法杖之一" | ||||
| 				}, | ||||
| 				"name": { | ||||
| 					"_leaf": true, | ||||
| 					"_type": "textarea", | ||||
| @ -187,23 +170,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { | ||||
| 				"def": { | ||||
| 					"_leaf": true, | ||||
| 					"_type": "textarea", | ||||
| 					"_data": "物理防御力" | ||||
| 				}, | ||||
| 				"mdef": { | ||||
| 					"_leaf": true, | ||||
| 					"_type": "textarea", | ||||
| 					"_data": "魔法防御力" | ||||
| 				}, | ||||
| 				"speed": { | ||||
| 					"_leaf": true, | ||||
| 					"_type": "textarea", | ||||
| 					"_data": "速度" | ||||
| 				}, | ||||
| 				"magic": { | ||||
| 					"_leaf": true, | ||||
| 					"_type": "checkbox", | ||||
| 					"_docs": "是否为魔法攻击", | ||||
| 					"_data": "勾选以魔法攻击计算,不勾选以物理攻击计算" | ||||
| 					"_data": "防御力" | ||||
| 				}, | ||||
| 				"money": { | ||||
| 					"_leaf": true, | ||||
|  | ||||
| @ -257,48 +257,17 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { | ||||
| 						"atk": { | ||||
| 							"_leaf": true, | ||||
| 							"_type": "textarea", | ||||
| 							"_data": "攻击" | ||||
| 							"_data": "初始攻击" | ||||
| 						}, | ||||
| 						"def": { | ||||
| 							"_leaf": true, | ||||
| 							"_type": "textarea", | ||||
| 							"_data": "物理防御" | ||||
| 							"_data": "初始防御" | ||||
| 						}, | ||||
| 						"mdef": { | ||||
| 							"_leaf": true, | ||||
| 							"_type": "textarea", | ||||
| 							"_data": "魔法防御" | ||||
| 						}, | ||||
| 						"speed": { | ||||
| 							"_leaf": true, | ||||
| 							"_type": "textarea", | ||||
| 							"_data": "攻击速度" | ||||
| 						}, | ||||
| 						"str": { | ||||
| 							"_leaf": true, | ||||
| 							"_type": "textarea", | ||||
| 							"_data": "力量" | ||||
| 						}, | ||||
| 						"agi": { | ||||
| 							"_leaf": true, | ||||
| 							"_type": "textarea", | ||||
| 							"_data": "敏捷" | ||||
| 						}, | ||||
| 						"int": { | ||||
| 							"_leaf": true, | ||||
| 							"_type": "textarea", | ||||
| 							"_data": "智力" | ||||
| 						}, | ||||
| 						"con": { | ||||
| 							"_leaf": true, | ||||
| 							"_type": "textarea", | ||||
| 							"_data": "体质" | ||||
| 						}, | ||||
| 						"magic": { | ||||
| 							"_leaf": true, | ||||
| 							"_type": "checkbox", | ||||
| 							"_docs": "攻击类型", | ||||
| 							"_data": "攻击类型是否是魔法" | ||||
| 							"_data": "初始护盾" | ||||
| 						}, | ||||
| 						"money": { | ||||
| 							"_leaf": true, | ||||
|  | ||||
| @ -239,9 +239,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = | ||||
| 		"levelChoose": null, | ||||
| 		"equipName": [ | ||||
| 			"武器", | ||||
| 			"武器", | ||||
| 			"防具", | ||||
| 			"饰品" | ||||
| 			"盾牌" | ||||
| 		], | ||||
| 		"startBgm": "theme.mp3", | ||||
| 		"styles": { | ||||
| @ -317,14 +315,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = | ||||
| 				"useBetweenLight": true | ||||
| 			}, | ||||
| 			"followers": [], | ||||
| 			"steps": 0, | ||||
| 			"matk": 0, | ||||
| 			"speed": 0, | ||||
| 			"str": 10, | ||||
| 			"agi": 10, | ||||
| 			"int": 10, | ||||
| 			"con": 10, | ||||
| 			"magic": false | ||||
| 			"steps": 0 | ||||
| 		}, | ||||
| 		"startCanvas": [ | ||||
| 			{ | ||||
|  | ||||
| @ -10,7 +10,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = | ||||
| 	"vampire": {"name":"冥灵魔王","hp":888,"atk":888,"def":888,"money":888,"exp":888,"point":0,"special":[6],"n":8}, | ||||
| 	"skeleton": {"name":"骷髅人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, | ||||
| 	"skeletonCaptain": {"name":"骷髅队长","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, | ||||
| 	"zombie": {"name":"兽人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0,"magic":false}, | ||||
| 	"zombie": {"name":"兽人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, | ||||
| 	"zombieKnight": {"name":"兽人武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0}, | ||||
| 	"rock": {"name":"石头人","hp":50,"atk":50,"def":0,"money":3,"exp":0,"point":0,"special":3}, | ||||
| 	"bluePriest": {"name":"初级法师","hp":100,"atk":120,"def":0,"money":3,"exp":0,"point":1,"special":[9]}, | ||||
|  | ||||
| @ -492,7 +492,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = | ||||
| 			// 名字和描述可以直接写字符串,也可以写个function将怪物传进去
 | ||||
| 			return [ | ||||
| 				[1, "先攻", "怪物首先攻击", "#ffcc33"], | ||||
| 				[2, "魔攻", "怪物无视角色的防御", "#bbb0ff"], | ||||
| 				[3, "坚固", "怪物防御不小于角色攻击-1", "#c0b088"], | ||||
| 				[4, "2连击", "怪物每回合攻击2次", "#ffee77"], | ||||
| 				[5, "3连击", "怪物每回合攻击3次", "#ffee77"], | ||||
| 				[6, function (enemy) { return (enemy.n || '') + "连击"; }, function (enemy) { return "怪物每回合攻击" + (enemy.n || 4) + "次"; }, "#ffee77"], | ||||
| 				[7, "破甲", function (enemy) { return "战斗前,怪物附加角色防御的" + Math.floor(100 * (enemy.breakArmor || core.values.breakArmor || 0)) + "%作为伤害"; }, "#88c0ff"], | ||||
| 				[8, "反击", function (enemy) { return "战斗时,怪物每回合附加角色攻击的" + Math.floor(100 * (enemy.counterAttack || core.values.counterAttack || 0)) + "%作为伤害,无视角色防御"; }, "#ffaa44"], | ||||
| @ -516,7 +519,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = | ||||
| 				[26, "支援", "当周围一圈的怪物受到攻击时将上前支援,并组成小队战斗。", "#77c0b6", 1], | ||||
| 				[27, "捕捉", function (enemy) { return "当走到怪物周围" + (enemy.zoneSquare ? "九宫格" : "十字") + "时会强制进行战斗。"; }, "#c0ddbb"] | ||||
| 			]; | ||||
| }, | ||||
| 		}, | ||||
|         "getEnemyInfo": function (enemy, hero, x, y, floorId) { | ||||
| 			// 获得某个怪物变化后的数据;该函数将被伤害计算和怪物手册使用
 | ||||
| 			// 例如:坚固、模仿、仿攻等等
 | ||||
| @ -639,7 +642,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = | ||||
| 				"special": mon_special, | ||||
| 				"guards": guards, // 返回支援情况
 | ||||
| 			}; | ||||
| }, | ||||
| 		}, | ||||
|         "getDamageInfo": function (enemy, hero, x, y, floorId) { | ||||
| 			// 获得战斗伤害信息(实际伤害计算函数)
 | ||||
| 			// 
 | ||||
| @ -703,12 +706,15 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = | ||||
| 
 | ||||
| 			// 每回合怪物对勇士造成的战斗伤害
 | ||||
| 			var per_damage = mon_atk - hero_def; | ||||
| 
 | ||||
| 			// 魔攻:战斗伤害就是怪物攻击力
 | ||||
| 			if (core.hasSpecial(mon_special, 2)) per_damage = mon_atk; | ||||
| 			// 战斗伤害不能为负值
 | ||||
| 			if (per_damage < 0) per_damage = 0; | ||||
| 
 | ||||
| 	// 连击
 | ||||
| 	if (core.hasSpecial(mon_special, 6)) per_damage *= (enemy.n || 2); | ||||
| 			// 2连击 & 3连击 & N连击
 | ||||
| 			if (core.hasSpecial(mon_special, 4)) per_damage *= 2; | ||||
| 			if (core.hasSpecial(mon_special, 5)) per_damage *= 3; | ||||
| 			if (core.hasSpecial(mon_special, 6)) per_damage *= (enemy.n || 4); | ||||
| 
 | ||||
| 			// 每回合的反击伤害;反击是按照勇士的攻击次数来计算回合
 | ||||
| 			var counterDamage = 0; | ||||
| @ -794,7 +800,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = | ||||
| 				"turn": Math.floor(turn), | ||||
| 				"damage": Math.floor(damage) | ||||
| 			}; | ||||
| } | ||||
| 		} | ||||
|     }, | ||||
|     "actions": { | ||||
|         "onKeyUp": function (keyCode, altKey) { | ||||
| @ -1162,8 +1168,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = | ||||
| 			} | ||||
| 		}, | ||||
|         "updateStatusBar": function () { | ||||
| 	//更新属性映射
 | ||||
| 	core.updateStatus() | ||||
| 	// 更新状态栏
 | ||||
| 	core.ui.statusBar.update(); | ||||
| 
 | ||||
|  | ||||
| @ -144,7 +144,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = | ||||
| 		"itemEffectTip": ",攻击+0" | ||||
| 	}, | ||||
| 	"sword1": { | ||||
| 		"cls": "equips", | ||||
| 		"cls": "items", | ||||
| 		"name": "铁剑", | ||||
| 		"text": "一把很普通的铁剑", | ||||
| 		"equip": { | ||||
| @ -152,31 +152,27 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = | ||||
| 			"animate": "sword", | ||||
| 			"value": { | ||||
| 				"atk": 10 | ||||
| 			}, | ||||
| 			"percentage": {} | ||||
| 			} | ||||
| 		}, | ||||
| 		"itemEffect": "core.status.hero.atk += 10", | ||||
| 		"itemEffectTip": ",攻击+10", | ||||
| 		"equipCls": "双手剑" | ||||
| 		"itemEffectTip": ",攻击+10" | ||||
| 	}, | ||||
| 	"sword2": { | ||||
| 		"cls": "equips", | ||||
| 		"cls": "items", | ||||
| 		"name": "银剑", | ||||
| 		"text": "一把很普通的银剑", | ||||
| 		"equip": { | ||||
| 			"type": "武器", | ||||
| 			"type": 0, | ||||
| 			"animate": "sword", | ||||
| 			"value": { | ||||
| 				"atk": 20 | ||||
| 			}, | ||||
| 			"percentage": {} | ||||
| 			} | ||||
| 		}, | ||||
| 		"itemEffect": "core.status.hero.atk += 20", | ||||
| 		"itemEffectTip": ",攻击+20", | ||||
| 		"equipCls": "匕首" | ||||
| 		"itemEffectTip": ",攻击+20" | ||||
| 	}, | ||||
| 	"sword3": { | ||||
| 		"cls": "equips", | ||||
| 		"cls": "items", | ||||
| 		"name": "骑士剑", | ||||
| 		"text": "一把很普通的骑士剑", | ||||
| 		"equip": { | ||||
| @ -184,44 +180,38 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = | ||||
| 			"animate": "sword", | ||||
| 			"value": { | ||||
| 				"atk": 40 | ||||
| 			}, | ||||
| 			"percentage": {} | ||||
| 			} | ||||
| 		}, | ||||
| 		"itemEffect": "core.status.hero.atk += 40", | ||||
| 		"itemEffectTip": ",攻击+40", | ||||
| 		"equipCls": "法杖" | ||||
| 		"itemEffectTip": ",攻击+40" | ||||
| 	}, | ||||
| 	"sword4": { | ||||
| 		"cls": "equips", | ||||
| 		"cls": "items", | ||||
| 		"name": "圣剑", | ||||
| 		"text": "一把很普通的圣剑", | ||||
| 		"equip": { | ||||
| 			"type": "武器", | ||||
| 			"type": 0, | ||||
| 			"animate": "sword", | ||||
| 			"value": { | ||||
| 				"atk": 80 | ||||
| 			}, | ||||
| 			"percentage": {} | ||||
| 			} | ||||
| 		}, | ||||
| 		"itemEffect": "core.status.hero.atk += 80", | ||||
| 		"itemEffectTip": ",攻击+80", | ||||
| 		"equipCls": "单手剑" | ||||
| 		"itemEffectTip": ",攻击+80" | ||||
| 	}, | ||||
| 	"sword5": { | ||||
| 		"cls": "equips", | ||||
| 		"name": "神圣剑", | ||||
| 		"text": "一把很普通的神圣剑", | ||||
| 		"equip": { | ||||
| 			"type": "武器", | ||||
| 			"type": 0, | ||||
| 			"animate": "sword", | ||||
| 			"value": { | ||||
| 				"atk": 160 | ||||
| 			}, | ||||
| 			"percentage": {} | ||||
| 			} | ||||
| 		}, | ||||
| 		"itemEffect": "core.status.hero.atk += 100", | ||||
| 		"itemEffectTip": ",攻击+100", | ||||
| 		"equipCls": "匕首" | ||||
| 		"itemEffectTip": ",攻击+100" | ||||
| 	}, | ||||
| 	"shield0": { | ||||
| 		"cls": "items", | ||||
| @ -244,12 +234,10 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = | ||||
| 			"type": 1, | ||||
| 			"value": { | ||||
| 				"def": 10 | ||||
| 			}, | ||||
| 			"percentage": {} | ||||
| 			} | ||||
| 		}, | ||||
| 		"itemEffect": "core.status.hero.def += 10", | ||||
| 		"itemEffectTip": ",防御+10", | ||||
| 		"equipCls": "盾牌" | ||||
| 		"itemEffectTip": ",防御+10" | ||||
| 	}, | ||||
| 	"shield2": { | ||||
| 		"cls": "items", | ||||
|  | ||||
| @ -2889,7 +2889,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = | ||||
| 		this.doEvent(data, x, y, prefix); | ||||
| 		return; | ||||
| 	} | ||||
| 
 | ||||
| }, | ||||
|     "额外信息": function () { | ||||
| 	/* 宝石血瓶左下角显示数值 | ||||
| @ -3814,11 +3813,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = | ||||
| 			cls: "equips", | ||||
| 			name: "未知装备", | ||||
| 			text: "一无所有,又何尝不是一种装备", | ||||
| 			equipCls: "无", | ||||
| 			equip: { | ||||
| 				type: "装备", | ||||
| 				type: "装备" | ||||
| 			} | ||||
| 
 | ||||
| 		} | ||||
| 		///// ***
 | ||||
| 
 | ||||
| @ -3842,8 +3839,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = | ||||
| 		core.setTextBaseline(ctx, "middle"); | ||||
| 		core.fillText(ctx, itemName, itemName_x, itemName_middle, itemNameColor, itemNameFont, itemNameMaxWidth); | ||||
| 		core.fillText(ctx, "【" + itemClsName + "】", itemCls_x, itemCls_middle, itemClsColor, itemClsFont); | ||||
| 		var statusText = "【装备类型】" + item.equipCls + '\n\n'; | ||||
| 		/*if (core.status.event.id == "equipbox") { | ||||
| 		var statusText = ""; | ||||
| 		if (core.status.event.id == "equipbox") { | ||||
| 			var type = item.equip.type; | ||||
| 			if (typeof type == "string") type = core.getEquipTypeByName(type); | ||||
| 			var compare = core.compareEquipment(item.id, core.getEquip(type)); | ||||
| @ -3861,7 +3858,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = | ||||
| 				newValue = core.formatBigNumber(newValue); | ||||
| 				statusText += core.getStatusLabel(name) + " " + nowValue + "->\r[" + color + "]" + newValue + "\r\n"; | ||||
| 			} | ||||
| 		}*/ | ||||
| 		} | ||||
| 		itemText = statusText + itemText; | ||||
| 		core.drawTextContent(ctx, itemText, { | ||||
| 			left: itemText_x, | ||||
| @ -3951,8 +3948,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = | ||||
| 		for (var i = 0; i < len; i++) { | ||||
| 			var id = core.getEquip(i), | ||||
| 				name = toDrawList[i]; | ||||
| 			if (i === 0) name = "主手"; | ||||
| 			if (i === 1) name = "副手"; | ||||
| 			var selectBorder = false; | ||||
| 			if (core.status.thisUIEventInfo.select.type == i) selectBorder = true; | ||||
| 			var borderStyle = selectBorder ? box_selectBorderStyle : box_borderStyle; | ||||
| @ -3965,10 +3960,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = | ||||
| 				box_y += space_y + oneBoxHeight; | ||||
| 			} | ||||
| 		} | ||||
| 		if (core.material.items[core.getEquip(0)]?.equipCls === "双手剑") { | ||||
| 			core.drawLine(ctx, equipList_x + space_x + space_x + oneBoxWidth, equipList_y + space_y, equipList_x + space_x + space_x + oneBoxWidth + box_width + box_borderWidth, equipList_y + space_y + box_height) | ||||
| 			core.drawLine(ctx, equipList_x + space_x + space_x + oneBoxWidth, equipList_y + space_y + box_height, equipList_x + space_x + space_x + oneBoxWidth + box_width + box_borderWidth, equipList_y + space_y) | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	this.drawToolbox = function (ctx) { | ||||
| @ -4169,80 +4160,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = | ||||
| 			info.index = 1; | ||||
| 			if (action == "load") { | ||||
| 				var type = core.getEquipTypeById(id); | ||||
| 				let equipClsid = core.material.items[id]?.equipCls; | ||||
| 				let equipCls0 = core.material.items[core.getEquip(0)]?.equipCls; | ||||
| 				let equipCls1 = core.material.items[core.getEquip(1)]?.equipCls; | ||||
| 				if (equipCls0 === "双手剑") { | ||||
| 					core.unloadEquip(0, function () { | ||||
| 						core.status.route.push("unEquip:" + 0); | ||||
| 					}); | ||||
| 				} | ||||
| 				if (equipClsid === "单手剑") { | ||||
| 					if (equipCls1 !== "单手剑" && equipCls1 !== "匕首" && equipCls1 !== "盾牌") { | ||||
| 						core.unloadEquip(0, function () { | ||||
| 							core.status.route.push("unEquip:" + 0); | ||||
| 						}); | ||||
| 						core.unloadEquip(1, function () { | ||||
| 							core.status.route.push("unEquip:" + 1); | ||||
| 						}); | ||||
| 					} else if (equipCls0 !== "单手剑") { | ||||
| 						core.unloadEquip(0, function () { | ||||
| 							core.status.route.push("unEquip:" + 0); | ||||
| 						}); | ||||
| 					} | ||||
| 				} | ||||
| 				if (equipClsid === "法杖") { | ||||
| 					if (equipCls1 !== "匕首" && equipCls1 !== "盾牌") { | ||||
| 						core.unloadEquip(0, function () { | ||||
| 							core.status.route.push("unEquip:" + 0); | ||||
| 						}); | ||||
| 						core.unloadEquip(1, function () { | ||||
| 							core.status.route.push("unEquip:" + 1); | ||||
| 						}); | ||||
| 					} else { | ||||
| 						core.unloadEquip(0, function () { | ||||
| 							core.status.route.push("unEquip:" + 0); | ||||
| 						}); | ||||
| 					} | ||||
| 				} | ||||
| 				if (equipClsid === "双手剑") { | ||||
| 
 | ||||
| 					core.unloadEquip(0, function () { | ||||
| 						core.status.route.push("unEquip:" + 0); | ||||
| 					}); | ||||
| 					core.unloadEquip(1, function () { | ||||
| 						core.status.route.push("unEquip:" + 1); | ||||
| 					}); | ||||
| 
 | ||||
| 				} | ||||
| 				if (equipClsid === "匕首") { | ||||
| 					if (equipCls0 !== "匕首") { | ||||
| 						core.unloadEquip(0, function () { | ||||
| 							core.status.route.push("unEquip:" + 0); | ||||
| 						}); | ||||
| 						core.unloadEquip(1, function () { | ||||
| 							core.status.route.push("unEquip:" + 1); | ||||
| 						}); | ||||
| 					} else { | ||||
| 						core.unloadEquip(1, function () { | ||||
| 							core.status.route.push("unEquip:" + 1); | ||||
| 						}); | ||||
| 					} | ||||
| 				} | ||||
| 				if (equipClsid === "盾牌") { | ||||
| 					if (equipCls0 !== "单手剑" && equipCls0 !== "法杖") { | ||||
| 						core.unloadEquip(0, function () { | ||||
| 							core.status.route.push("unEquip:" + 0); | ||||
| 						}); | ||||
| 						core.unloadEquip(1, function () { | ||||
| 							core.status.route.push("unEquip:" + 1); | ||||
| 						}); | ||||
| 					} else { | ||||
| 						core.unloadEquip(1, function () { | ||||
| 							core.status.route.push("unEquip:" + 1); | ||||
| 						}); | ||||
| 					} | ||||
| 				} | ||||
| 				core.loadEquip(id, function () { | ||||
| 					core.status.route.push("equip:" + id); | ||||
| 					info.select.type = type; | ||||
| @ -4260,7 +4177,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = | ||||
| 				}); | ||||
| 			} | ||||
| 		} | ||||
| 		core.updateStatusBar() | ||||
| 	} | ||||
| 	this.setIndexAndSelect = function (toChange) { | ||||
| 		var info = core.status.thisUIEventInfo; | ||||
| @ -10101,22 +10017,23 @@ core.plugin.animate = { | ||||
| 
 | ||||
| 	} | ||||
| 	core.ui.cgText = new cgText() | ||||
| }, | ||||
| "旁白": function () { | ||||
| // 在此增加新插件
 | ||||
| const over = document.createElement('canvas'); //over画布设置
 | ||||
| over.style.position = 'absolute'; | ||||
| over.style.zIndex = 310; | ||||
| over.style.display = "none" | ||||
| over.id = 'over'; | ||||
| main.dom.gameGroup.insertAdjacentElement('afterend', over) | ||||
| over.style.top = "50%" | ||||
| over.style.left = "50%" | ||||
| over.style.transform = "translate(-50%,-50%)" | ||||
| const ctx = over.getContext("2d"); | ||||
| main.dom.over = over; | ||||
| 
 | ||||
| this.over = function (image, time = 3000, hidetime = 100, sound = "", textColor = "#FFFFFF", boldColor = "#000000", font = "bold 48px Verdana", text = "") { | ||||
| }, | ||||
|     "旁白": function () { | ||||
| 	// 在此增加新插件
 | ||||
| 	const over = document.createElement('canvas'); //over画布设置
 | ||||
| 	over.style.position = 'absolute'; | ||||
| 	over.style.zIndex = 310; | ||||
| 	over.style.display = "none" | ||||
| 	over.id = 'over'; | ||||
| 	main.dom.gameGroup.insertAdjacentElement('afterend', over) | ||||
| 	over.style.top = "50%" | ||||
| 	over.style.left = "50%" | ||||
| 	over.style.transform = "translate(-50%,-50%)" | ||||
| 	const ctx = over.getContext("2d"); | ||||
| 	main.dom.over = over; | ||||
| 
 | ||||
| 	this.over = function (image, time = 3000, hidetime = 100, sound = "", textColor = "#FFFFFF", boldColor = "#000000", font = "bold 48px Verdana", text = "") { | ||||
| 		if (!core.isPlaying()) { return core.doAction() } | ||||
| 		const img = core.material.images.images?.[image] | ||||
| 		core.lockControl(); | ||||
| @ -10230,128 +10147,7 @@ this.over = function (image, time = 3000, hidetime = 100, sound = "", textColor | ||||
| 		}) | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| }, | ||||
| "属性映射": function () { | ||||
| // 在此增加新插件
 | ||||
| this.statusEquip = function () { | ||||
| 	const hero = core.status.hero; | ||||
| 	//装备具体效果在这里写,道具填写道具类型为equip并选择装备类型,道具的装备属性中装备类型遵循以下填写方式:
 | ||||
| 	//固定装备孔的填写0/1/2/3,分别对应主手、副手、防具、饰品
 | ||||
| 	//主副手同时可使用的,填写 武器
 | ||||
| 	//具体的换装时装备切换操作写在新道具栏/物品栏插件
 | ||||
| 	//当前仅完善法杖、单手剑、双手剑、匕首、盾牌的多孔切换操作
 | ||||
| 	//主武器效果
 | ||||
| 	if (core.getEquip[0]) { | ||||
| 		switch (core.getEquip[0]) { | ||||
| 		case "sword1": | ||||
| 			hero.atk = hero.str + hero.agi; | ||||
| 			hero.magic = false; | ||||
| 			break; | ||||
| 	} | ||||
| 	} | ||||
| 	//副手效果
 | ||||
| 	if (core.getEquip[1]) { | ||||
| 		switch (core.getEquip[1]) { | ||||
| 		case "sword1": | ||||
| 			hero.atk += hero.agi; | ||||
| 			break; | ||||
| 		} | ||||
| 	} | ||||
| 	//防具效果
 | ||||
| 	if (core.getEquip[2]) { | ||||
| 		switch (core.getEquip[2]) { | ||||
| 		case "sword1": | ||||
| 			hero.def = hero.con + hero.agi; | ||||
| 			hero.hpmax = 2.5 * hero.con; | ||||
| 			break; | ||||
| 		} | ||||
| 	} | ||||
| 	//饰品效果
 | ||||
| 	if (core.getEquip[3]) { | ||||
| 		switch (core.getEquip[3]) { | ||||
| 		case "sword1": | ||||
| 			hero.speed += 0.4 * hero.int + 0.6 * hero.agi; | ||||
| 			break; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| this.updateStatus = function () { | ||||
| 	const hero = core.status.hero; | ||||
| 	//默认映射关系
 | ||||
| 	hero.hpmax = hero.str * 50 + hero.con * 50; | ||||
| 	hero.atk = hero.str * 0.5 + hero.int * 0.5; | ||||
| 	hero.manamax = hero.agi * 0.5 + hero.int * 0.5; | ||||
| 	hero.def = hero.con * 0.5 + hero.agi * 0.5; | ||||
| 	hero.mdef = hero.con * 0.5 + hero.int * 0.5; | ||||
| 	hero.speed = hero.str * 0.5 + hero.agi * 0.5; | ||||
| 	hero.magic = false; | ||||
| 	this.statusEquip(); //处理装备效果
 | ||||
| 	for (let v in hero) { //归整
 | ||||
| 		if (typeof hero[v] === 'number') { | ||||
| 			hero[v] = Math.floor(hero[v]) | ||||
| 		} | ||||
| 	} | ||||
| 	hero.hp = Math.min(hero.hp, hero.hpmax) | ||||
| 	hero.mana = Math.min(hero.mana, hero.manamax) | ||||
| 	core.status.hero = hero | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| }, | ||||
| "回合制boss战": function () { | ||||
| // 在此增加新插件
 | ||||
| const boss = document.createElement('canvas'); //boss战画布设置
 | ||||
| boss.style.position = 'absolute'; | ||||
| boss.style.zIndex = 300; | ||||
| boss.style.display = "none" | ||||
| boss.id = 'boss'; | ||||
| main.dom.gameGroup.insertAdjacentElement('afterend', boss) | ||||
| boss.style.top = "50%" | ||||
| boss.style.left = "50%" | ||||
| boss.style.transform = "translate(-50%,-50%)" | ||||
| const ctx = boss.getContext("2d"); | ||||
| main.dom.boss = boss; | ||||
| boss.onclick = function (e) { | ||||
| 	try { | ||||
| 		e.preventDefault(); | ||||
| 		if (core.isPlaying()) return false; | ||||
| 		const left = core.dom.gameGroup.offsetLeft; | ||||
| 		const top = core.dom.gameGroup.offsetTop; | ||||
| 		const px = Math.floor((e.clientX - left) / core.domStyle.scale), | ||||
| 			py = Math.floor((e.clientY - top) / core.domStyle.scale); | ||||
| 		core.ui.boss.onclick(px * 3, py * 3); | ||||
| 	} catch (ee) { | ||||
| 		main.log(ee); | ||||
| 	} | ||||
| } | ||||
| class boss1 { | ||||
| 	constructor() { | ||||
| 		this.bg = "" | ||||
| 	} | ||||
| 	cavans() { | ||||
| 		if (core.domStyle.isVertical) { | ||||
| 			ctx.canvas.width = 1248; | ||||
| 			ctx.canvas.height = 2028; | ||||
| 
 | ||||
| 			core.setTextAlign(ctx, 'center'); | ||||
| 		} else { | ||||
| 			ctx.canvas.width = 2028; | ||||
| 			ctx.canvas.height = 1248; | ||||
| 
 | ||||
| 			core.setTextAlign(ctx, 'center'); | ||||
| 		} | ||||
| 
 | ||||
| 	} | ||||
| 	start() { | ||||
| 
 | ||||
| 	} | ||||
| 	onclick(px, py) { | ||||
| 
 | ||||
| 	} | ||||
| } | ||||
| core.ui.boss = new boss1() | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user