继续增加技能解析

This commit is contained in:
枫谷剑仙 2021-08-11 23:52:39 +08:00
parent 1ab6ce7fcb
commit 734265d355
4 changed files with 47 additions and 31 deletions

View File

@ -57,9 +57,10 @@
drum: tp`宝珠移动和消除的声音变成太鼓达人的音效`,
board7x6: tp`${'icon'}7×6版面】`,
counter_attack: tp`受到${'target'}攻击时,${'prob'}进行受到伤害${'value'}${'attr'}属性${'icon'}反击`,
change_orbs: tp`${'from'}${'to'}`,
change_orbs: tp`[${'from'}][${'to'}]`,
generate_orbs: tp`${'exclude'}生成${'to'}${'count'}`,
fixed_orbs: tp`${'position'}产生${'to'}`,
orb_drop_increase: tp`${'attrs'}宝珠的掉落率提高到${'value'}`,
},
position: {
top: tp`上方第${'pos'}横行`,

View File

@ -333,6 +333,7 @@ const SkillKinds = {
Drum: "drum",
Board7x6: "7x6-board",
NoSkyfall: "no-skyfall",
Henshin: "henshin",
}
function skillParser(skillId)
@ -598,6 +599,7 @@ function drum() { return { kind: SkillKinds.Drum }; }
function leaderChange() { return { kind: SkillKinds.LeaderChange }; }
function board7x6() { return { kind: SkillKinds.Board7x6 }; }
function noSkyfall() { return { kind: SkillKinds.NoSkyfall }; }
function henshin(id) { return { kind: SkillKinds.Henshin, id: id }; }
const parsers = {
parser: (() => []), //这个用来解决代码提示的报错问题,不起实际作用
@ -882,10 +884,11 @@ const parsers = {
return powerUp(null, null, p.scaleMatchAttrs(attrs.map(flags), min, min, [mul, 0], [0, 0]), undefined, v.percent(percent));
},
[172]() { return setOrbState(null, 'unlocked'); },
[173](turns, attrAbsorb, _, damageAbsorb) {
[173](turns, attrAbsorb, comboAbsorb, damageAbsorb) {
return activeTurns(turns, voidEnemyBuff(
[
attrAbsorb && 'attr-absorb',
comboAbsorb && 'combo-absorb',
damageAbsorb && 'damage-absorb'
].filter((buff) => typeof buff === 'string')
));
@ -939,12 +942,18 @@ const parsers = {
[188](value) {
return damageEnemy('single', 'fixed', v.constant(value));
},
[191](turns) {
return activeTurns(turns, voidEnemyBuff(['damage-void']));
},
[195](percent) {
return selfHarm(percent ? v.xHP(percent) : v.constantTo(1));
},
[196](matches) {
return unbind(0,0,matches);
},
[202](id) {
return henshin(id);
},
[218](turns) { return skillBoost(v.constant(-turns)); },
};
@ -1371,29 +1380,17 @@ function renderSkill(skill, option = {})
break;
}
/*
case SkillKinds.OrbDropIncrease: {
const { attrs, value } = skill as Skill.OrbDropIncrease;
let attrElems: React.ReactNode[];
if (attrs === 'enhanced')
attrElems = [<Asset assetId="status-orb-enhanced" className="CardSkill-icon" key="enhanced" />];
else
attrElems = renderOrbs(attrs);
attrElems = attrElems.map((elem, i) => (
<AssetBox className="CardSkill-icon-box" key={i}>
{elem}
<Asset assetId="overlay-drop" className="CardSkill-icon" />
</AssetBox>
));
return (
<span className="CardSkill-skill">
{attrElems}
{renderValue(value)}
</span>
);
case SkillKinds.OrbDropIncrease: { //增加天降
let attrs = skill.attrs, value = skill.value;
dict = {
icon: createIcon(skill.kind),
attrs: renderOrbs(attrs, {className: "drop"}),
value: renderValue(value, {percent: true}),
};
frg.ap(tsp.skill.orb_drop_increase(dict));
break;
}
/*
case SkillKinds.VoidEnemyBuff: {
const { buffs } = skill as Skill.VoidEnemyBuff;
return (
@ -1559,6 +1556,7 @@ function renderOrbs(attrs, option = {}) {
const contentFrg = attrs.map(attr => {
const icon = document.createElement("icon");
icon.className = "orb";
if (option.className) icon.className += " " + option.className;
icon.setAttribute("data-orb-icon",attr);
return tsp.orbs[attr]({icon: icon});
})

View File

@ -1004,7 +1004,7 @@
background-position-y:calc(-32px * 6);
}
/*属性图片*/
/*珠子图片*/
.orb
{
display: inline-block;
@ -1015,6 +1015,19 @@
background-repeat: no-repeat;
vertical-align: bottom;
}
.orb::before,
.orb::after
{
content: "";
width: 36px;
height: 36px;
display: block;
}
.orb.drop::before
{
background-image: url(images/icon-skills.fw.png);
background-position-y:calc(-36px * 23);
}
.orb[data-orb-icon='-1']
{

View File

@ -3151,18 +3151,18 @@ table .orb-icon
{
border-color: #DBE721;
}
.henshin .evo-type::after,
.henshin-loop .evo-type::after
.evo-panel.henshin .evo-type::after,
.evo-panel.henshin-loop .evo-type::after
{ /*變身*/
background-image: linear-gradient(#00FFFF 30%, #FF00FF);
}
.henshin,
.henshin-loop
.evo-panel.henshin,
.evo-panel.henshin-loop
{
background-image: linear-gradient(#BFFFCF,#FFFFBF,#FFBFBF);
}
.henshin .evo-panel-right,
.henshin-loop .evo-panel-right
.evo-panel.henshin .evo-panel-right,
.evo-panel.henshin-loop .evo-panel-right
{
border-color: #7F00FF;
}
@ -3433,4 +3433,8 @@ table .orb-icon
.icon-skill[data-icon-type="counter-attack"]
{
background-position-y:calc(-36px * 22);
}
.icon-skill[data-icon-type="orb-drop-incr"]
{
background-position-y:calc(-36px * 23);
}