master
humingxing 2 days ago
parent 58af7572ad
commit 594e845dd5
  1. 710
      assets/bundles/first/config/Battlebuff.json
  2. 248
      assets/bundles/first/config/Skill.json
  3. 8
      assets/bundles/first/config/Weapon.json
  4. 15
      assets/script/interface/AutoTable.ts
  5. 6
      preview-template/workbench/js/agent-core.js
  6. 46
      preview-template/workbench/js/agent-pick.js
  7. 16
      preview-template/workbench/js/host.js
  8. 52
      preview-template/workbench/js/panels/hierarchy.js
  9. BIN
      配置表/excelList/技能表.xlsx

File diff suppressed because it is too large Load Diff

@ -659,6 +659,248 @@
"condition": "",
"result": ""
},
{
"id": 105201,
"name": "",
"desc": "上阵的最大金系数字,释放远程剑气攻击",
"icon": "",
"type": 2,
"level": 0,
"cd": 13,
"priority": 200,
"animation": "攻击",
"showeffect": "",
"target_stage": 1,
"range": 0,
"atk_type": "1",
"fly": "",
"atk_para": "0",
"atk_buff1": "",
"atk_buff2": "",
"skill": "",
"condition": "2",
"result": "11,1,0,20000"
},
{
"id": 106101,
"name": "",
"desc": "超过32的金系数字,斩杀血量低于20%对手",
"icon": "",
"type": 2,
"level": 0,
"cd": 0,
"priority": 200,
"animation": "",
"showeffect": "",
"target_stage": 1,
"range": 0,
"atk_type": "",
"fly": "",
"atk_para": "",
"atk_buff1": "",
"atk_buff2": "",
"skill": "",
"condition": "1,10000",
"result": "15,2000,10000"
},
{
"id": 106201,
"name": "",
"desc": "超过128的金系数字,一定几率秒杀怪物",
"icon": "",
"type": 2,
"level": 0,
"cd": 0,
"priority": 200,
"animation": "",
"showeffect": "",
"target_stage": 1,
"range": 0,
"atk_type": "",
"fly": "",
"atk_para": "",
"atk_buff1": "",
"atk_buff2": "",
"skill": "",
"condition": "1,500",
"result": "16,10000"
},
{
"id": 205201,
"name": "",
"desc": "木系数字命中后给目标添加毒素,造成持续掉血",
"icon": "",
"type": 2,
"level": 0,
"cd": 0,
"priority": 200,
"animation": "",
"showeffect": "",
"target_stage": 1,
"range": 0,
"atk_type": "",
"fly": "",
"atk_para": "",
"atk_buff1": "",
"atk_buff2": "",
"skill": "",
"condition": "1,10000",
"result": "17,0.25,5000,3"
},
{
"id": 206101,
"name": "",
"desc": "超过32的木系数字,击杀目标,提升周围友军攻速",
"icon": "",
"type": 2,
"level": 0,
"cd": 5,
"priority": 200,
"animation": "攻击",
"showeffect": "",
"target_stage": 2,
"range": 0,
"atk_type": "3",
"fly": "",
"atk_para": "0",
"atk_buff1": "3,10000,3000,3",
"atk_buff2": "",
"skill": "",
"condition": "5,10000",
"result": ""
},
{
"id": 305201,
"name": "",
"desc": "冰球术,每攻击一定次数,召唤冰球砸向目标区域,减速并几率冰冻",
"icon": "",
"type": 2,
"level": 0,
"cd": 0,
"priority": 200,
"animation": "攻击",
"showeffect": "",
"target_stage": 1,
"range": 0,
"atk_type": "15",
"fly": "",
"atk_para": "180,5000",
"atk_buff1": "3,10000,-2000,3",
"atk_buff2": "13,2000,3",
"skill": "",
"condition": "6,10",
"result": ""
},
{
"id": 306101,
"name": "",
"desc": "超过32的水系,击杀怪物,在目标脚下生成一块水潭,经过水潭减速",
"icon": "",
"type": 2,
"level": 0,
"cd": 0,
"priority": 200,
"animation": "",
"showeffect": "",
"target_stage": 1,
"range": 0,
"atk_type": "",
"fly": "",
"atk_para": "",
"atk_buff1": "",
"atk_buff2": "",
"skill": "",
"condition": "5,10000",
"result": "18,170,3000,3"
},
{
"id": 406201,
"name": "",
"desc": "每攻击10次,发射直线巨箭",
"icon": "",
"type": 2,
"level": 0,
"cd": 0,
"priority": 200,
"animation": "攻击",
"showeffect": "",
"target_stage": 1,
"range": 0,
"atk_type": "12",
"fly": "",
"atk_para": "1,0,15000",
"atk_buff1": "2,10000,50",
"atk_buff2": "",
"skill": "",
"condition": "6,10",
"result": ""
},
{
"id": 505201,
"name": "",
"desc": "隔山打牛,击中目标,对目标身后扇形区域造成伤害",
"icon": "",
"type": 2,
"level": 0,
"cd": 0,
"priority": 200,
"animation": "",
"showeffect": "",
"target_stage": 1,
"range": 0,
"atk_type": "",
"fly": "",
"atk_para": "",
"atk_buff1": "",
"atk_buff2": "",
"skill": "",
"condition": "1,10000",
"result": "19,45,100,10000"
},
{
"id": 506101,
"name": "",
"desc": "超过32的土系,锁定同一目标时,每次攻击攻速+20%",
"icon": "",
"type": 2,
"level": 0,
"cd": 0,
"priority": 200,
"animation": "",
"showeffect": "",
"target_stage": 3,
"range": 0,
"atk_type": "",
"fly": "",
"atk_para": "",
"atk_buff1": "",
"atk_buff2": "",
"skill": "",
"condition": "3",
"result": "2,1000,10,2"
},
{
"id": 506201,
"name": "",
"desc": "超过128的土系,每次击杀,伤害提升2%,最大200%",
"icon": "",
"type": 2,
"level": 0,
"cd": 0,
"priority": 200,
"animation": "",
"showeffect": "",
"target_stage": 3,
"range": 0,
"atk_type": "",
"fly": "",
"atk_para": "",
"atk_buff1": "",
"atk_buff2": "",
"skill": "",
"condition": "5,10000",
"result": "20,200,100"
},
{
"id": 210101,
"name": "",
@ -1058,7 +1300,7 @@
{
"id": 330201,
"name": "",
"desc": "持续挥舞飞棍,持续造成伤害",
"desc": "持续旋转木棍,持续造成伤害",
"icon": "",
"type": 1,
"level": 0,
@ -1124,7 +1366,7 @@
{
"id": 340201,
"name": "",
"desc": "持续挥舞飞棍,持续造成伤害",
"desc": "持续旋转木棍,持续造成伤害",
"icon": "",
"type": 1,
"level": 0,
@ -1190,7 +1432,7 @@
{
"id": 350201,
"name": "",
"desc": "持续挥舞飞棍,持续造成伤害",
"desc": "持续旋转木棍,持续造成伤害",
"icon": "",
"type": 1,
"level": 0,

@ -586,7 +586,7 @@
},
{
"id": 3202,
"name": "神通2级",
"name": "棍舞2级",
"desc": "持续挥舞飞棍,持续造成伤害",
"icon": "神通2",
"skin": "",
@ -637,7 +637,7 @@
},
{
"id": 3302,
"name": "神通3级",
"name": "棍舞3级",
"desc": "持续挥舞飞棍,持续造成伤害",
"icon": "神通3",
"skin": "",
@ -688,7 +688,7 @@
},
{
"id": 3402,
"name": "神通4级",
"name": "棍舞4级",
"desc": "持续挥舞飞棍,持续造成伤害",
"icon": "神通4",
"skin": "",
@ -737,7 +737,7 @@
},
{
"id": 3502,
"name": "神通5级",
"name": "棍舞5级",
"desc": "持续挥舞飞棍,持续造成伤害",
"icon": "神通5",
"skin": "",

@ -376,7 +376,8 @@ declare global {
11、攻击距离增加,参数:距离加值,持续时间(-1为本场永久生效)
12、损毁基础字,参数:概率
13、冰冻,参数:概率,冰冻时间
14、点燃,参数:伤害间隔,伤害系数,持续时间 */
14、点燃,参数:伤害间隔,伤害系数,持续时间
15、毒,参数:伤害间隔,伤害系数,持续时间 */
readonly atk_buff1: string;
/** 命中后效果:buff类型,参数
1、眩晕,参数:概率,眩晕时长
@ -427,7 +428,13 @@ declare global {
类型11:释放直线剑气,参数:剑气数量,间隔,伤害系数
类型12:从目标身上开始产生闪电链,蔓延多个目标(不会重复蔓延),参数:蔓延范围,蔓延数量,伤害系数
13:从目标身上分裂冰锥,参数:索敌范围(半径),分裂数量,伤害系数
14:产生爆炸:参数:爆炸圆形半径,伤害系数 */
14:产生爆炸:参数:爆炸圆形半径,伤害系数
15:低血量斩杀,参数:剩余血量比例,斩杀概率
16:秒杀,对boss不生效,参数:秒杀几率
17:上毒,参数:伤害间隔,伤害系数,持续时间
18:生成寒潭铺在地上,经过单位减速,参数:半径,减速比例,持续时间
19:目标产生扇形范围伤害,参数:角度,半径,伤害系数
20:增加伤害,参数:加成比例,最大叠加次数 */
readonly result: string;
}
/**
@ -466,6 +473,10 @@ declare global {
readonly functiontype: number;
/** 功能参数 */
readonly functionpar: string;
/** 功能类型 */
readonly functiontype1: number;
/** 功能参数 */
readonly functionpar1: string;
/** 随机权重 */
readonly weight: number;
/** 购买价格 */

@ -155,6 +155,7 @@
case 'pick.setMode': return this._setPickMode(params.mode);
case 'pick.select': return this._selectNode(params.uuid);
case 'pick.at': return this._pickAt(params);
case 'pick.getRect': return this._getOverlayRect();
case 'game.pause': return this._setPaused(true);
case 'game.resume': return this._setPaused(false);
case 'game.step': return this._stepFrame();
@ -427,7 +428,10 @@
this._updateOverlay();
this._post({ type: 'event', name: 'pick.selected', data: { uuid: this._selectedUuid, ok: !!node } });
this._post({ type: 'event', name: 'hier.diff', data: this._getHierTree() });
return { uuid: this._selectedUuid, ok: !!node };
// 立刻推高亮框,壳层画绿色遮罩
var rect = this._getOverlayRect();
if (rect) this._post({ type: 'event', name: 'pick.rect', data: rect });
return { uuid: this._selectedUuid, ok: !!node, rect: rect || null };
};
/** 组件内部属性,不在 Inspector 展示 */

@ -420,11 +420,34 @@
el.id = 'pw-pick-overlay';
el.className = 'pw-pick-overlay';
el.hidden = true;
document.body.appendChild(el);
(document.body || document.documentElement).appendChild(el);
}
this._overlay = el;
};
WorkbenchAgent.prototype._updateOverlay = function () {
this._ensureOverlay();
var node = this._findNode(this._selectedUuid);
var overlay = this._overlay;
if (!overlay) return;
if (!node) {
overlay.hidden = true;
return;
}
var box = this._nodeClientRect(node);
if (!box) {
overlay.hidden = true;
return;
}
overlay.hidden = false;
overlay.style.position = 'fixed';
overlay.style.left = box.left + 'px';
overlay.style.top = box.top + 'px';
overlay.style.width = box.width + 'px';
overlay.style.height = box.height + 'px';
overlay.style.zIndex = '99999';
};
WorkbenchAgent.prototype._nodeClientRect = function (node) {
var cc = this.cc;
var canvas = this._getCanvasEl();
@ -478,27 +501,6 @@
};
};
WorkbenchAgent.prototype._updateOverlay = function () {
var node = this._findNode(this._selectedUuid);
var overlay = this._overlay;
if (!overlay) return;
if (!node) {
overlay.hidden = true;
return;
}
var box = this._nodeClientRect(node);
if (!box) {
overlay.hidden = true;
return;
}
overlay.hidden = false;
overlay.style.position = 'fixed';
overlay.style.left = box.left + 'px';
overlay.style.top = box.top + 'px';
overlay.style.width = box.width + 'px';
overlay.style.height = box.height + 'px';
};
WorkbenchAgent.prototype._getOverlayRect = function () {
var overlay = this._overlay;
if (!overlay || overlay.hidden) return null;

@ -139,6 +139,13 @@
cap.title = '检视:点击选取节点';
host.appendChild(cap);
// 选中节点绿色高亮(壳层,盖在预览上)
var hi = document.createElement('div');
hi.id = 'pw-pick-highlight';
hi.className = 'pw-pick-highlight pw-shell-only';
hi.hidden = true;
host.appendChild(hi);
if (this.layout) this.layout.gameHost = host;
};
@ -231,6 +238,15 @@
b.on('pick.selected', function (data) {
if (self.panels.hierarchy) self.panels.hierarchy.setSelectedUuid(data && data.uuid);
if (self.panels.inspector) self.panels.inspector.loadUuid(data && data.uuid);
if (!data || !data.uuid) self._setPickHighlight(null);
if (self.bridge) {
self.bridge.call('pick.getRect').then(function (rect) {
self._setPickHighlight(rect);
}).catch(function () { /* */ });
}
});
b.on('pick.rect', function (rect) {
self._setPickHighlight(rect);
});
b.on('perf.sample', function (data) {
if (self.panels.perf) self.panels.perf.applySample(data);

@ -34,7 +34,19 @@
HierarchyPanel.prototype.setSelectedUuid = function (uuid) {
this._selectedUuid = uuid || '';
var ok = this._expandToUuid(this._selectedUuid);
if (!ok && this._bridge && this._selectedUuid) {
// 树里还没有该节点时拉一份最新层级
var self = this;
this._bridge.call('hier.getTree').then(function (t) {
self.applyTree(t);
}).catch(function () {
self._render();
});
return;
}
this._render();
this._scrollToSelected();
};
HierarchyPanel.prototype.applyTree = function (data) {
@ -46,8 +58,35 @@
this._expanded[key] = true;
this._defaultInited = true;
}
if (this._selectedUuid) this._expandToUuid(this._selectedUuid);
}
this._render();
if (this._selectedUuid) this._scrollToSelected();
};
/** 展开选中节点的全部祖先,使其在树中可见 @returns {boolean} 是否找到 */
HierarchyPanel.prototype._expandToUuid = function (uuid) {
if (!uuid || !this._tree || !this._tree.root) return false;
var path = [];
var found = findPath(this._tree.root, uuid, path);
if (!found) return false;
for (var i = 0; i < path.length - 1; i++) {
var key = path[i].uuid || path[i].name || '';
if (key) this._expanded[key] = true;
}
// 根节点也展开
var rootKey = this._tree.root.uuid || this._tree.root.name || 'scene';
this._expanded[rootKey] = true;
return true;
};
/** 把选中项滚入可视区 */
HierarchyPanel.prototype._scrollToSelected = function () {
if (!this.treeEl || !this._selectedUuid) return;
var el = this.treeEl.querySelector('.pw-tree-item.selected');
if (el && typeof el.scrollIntoView === 'function') {
el.scrollIntoView({ block: 'nearest' });
}
};
HierarchyPanel.prototype.mount = function () {
@ -195,6 +234,19 @@
return false;
};
/** DFS 找 uuid 路径,path 收集祖先+自身 */
function findPath(node, uuid, path) {
if (!node) return false;
path.push(node);
if (node.uuid === uuid) return true;
var children = node.children || [];
for (var i = 0; i < children.length; i++) {
if (findPath(children[i], uuid, path)) return true;
}
path.pop();
return false;
}
function hasName(list, name) {
for (var i = 0; i < list.length; i++) if (list[i] === name) return true;
return false;

Loading…
Cancel
Save