Merge pull request #952 from mengxinzxz/PR-Branch

bugfix
This commit is contained in:
Spmario233 2024-02-15 01:09:35 +08:00 committed by GitHub
commit a2b39a09d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View File

@ -3989,7 +3989,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
isCard:true, isCard:true,
}; };
if(target.hasUseTarget(card,true)){ if(target.hasUseTarget(card,true)){
target.chooseUseTarget(card,true); target.chooseUseTarget(card,true,false);
} }
}, },
ai:{ ai:{

View File

@ -8428,8 +8428,10 @@ export class Game extends Uninstantable {
return skills.addArray(skills.reduce((previousValue, currentValue) => { return skills.addArray(skills.reduce((previousValue, currentValue) => {
const info = get.info(currentValue); const info = get.info(currentValue);
if (info) { if (info) {
if (Array.isArray(info.group)) previousValue.push(...info.group); if (info.group) {
else if (info.group) previousValue.push(info.group); const adds = (Array.isArray(info.group) ? info.group : [info.group]).filter(i => lib.skill[i]);
previousValue.push(...adds);
}
} }
else console.log(currentValue); else console.log(currentValue);
return previousValue; return previousValue;

View File

@ -16,7 +16,7 @@ import {
createMenu, createMenu,
createConfig createConfig
} from "../index.js"; } from "../index.js";
import { ui, game, get, lib, _status } from "../../../../../noname.js"; import { ui, game, get ,ai ,lib, _status } from "../../../../../noname.js";
export const otherMenu = function (connectMenu) { export const otherMenu = function (connectMenu) {
if (connectMenu) return; if (connectMenu) return;