Add awakenings to blueprints

This commit is contained in:
Justin Edmund 2022-12-23 16:40:42 -08:00
parent 7bdee95c0e
commit 6ccc8fd338
3 changed files with 16 additions and 1 deletions

View file

@ -10,6 +10,14 @@ module Api
view :nested do
fields :position, :uncap_level, :perpetuity
field :awakening do |c|
{
type: c.awakening_type,
level: c.awakening_level
}
end
association :character, name: :object, blueprint: CharacterBlueprint
end

View file

@ -32,6 +32,13 @@ module Api
end
end
field :awakening, if: ->(_field_name, w, _options) { w.weapon.awakening } do |w|
{
type: w.awakening_type,
level: w.awakening_level
}
end
view :full do
include_view :nested
association :party, blueprint: PartyBlueprint, view: :minimal

View file

@ -12,7 +12,7 @@ module Api
fields :granblue_id, :element, :proficiency,
:max_level, :max_skill_level, :limit, :rarity,
:series, :ax
:series, :ax, :awakening
field :uncap do |w|
{