增加237新技能
This commit is contained in:
parent
b93d7ea6e4
commit
ec11b42282
|
@ -37,7 +37,10 @@ class CustomTokenList extends Array {
|
|||
} else {
|
||||
throw new TypeError(`${CustomTokenList.name}.constructor: Argument 1 is not an Attr or HTMLElement.\n参数 1 不是 Attr 或 HTMLElement。`);
|
||||
}
|
||||
|
||||
let initializeValue = this.#attribute.nodeValue;
|
||||
if (initializeValue) { //如果值已经存在,则先添加到TokenList
|
||||
this.add(...new Set(initializeValue.split(/\s+/g)));
|
||||
}
|
||||
const _this = this;
|
||||
this.#observer = new MutationObserver(function(mutationList) {
|
||||
for (const mutation of mutationList) {
|
||||
|
|
|
@ -417,7 +417,6 @@ const SkillKinds = {
|
|||
SkillProviso: "skill-proviso",
|
||||
ImpartAwakenings: "impart-awakenings",
|
||||
ObstructOpponent: "obstruct-opponent",
|
||||
|
||||
}
|
||||
|
||||
function skillParser(skillId)
|
||||
|
@ -1477,6 +1476,11 @@ const parsers = {
|
|||
[236](...ids) { //随机变身
|
||||
return henshin(ids.distinct(), true);
|
||||
},
|
||||
[237](turns, hp) { //改变HP上限
|
||||
return activeTurns(turns,
|
||||
powerUp(null, null, p.mul({ hp: hp }))
|
||||
);
|
||||
},
|
||||
[1000](type, pos, ...ids) {
|
||||
const posType = (type=>{
|
||||
switch (type) {
|
||||
|
|
|
@ -95,10 +95,12 @@ Array.prototype.deleteLatter = function(item = null) {
|
|||
this.splice(index + 1);
|
||||
return this;
|
||||
}
|
||||
//数组去重
|
||||
//数组去重,改变自身
|
||||
Array.prototype.distinct = function() {
|
||||
let _set = new Set(this);
|
||||
return Array.from(_set)
|
||||
const _set = new Set(this);
|
||||
this.length = 0;
|
||||
this.splice(this.length,0,..._set);
|
||||
return this.valueOf();
|
||||
}
|
||||
Array.prototype.randomShift = function() {
|
||||
return this.splice(Math.random() * this.length, 1)?.[0];
|
||||
|
|
Loading…
Reference in New Issue