Browse Source

解决一些flags没有替换完的问题

pull/1/head
枫谷剑仙 2 years ago
parent
commit
fbc6c29738
3 changed files with 12 additions and 16 deletions
  1. +3
    -3
      script-json_data.js
  2. +7
    -7
      script-skill-parser.js
  3. +2
    -6
      service-worker.js

+ 3
- 3
script-json_data.js View File

@@ -1316,7 +1316,7 @@ const specialSearchFunctions = (function() {
else if(skill.type == 231 && sk[6] > 0)
{
outObj.skilltype = 1;
outObj.awoken = sk.slice(1, 5).filter(Boolean).filter(flags);
outObj.awoken = sk.slice(1, 5).filter(Boolean);
outObj.turns = sk[0];
outObj.rate = sk[6];
}
@@ -1351,7 +1351,7 @@ const specialSearchFunctions = (function() {
outObj.rate = sk[4];
} else if (skill.type == 231 && sk[7] > 0) {
outObj.skilltype = 1;
outObj.awoken = sk.slice(1, 5).filter(Boolean).filter(flags);
outObj.awoken = sk.slice(1, 5).filter(Boolean);
outObj.turns = sk[0];
outObj.rate = sk[7];
} else if (skill.type == 50 || skill.type == 90) {
@@ -2395,7 +2395,7 @@ const specialSearchFunctions = (function() {
if (skill.type == 249) {
fragment.append(createOrbsList(Bin.unflags(sk[1])));
}
fragment.append(`${sk[7]? sk[7] : '固定'+sk.slice(2,7).flatMap(flags).length }`,`×${sk[0]}T`);
fragment.append(`${sk[7]? sk[7] : '固定'+sk.slice(2,7).flatMap(Bin.unflags).length }`,`×${sk[0]}T`);
return fragment;
}
},


+ 7
- 7
script-skill-parser.js View File

@@ -1232,7 +1232,7 @@ const skillObjectParsers = {
[123](percent, attrs, types, atk, rcv) { return powerUp(Bin.unflags(attrs), Bin.unflags(types), p.mul({ atk: atk || 100, rcv: rcv || 100 }), c.hp(percent, 100)); },
[124](attrs1, attrs2, attrs3, attrs4, attrs5, min, mul, bonus) {
const attrs = [attrs1, attrs2, attrs3, attrs4, attrs5].filter(Boolean);
return powerUp(null, null, p.scaleMatchAttrs(attrs.flatMap(flags), min, bonus ? attrs.length : min, [mul, 100], [bonus, 0]));
return powerUp(null, null, p.scaleMatchAttrs(attrs.flatMap(Bin.unflags), min, bonus ? attrs.length : min, [mul, 100], [bonus, 0]));
},
[125](mon1, mon2, mon3, mon4, mon5, hp, atk, rcv) { return powerUp(null, null, p.mul({ hp: hp || 100, atk: atk || 100, rcv: rcv || 100 }), c.compo('card', [mon1, mon2, mon3, mon4, mon5].filter(Boolean))); },
[126](attrs, turns, turns2, percent) { return activeTurns(turns === turns2 ? turns : [turns, turns2], orbDropIncrease(v.percent(percent), Bin.unflags(attrs))); },
@@ -1349,7 +1349,7 @@ const skillObjectParsers = {
},
[164](attrs1, attrs2, attrs3, attrs4, min, atk, rcv, bonus) {
const attrs = [attrs1, attrs2, attrs3, attrs4].filter(Boolean);
return powerUp(null, null, p.scaleMatchAttrs(attrs.flatMap(flags), min, attrs.length, [atk, rcv], [bonus, bonus]));
return powerUp(null, null, p.scaleMatchAttrs(attrs.flatMap(Bin.unflags), min, attrs.length, [atk, rcv], [bonus, bonus]));
},
[165](attrs, min, baseAtk, baseRcv, bonusAtk, bonusRcv, incr) {
const attrsArr = Bin.unflags(attrs);
@@ -1371,7 +1371,7 @@ const skillObjectParsers = {
},
[171](attrs1, attrs2, attrs3, attrs4, min, mul, percent, bonus) {
const attrs = [attrs1, attrs2, attrs3, attrs4].filter(Boolean);
return powerUp(null, null, p.scaleMatchAttrs(attrs.flatMap(flags), min, bonus ? attrs.length : min, [mul, 100], [bonus ?? 0, 0]), null, v.percent(percent));
return powerUp(null, null, p.scaleMatchAttrs(attrs.flatMap(Bin.unflags), min, bonus ? attrs.length : min, [mul, 100], [bonus ?? 0, 0]), null, v.percent(percent));
},
[172]() { return setOrbState(Attributes.orbs(), 'unlocked'); },
[173](turns, attrAbsorb, comboAbsorb, damageAbsorb) {
@@ -1482,7 +1482,7 @@ const skillObjectParsers = {
},
[201](attrs1, attrs2, attrs3, attrs4, min, damage) {
const attrs = [attrs1, attrs2, attrs3, attrs4].filter(Boolean);
return powerUp(null, null, p.scaleMatchAttrs(attrs.flatMap(flags), min, min, [100, 100], [0, 0]), null, null, [followAttackFixed(damage)]);
return powerUp(null, null, p.scaleMatchAttrs(attrs.flatMap(Bin.unflags), min, min, [100, 100], [0, 0]), null, null, [followAttackFixed(damage)]);
},
[202](id) {
return henshin(id);
@@ -1502,7 +1502,7 @@ const skillObjectParsers = {
[205](attrs, turns) { return activeTurns(turns, orbDropIncrease(null, Bin.unflags(attrs == -1 ? 0b1111111111: attrs), 'locked')); },
[206](attrs1, attrs2, attrs3, attrs4, attrs5, min, combo) {
const attrs = [attrs1, attrs2, attrs3, attrs4, attrs5].filter(Boolean);
return powerUp(null, null, p.scaleMatchAttrs(attrs.flatMap(flags), min, min, [100, 100], [0, 0]), null, null, combo ? [addCombo(combo)] : null);
return powerUp(null, null, p.scaleMatchAttrs(attrs.flatMap(Bin.unflags), min, min, [100, 100], [0, 0]), null, null, combo ? [addCombo(combo)] : null);
},
[207](turns, time, row1, row2, row3, row4, row5, count) {
/*return activeTurns(turns, count ?
@@ -1513,7 +1513,7 @@ const skillObjectParsers = {
if (count) {
options.count = count;
} else {
options.positions = [row1, row2, row3, row4, row5].map(flags);
options.positions = [row1, row2, row3, row4, row5].map(Bin.unflags);
}
return activeTurns(turns,
boardJammingStates('roulette', count ? 'random' : 'shape', options)
@@ -1671,7 +1671,7 @@ const skillObjectParsers = {
if (count) {
options.count = count;
} else {
options.positions = [row1, row2, row3, row4, row5].map(flags);
options.positions = [row1, row2, row3, row4, row5].map(Bin.unflags);
}
return activeTurns(turns,
boardJammingStates('roulette', count ? 'random' : 'shape', options)


+ 2
- 6
service-worker.js View File

@@ -25511,11 +25511,11 @@ const cachesMap = new Map([
],
[
"script-json_data.js",
"11cec86f554c4b4dceb01d57850b20a9"
"24fa2bd9a0ff6e04fa1520d027701a3e"
],
[
"script-skill-parser.js",
"3ec1eb93ca9b88f454c0e9e69e347a06"
"7fd84302ec5dc1d1a7b68a8f4bbec9d5"
],
[
"script-universal_function.js",
@@ -25753,10 +25753,6 @@ const cachesMap = new Map([
"library/html2canvas.min.js",
"d7530aa0b7587e627484c49fdf8f13f2"
],
[
"library/minified.js",
"4d02ac7bb781ce3f52a8008f2047e77e"
],
[
"library/zxing.umd.min.js",
"46934f662940b020aee6466c1e334c5f"


Loading…
Cancel
Save