定义全部基础装备
This commit is contained in:
parent
e9feb88ff4
commit
050c0926a5
@ -13828,71 +13828,94 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
};
|
||||
},
|
||||
"属性映射": 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;
|
||||
};
|
||||
},
|
||||
// 在此增加新插件
|
||||
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;
|
||||
case "twoHandedSword1":
|
||||
hero.atk = Math.floor(hero.str * 2 + hero.con / 10);
|
||||
hero.magic = false;
|
||||
break;
|
||||
case "wand1":
|
||||
hero.atk = hero.str + hero.int;
|
||||
hero.magic = true;
|
||||
break;
|
||||
case "knife1":
|
||||
hero.atk = Math.floor(hero.agi * 1.2);
|
||||
hero.speed = hero.agi * 2 + hero.int;
|
||||
hero.magic = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//副手效果
|
||||
if (core.getEquip[1]) {
|
||||
switch (core.getEquip[1]) {
|
||||
case "sword1":
|
||||
hero.atk += hero.agi;
|
||||
break;
|
||||
case "knife1":
|
||||
hero.speed += Math.floor(hero.agi * 0.6);
|
||||
if (core.getEquip[0] === "knife1") {
|
||||
hero.atk += Math.floor(hero.agi * 0.6);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
//防具效果
|
||||
if (core.getEquip[2]) {
|
||||
switch (core.getEquip[2]) {
|
||||
case "armor1":
|
||||
hero.def = hero.con + hero.agi;
|
||||
hero.hpmax = Math.floor(2.5 * hero.con);
|
||||
break;
|
||||
case "armor2":
|
||||
hero.mdef = hero.con + hero.int;
|
||||
hero.hpmax = hero.con * 2 + hero.int;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//饰品效果
|
||||
if (core.getEquip[3]) {
|
||||
switch (core.getEquip[3]) {
|
||||
case "jewel1":
|
||||
hero.speed += Math.floor(0.4 * hero.int + 0.6 * hero.agi);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
this.updateStatus = function () {
|
||||
const hero = core.status.hero;
|
||||
//默认映射关系
|
||||
hero.hpmax = hero.str * 100 + hero.con * 100;
|
||||
hero.atk = hero.str + hero.int;
|
||||
hero.manamax = hero.agi + hero.int;
|
||||
hero.def = hero.con + hero.agi;
|
||||
hero.mdef = hero.con + hero.int;
|
||||
hero.speed = hero.str + hero.agi;
|
||||
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战画布设置
|
||||
|
Loading…
Reference in New Issue
Block a user