Skip to content

Instantly share code, notes, and snippets.

@allison-casey
Created September 19, 2019 01:01
Show Gist options
  • Save allison-casey/a3670cedd95473333d158fc7404ba8ae to your computer and use it in GitHub Desktop.
Save allison-casey/a3670cedd95473333d158fc7404ba8ae to your computer and use it in GitHub Desktop.
---
definitions:
effect:
type: object
properties:
id:
oneOf:
- type: integer
- type: string
name:
type: string
description:
type: string
effect:
oneOf:
- type: object
properties:
ref:
type: string
operator:
type: string
enum:
- add
- subtract
- divide
- multiply
value:
oneOf:
- type: integer
- type: string
pattern: "^%\\d*$"
- type: string
pattern: "^\\d+d\\d+$"
required:
- ref
- operator
- value
- type: object
properties:
ref:
type: string
operator:
type: string
enum:
- add
- subtract
- divide
- multiply
expression:
type: string
required:
- ref
- operator
- expression
required:
- effect
type: object
properties:
id:
oneOf:
- type: integer
- type: string
name:
type: string
description:
type: string
target:
type: string
enum:
- self
- aoe
- entity
cost:
type: object
properties:
type:
type: string
enum:
- ap
format:
type: string
enum:
- exactly
- upto
value:
type: integer
required:
- type
- value
duration:
type: integer
effect:
"$ref": "#/definitions/effect"
children:
type: array
items:
ref: "#"
required:
- target
- effect
---
"$schema": http://json-schema.org/draft-07/schema#
type: object
properties:
id:
type: number
exclusiveMinimum: 0
name:
type: string
level:
type: integer
minimum: 0
morality:
type: string
enum:
- good
- neutral
- evil
lawfulness:
type: string
enum:
- lawful
- neutral
- chaotic
xp:
type: integer
minimum: 0
items:
type: array
items:
type: object
properties:
name:
type: string
description:
type: string
count:
type: integer
minimum: 1
required:
- name
required:
- id
- name
- level
- morality
- lawfulness
- xp
---
id: live-steal
name: Life Steal
description: Do 1d8 damage to a target and receive damage done as health
target: entity
cost:
type: ap
format: upto
value: 2
effect:
effect:
ref: "#/health"
operator: subtract
value: 2d10
children:
- target: self
effect:
ref: "#/health"
operator: add
value: "%"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment