Merge branch 'libccy:PR-Branch' into PR-Branch

This commit is contained in:
157 2024-05-06 20:07:59 +08:00 committed by GitHub
commit edf585ec0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 10 deletions

View File

@ -84,6 +84,8 @@ const skills = {
if (name !== "dc_wuyi") { if (name !== "dc_wuyi") {
const skills = get.character(name, 3); const skills = get.character(name, 3);
skills.forEach(skill => { skills.forEach(skill => {
const info = get.info(skill);
if (!info || (info.ai && info.ai.combo)) return;
if (skill in _status.dcbenxi_map) return; if (skill in _status.dcbenxi_map) return;
const voices = game.parseSkillText(skill, name); const voices = game.parseSkillText(skill, name);
if ( if (

View File

@ -12198,7 +12198,7 @@ const skills = {
filter: function (event, player, name) { filter: function (event, player, name) {
if (player.hasSkill("zhiwei2")) return false; if (player.hasSkill("zhiwei2")) return false;
if (!game.hasPlayer(current => current != player)) return false; if (!game.hasPlayer(current => current != player)) return false;
if (get.mode() == "guozhan") return event.name == "showCharacter" && event.toShow(name => { if (get.mode() == "guozhan") return event.name == "showCharacter" && event.toShow.some(name => {
return get.character(name, 3).includes("zhiwei"); return get.character(name, 3).includes("zhiwei");
}); });
return event.name != "showCharacter" && (name != "phaseBefore" || game.phaseNumber == 0); return event.name != "showCharacter" && (name != "phaseBefore" || game.phaseNumber == 0);

View File

@ -14207,7 +14207,7 @@ const skills = {
.set("ai", () => { .set("ai", () => {
const player = get.event("player"), const player = get.event("player"),
trigger = get.event().getTrigger(); trigger = get.event().getTrigger();
const cards = trigger.cards.filterInD(); const cards = trigger.cards ? trigger.cards.filterInD() : [];
if (get.event().controls.includes("拿牌")) { if (get.event().controls.includes("拿牌")) {
if ( if (
cards.reduce((sum, card) => { cards.reduce((sum, card) => {

View File

@ -142,17 +142,14 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", {
gzbool = false; gzbool = false;
const mode = get.mode(); const mode = get.mode();
if (type == "character") { if (type == "character") {
nameinfo = get.character(name);
if (lib.characterPack[`mode_${mode}`] && lib.characterPack[`mode_${mode}`][name]) { if (lib.characterPack[`mode_${mode}`] && lib.characterPack[`mode_${mode}`][name]) {
if (mode == "guozhan") { if (mode == "guozhan") {
nameinfo = lib.character[name];
if (name.startsWith("gz_shibing")) name = name.slice(3, 11); if (name.startsWith("gz_shibing")) name = name.slice(3, 11);
else { else {
if ( if (lib.config.mode_config.guozhan.guozhanSkin && nameinfo && nameinfo.hasSkinInGuozhan){
lib.config.mode_config.guozhan.guozhanSkin &&
lib.character[name] &&
lib.character[name].hasSkinInGuozhan
)
gzbool = true; gzbool = true;
}
name = name.slice(3); name = name.slice(3);
} }
} else modeimage = mode; } else modeimage = mode;
@ -161,8 +158,6 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", {
name = name.split("::"); name = name.split("::");
modeimage = name[0]; modeimage = name[0];
name = name[1]; name = name[1];
} else {
nameinfo = get.character(name);
} }
} }
let imgPrefixUrl; let imgPrefixUrl;