Browse Source

添加进化技能支持

tags/v21.0
枫谷剑仙 4 years ago
parent
commit
a6873409b9
20 changed files with 152 additions and 18 deletions
  1. BIN
      images/cards_ja/CARDS_079.PNG
  2. BIN
      images/cards_ja/CARDS_080.PNG
  3. BIN
      images/icon-evolved-skill-loop.png
  4. +5
    -1
      languages/en.css
  5. +2
    -0
      languages/en.js
  6. +5
    -0
      languages/ja.css
  7. +5
    -0
      languages/ko.css
  8. +13
    -0
      languages/zh-TW.css
  9. +5
    -0
      languages/zh.css
  10. +1
    -1
      monsters-info/ckey.json
  11. +1
    -1
      monsters-info/custom/chs.json
  12. +1
    -1
      monsters-info/custom/cht.json
  13. +1
    -1
      monsters-info/mon_ja.json
  14. +1
    -1
      monsters-info/official-API/ja-card.json
  15. +1
    -1
      monsters-info/official-API/ja-skill.json
  16. +1
    -1
      monsters-info/skill_ja.json
  17. +14
    -3
      script-json_data.js
  18. +50
    -2
      script-skill-parser.js
  19. +5
    -1
      script.js
  20. +41
    -4
      style.css

BIN
images/cards_ja/CARDS_079.PNG View File

Before After
Width: 1024  |  Height: 1024  |  Size: 585 kB Width: 1024  |  Height: 1024  |  Size: 698 kB

BIN
images/cards_ja/CARDS_080.PNG View File

Before After
Width: 1024  |  Height: 1024  |  Size: 339 kB Width: 1024  |  Height: 1024  |  Size: 586 kB

BIN
images/icon-evolved-skill-loop.png View File

Before After
Width: 60  |  Height: 48  |  Size: 1.0 kB

+ 5
- 1
languages/en.css View File

@@ -119,7 +119,6 @@
{
content: "RCV:";
}

.edit-box .setting-box .row-mon-level::before{
content: "▼Monster Level";
}
@@ -150,6 +149,11 @@
{
content: "Skill";
}
.row-mon-skill .evolved-skill .type-title::before,
.row-mon-skill .evolved-skill .type-title::after
{
content: "Evoveld Skill";
}
.row-mon-leader-skill .type-title::before,
.row-mon-leader-skill .type-title::after
{


+ 2
- 0
languages/en.js View File

@@ -27,6 +27,8 @@
unknown: tp`Unkonwn skill type: ${'type'}`,
active_turns: tp`${'actionSkill'}, for ${'turns'} turns`,
random_skills: tp`Random Activates these skills:${'skills'}`,
evolved_skills: tp`Skills evolve to the next stage when used:${'skills'}`,
evolved_skills_loop: tp`${`icon`}Returns to the first stage after use`,
damage_enemy: tp`Inflicts ${'times'}${'damage'} ${'attr'} attack on ${'target'}${'totalDamage'}`,
damage_enemy_times: tp`${'times'} `,
damage_enemy_count: tp` (${'damage'} in total)`,


+ 5
- 0
languages/ja.css View File

@@ -148,6 +148,11 @@
{
content: "スキル";
}
.row-mon-skill .evolved-skill .type-title::before,
.row-mon-skill .evolved-skill .type-title::after
{
content: "進化スキル";
}
.row-mon-leader-skill .type-title::before,
.row-mon-leader-skill .type-title::after
{


+ 5
- 0
languages/ko.css View File

@@ -145,6 +145,11 @@
{
content: "스킬";
}
.row-mon-skill .evolved-skill .type-title::before,
.row-mon-skill .evolved-skill .type-title::after
{
content: "진화 기술";
}
.row-mon-leader-skill .type-title::before,
.row-mon-leader-skill .type-title::after
{


+ 13
- 0
languages/zh-TW.css View File

@@ -148,6 +148,11 @@
{
content: "主動技能";
}
.row-mon-skill .evolved-skill .type-title::before,
.row-mon-skill .evolved-skill .type-title::after
{
content: "進化技能";
}
.row-mon-leader-skill .type-title::before,
.row-mon-leader-skill .type-title::after
{
@@ -606,4 +611,12 @@ label[for="qr-data-type-pdchu"]::before {
.player-card .stama::before
{
content: "體力";
}
.edit-box .monsterinfo-box .monster-name,
.evo-panel-right .monster-name
{
font-family: var(--font-family);
font-weight: bold;
}

+ 5
- 0
languages/zh.css View File

@@ -147,6 +147,11 @@
{
content: "主動技能";
}
.row-mon-skill .evolved-skill .type-title::before,
.row-mon-skill .evolved-skill .type-title::after
{
content: "進化技能";
}
.row-mon-leader-skill .type-title::before,
.row-mon-leader-skill .type-title::after
{


+ 1
- 1
monsters-info/ckey.json View File

@@ -1 +1 @@
[{"code":"ja","ckey":{"card":"e272bb34f9cdedc698fa5fbbe0e7e710","skill":"105fa55b18e33690b7559721c2d11224"},"updateTime":1634798910326},{"code":"en","ckey":{"card":"47fa848b4ea328d43a98148ccc94610d","skill":"576311cbfc2dec5d780fd7df63620225"},"updateTime":1634798910326},{"code":"ko","ckey":{"card":"94ec59fd10335cb3e2ac5589bf8c8190","skill":"b54973dbaad4d3ec0ad385d1ac3d8ded"},"updateTime":1634798910326}]
[{"code":"ja","ckey":{"card":"536dd7cca3dbc012d12ec74c79334901","skill":"8028fcf43e381ececcacef75cd766258"},"updateTime":1634904936172},{"code":"en","ckey":{"card":"47fa848b4ea328d43a98148ccc94610d","skill":"576311cbfc2dec5d780fd7df63620225"},"updateTime":1634798910326},{"code":"ko","ckey":{"card":"94ec59fd10335cb3e2ac5589bf8c8190","skill":"b54973dbaad4d3ec0ad385d1ac3d8ded"},"updateTime":1634798910326}]

+ 1
- 1
monsters-info/custom/chs.json
File diff suppressed because it is too large
View File


+ 1
- 1
monsters-info/custom/cht.json
File diff suppressed because it is too large
View File


+ 1
- 1
monsters-info/mon_ja.json
File diff suppressed because it is too large
View File


+ 1
- 1
monsters-info/official-API/ja-card.json
File diff suppressed because it is too large
View File


+ 1
- 1
monsters-info/official-API/ja-skill.json
File diff suppressed because it is too large
View File


+ 1
- 1
monsters-info/skill_ja.json
File diff suppressed because it is too large
View File


+ 14
- 3
script-json_data.js View File

@@ -42,6 +42,8 @@ let localTranslating = {
unknown: tp`未知的技能类型:${'type'}`, //type
active_turns: tp`${'turns'} 回合内,${'actionSkill'}`, //turns, actionSkill
random_skills: tp`随机发动以下技能:${'skills'}`, //skills
evolved_skills: tp`技能使用后会进化为下一阶段:${'skills'}`, //skills
evolved_skills_loop: tp`${`icon`}使用后返回第一阶段`,
damage_enemy: tp`对${'target'}造成${'damage'}的${'attr'}伤害${'times'}${'totalDamage'}`, //target, damage, attr
damage_enemy_times: tp`×${'times'}`,
damage_enemy_count: tp`(共${'damage'})`,
@@ -581,7 +583,7 @@ const specialSearchFunctions = (function() {
if (skillTypes.includes(skill.type))
{
return skill;
}else if (skill.type == 116 || (searchRandom && skill.type == 118) || skill.type == 138)
}else if (skill.type == 116 || (searchRandom && skill.type == 118) || skill.type == 138 || skill.type == 232 || skill.type == 233)
{
const subSkills = skill.params.map(id=>Skills[id]);
for(let i = 0;i < subSkills.length; i++)
@@ -1606,8 +1608,17 @@ const specialSearchFunctions = (function() {
return `时停${value}s`;
}
},
{name:"Random effect active",otLangName:{chs:"随机效果技能"},
function:cards=>cards.filter(card=>Skills[card.activeSkillId].type == 118)},
{
name:"Random effect active",otLangName:{chs:"随机效果技能"},
function:cards=>cards.filter(card=>Skills[card.activeSkillId].type == 118)
},
{
name:"Evolved active",otLangName:{chs:"进化类技能"},
function:cards=>cards.filter(card=>{
let skType = Skills[card.activeSkillId].type;
return skType == 232 || skType == 233;
})
},
{name:"Enable require HP range",otLangName:{chs:"技能使用血线要求"},
function:cards=>cards.filter(card=>{
const searchTypeArray = [225];


+ 50
- 2
script-skill-parser.js View File

@@ -347,6 +347,7 @@ const SkillKinds = {
Unbind: "unbind",
BindSkill: "bind-skill",
RandomSkills: "random-skills",
EvolvedSkills: "evolved-skills",
SkillProviso: "skill-proviso",
ChangeAttribute: "change-attr",
SkillBoost: "skill-boost",
@@ -871,6 +872,9 @@ function boardChange(attrs) {
function randomSkills(skills) {
return { kind: SkillKinds.RandomSkills, skills: skills };
}
function evolvedSkills(loop, skills) {
return { kind: SkillKinds.EvolvedSkills, loop: loop, skills: skills };
}
function changeAttr(target, attr) {
return { kind: SkillKinds.ChangeAttribute, target: target, attr: attr ?? 0 };
}
@@ -1401,6 +1405,8 @@ const parsers = {
})(target);
return activeTurns(turns, powerUp({target: targetType}, null, p.mul({ atk: mul })));
},
[232](...ids) { return evolvedSkills(false, ids.map(id => this.parser(id))); },
[233](...ids) { return evolvedSkills(true, ids.map(id => this.parser(id))); },
[1000](type, pos, ...ids) {
const posType = (type=>{
switch (type) {
@@ -1451,6 +1457,27 @@ function showParsedSkill(event) {
}
}
function renderSkillTitle(skillId) {
const skill = Skills[skillId];
const div = document.createElement("div");
div.className = "evolved-skill-title";
const name = div.appendChild(document.createElement("span"));
name.className = "skill-name";
name.textContent = skill.name;
name.setAttribute("data-skillid", skillId);
name.onclick = fastShowSkill;
const cd = div.appendChild(document.createElement("span"));
cd.className = "skill-cd";
cd.textContent = skill.initialCooldown - skill.maxLevel + 1;
if (skill.maxLevel > 1) {
const level = div.appendChild(document.createElement("span"));
level.className = "skill-level-label";
level.textContent = skill.maxLevel;
}
return div;
}
function renderSkillEntry(skills)
{
const ul = document.createElement("ul");
@@ -1553,9 +1580,9 @@ function renderSkill(skill, option = {})
let skills = skill.skills;
const ul = document.createElement("ul");
ul.className = "random-active-skill";
skills.forEach(subSkills=>{
skills.forEach(subSkill=>{
const li = ul.appendChild(document.createElement("li"));
li.appendChild(renderSkillEntry(subSkills));
li.appendChild(renderSkillEntry(subSkill));
});
let dict = {
skills: ul,
@@ -1563,6 +1590,27 @@ function renderSkill(skill, option = {})
frg.ap(tsp.skill.random_skills(dict));
break;
}
case SkillKinds.EvolvedSkills: { //技能进化
let skills = skill.skills, loop = skill.loop;
const ul = document.createElement("ul");
ul.className = "evolved-active-skill";
skills.forEach((subSkill, idx)=>{
const li = ul.appendChild(document.createElement("li"));
li.appendChild(renderSkillTitle(skill.params[idx]));
li.appendChild(renderSkillEntry(subSkill));
});
let dict = {
skills: ul,
};
frg.ap(tsp.skill.evolved_skills(dict));
if (loop) {
let dict2 = {
icon: createIcon("evolved-skill-loop"),
}
frg.ap(tsp.skill.evolved_skills_loop(dict2));
}
break;
}
case SkillKinds.Delay: { //威吓
let dict = {
icon: createIcon(skill.kind),


+ 5
- 1
script.js View File

@@ -3335,8 +3335,12 @@ function initialize(event) {
const card = Cards[this.mid] || Cards[0];
if (!card) return;
const activeSkill = skillParser(card.activeSkillId);
toggleDomClassName(
!activeSkill.some(skill=>skill.type == SkillKinds.EvolvedSkills),
"evolved-skill", skillBox);
skillDetailParsed.innerHTML = "";
skillDetailParsed.appendChild(renderSkillEntry(skillParser(card.activeSkillId)));
skillDetailParsed.appendChild(renderSkillEntry(activeSkill));
lskillDetailParsed.innerHTML = "";
lskillDetailParsed.appendChild(renderSkillEntry(skillParser(card.leaderSkillId)));
};


+ 41
- 4
style.css View File

@@ -2329,7 +2329,8 @@ icon.inflicts::after
{
content: attr(value);
}
.skill-box{
.skill-box
{
font-family: var(--game-font-family);
font-size: 16px;
border: #9C743E solid 2px;
@@ -2399,6 +2400,11 @@ icon.inflicts::after
background-image: linear-gradient(white 25%, #3377AA 80%);
}

.row-mon-skill .evolved-skill .type-title::after
{
background-image: linear-gradient(#228899 25%, #44DDDD 80%);
}

/*.row-mon-leader-skill .type-title::before,
.row-mon-leader-skill .type-title::after
{
@@ -2410,7 +2416,23 @@ icon.inflicts::after
}


.row-mon-skill .skill-title .skill-name{
.evolved-skill-title
{
background-color: #00000044;
font-family: var(--game-font-family);
font-weight: normal;
color: white;
padding: 0 10px 0 2px;
text-shadow:black 2px 2px 0;
}
.evolved-skill-title .skill-level-label,
.evolved-skill-title .skill-cd
{
float: right;
}
.row-mon-skill .skill-title .skill-name,
.evolved-skill-title .skill-name
{
color: #84BAFC;
cursor: pointer;
}
@@ -2453,11 +2475,21 @@ icon.inflicts::after
.skill-datail-parsed .detail-search::before{
content: "🔍";
}
.random-active-skill{
.random-active-skill,
.evolved-active-skill
{
padding-left: 1em;
}
.random-active-skill>li{
.random-active-skill>li,
.evolved-active-skill>li
{
list-style: decimal;
border-bottom: 1px solid white;
}
.random-active-skill>li:last-of-type,
.evolved-active-skill>li:last-of-type
{
border-bottom: unset;
}

.edit-box .button-box{
@@ -3772,4 +3804,9 @@ table .orb-icon
.icon-skill[data-icon-type="orb-nail"]
{
background-position-y:calc(-36px * 35);
}
.icon-skill[data-icon-type="evolved-skill-loop"]
{
background-image: url(images/icon-evolved-skill-loop.png);
background-size: contain;
}

Loading…
Cancel
Save