@arcadia-eternity/data-pack-base 4.10.0 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6489,6 +6489,7 @@ var dist_exports = /* @__PURE__ */ __exportAll$1({
6489
6489
  EnvironmentRulesSchema: () => EnvironmentRulesSchema,
6490
6490
  Gender: () => Gender,
6491
6491
  IgnoreStageStrategy: () => IgnoreStageStrategy,
6492
+ IndependentEnvironmentRulesSchema: () => IndependentEnvironmentRulesSchema,
6492
6493
  MAX_RAGE: () => 100,
6493
6494
  Nature: () => Nature,
6494
6495
  NatureMap: () => NatureMap,
@@ -6534,10 +6535,12 @@ var dist_exports = /* @__PURE__ */ __exportAll$1({
6534
6535
  requireElementChart: () => requireElementChart,
6535
6536
  resolveElementChart: () => resolveElementChart,
6536
6537
  resolveEnhancement: () => resolveEnhancement,
6538
+ resolveEnvironmentBattleOptions: () => resolveEnvironmentBattleOptions,
6537
6539
  resolveEnvironmentMechanics: () => resolveEnvironmentMechanics,
6538
6540
  resolveEnvironmentTeam: () => resolveEnvironmentTeam,
6539
6541
  resolveSkillGroupValue: () => resolveSkillGroupValue,
6540
6542
  resolveSkillParameters: () => resolveSkillParameters,
6543
+ resolveTeamSelectionConfig: () => resolveTeamSelectionConfig,
6541
6544
  ruleCollectionsSchema: () => ruleCollectionsSchema,
6542
6545
  scaledIndividualValues: () => scaledIndividualValues,
6543
6546
  sha256Bytes: () => sha256Bytes,
@@ -7734,6 +7737,17 @@ function readNatureCatalog(input) {
7734
7737
  };
7735
7738
  });
7736
7739
  }
7740
+ function resolveTeamSelectionConfig(config = {}) {
7741
+ return {
7742
+ mode: config.mode ?? "TEAM_SELECTION",
7743
+ minTeamSize: config.minTeamSize ?? 1,
7744
+ maxTeamSize: config.maxTeamSize ?? 6,
7745
+ allowStarterSelection: config.allowStarterSelection ?? true,
7746
+ showOpponentTeam: config.showOpponentTeam ?? false,
7747
+ teamInfoVisibility: config.teamInfoVisibility ?? "HIDDEN",
7748
+ timeLimit: config.timeLimit ?? 60
7749
+ };
7750
+ }
7737
7751
  let SetStageStrategy = /* @__PURE__ */ function(SetStageStrategy) {
7738
7752
  SetStageStrategy["add"] = "add";
7739
7753
  SetStageStrategy["set"] = "set";
@@ -8393,6 +8407,31 @@ const EnvironmentRulesSchema = object({
8393
8407
  individualValueDefault: number$1().int().min(0).max(120).optional(),
8394
8408
  individualValues: object({ max: number$1().int().min(0).max(120) }).strict().optional(),
8395
8409
  allowFaintSwitch: boolean().optional(),
8410
+ timer: object({
8411
+ enabled: boolean(),
8412
+ turnTimeLimit: number$1().int().min(0).max(86400).optional(),
8413
+ totalTimeLimit: number$1().int().min(0).max(86400).optional(),
8414
+ animationPauseEnabled: boolean().optional(),
8415
+ maxAnimationDuration: number$1().int().min(1).max(2e4).optional()
8416
+ }).strict().optional(),
8417
+ teamSelection: object({
8418
+ enabled: boolean(),
8419
+ mode: _enum([
8420
+ "TEAM_SELECTION",
8421
+ "FULL_TEAM",
8422
+ "VIEW_ONLY"
8423
+ ]).optional(),
8424
+ minTeamSize: number$1().int().min(1).max(6).optional(),
8425
+ maxTeamSize: number$1().int().min(1).max(6).optional(),
8426
+ allowStarterSelection: boolean().optional(),
8427
+ showOpponentTeam: boolean().optional(),
8428
+ teamInfoVisibility: _enum([
8429
+ "HIDDEN",
8430
+ "BASIC",
8431
+ "FULL"
8432
+ ]).optional(),
8433
+ timeLimit: number$1().int().min(0).max(86400).optional()
8434
+ }).strict().refine((value) => (value.minTeamSize ?? 1) <= (value.maxTeamSize ?? 6), "最少出战数量不能大于最多出战数量").optional(),
8396
8435
  inheritance: inheritanceSchema.optional(),
8397
8436
  enhancement: enhancementSchema.optional(),
8398
8437
  secondGenerationNatures: eligibilitySchema.optional()
@@ -8416,10 +8455,26 @@ const EnvironmentRulesSchema = object({
8416
8455
  uniqueSpecies: boolean().optional()
8417
8456
  }).strict().refine((value) => value.minSize === void 0 || value.maxSize === void 0 || value.minSize <= value.maxSize, "队伍最小数量不能大于最大数量").optional()
8418
8457
  }).strict().refine((rules) => rules.schemaVersion === 2 || rules.mechanics === void 0 && rules.learnsetAdjustments === void 0 && rules.constraints === void 0 && rules.matchups === void 0 && rules.skillParameters === void 0, "玩法机制需要规则版本 2");
8458
+ /** Only declared settings override the launcher's options. Each group inherits as a unit. */
8459
+ function resolveEnvironmentBattleOptions(rules) {
8460
+ const { timer, teamSelection } = rules?.mechanics ?? {};
8461
+ return {
8462
+ ...timer && { timerConfig: {
8463
+ ...DEFAULT_TIMER_CONFIG,
8464
+ ...timer
8465
+ } },
8466
+ ...teamSelection && { teamSelection: {
8467
+ enabled: teamSelection.enabled,
8468
+ config: resolveTeamSelectionConfig(teamSelection)
8469
+ } }
8470
+ };
8471
+ }
8419
8472
  function resolveEnvironmentTeam(rules) {
8420
8473
  const { minSize = 1, maxSize = 6, uniqueSpecies = false } = rules?.team ?? {};
8474
+ const selection = rules?.mechanics?.teamSelection;
8475
+ const selectionMin = selection?.enabled && (selection.mode ?? "TEAM_SELECTION") === "TEAM_SELECTION" ? selection.minTeamSize ?? 1 : 1;
8421
8476
  return {
8422
- minSize,
8477
+ minSize: Math.max(minSize, selectionMin),
8423
8478
  maxSize,
8424
8479
  uniqueSpecies
8425
8480
  };
@@ -8455,9 +8510,14 @@ function resolveEnvironmentMechanics(rules) {
8455
8510
  skillSlots: mechanics?.skillSlots
8456
8511
  };
8457
8512
  }
8458
- const EnvironmentRuleDeclarationSchema = EnvironmentRulesSchema.safeExtend({
8513
+ const declarationFields = {
8459
8514
  constraints: declaredConstraintsSchema.optional(),
8460
- collections: ruleCollectionsSchema.optional(),
8515
+ collections: ruleCollectionsSchema.optional()
8516
+ };
8517
+ const IndependentEnvironmentRulesSchema = EnvironmentRulesSchema.safeExtend(declarationFields).refine((value) => value.collections === void 0 || value.schemaVersion === 2, "具名集合需要规则版本 2");
8518
+ /** A rule set supplied by a content package. */
8519
+ const EnvironmentRuleDeclarationSchema = EnvironmentRulesSchema.safeExtend({
8520
+ ...declarationFields,
8461
8521
  include: uniqueList(reference).max(128).optional(),
8462
8522
  constraintEdits: constraintEditsSchema.optional()
8463
8523
  }).refine((value) => value.include === void 0 && value.constraintEdits === void 0 && value.collections === void 0 || value.schemaVersion === 2, "规则集引用需要规则版本 2");
@@ -24639,6 +24699,7 @@ var authoring_exports = /* @__PURE__ */ __exportAll$1({
24639
24699
  HealContext: () => HealContext,
24640
24700
  HealPhase: () => HealPhase,
24641
24701
  IgnoreStageStrategy: () => IgnoreStageStrategy,
24702
+ IndependentEnvironmentRulesSchema: () => IndependentEnvironmentRulesSchema,
24642
24703
  InteractivePhase: () => InteractivePhase,
24643
24704
  MAX_RAGE: () => 100,
24644
24705
  MarkAttributeSystem: () => MarkAttributeSystem,
@@ -24791,10 +24852,12 @@ var authoring_exports = /* @__PURE__ */ __exportAll$1({
24791
24852
  requireElementChart: () => requireElementChart,
24792
24853
  resolveElementChart: () => resolveElementChart,
24793
24854
  resolveEnhancement: () => resolveEnhancement,
24855
+ resolveEnvironmentBattleOptions: () => resolveEnvironmentBattleOptions,
24794
24856
  resolveEnvironmentMechanics: () => resolveEnvironmentMechanics,
24795
24857
  resolveEnvironmentTeam: () => resolveEnvironmentTeam,
24796
24858
  resolveSkillGroupValue: () => resolveSkillGroupValue,
24797
24859
  resolveSkillParameters: () => resolveSkillParameters,
24860
+ resolveTeamSelectionConfig: () => resolveTeamSelectionConfig,
24798
24861
  ruleCollectionsSchema: () => ruleCollectionsSchema,
24799
24862
  scaledIndividualValues: () => scaledIndividualValues,
24800
24863
  selectFrom: () => selectFrom,
@@ -1 +1 @@
1
- export const nativeBuildIdentity = Object.freeze({"formatVersion":1,"coreBuildId":"683246c3a6815217da6c0808333f9d838f05e24d029e74e8a72f0bf2b894299a","registryBuildId":"dbd084a712ade23a5d17f7cfd35e8dff11410e10ccb58f4ce6e69e261639d1bb"});
1
+ export const nativeBuildIdentity = Object.freeze({"formatVersion":1,"coreBuildId":"d45fed9a862fddc5048008ac76568839952063a8f1aa226f6407a76e46240725","registryBuildId":"925a61dd32a2a120c23f43ef7e87d06e07e8d4f8fae8b6d3f8a3bace8504312a"});
@@ -1,5 +1,5 @@
1
1
  lockfileVersion: 1
2
- generatedAt: 2026-11-20T16:29:08.695Z
2
+ generatedAt: 2026-11-21T04:03:29.876Z
3
3
  importers:
4
4
  .:
5
5
  specifiers: