enchantable.json 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {
  2. "properties": {
  3. "masterwork": {"type": "boolean"},
  4. "bonus": {"$ref": "#/definitions/bonus"},
  5. "enchantments": {
  6. "items": {
  7. "dependencies": {
  8. "effectiveBonus": {"properties": {"adHocValue": false}},
  9. "adHocValue": {"properties": {"effectiveBonus": false}}
  10. },
  11. "properties": {
  12. "name": {"type": "string"},
  13. "effectiveBonus": {"$ref": "#/definitions/bonus"},
  14. "adHocValue": {"$ref": "#/definitions/money"},
  15. "canAttachTo": {
  16. "items": {"$ref": "#/definitions/attachCriteria"},
  17. "type": "array"
  18. }
  19. },
  20. "oneOf": [
  21. {"required": ["name", "effectiveBonus"]},
  22. {"required": ["name", "adHocValue"]}
  23. ]
  24. "type": "object"
  25. },
  26. "type": "array"
  27. }
  28. },
  29. "definitions": {
  30. "bonus": {
  31. "type": "string",
  32. "enum": ["+1", "+2", "+3", "+4", "+5"]
  33. },
  34. "attachCriteria": {
  35. "items": {
  36. "enum": [
  37. "Slashing",
  38. "Piercing",
  39. "Bludgeoning",
  40. "Ranged",
  41. "Armor",
  42. "Shield",
  43. "Light",
  44. "Medium",
  45. "Heavy",
  46. "One-Handed",
  47. "Two-Handed"
  48. ],
  49. "type": "string",
  50. "uniqueItems": true
  51. },
  52. "type": "array"
  53. }
  54. }
  55. }