optolith-database-schema 0.2.1 → 0.2.2

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.2.2](https://github.com/elyukai/optolith-database-schema/compare/v0.2.1...v0.2.2) (2022-03-29)
6
+
7
+
8
+ ### Features
9
+
10
+ * add offset option for deriving AP value from improvement cost ([f556207](https://github.com/elyukai/optolith-database-schema/commit/f55620751b7a68383c74ba8c4256d11802ab99c7))
11
+
5
12
  ### [0.2.1](https://github.com/elyukai/optolith-database-schema/compare/v0.2.0...v0.2.1) (2022-03-29)
6
13
 
7
14
 
@@ -357,53 +357,53 @@ declare type CategoryOption = {
357
357
  /**
358
358
  * Generate AP values for each entry.
359
359
  */
360
- ap_value?: OptionSkillDeriveAdventurePointsValue<SkillIdentifier> | {
361
- tag: "CombatTechniques";
360
+ ap_value?: OptionSkillDeriveAdventurePointsValue<SkillIdentifier>;
361
+ } | {
362
+ tag: "CombatTechniques";
363
+ /**
364
+ * A list of combat technique categories.
365
+ * @minItems 1
366
+ */
367
+ categories: {
368
+ tag: CombatTechniqueCategory;
362
369
  /**
363
- * A list of combat technique categories.
364
- * @minItems 1
370
+ * Only include (`Intersection`) or exclude (`Difference`) specific
371
+ * entries.
365
372
  */
366
- categories: {
367
- tag: CombatTechniqueCategory;
368
- /**
369
- * Only include (`Intersection`) or exclude (`Difference`) specific
370
- * entries.
371
- */
372
- specific?: {
373
- operation: {
374
- tag: "Intersection";
375
- } | {
376
- tag: "Difference";
377
- };
378
- /**
379
- * The list of specific entries.
380
- * @minItems 1
381
- * @uniqueItems
382
- */
383
- list: {
384
- /**
385
- * The entry's identifier.
386
- * @integer
387
- * @minimum 1
388
- * @maximum 59
389
- */
390
- id: number;
391
- }[];
373
+ specific?: {
374
+ operation: {
375
+ tag: "Intersection";
376
+ } | {
377
+ tag: "Difference";
392
378
  };
393
379
  /**
394
- * Generate prerequisites for each entry of the category.
380
+ * The list of specific entries.
395
381
  * @minItems 1
382
+ * @uniqueItems
396
383
  */
397
- prerequisites?: (OptionSkillSelfPrerequisite | OptionOptionPrerequisite)[];
398
- }[];
384
+ list: {
385
+ /**
386
+ * The entry's identifier.
387
+ * @integer
388
+ * @minimum 1
389
+ * @maximum 59
390
+ */
391
+ id: number;
392
+ }[];
393
+ };
399
394
  /**
400
- * Generate AP values for each entry.
395
+ * Generate prerequisites for each entry of the category.
396
+ * @minItems 1
401
397
  */
402
- ap_value?: OptionSkillDeriveAdventurePointsValue<CombatTechniqueIdentifier>;
403
- };
398
+ prerequisites?: (OptionSkillSelfPrerequisite | OptionOptionPrerequisite)[];
399
+ }[];
400
+ /**
401
+ * Generate AP values for each entry.
402
+ */
403
+ ap_value?: OptionSkillDeriveAdventurePointsValue<CombatTechniqueIdentifier>;
404
404
  };
405
405
  declare enum SkillWithEnhancementsCategory {
406
- spells = "spells",
406
+ Spells = "Spells",
407
407
  Rituals = "Rituals",
408
408
  LiturgicalChants = "LiturgicalChants",
409
409
  Ceremonies = "Ceremonies"
@@ -445,14 +445,27 @@ declare type OptionOptionPrerequisite = {
445
445
  * Generate AP values for each entry.
446
446
  */
447
447
  declare type OptionSkillDeriveAdventurePointsValue<Identifier> = {
448
+ /**
449
+ * Derive the cost from the improvement cost of each entry.
450
+ *
451
+ * AP Value = Improvement Cost × `multiplier` + `offset`
452
+ */
448
453
  tag: "DerivedFromImprovementCost";
449
454
  /**
450
455
  * This number is multiplied with the improvement cost of the entry
451
456
  * (A = 1 to D = 4).
452
457
  * @integer
453
458
  * @minimum 2
459
+ * @default 1
454
460
  */
455
461
  multiplier?: number;
462
+ /**
463
+ * This number is added to the maybe multiplied improvement cost of the
464
+ * entry.
465
+ * @integer
466
+ * @default 0
467
+ */
468
+ offset?: number;
456
469
  } | {
457
470
  tag: "Fixed";
458
471
  /**
@@ -4,7 +4,7 @@
4
4
  */
5
5
  var SkillWithEnhancementsCategory;
6
6
  (function (SkillWithEnhancementsCategory) {
7
- SkillWithEnhancementsCategory["spells"] = "spells";
7
+ SkillWithEnhancementsCategory["Spells"] = "Spells";
8
8
  SkillWithEnhancementsCategory["Rituals"] = "Rituals";
9
9
  SkillWithEnhancementsCategory["LiturgicalChants"] = "LiturgicalChants";
10
10
  SkillWithEnhancementsCategory["Ceremonies"] = "Ceremonies";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Definitions and utilities for the flat-file database of Optolith, a character creation tool for the Pen and Paper RPG “The Dark Eye 5”, and its external integrations into other software.",
5
5
  "keywords": [
6
6
  "tde",
@@ -644,233 +644,238 @@
644
644
  "description": "Generate AP values for each entry.",
645
645
  "oneOf": [
646
646
  {
647
- "description": "Generate AP values for each entry.",
648
- "oneOf": [
649
- {
650
- "type": "object",
651
- "properties": {
652
- "tag": {
653
- "const": "DerivedFromImprovementCost"
654
- },
655
- "multiplier": {
656
- "description": "This number is multiplied with the improvement cost of the entry\n(A = 1 to D = 4).",
657
- "type": "integer",
658
- "minimum": 2
659
- }
660
- },
661
- "required": [
662
- "tag"
663
- ],
664
- "additionalProperties": false
647
+ "type": "object",
648
+ "properties": {
649
+ "tag": {
650
+ "description": "Derive the cost from the improvement cost of each entry.\n\nAP Value = Improvement Cost × `multiplier` + `offset`",
651
+ "const": "DerivedFromImprovementCost"
665
652
  },
666
- {
667
- "type": "object",
668
- "properties": {
669
- "tag": {
670
- "const": "Fixed"
671
- },
672
- "map": {
673
- "description": "A mapping of skill identifiers to their specific AP values.",
674
- "type": "array",
675
- "items": {
676
- "type": "object",
677
- "properties": {
678
- "id": {
679
- "$ref": "./_Identifier.schema.json#/definitions/SkillIdentifier"
680
- },
681
- "ap_value": {
682
- "description": "The AP value for the specified entry.",
683
- "type": "integer",
684
- "minimum": 1
685
- }
686
- },
687
- "required": [
688
- "id",
689
- "ap_value"
690
- ],
691
- "additionalProperties": false
692
- }
693
- },
694
- "default": {
695
- "description": "The default value of an entry. Used as a fallback if no value is\nfound in `list`.",
696
- "type": "integer",
697
- "minimum": 1
698
- }
699
- },
700
- "required": [
701
- "tag",
702
- "map",
703
- "default"
704
- ],
705
- "additionalProperties": false
653
+ "multiplier": {
654
+ "description": "This number is multiplied with the improvement cost of the entry\n(A = 1 to D = 4).",
655
+ "type": "integer",
656
+ "minimum": 2
657
+ },
658
+ "offset": {
659
+ "description": "This number is added to the maybe multiplied improvement cost of the\nentry.",
660
+ "type": "integer"
706
661
  }
707
- ]
662
+ },
663
+ "required": [
664
+ "tag"
665
+ ],
666
+ "additionalProperties": false
708
667
  },
709
668
  {
710
669
  "type": "object",
711
670
  "properties": {
712
671
  "tag": {
713
- "const": "CombatTechniques"
672
+ "const": "Fixed"
714
673
  },
715
- "categories": {
716
- "description": "A list of combat technique categories.",
674
+ "map": {
675
+ "description": "A mapping of skill identifiers to their specific AP values.",
717
676
  "type": "array",
718
677
  "items": {
719
678
  "type": "object",
720
679
  "properties": {
721
- "tag": {
722
- "$ref": "#/definitions/CombatTechniqueCategory"
680
+ "id": {
681
+ "$ref": "./_Identifier.schema.json#/definitions/SkillIdentifier"
723
682
  },
724
- "specific": {
725
- "description": "Only include (`Intersection`) or exclude (`Difference`) specific\nentries.",
683
+ "ap_value": {
684
+ "description": "The AP value for the specified entry.",
685
+ "type": "integer",
686
+ "minimum": 1
687
+ }
688
+ },
689
+ "required": [
690
+ "id",
691
+ "ap_value"
692
+ ],
693
+ "additionalProperties": false
694
+ }
695
+ },
696
+ "default": {
697
+ "description": "The default value of an entry. Used as a fallback if no value is\nfound in `list`.",
698
+ "type": "integer",
699
+ "minimum": 1
700
+ }
701
+ },
702
+ "required": [
703
+ "tag",
704
+ "map",
705
+ "default"
706
+ ],
707
+ "additionalProperties": false
708
+ }
709
+ ]
710
+ }
711
+ },
712
+ "required": [
713
+ "tag",
714
+ "categories"
715
+ ],
716
+ "additionalProperties": false
717
+ },
718
+ {
719
+ "type": "object",
720
+ "properties": {
721
+ "tag": {
722
+ "const": "CombatTechniques"
723
+ },
724
+ "categories": {
725
+ "description": "A list of combat technique categories.",
726
+ "type": "array",
727
+ "items": {
728
+ "type": "object",
729
+ "properties": {
730
+ "tag": {
731
+ "$ref": "#/definitions/CombatTechniqueCategory"
732
+ },
733
+ "specific": {
734
+ "description": "Only include (`Intersection`) or exclude (`Difference`) specific\nentries.",
735
+ "type": "object",
736
+ "properties": {
737
+ "operation": {
738
+ "oneOf": [
739
+ {
726
740
  "type": "object",
727
741
  "properties": {
728
- "operation": {
729
- "oneOf": [
730
- {
731
- "type": "object",
732
- "properties": {
733
- "tag": {
734
- "const": "Intersection"
735
- }
736
- },
737
- "required": [
738
- "tag"
739
- ],
740
- "additionalProperties": false
741
- },
742
- {
743
- "type": "object",
744
- "properties": {
745
- "tag": {
746
- "const": "Difference"
747
- }
748
- },
749
- "required": [
750
- "tag"
751
- ],
752
- "additionalProperties": false
753
- }
754
- ]
755
- },
756
- "list": {
757
- "description": "The list of specific entries.",
758
- "type": "array",
759
- "items": {
760
- "type": "object",
761
- "properties": {
762
- "id": {
763
- "description": "The entry's identifier.",
764
- "type": "integer",
765
- "maximum": 59,
766
- "minimum": 1
767
- }
768
- },
769
- "required": [
770
- "id"
771
- ],
772
- "additionalProperties": false
773
- },
774
- "minItems": 1,
775
- "uniqueItems": true
742
+ "tag": {
743
+ "const": "Intersection"
776
744
  }
777
745
  },
778
746
  "required": [
779
- "operation",
780
- "list"
747
+ "tag"
781
748
  ],
782
749
  "additionalProperties": false
783
750
  },
784
- "prerequisites": {
785
- "description": "Generate prerequisites for each entry of the category.",
786
- "type": "array",
787
- "items": {
788
- "oneOf": [
789
- {
790
- "$ref": "#/definitions/OptionSkillSelfPrerequisite"
791
- },
792
- {
793
- "$ref": "#/definitions/OptionOptionPrerequisite"
794
- }
795
- ]
751
+ {
752
+ "type": "object",
753
+ "properties": {
754
+ "tag": {
755
+ "const": "Difference"
756
+ }
796
757
  },
797
- "minItems": 1
758
+ "required": [
759
+ "tag"
760
+ ],
761
+ "additionalProperties": false
798
762
  }
799
- },
800
- "required": [
801
- "tag"
802
- ],
803
- "additionalProperties": false
763
+ ]
804
764
  },
805
- "minItems": 1
806
- },
807
- "ap_value": {
808
- "description": "Generate AP values for each entry.",
809
- "oneOf": [
810
- {
765
+ "list": {
766
+ "description": "The list of specific entries.",
767
+ "type": "array",
768
+ "items": {
811
769
  "type": "object",
812
770
  "properties": {
813
- "tag": {
814
- "const": "DerivedFromImprovementCost"
815
- },
816
- "multiplier": {
817
- "description": "This number is multiplied with the improvement cost of the entry\n(A = 1 to D = 4).",
771
+ "id": {
772
+ "description": "The entry's identifier.",
818
773
  "type": "integer",
819
- "minimum": 2
774
+ "maximum": 59,
775
+ "minimum": 1
820
776
  }
821
777
  },
822
778
  "required": [
823
- "tag"
779
+ "id"
824
780
  ],
825
781
  "additionalProperties": false
826
782
  },
783
+ "minItems": 1,
784
+ "uniqueItems": true
785
+ }
786
+ },
787
+ "required": [
788
+ "operation",
789
+ "list"
790
+ ],
791
+ "additionalProperties": false
792
+ },
793
+ "prerequisites": {
794
+ "description": "Generate prerequisites for each entry of the category.",
795
+ "type": "array",
796
+ "items": {
797
+ "oneOf": [
827
798
  {
828
- "type": "object",
829
- "properties": {
830
- "tag": {
831
- "const": "Fixed"
832
- },
833
- "map": {
834
- "description": "A mapping of skill identifiers to their specific AP values.",
835
- "type": "array",
836
- "items": {
837
- "type": "object",
838
- "properties": {
839
- "id": {
840
- "$ref": "./_Identifier.schema.json#/definitions/CombatTechniqueIdentifier"
841
- },
842
- "ap_value": {
843
- "description": "The AP value for the specified entry.",
844
- "type": "integer",
845
- "minimum": 1
846
- }
847
- },
848
- "required": [
849
- "id",
850
- "ap_value"
851
- ],
852
- "additionalProperties": false
853
- }
854
- },
855
- "default": {
856
- "description": "The default value of an entry. Used as a fallback if no value is\nfound in `list`.",
857
- "type": "integer",
858
- "minimum": 1
859
- }
860
- },
861
- "required": [
862
- "tag",
863
- "map",
864
- "default"
865
- ],
866
- "additionalProperties": false
799
+ "$ref": "#/definitions/OptionSkillSelfPrerequisite"
800
+ },
801
+ {
802
+ "$ref": "#/definitions/OptionOptionPrerequisite"
867
803
  }
868
804
  ]
805
+ },
806
+ "minItems": 1
807
+ }
808
+ },
809
+ "required": [
810
+ "tag"
811
+ ],
812
+ "additionalProperties": false
813
+ },
814
+ "minItems": 1
815
+ },
816
+ "ap_value": {
817
+ "description": "Generate AP values for each entry.",
818
+ "oneOf": [
819
+ {
820
+ "type": "object",
821
+ "properties": {
822
+ "tag": {
823
+ "description": "Derive the cost from the improvement cost of each entry.\n\nAP Value = Improvement Cost × `multiplier` + `offset`",
824
+ "const": "DerivedFromImprovementCost"
825
+ },
826
+ "multiplier": {
827
+ "description": "This number is multiplied with the improvement cost of the entry\n(A = 1 to D = 4).",
828
+ "type": "integer",
829
+ "minimum": 2
830
+ },
831
+ "offset": {
832
+ "description": "This number is added to the maybe multiplied improvement cost of the\nentry.",
833
+ "type": "integer"
834
+ }
835
+ },
836
+ "required": [
837
+ "tag"
838
+ ],
839
+ "additionalProperties": false
840
+ },
841
+ {
842
+ "type": "object",
843
+ "properties": {
844
+ "tag": {
845
+ "const": "Fixed"
846
+ },
847
+ "map": {
848
+ "description": "A mapping of skill identifiers to their specific AP values.",
849
+ "type": "array",
850
+ "items": {
851
+ "type": "object",
852
+ "properties": {
853
+ "id": {
854
+ "$ref": "./_Identifier.schema.json#/definitions/CombatTechniqueIdentifier"
855
+ },
856
+ "ap_value": {
857
+ "description": "The AP value for the specified entry.",
858
+ "type": "integer",
859
+ "minimum": 1
860
+ }
861
+ },
862
+ "required": [
863
+ "id",
864
+ "ap_value"
865
+ ],
866
+ "additionalProperties": false
867
+ }
868
+ },
869
+ "default": {
870
+ "description": "The default value of an entry. Used as a fallback if no value is\nfound in `list`.",
871
+ "type": "integer",
872
+ "minimum": 1
869
873
  }
870
874
  },
871
875
  "required": [
872
876
  "tag",
873
- "categories"
877
+ "map",
878
+ "default"
874
879
  ],
875
880
  "additionalProperties": false
876
881
  }
@@ -887,7 +892,7 @@
887
892
  },
888
893
  "SkillWithEnhancementsCategory": {
889
894
  "enum": [
890
- "spells",
895
+ "Spells",
891
896
  "Rituals",
892
897
  "LiturgicalChants",
893
898
  "Ceremonies"