Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate weapon stats to type string #13

Merged
merged 2 commits into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 34 additions & 34 deletions api/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 7 additions & 20 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Error'

components:
schemas:
Health:
Expand Down Expand Up @@ -589,24 +588,19 @@ components:
bun: ',pk'
name:
type: string
example: "Lance and Sword"
range:
type: integer
format: int64
type: string
attacks:
type: integer
format: int64
type: string
to_hit:
type: integer
format: int64
type: string
to_wound:
type: integer
format: int64
type: string
rend:
type: integer
format: int64
type: string
damage:
type: integer
format: int64
type: string
GrandAlliance:
type: object
required:
Expand Down Expand Up @@ -696,20 +690,14 @@ components:
type: string
command_abilities:
type: array
# x-go-extra-tags:
# bun: "rel:has-many,join:id=unit_id"
items:
$ref: '#/components/schemas/Attribute'
magic:
type: array
# x-go-extra-tags:
# bun: "rel:has-many,join:id=unit_id"
items:
$ref: '#/components/schemas/Attribute'
damage_table:
type: array
# x-go-extra-tags:
# bun: "rel:has-many,join:id=unit_id"
items:
$ref: '#/components/schemas/DamageTable'
missile_weapons:
Expand All @@ -720,7 +708,6 @@ components:
type: array
items:
$ref: '#/components/schemas/Weapon'

Army:
type: object
required:
Expand Down
38 changes: 26 additions & 12 deletions fixtures/units.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,26 @@
min_wounds_suffered: 0
melee_weapons:
- name: Celestine Hammer
range: 1
attacks: 4
to_hit: 3
to_wound: 3
rend: -1
damage: 2
range: '1'
attacks: '4+'
to_hit: '3+'
to_wound: '3+'
rend: '-1'
damage: 'D3'
- name: Stormbound Blade
range: '1'
attacks: '1'
to_hit: '3+'
to_wound: '4+'
rend: '-1'
damage: '2'
- name: Great Claws
range: '1'
attacks: '2'
to_hit: '3+'
to_wound: '3+'
rend: '-1'
damage: '1'
missile_weapons: []
- id: liberators
name: Liberators
Expand Down Expand Up @@ -75,10 +89,10 @@
min_wounds_suffered: 0
melee_weapons:
- name: Warhammer
range: 1
attacks: 1
to_hit: 4
to_wound: 3
rend: -1
damage: 1
range: '1'
attacks: '1+'
to_hit: '4+'
to_wound: '3+'
rend: '-1'
damage: '1'
missile_weapons: []
Loading