mana & skill
This commit is contained in:
parent
de972f87f4
commit
1ddde2137d
@ -153,6 +153,11 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
|
|||||||
"_type": "textarea",
|
"_type": "textarea",
|
||||||
"_data": "初始生命值"
|
"_data": "初始生命值"
|
||||||
},
|
},
|
||||||
|
"mana": {
|
||||||
|
"_leaf": true,
|
||||||
|
"_type": "textarea",
|
||||||
|
"_data": "初始魔力值,只在enableMana开启时才有效"
|
||||||
|
},
|
||||||
"atk": {
|
"atk": {
|
||||||
"_leaf": true,
|
"_leaf": true,
|
||||||
"_type": "textarea",
|
"_type": "textarea",
|
||||||
@ -389,6 +394,12 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
|
|||||||
"_bool": "bool",
|
"_bool": "bool",
|
||||||
"_data": "是否是否启用生命上限"
|
"_data": "是否是否启用生命上限"
|
||||||
},
|
},
|
||||||
|
"enableMana": {
|
||||||
|
"_leaf": true,
|
||||||
|
"_type": "checkbox",
|
||||||
|
"_bool": "bool",
|
||||||
|
"_data": "是否开启魔力值"
|
||||||
|
},
|
||||||
"enableMDef": {
|
"enableMDef": {
|
||||||
"_leaf": true,
|
"_leaf": true,
|
||||||
"_type": "checkbox",
|
"_type": "checkbox",
|
||||||
@ -431,6 +442,12 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
|
|||||||
"_bool": "bool",
|
"_bool": "bool",
|
||||||
"_data": "是否涉及毒衰咒;如果此项为false则不会在状态栏中显示毒衰咒的debuff"
|
"_data": "是否涉及毒衰咒;如果此项为false则不会在状态栏中显示毒衰咒的debuff"
|
||||||
},
|
},
|
||||||
|
"enableSkill": {
|
||||||
|
"_leaf": true,
|
||||||
|
"_type": "checkbox",
|
||||||
|
"_bool": "bool",
|
||||||
|
"_data": "是否启用技能栏"
|
||||||
|
},
|
||||||
"flyNearStair": {
|
"flyNearStair": {
|
||||||
"_leaf": true,
|
"_leaf": true,
|
||||||
"_type": "checkbox",
|
"_type": "checkbox",
|
||||||
|
|||||||
@ -554,6 +554,8 @@ this.myfunc = function(x) {
|
|||||||
|
|
||||||
通过这种,将脚本和自定义事件混用的方式,可以达到和RM中公共事件类似的效果,即一个调用触发一系列事件。
|
通过这种,将脚本和自定义事件混用的方式,可以达到和RM中公共事件类似的效果,即一个调用触发一系列事件。
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
## 自定义状态栏(新增显示项)
|
## 自定义状态栏(新增显示项)
|
||||||
|
|
||||||
在V2.2以后,我们可以自定义状态栏背景图(全塔属性 - statusLeftBackground)等等。
|
在V2.2以后,我们可以自定义状态栏背景图(全塔属性 - statusLeftBackground)等等。
|
||||||
@ -594,56 +596,51 @@ core.statusBar.mana.innerHTML = core.getFlag('mana', 0) + '/' + core.getFlag('ma
|
|||||||
core.statusBar.mana.style.fontStyle = 'normal'; // 这一行会取消斜体。如果是汉字(比如技能名)的话,斜体起来会非常难看,可以通过这一句取消。
|
core.statusBar.mana.style.fontStyle = 'normal'; // 这一行会取消斜体。如果是汉字(比如技能名)的话,斜体起来会非常难看,可以通过这一句取消。
|
||||||
```
|
```
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
## 技能塔的支持
|
## 技能塔的支持
|
||||||
|
|
||||||
其实,在HTML5上制作技能塔是完全可行的。
|
其实,在HTML5上制作技能塔是完全可行的。
|
||||||
|
|
||||||
要支持技能塔,可能需要如下几个方面:
|
要支持技能塔,可能需要如下几个方面:
|
||||||
|
|
||||||
- 魔力(和上限)的定义添加
|
- 魔力(和上限)的添加;技能的定义
|
||||||
- 状态栏的显示
|
- 状态栏的显示
|
||||||
- 技能的触发(按键与录像问题)
|
- 技能的触发(按键与录像问题)
|
||||||
- 技能的效果
|
- 技能的效果
|
||||||
|
|
||||||
下面依次进行描述。
|
从V2.5开始,魔力和技能的定义被内置到了样板中,因此十分方便。
|
||||||
|
|
||||||
### 魔力的定义添加
|
### 魔力的定义添加;技能的定义
|
||||||
|
|
||||||
当我们定义了魔力的ID,比如`mana`后,要使用它,一般有两种方式:属性获取`status:mana`或者flag标记`flag:mana`。
|
从V2.5开始,提供了status:mana选项,可以直接代表当前魔力值。
|
||||||
|
|
||||||
如果要属性获取,则需要打开`data.js`文件,并在`hero`中添加定义。
|
如果要启用,需要开启全塔属性的enableMana选项。
|
||||||
|
|
||||||
通过这种方式定义的,可以通过`core.setStatus('mana', 0)`以及`core.getStatus('mana')`来设置或获取。
|
如果需要魔力上限,则可以使用flag:manaMax来表示当前的魔力最大值。
|
||||||
|
|
||||||
``` js
|
同时,我们可以使用flag:skill表示当前开启的技能编号,flag:skillName表示当前开启的技能名称。
|
||||||
'hero': {
|
|
||||||
// ... 上略
|
|
||||||
'mana': 0, // 增添mana定义,可以放在experience之后。同理可定义manaMax表示当前最大魔力值。
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
如果要flag标记,则无需额外在任何地方进行定义。只需要在设置或取用的时候使用 `core.setFlag('mana', 0)` 或 `core.getFlag('mana', 0)` 即可。
|
如果flag:skill不为0,则代表当前处于某个技能开启状态,且状态栏显示flag:skillName值。伤害计算函数中只需要对flag:skill进行处理即可。
|
||||||
|
|
||||||
下面我都使用属性获取的方式来进行说明。
|
|
||||||
|
|
||||||
### 状态栏的显示
|
### 状态栏的显示
|
||||||
|
|
||||||
首先我们需要额外新增一个状态栏;请参见[自定义状态栏(新增显示项)](#自定义状态栏(新增显示项))。
|
从V2.5开始,魔力值和技能名的状态栏项目已经被添加,可以直接使用。
|
||||||
|
|
||||||
我们可以在魔力那一行显示当前值和最大值:
|
在脚本编辑-updateStatusBar中,可以对状态栏显示内容进行修改。
|
||||||
|
|
||||||
``` js
|
``` js
|
||||||
core.setStatus('mana', Math.min(core.getStatus('mana'), core.getStatus('manaMax'))); // 如果魔力存在上限,则不能超过其上限值
|
// 设置魔力值
|
||||||
core.statusBar.mana.innerHTML = core.getStatus('mana') + '/' + core.getStatus('manaMax', 0); // 显示比如 6/30 这样
|
if (core.flags.enableMana) {
|
||||||
```
|
// 也可以使用flag:manaMax来表示最大魔力值
|
||||||
|
// core.status.hero.mana = Math.max(core.status.hero.mana, core.getFlag('manaMax', 10));
|
||||||
如果我们还需要显示当前使用的技能名,也是可以的;定义一个ID为skill,然后按照上面的做法新增一行。
|
// core.statusBar.mana.innerHTML = core.status.hero.mana + "/" + core.getFlag('manaMax', 10);
|
||||||
|
}
|
||||||
请注意,如果是中文字符,需要取消斜体(不然会非常难看的)!
|
// 设置技能栏
|
||||||
|
if (core.flags.enableSkill) {
|
||||||
``` js
|
// 可以用flag:kill表示当前开启的技能类型,flag:skillName显示技能名;详见文档-个性化-技能塔的支持
|
||||||
core.statusBar.skill.style.fontStyle = 'normal'; // 取消斜体显示
|
core.statusBar.skill.innerHTML = core.getFlag('skillName', '无');
|
||||||
core.statusBar.skill.innerHTML = core.getFlag('skillName', '无'); // 使用flag:skillName表示当前激活的技能名。
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### 技能的触发
|
### 技能的触发
|
||||||
@ -716,7 +713,7 @@ case 87: // W
|
|||||||
|
|
||||||
举个例子,我设置一个勇士的技能:二倍斩,开启技能消耗5点魔力,下一场战斗攻击力翻倍。
|
举个例子,我设置一个勇士的技能:二倍斩,开启技能消耗5点魔力,下一场战斗攻击力翻倍。
|
||||||
|
|
||||||
那么,直接在`getDamageInfo`中进行判断:
|
那么,直接在脚本编辑的`getDamageInfo`中进行判断:
|
||||||
|
|
||||||
``` js
|
``` js
|
||||||
if (core.getFlag('skill', 0)==1) { // 开启了技能1
|
if (core.getFlag('skill', 0)==1) { // 开启了技能1
|
||||||
@ -724,7 +721,7 @@ if (core.getFlag('skill', 0)==1) { // 开启了技能1
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
然后在脚本编辑的战后事件中进行魔力值的扣除:
|
然后在脚本编辑的`afterBattle`中进行魔力值的扣除:
|
||||||
|
|
||||||
``` js
|
``` js
|
||||||
if (core.getFlag('skill', 0)==1) { // 开启了技能1
|
if (core.getFlag('skill', 0)==1) { // 开启了技能1
|
||||||
|
|||||||
@ -355,6 +355,10 @@
|
|||||||
<img id="img-hp">
|
<img id="img-hp">
|
||||||
<p class='statusLabel statusText' id='hp'></p>
|
<p class='statusLabel statusText' id='hp'></p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="status" id='manaCol'>
|
||||||
|
<img id="img-mana">
|
||||||
|
<p class='statusLabel statusText' id='mana'></p>
|
||||||
|
</div>
|
||||||
<div class="status">
|
<div class="status">
|
||||||
<img id="img-atk">
|
<img id="img-atk">
|
||||||
<p class='statusLabel statusText' id='atk'></p>
|
<p class='statusLabel statusText' id='atk'></p>
|
||||||
@ -379,6 +383,10 @@
|
|||||||
<img id="img-up">
|
<img id="img-up">
|
||||||
<p class='statusLabel statusText' id='up'></p>
|
<p class='statusLabel statusText' id='up'></p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="status" id="skillCol">
|
||||||
|
<img id="img-skill">
|
||||||
|
<p class='statusLabel statusText' id='skill' style='font-style: normal'></p>
|
||||||
|
</div>
|
||||||
<div class="status" id='keyCol'>
|
<div class="status" id='keyCol'>
|
||||||
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
|
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
|
||||||
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
|
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
|
||||||
|
|||||||
@ -341,6 +341,10 @@
|
|||||||
<img id="img-hp">
|
<img id="img-hp">
|
||||||
<p class='statusLabel statusText' id='hp'></p>
|
<p class='statusLabel statusText' id='hp'></p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="status" id='manaCol'>
|
||||||
|
<img id="img-mana">
|
||||||
|
<p class='statusLabel statusText' id='mana'></p>
|
||||||
|
</div>
|
||||||
<div class="status">
|
<div class="status">
|
||||||
<img id="img-atk">
|
<img id="img-atk">
|
||||||
<p class='statusLabel statusText' id='atk'></p>
|
<p class='statusLabel statusText' id='atk'></p>
|
||||||
@ -365,6 +369,10 @@
|
|||||||
<img id="img-up">
|
<img id="img-up">
|
||||||
<p class='statusLabel statusText' id='up'></p>
|
<p class='statusLabel statusText' id='up'></p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="status" id="skillCol">
|
||||||
|
<img id="img-skill">
|
||||||
|
<p class='statusLabel statusText' id='skill' style='font-style: normal'></p>
|
||||||
|
</div>
|
||||||
<div class="status" id='keyCol'>
|
<div class="status" id='keyCol'>
|
||||||
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
|
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
|
||||||
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
|
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
|
||||||
|
|||||||
@ -62,6 +62,10 @@
|
|||||||
<img id="img-hp">
|
<img id="img-hp">
|
||||||
<p class='statusLabel statusText' id='hp'></p>
|
<p class='statusLabel statusText' id='hp'></p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="status" id='manaCol'>
|
||||||
|
<img id="img-mana">
|
||||||
|
<p class='statusLabel statusText' id='mana'></p>
|
||||||
|
</div>
|
||||||
<div class="status">
|
<div class="status">
|
||||||
<img id="img-atk">
|
<img id="img-atk">
|
||||||
<p class='statusLabel statusText' id='atk'></p>
|
<p class='statusLabel statusText' id='atk'></p>
|
||||||
@ -86,6 +90,10 @@
|
|||||||
<img id="img-up">
|
<img id="img-up">
|
||||||
<p class='statusLabel statusText' id='up'></p>
|
<p class='statusLabel statusText' id='up'></p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="status" id="skillCol">
|
||||||
|
<img id="img-skill">
|
||||||
|
<p class='statusLabel statusText' id='skill' style='font-style: normal'></p>
|
||||||
|
</div>
|
||||||
<div class="status" id='keyCol'>
|
<div class="status" id='keyCol'>
|
||||||
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
|
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
|
||||||
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
|
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
|
||||||
|
|||||||
@ -2807,6 +2807,8 @@ control.prototype.resize = function(clientWidth, clientHeight) {
|
|||||||
if (!core.flags.enableKeys) count--;
|
if (!core.flags.enableKeys) count--;
|
||||||
if (!core.flags.enablePZF) count--;
|
if (!core.flags.enablePZF) count--;
|
||||||
if (!core.flags.enableName) count--;
|
if (!core.flags.enableName) count--;
|
||||||
|
if (!core.flags.enableMana) count--;
|
||||||
|
if (!core.flags.enableSkill) count--;
|
||||||
|
|
||||||
var statusLineHeight = BASE_LINEHEIGHT * 9 / count;
|
var statusLineHeight = BASE_LINEHEIGHT * 9 / count;
|
||||||
var statusLineFontSize = DEFAULT_FONT_SIZE;
|
var statusLineFontSize = DEFAULT_FONT_SIZE;
|
||||||
@ -3086,6 +3088,12 @@ control.prototype.resize = function(clientWidth, clientHeight) {
|
|||||||
display: core.flags.enableHPMax ? 'block': 'none'
|
display: core.flags.enableHPMax ? 'block': 'none'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'manaCol',
|
||||||
|
rules: {
|
||||||
|
display: core.flags.enableMana ? 'block': 'none'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'mdefCol',
|
id: 'mdefCol',
|
||||||
rules: {
|
rules: {
|
||||||
@ -3110,6 +3118,12 @@ control.prototype.resize = function(clientWidth, clientHeight) {
|
|||||||
display: core.flags.enableLevelUp ? 'block': 'none'
|
display: core.flags.enableLevelUp ? 'block': 'none'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'skillCol',
|
||||||
|
rules: {
|
||||||
|
display: core.flags.enableSkill ? 'block': 'none'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'keyCol',
|
id: 'keyCol',
|
||||||
rules: {
|
rules: {
|
||||||
|
|||||||
6
main.js
6
main.js
@ -55,6 +55,7 @@ function main() {
|
|||||||
'nameCol': document.getElementById('nameCol'),
|
'nameCol': document.getElementById('nameCol'),
|
||||||
'lvCol': document.getElementById('lvCol'),
|
'lvCol': document.getElementById('lvCol'),
|
||||||
'hpmaxCol': document.getElementById('hpmaxCol'),
|
'hpmaxCol': document.getElementById('hpmaxCol'),
|
||||||
|
'manaCol': document.getElementById('manaCol'),
|
||||||
'mdefCol': document.getElementById('mdefCol'),
|
'mdefCol': document.getElementById('mdefCol'),
|
||||||
'moneyCol': document.getElementById('moneyCol'),
|
'moneyCol': document.getElementById('moneyCol'),
|
||||||
'expCol': document.getElementById('expCol'),
|
'expCol': document.getElementById('expCol'),
|
||||||
@ -62,6 +63,7 @@ function main() {
|
|||||||
'keyCol': document.getElementById('keyCol'),
|
'keyCol': document.getElementById('keyCol'),
|
||||||
'pzfCol': document.getElementById('pzfCol'),
|
'pzfCol': document.getElementById('pzfCol'),
|
||||||
'debuffCol': document.getElementById('debuffCol'),
|
'debuffCol': document.getElementById('debuffCol'),
|
||||||
|
'skillCol': document.getElementById('skillCol'),
|
||||||
'hard': document.getElementById('hard'),
|
'hard': document.getElementById('hard'),
|
||||||
};
|
};
|
||||||
this.mode = 'play';
|
this.mode = 'play';
|
||||||
@ -82,12 +84,14 @@ function main() {
|
|||||||
'lv': document.getElementById('img-lv'),
|
'lv': document.getElementById('img-lv'),
|
||||||
'hpmax': document.getElementById('img-hpmax'),
|
'hpmax': document.getElementById('img-hpmax'),
|
||||||
'hp': document.getElementById("img-hp"),
|
'hp': document.getElementById("img-hp"),
|
||||||
|
'mana': document.getElementById("img-mana"),
|
||||||
'atk': document.getElementById("img-atk"),
|
'atk': document.getElementById("img-atk"),
|
||||||
'def': document.getElementById("img-def"),
|
'def': document.getElementById("img-def"),
|
||||||
'mdef': document.getElementById("img-mdef"),
|
'mdef': document.getElementById("img-mdef"),
|
||||||
'money': document.getElementById("img-money"),
|
'money': document.getElementById("img-money"),
|
||||||
'experience': document.getElementById("img-experience"),
|
'experience': document.getElementById("img-experience"),
|
||||||
'up': document.getElementById("img-up"),
|
'up': document.getElementById("img-up"),
|
||||||
|
'skill': document.getElementById('img-skill'),
|
||||||
'book': document.getElementById("img-book"),
|
'book': document.getElementById("img-book"),
|
||||||
'fly': document.getElementById("img-fly"),
|
'fly': document.getElementById("img-fly"),
|
||||||
'toolbox': document.getElementById("img-toolbox"),
|
'toolbox': document.getElementById("img-toolbox"),
|
||||||
@ -133,12 +137,14 @@ function main() {
|
|||||||
'lv': document.getElementById('lv'),
|
'lv': document.getElementById('lv'),
|
||||||
'hpmax': document.getElementById('hpmax'),
|
'hpmax': document.getElementById('hpmax'),
|
||||||
'hp': document.getElementById('hp'),
|
'hp': document.getElementById('hp'),
|
||||||
|
'mana': document.getElementById('mana'),
|
||||||
'atk': document.getElementById('atk'),
|
'atk': document.getElementById('atk'),
|
||||||
'def': document.getElementById("def"),
|
'def': document.getElementById("def"),
|
||||||
'mdef': document.getElementById('mdef'),
|
'mdef': document.getElementById('mdef'),
|
||||||
'money': document.getElementById("money"),
|
'money': document.getElementById("money"),
|
||||||
'experience': document.getElementById("experience"),
|
'experience': document.getElementById("experience"),
|
||||||
'up': document.getElementById('up'),
|
'up': document.getElementById('up'),
|
||||||
|
'skill': document.getElementById('skill'),
|
||||||
'yellowKey': document.getElementById("yellowKey"),
|
'yellowKey': document.getElementById("yellowKey"),
|
||||||
'blueKey': document.getElementById("blueKey"),
|
'blueKey': document.getElementById("blueKey"),
|
||||||
'redKey': document.getElementById("redKey"),
|
'redKey': document.getElementById("redKey"),
|
||||||
|
|||||||
@ -75,6 +75,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
|||||||
"lv": 1,
|
"lv": 1,
|
||||||
"hpmax": 9999,
|
"hpmax": 9999,
|
||||||
"hp": 1000,
|
"hp": 1000,
|
||||||
|
"mana": 0,
|
||||||
"atk": 100,
|
"atk": 100,
|
||||||
"def": 100,
|
"def": 100,
|
||||||
"mdef": 100,
|
"mdef": 100,
|
||||||
@ -197,6 +198,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
|||||||
"enableName": false,
|
"enableName": false,
|
||||||
"enableLv": false,
|
"enableLv": false,
|
||||||
"enableHPMax": false,
|
"enableHPMax": false,
|
||||||
|
"enableMana": false,
|
||||||
"enableMDef": true,
|
"enableMDef": true,
|
||||||
"enableMoney": true,
|
"enableMoney": true,
|
||||||
"enableExperience": false,
|
"enableExperience": false,
|
||||||
@ -204,6 +206,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
|||||||
"enableKeys": true,
|
"enableKeys": true,
|
||||||
"enablePZF": false,
|
"enablePZF": false,
|
||||||
"enableDebuff": false,
|
"enableDebuff": false,
|
||||||
|
"enableSkill": false,
|
||||||
"flyNearStair": true,
|
"flyNearStair": true,
|
||||||
"pickaxeFourDirections": false,
|
"pickaxeFourDirections": false,
|
||||||
"bombFourDirections": false,
|
"bombFourDirections": false,
|
||||||
|
|||||||
@ -617,7 +617,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
else core.statusBar.lv.style.fontStyle = 'normal';
|
else core.statusBar.lv.style.fontStyle = 'normal';
|
||||||
|
|
||||||
// 设置生命上限、生命值、攻防魔防金币和经验值
|
// 设置生命上限、生命值、攻防魔防金币和经验值
|
||||||
var statusList = ['hpmax', 'hp', 'atk', 'def', 'mdef', 'money', 'experience'];
|
var statusList = ['hpmax', 'hp', 'mana', 'atk', 'def', 'mdef', 'money', 'experience'];
|
||||||
statusList.forEach(function (item) {
|
statusList.forEach(function (item) {
|
||||||
// 向下取整
|
// 向下取整
|
||||||
if (core.isset(core.status.hero[item]))
|
if (core.isset(core.status.hero[item]))
|
||||||
@ -633,6 +633,18 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
core.statusBar.mdef.innerHTML = core.formatBigNumber(Math.floor(core.getFlag('equip_mdef_buff',1)*core.getStatus('mdef')));
|
core.statusBar.mdef.innerHTML = core.formatBigNumber(Math.floor(core.getFlag('equip_mdef_buff',1)*core.getStatus('mdef')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 设置魔力值
|
||||||
|
if (core.flags.enableMana) {
|
||||||
|
// 也可以使用flag:manaMax来表示最大魔力值;详见文档-个性化-技能塔的支持
|
||||||
|
// core.status.hero.mana = Math.max(core.status.hero.mana, core.getFlag('manaMax', 10));
|
||||||
|
// core.statusBar.mana.innerHTML = core.status.hero.mana + "/" + core.getFlag('manaMax', 10);
|
||||||
|
}
|
||||||
|
// 设置技能栏
|
||||||
|
if (core.flags.enableSkill) {
|
||||||
|
// 可以用flag:kill表示当前开启的技能类型,flag:skillName显示技能名;详见文档-个性化-技能塔的支持
|
||||||
|
core.statusBar.skill.innerHTML = core.getFlag('skillName', '无');
|
||||||
|
}
|
||||||
|
|
||||||
// 可以在这里添加自己额外的状态栏信息,比如想攻击显示 +0.5 可以这么写:
|
// 可以在这里添加自己额外的状态栏信息,比如想攻击显示 +0.5 可以这么写:
|
||||||
// if (core.hasFlag('halfAtk')) core.statusBar.atk.innerHTML += "+0.5";
|
// if (core.hasFlag('halfAtk')) core.statusBar.atk.innerHTML += "+0.5";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user