mirror of
https://github.com/Shu-Ying/noname-shuying.git
synced 2026-11-24 14:06:29 +08:00
fixed # 修复大量BUG
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { cardPackDefinitions } from "./packs/data.js";
|
||||
import { cardTypes, cardRarityLabels } from "./classification-types.js";
|
||||
import { liubeiCardTraits } from "./packs/liubei/traits.js";
|
||||
import { isRetiredDeckCard } from "./retired-cards.js";
|
||||
const definitions = [
|
||||
...cardPackDefinitions,
|
||||
{ name: "sha", category: "damage", owner: null, ...liubeiCardTraits.sha },
|
||||
@@ -42,6 +43,6 @@ export const cardDefinitions = createCardRegistry(definitions);
|
||||
|
||||
export function canAcquireCard(character, name, registry = cardDefinitions) {
|
||||
const definition = Object.hasOwn(registry, name) ? registry[name] : null;
|
||||
return !!definition && !definition.generatedOnly &&
|
||||
return !!definition && !definition.generatedOnly && !isRetiredDeckCard(character, name) &&
|
||||
(definition.owner === null || definition.owner === character);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user