This commit is contained in:
unanmed 2022-12-31 20:04:54 +08:00
parent cc6ee7e7af
commit 7e9aa28bc0
2 changed files with 15 additions and 5 deletions

View File

@ -7,7 +7,7 @@
]
},
"blade": {
"text": "1: 断灭之刃",
"text": "1断灭之刃",
"opened": "core.getSkillLevel(2) > 0",
"desc": [
"<span style=\"color: gold\">快捷键1</span>,开启后勇士攻击增加${level:2 * 10}%",
@ -18,7 +18,7 @@
]
},
"jump": {
"text": "2: 跳跃",
"text": "2跳跃",
"opened": "flags.skill2 === true",
"desc": [
"<span style=\"color: gold\">快捷键2</span>消耗200点生命值困难消耗400点一个地图只能使用3次",

View File

@ -181,6 +181,8 @@ function draw() {
);
if (core.getSkillLevel(s.index) < v.front[i][1])
ctx.strokeStyle = '#aaa';
else if (core.getSkillLevel(s.index) === s.max)
ctx.strokeStyle = '#ff0';
else ctx.strokeStyle = '#0f8';
ctx.lineWidth = devicePixelRatio;
ctx.stroke();
@ -190,15 +192,23 @@ function draw() {
const [x, y] = v.loc.map(v => v * 2 - 1);
const level = core.getSkillLevel(v.index);
//
if (selected.value === v.index) ctx.strokeStyle = '#ff0';
else if (level === 0) ctx.strokeStyle = '#888';
ctx.save();
ctx.lineWidth = per * 0.06;
if (selected.value === v.index) {
ctx.strokeStyle = '#ff0';
ctx.lineWidth *= 2;
} else if (level === 0) ctx.strokeStyle = '#888';
else if (level === v.max) ctx.strokeStyle = '#F7FF68';
else ctx.strokeStyle = '#00FF69';
ctx.lineWidth = per * 0.03;
ctx.strokeRect(x * per, y * per, per, per);
const img =
core.material.images.images[`skill${v.index}.png` as ImageIds];
ctx.drawImage(img, x * per, y * per, per, per);
if (selected.value === v.index) {
ctx.fillStyle = '#ff04';
ctx.fillRect(x * per, y * per, per, per);
}
ctx.restore();
});
}