消灭炉石传说模式下[4]和[5]的垃圾
This commit is contained in:
parent
88c31a49a0
commit
1f96b1f3ee
|
@ -67,7 +67,6 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
delete lib.translate.shuiyanqijunx_info_guozhan;
|
delete lib.translate.shuiyanqijunx_info_guozhan;
|
||||||
const pack = lib.yingbian_guozhan;
|
const pack = lib.yingbian_guozhan;
|
||||||
for (const i in pack) {
|
for (const i in pack) {
|
||||||
if (!pack[i][4]) pack[i][4] = [];
|
|
||||||
lib.character[i] = pack[i];
|
lib.character[i] = pack[i];
|
||||||
lib.characterPack.mode_guozhan[i] = pack[i];
|
lib.characterPack.mode_guozhan[i] = pack[i];
|
||||||
if (!lib.translate[i]) lib.translate[i] = lib.translate[i.slice(3)];
|
if (!lib.translate[i]) lib.translate[i] = lib.translate[i.slice(3)];
|
||||||
|
@ -120,7 +119,6 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
delete lib.translate.shuiyanqijunx_info_guozhan;
|
delete lib.translate.shuiyanqijunx_info_guozhan;
|
||||||
const pack2 = lib.yingbian_guozhan;
|
const pack2 = lib.yingbian_guozhan;
|
||||||
for (const i in pack2) {
|
for (const i in pack2) {
|
||||||
if (!pack2[i][4]) pack2[i][4] = [];
|
|
||||||
pack[i] = pack2[i];
|
pack[i] = pack2[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22329,7 +22327,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lib.character[button.link][4].includes("hiddenSkill")) return false;
|
if (lib.character[button.link].hasHiddenSkill) return false;
|
||||||
var filterChoice = function (name1, name2) {
|
var filterChoice = function (name1, name2) {
|
||||||
if (_status.separatism) return true;
|
if (_status.separatism) return true;
|
||||||
var group1 = lib.character[name1][1];
|
var group1 = lib.character[name1][1];
|
||||||
|
|
|
@ -307,9 +307,6 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
if (_status.mode != "normal") return;
|
if (_status.mode != "normal") return;
|
||||||
for (var i in lib.characterSingle) {
|
for (var i in lib.characterSingle) {
|
||||||
lib.character[i] = lib.characterSingle[i];
|
lib.character[i] = lib.characterSingle[i];
|
||||||
if (!lib.character[i][4]) {
|
|
||||||
lib.character[i][4] = [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (var j in lib.singleTranslate) lib.translate[j] = lib.singleTranslate[j];
|
for (var j in lib.singleTranslate) lib.translate[j] = lib.singleTranslate[j];
|
||||||
},
|
},
|
||||||
|
@ -352,11 +349,8 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
for (var j in singleTranslate) lib.translate[j] = singleTranslate[j];
|
for (var j in singleTranslate) lib.translate[j] = singleTranslate[j];
|
||||||
_status.characterlist = [];
|
_status.characterlist = [];
|
||||||
for (var i in characterSingle) {
|
for (var i in characterSingle) {
|
||||||
if (!jin && characterSingle[i][1] == "jin") continue;
|
if (!jin && get.convertedCharacter(characterSingle[i]) == "jin") continue;
|
||||||
lib.character[i] = characterSingle[i];
|
lib.character[i] = characterSingle[i];
|
||||||
if (!lib.character[i][4]) {
|
|
||||||
lib.character[i][4] = [];
|
|
||||||
}
|
|
||||||
_status.characterlist.push(i);
|
_status.characterlist.push(i);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -647,7 +641,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
[game.me, game.me.enemy].forEach((current) => {
|
[game.me, game.me.enemy].forEach((current) => {
|
||||||
if (
|
if (
|
||||||
current.storage.nohp ||
|
current.storage.nohp ||
|
||||||
(lib.character[current.name1][4].includes("hiddenSkill") && !current.noclick)
|
(lib.character[current.name1].hasHiddenSkil && !current.noclick)
|
||||||
) {
|
) {
|
||||||
current.storage.rawHp = 1;
|
current.storage.rawHp = 1;
|
||||||
current.storage.rawMaxHp = 1;
|
current.storage.rawMaxHp = 1;
|
||||||
|
@ -1116,7 +1110,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
current.init(result[i][0]);
|
current.init(result[i][0]);
|
||||||
if (
|
if (
|
||||||
current.storage.nohp ||
|
current.storage.nohp ||
|
||||||
(lib.character[current.name1][4].includes("hiddenSkill") && !current.noclick)
|
(lib.character[current.name1].hasHiddenSkil && !current.noclick)
|
||||||
) {
|
) {
|
||||||
current.storage.rawHp = 1;
|
current.storage.rawHp = 1;
|
||||||
current.storage.rawMaxHp = 1;
|
current.storage.rawMaxHp = 1;
|
||||||
|
@ -1134,7 +1128,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
current.init(result[i][0]);
|
current.init(result[i][0]);
|
||||||
if (
|
if (
|
||||||
current.storage.nohp ||
|
current.storage.nohp ||
|
||||||
(lib.character[current.name1][4].includes("hiddenSkill") &&
|
(lib.character[current.name1].hasHiddenSkil &&
|
||||||
!current.noclick)
|
!current.noclick)
|
||||||
) {
|
) {
|
||||||
current.storage.rawHp = 1;
|
current.storage.rawHp = 1;
|
||||||
|
|
|
@ -2256,33 +2256,33 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
var i, j, name;
|
var i, j, name;
|
||||||
for (var i in lib.characterPack.mode_stone) {
|
for (var i in lib.characterPack.mode_stone) {
|
||||||
lib.character[i] = lib.characterPack.mode_stone[i];
|
lib.character[i] = lib.characterPack.mode_stone[i];
|
||||||
if (lib.characterPack.mode_stone[i][4].includes("stonespecial")) continue;
|
if (lib.character[i].isSpecialInStoneMode) continue;
|
||||||
lib.character[i][3].add("stonesha");
|
lib.character[i].skills.add("stonesha");
|
||||||
lib.character[i][3].add("stoneshan");
|
lib.character[i].skills.add("stoneshan");
|
||||||
lib.character[i][3].add("stonedraw");
|
lib.character[i].skills.add("stonedraw");
|
||||||
name = i + "_stonecharacter";
|
name = i + "_stonecharacter";
|
||||||
lib.card[name] = {
|
lib.card[name] = {
|
||||||
image: "mode/stone/character/" + i,
|
image: "mode/stone/character/" + i,
|
||||||
stoneact: lib.character[i][5][0],
|
stoneact: lib.character[i].stoneModeData[0],
|
||||||
career: lib.character[i][5][2] || null,
|
career: lib.character[i].stoneModeData[2] || null,
|
||||||
};
|
};
|
||||||
for (j in lib.element.stonecharacter) {
|
for (j in lib.element.stonecharacter) {
|
||||||
lib.card[name][j] = lib.element.stonecharacter[j];
|
lib.card[name][j] = lib.element.stonecharacter[j];
|
||||||
}
|
}
|
||||||
lib.translate[name] = get.translation(i);
|
lib.translate[name] = get.translation(i);
|
||||||
lib.translate[name + "_info"] = get.skillintro(i);
|
lib.translate[name + "_info"] = get.skillintro(i);
|
||||||
if (lib.character[i][4].includes("stonehidden")) {
|
if (lib.character[i].isHiddenInStoneMode) {
|
||||||
lib.card[name].stonehidden = true;
|
lib.card[name].stonehidden = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!lib.character[i][5][2]) {
|
if (!lib.character[i].stoneModeData[2]) {
|
||||||
if (lib.character[i][5][0] < 3) {
|
if (lib.character[i].stoneModeData[0] < 3) {
|
||||||
list.push(name);
|
list.push(name);
|
||||||
} else {
|
} else {
|
||||||
list2.push(name);
|
list2.push(name);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
list3[lib.character[i][5][2]].push(name);
|
list3[lib.character[i].stoneModeData[2]].push(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_status.mode == "deck") {
|
if (_status.mode == "deck") {
|
||||||
|
@ -2415,8 +2415,8 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
var list = [];
|
var list = [];
|
||||||
event.list = list;
|
event.list = list;
|
||||||
for (i in lib.character) {
|
for (i in lib.character) {
|
||||||
if (lib.character[i][4] && lib.character[i][4].includes("minskin")) continue;
|
if (lib.character[i].isMinskin) continue;
|
||||||
if (lib.character[i][4] && lib.character[i][4].includes("stonehidden")) continue;
|
if (lib.character[i].isHiddenInStoneMode) continue;
|
||||||
if (lib.config.forbidstone.includes(i)) continue;
|
if (lib.config.forbidstone.includes(i)) continue;
|
||||||
if (lib.filter.characterDisabled(i)) continue;
|
if (lib.filter.characterDisabled(i)) continue;
|
||||||
list.push(i);
|
list.push(i);
|
||||||
|
@ -7232,10 +7232,10 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
var list = [];
|
var list = [];
|
||||||
for (var i in lib.character) {
|
for (var i in lib.character) {
|
||||||
if (
|
if (
|
||||||
lib.character[i][4].includes("stone") &&
|
lib.character[i].isFellowInStoneMode &&
|
||||||
!lib.character[i][4].includes("stonehidden") &&
|
!lib.character[i].isHiddenInStoneMode &&
|
||||||
lib.character[i][5] &&
|
lib.character[i].stoneModeData &&
|
||||||
lib.character[i][5][0] == num
|
lib.character[i].stoneModeData[0] == num
|
||||||
) {
|
) {
|
||||||
list.push(i);
|
list.push(i);
|
||||||
}
|
}
|
||||||
|
@ -7787,10 +7787,10 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
var list = [];
|
var list = [];
|
||||||
for (var i in lib.character) {
|
for (var i in lib.character) {
|
||||||
if (
|
if (
|
||||||
lib.character[i][4].includes("stone") &&
|
lib.character[i].isFellowInStoneMode &&
|
||||||
!lib.character[i][4].includes("stonehidden") &&
|
!lib.character[i].isHiddenInStoneMode &&
|
||||||
lib.character[i][5] &&
|
lib.character[i].stoneModeData &&
|
||||||
lib.character[i][5][0] == 1
|
lib.character[i].stoneModeData[0] == 1
|
||||||
) {
|
) {
|
||||||
list.push(i);
|
list.push(i);
|
||||||
}
|
}
|
||||||
|
@ -10366,9 +10366,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
||||||
var list = [];
|
var list = [];
|
||||||
var list2 = [];
|
var list2 = [];
|
||||||
for (var i in lib.character) {
|
for (var i in lib.character) {
|
||||||
if (lib.character[i][4].includes("stonelegend_" + player.career)) {
|
if (lib.character[i].trashBin.includes("stonelegend_" + player.career)) {
|
||||||
list.push(i);
|
list.push(i);
|
||||||
} else if (lib.character[i][4].includes("stonelegend")) {
|
} else if (lib.character[i].trashBin.includes("stonelegend")) {
|
||||||
list2.push(i);
|
list2.push(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,11 +95,26 @@ export class Character {
|
||||||
* @type { boolean }
|
* @type { boolean }
|
||||||
**/
|
**/
|
||||||
isAiForbidden = false;
|
isAiForbidden = false;
|
||||||
|
/**
|
||||||
|
* 武将牌在炉石模式下的特殊信息
|
||||||
|
* @type { array|undefined }
|
||||||
|
**/
|
||||||
|
stoneModeData;
|
||||||
|
/**
|
||||||
|
* 武将牌是否为炉石模式下的随从
|
||||||
|
* @type { boolean }
|
||||||
|
**/
|
||||||
|
isFellowInStoneMode = false;
|
||||||
/**
|
/**
|
||||||
* 武将牌是否为炉石模式下的隐藏武将
|
* 武将牌是否为炉石模式下的隐藏武将
|
||||||
* @type { boolean }
|
* @type { boolean }
|
||||||
**/
|
**/
|
||||||
isHiddenInStoneMode = false;
|
isHiddenInStoneMode = false;
|
||||||
|
/**
|
||||||
|
* 武将牌是否为炉石模式下的特殊随从(可以使用装备和锦囊)
|
||||||
|
* @type { boolean }
|
||||||
|
**/
|
||||||
|
isSpecialInStoneMode = false;
|
||||||
/**
|
/**
|
||||||
* 武将牌是否为bossallowed
|
* 武将牌是否为bossallowed
|
||||||
* @type { boolean }
|
* @type { boolean }
|
||||||
|
@ -137,6 +152,7 @@ export class Character {
|
||||||
this.hujia = get.infoHujia(data[2]);
|
this.hujia = get.infoHujia(data[2]);
|
||||||
this.skills = get.copy(data[3] || []);
|
this.skills = get.copy(data[3] || []);
|
||||||
if (data[4]) Character.convertTrashToProperties(this, data[4]);
|
if (data[4]) Character.convertTrashToProperties(this, data[4]);
|
||||||
|
if (data[5]) this.stoneModeData = data[5];
|
||||||
} else if (get.is.object(data)) {
|
} else if (get.is.object(data)) {
|
||||||
Object.assign(this, data);
|
Object.assign(this, data);
|
||||||
if (typeof this.maxHp !== "number") this.maxHp = this.hp;
|
if (typeof this.maxHp !== "number") this.maxHp = this.hp;
|
||||||
|
@ -175,8 +191,12 @@ export class Character {
|
||||||
character.isHiddenBoss = true;
|
character.isHiddenBoss = true;
|
||||||
} else if (item === "forbidai") {
|
} else if (item === "forbidai") {
|
||||||
character.isAiForbidden = true;
|
character.isAiForbidden = true;
|
||||||
|
} else if (item === "stone") {
|
||||||
|
character.isFellowInStoneMode = true;
|
||||||
} else if (item === "stonehidden") {
|
} else if (item === "stonehidden") {
|
||||||
character.isHiddenInStoneMode = true;
|
character.isHiddenInStoneMode = true;
|
||||||
|
} else if (item === "stonespecial") {
|
||||||
|
character.isSpecialInStoneMode = true;
|
||||||
} else if (item === "hiddenSkill") {
|
} else if (item === "hiddenSkill") {
|
||||||
character.hasHiddenSkill = true;
|
character.hasHiddenSkill = true;
|
||||||
} else if (item.startsWith("border:")) {
|
} else if (item.startsWith("border:")) {
|
||||||
|
@ -278,9 +298,15 @@ export class Character {
|
||||||
if (character.isAiForbidden) {
|
if (character.isAiForbidden) {
|
||||||
trashes.push("forbidai");
|
trashes.push("forbidai");
|
||||||
}
|
}
|
||||||
|
if (character.isFellowInStoneMode) {
|
||||||
|
trashes.push("stone");
|
||||||
|
}
|
||||||
if (character.isHiddenInStoneMode) {
|
if (character.isHiddenInStoneMode) {
|
||||||
trashes.push("stonehidden");
|
trashes.push("stonehidden");
|
||||||
}
|
}
|
||||||
|
if (character.isSpecialInStoneMode) {
|
||||||
|
trashes.push("stonespecial");
|
||||||
|
}
|
||||||
if (character.hasHiddenSkill) {
|
if (character.hasHiddenSkill) {
|
||||||
trashes.push("hiddenSkill");
|
trashes.push("hiddenSkill");
|
||||||
}
|
}
|
||||||
|
@ -302,4 +328,11 @@ export class Character {
|
||||||
set 4(trashBin) {
|
set 4(trashBin) {
|
||||||
console.warn("你set你🐎的废弃属性");
|
console.warn("你set你🐎的废弃属性");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get 5(){
|
||||||
|
return this.stoneModeData;
|
||||||
|
}
|
||||||
|
set 5(stoneData){
|
||||||
|
this.stoneModeData = stoneData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue