Compare commits
129 commits
main
...
9th-anni-u
| Author | SHA1 | Date | |
|---|---|---|---|
| 3c4b39287c | |||
| 53bc28d76a | |||
| b5cb4b1da5 | |||
| b2cdfbd774 | |||
| 178277ff3a | |||
| 9d777bcbf2 | |||
| c8eb9187d6 | |||
| 67c004b2a4 | |||
| ba52a1df43 | |||
| 7f5cfc1c05 | |||
| 2596e2785a | |||
| 39567fcefd | |||
| 9247e38353 | |||
| 31c9245c98 | |||
| 5f92d64373 | |||
| a123e5fe23 | |||
| bdb68f17a9 | |||
| c5ecd8d6e9 | |||
| 36761f0185 | |||
| b05670bbd3 | |||
| 260ca449a7 | |||
| 2dd6dbae57 | |||
| 6e837e5d18 | |||
| 6bbeeb3df2 | |||
| 7d576c3485 | |||
| 4b7b48cbd3 | |||
| 6b24970c54 | |||
| e45dabf39a | |||
| cce33ebf08 | |||
| bedd72a753 | |||
| c4ae38a432 | |||
| e13bc6f636 | |||
| c0bc62acc2 | |||
| 0ae9b5ba6b | |||
| 50c9dbe7b3 | |||
| 05ea4a41f3 | |||
| 8d68a97ab1 | |||
| 91fdbfe393 | |||
| df21dd6f37 | |||
| 1474580d37 | |||
| 6c12b1937a | |||
| 8fb6fab0d7 | |||
| c336aef449 | |||
| 54ed380d57 | |||
| 651a7ff5f6 | |||
| d39dca337b | |||
| 3dc606de9e | |||
| 7a290c2945 | |||
| 6c084610ad | |||
| 2c4d8b6fe1 | |||
| 906faaeb1e | |||
| 986ef2fb56 | |||
| 1e0ada0613 | |||
| 584fd31776 | |||
| 5025f51d04 | |||
| 8bd78d7764 | |||
| 159439a67e | |||
| c70290d6d5 | |||
| caf357a84d | |||
| 7911374c1e | |||
| bc14ac80ec | |||
| 404720d259 | |||
| 7d142ada54 | |||
| ea7650a9bb | |||
| c474d8030b | |||
| 0ff7e7a8dd | |||
| 7de4bb6863 | |||
| 95748db677 | |||
| 90f2f6e390 | |||
| 1f785d4695 | |||
| 3ced0c6523 | |||
| 5b7a61c3bb | |||
| 7d7c96df80 | |||
| cbfe7ce2da | |||
| bb7d32d262 | |||
| 31240936ab | |||
| fcbf97fe0a | |||
| 6bf100a830 | |||
| ec0549cd18 | |||
| 098fdbffa8 | |||
| a1967bbd2c | |||
| 99578d33ee | |||
| 0797306569 | |||
| 559f30226d | |||
| ee7085f65e | |||
| 9fea1350b3 | |||
| 6ecc2a706c | |||
| d91fd72431 | |||
| ed76afe44c | |||
| 4ee65aecd3 | |||
| 67146e3ab3 | |||
| 54948e4435 | |||
| a8a0a5944c | |||
| d343adeca3 | |||
| bd15d91cdd | |||
| 5460a1d167 | |||
| b248fb62ea | |||
| 717c08ea8f | |||
| 422651668e | |||
| 8c1fae02d4 | |||
| bb79f68a2c | |||
| cfee8b0b31 | |||
| cf270f0243 | |||
| 65d8024476 | |||
| 67cc1138e6 | |||
| c5f2c9d080 | |||
| 633db43e94 | |||
| 73022778f6 | |||
| 18ca78a272 | |||
| f73593d8e1 | |||
| 79b9b4e225 | |||
| b6e8dd93b1 | |||
| fa2962ae1c | |||
| a3e76d53e7 | |||
| 1925678888 | |||
| b0b446aba3 | |||
| 433bd19f6d | |||
| 2a465aca3b | |||
| c2576973bb | |||
| 70bbd47606 | |||
| 24b15c0740 | |||
| 3f914d3be7 | |||
| 8f9bd0077e | |||
| 3617088418 | |||
| 5351123aa2 | |||
| beb9f5aa0c | |||
| a2fff663d6 | |||
| 7404bcbac9 | |||
| 6cf9c8d2ae |
21 changed files with 338 additions and 78 deletions
42
README.md
42
README.md
|
|
@ -1,24 +1,40 @@
|
||||||
# README
|
# hensei-api
|
||||||
|
|
||||||
This README would normally document whatever steps are necessary to get the
|
**hensei-api** is the backend for [granblue.team](https://app.granblue.team/), an app for saving and sharing teams for [Granblue Fantasy](https://game.granbluefantasy.jp).
|
||||||
application up and running.
|
|
||||||
|
|
||||||
Things you may want to cover:
|
**Please note that these instructions are a work-in-progress!**
|
||||||
|
|
||||||
* Ruby version
|
### Installing Ruby
|
||||||
|
|
||||||
* System dependencies
|
You'll need to install ruby-3.0.0. We recommend using [RVM](https://rvm.io/) and creating a gemset to manage your Ruby installation. Before proceeding, install the GPG keys from the official RVM website.
|
||||||
|
|
||||||
* Configuration
|
```
|
||||||
|
\curl -sSL https://get.rvm.io | bash -s stable
|
||||||
|
rvm install ruby-3.0.0
|
||||||
|
rvm use 3.0.0@granblue --create
|
||||||
|
```
|
||||||
|
|
||||||
* Database creation
|
### Installing dependencies
|
||||||
|
|
||||||
* Database initialization
|
After cloning the repo, install the project dependencies with:
|
||||||
|
|
||||||
* How to run the test suite
|
```
|
||||||
|
bundle install
|
||||||
|
```
|
||||||
|
|
||||||
* Services (job queues, cache servers, search engines, etc.)
|
### Creating the database
|
||||||
|
|
||||||
* Deployment instructions
|
Once the dependencies have been installed, you'll need to create and seed the database. Seed data is provided but may not be up-to-date!
|
||||||
|
|
||||||
* ...
|
```
|
||||||
|
rails db:create
|
||||||
|
rails db:migrate
|
||||||
|
rails db:seed
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running the server
|
||||||
|
|
||||||
|
Then, you can start the server with:
|
||||||
|
```
|
||||||
|
rails server
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -20,22 +20,6 @@ module Api
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
field :hp do |w|
|
|
||||||
{
|
|
||||||
min_hp: w.min_hp,
|
|
||||||
max_hp: w.max_hp,
|
|
||||||
max_hp_flb: w.max_hp_flb
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
field :atk do |w|
|
|
||||||
{
|
|
||||||
min_atk: w.min_atk,
|
|
||||||
max_atk: w.max_atk,
|
|
||||||
max_atk_flb: w.max_atk_flb
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
field :race do |w|
|
field :race do |w|
|
||||||
[
|
[
|
||||||
w.race1,
|
w.race1,
|
||||||
|
|
@ -50,17 +34,28 @@ module Api
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
field :data do |w|
|
field :stats do |w|
|
||||||
{
|
{
|
||||||
base_da: w.base_da,
|
atk: {
|
||||||
base_ta: w.base_ta
|
min_atk: w.min_atk,
|
||||||
}
|
max_atk: w.max_atk,
|
||||||
end
|
max_atk_flb: w.max_atk_flb,
|
||||||
|
max_atk_ulb: w.max_atk_ulb
|
||||||
field :ougi_ratio do |w|
|
},
|
||||||
{
|
hp: {
|
||||||
ougi_ratio: w.ougi_ratio,
|
min_hp: w.min_hp,
|
||||||
ougi_ratio_flb: w.ougi_ratio_flb
|
max_hp: w.max_hp,
|
||||||
|
max_hp_flb: w.max_hp_flb,
|
||||||
|
max_hp_ulb: w.max_hp_ulb
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
base_da: w.base_da,
|
||||||
|
base_ta: w.base_ta
|
||||||
|
},
|
||||||
|
charge_attack: {
|
||||||
|
ougi_ratio: w.ougi_ratio,
|
||||||
|
ougi_ratio_flb: w.ougi_ratio_flb
|
||||||
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ module Api
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
fields :granblue_id, :row, :ml, :order, :accessory, :accessory_type
|
fields :granblue_id, :row, :master_level, :ultimate_mastery, :order, :accessory, :accessory_type
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ module Api
|
||||||
end
|
end
|
||||||
|
|
||||||
view :jobs do
|
view :jobs do
|
||||||
|
fields :master_level, :ultimate_mastery
|
||||||
association :job,
|
association :job,
|
||||||
blueprint: JobBlueprint
|
blueprint: JobBlueprint
|
||||||
include_view :job_skills
|
include_view :job_skills
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ module Api
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
fields :granblue_id, :element, :rarity, :max_level
|
fields :granblue_id, :element, :rarity
|
||||||
|
|
||||||
field :uncap do |w|
|
field :uncap do |w|
|
||||||
{
|
{
|
||||||
|
|
@ -20,23 +20,23 @@ module Api
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
field :hp do |w|
|
field :stats do |w|
|
||||||
{
|
{
|
||||||
min_hp: w.min_hp,
|
atk: {
|
||||||
max_hp: w.max_hp,
|
min_atk: w.min_atk,
|
||||||
max_hp_flb: w.max_hp_flb,
|
max_atk: w.max_atk,
|
||||||
max_hp_ulb: w.max_hp_ulb,
|
max_atk_flb: w.max_atk_flb,
|
||||||
max_hp_xlb: w.max_hp_xlb
|
max_atk_ulb: w.max_atk_ulb,
|
||||||
}
|
max_atk_xlb: w.max_atk_xlb
|
||||||
end
|
},
|
||||||
|
hp: {
|
||||||
field :atk do |w|
|
min_hp: w.min_hp,
|
||||||
{
|
max_hp: w.max_hp,
|
||||||
min_atk: w.min_atk,
|
max_hp_flb: w.max_hp_flb,
|
||||||
max_atk: w.max_atk,
|
max_hp_ulb: w.max_hp_ulb,
|
||||||
max_atk_flb: w.max_atk_flb,
|
max_hp_xlb: w.max_hp_xlb
|
||||||
max_atk_ulb: w.max_atk_ulb,
|
},
|
||||||
max_atk_xlb: w.max_atk_xlb
|
max_level: w.max_level,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,21 @@ module Api
|
||||||
end
|
end
|
||||||
|
|
||||||
fields :granblue_id, :element, :proficiency,
|
fields :granblue_id, :element, :proficiency,
|
||||||
:max_level, :max_skill_level, :limit, :rarity,
|
:limit, :rarity, :series
|
||||||
:series, :ax, :ax_type, :awakening
|
|
||||||
|
field :ax do |w|
|
||||||
|
{
|
||||||
|
has_ax: w.ax,
|
||||||
|
type: w.ax_type
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
field :awakening do |w|
|
||||||
|
{
|
||||||
|
has_awakening: w.awakening,
|
||||||
|
types: w.awakening_types
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
field :uncap do |w|
|
field :uncap do |w|
|
||||||
{
|
{
|
||||||
|
|
@ -21,21 +34,22 @@ module Api
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
field :hp do |w|
|
field :stats do |w|
|
||||||
{
|
{
|
||||||
min_hp: w.min_hp,
|
atk: {
|
||||||
max_hp: w.max_hp,
|
min_atk: w.min_atk,
|
||||||
max_hp_flb: w.max_hp_flb,
|
max_atk: w.max_atk,
|
||||||
max_hp_ulb: w.max_hp_ulb
|
max_atk_flb: w.max_atk_flb,
|
||||||
}
|
max_atk_ulb: w.max_atk_ulb
|
||||||
end
|
},
|
||||||
|
hp: {
|
||||||
field :atk do |w|
|
min_hp: w.min_hp,
|
||||||
{
|
max_hp: w.max_hp,
|
||||||
min_atk: w.min_atk,
|
max_hp_flb: w.max_hp_flb,
|
||||||
max_atk: w.max_atk,
|
max_hp_ulb: w.max_hp_ulb
|
||||||
max_atk_flb: w.max_atk_flb,
|
},
|
||||||
max_atk_ulb: w.max_atk_ulb
|
max_level: w.max_level,
|
||||||
|
max_skill_level: w.max_skill_level
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddAwakeningTypesToWeapons < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :weapons, :awakening_types, :integer, array: true, default: []
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
class AddUltimateMasteryToParties < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :parties, :ultimate_mastery, :integer
|
||||||
|
rename_column :parties, :ml, :master_level
|
||||||
|
add_column :jobs, :ultimate_mastery, :boolean, default: false, null: false
|
||||||
|
rename_column :jobs, :ml, :master_level
|
||||||
|
change_column_null :jobs, :master_level, false
|
||||||
|
end
|
||||||
|
end
|
||||||
13
db/migrate/20230311065331_create_books_table.rb
Normal file
13
db/migrate/20230311065331_create_books_table.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
class CreateBooksTable < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
def change
|
||||||
|
create_table :books, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||||
|
t.string :name_en, null: false, unique: true
|
||||||
|
t.string :name_jp, null: false, unique: true
|
||||||
|
t.string :description_en, null: false, unique: true
|
||||||
|
t.string :description_jp, null: false, unique: true
|
||||||
|
t.string :granblue_id, null: false, unique: true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
32
db/migrate/20230311073805_create_effects.rb
Normal file
32
db/migrate/20230311073805_create_effects.rb
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
class CreateEffects < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
create_table :effects, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||||
|
t.string :name_en, null: false
|
||||||
|
t.string :name_jp, null: false
|
||||||
|
|
||||||
|
t.string :description_en, null: false
|
||||||
|
t.string :description_jp, null: false
|
||||||
|
|
||||||
|
t.integer :accuracy_value
|
||||||
|
t.string :accuracy_suffix
|
||||||
|
t.string :accuracy_comparator
|
||||||
|
|
||||||
|
t.jsonb :strength, array: true
|
||||||
|
# {
|
||||||
|
# "min": integer,
|
||||||
|
# "max": integer,
|
||||||
|
# "value": integer,
|
||||||
|
# "suffix": string
|
||||||
|
# }
|
||||||
|
|
||||||
|
t.integer :healing_cap
|
||||||
|
|
||||||
|
t.boolean :duration_indefinite, default: false, null: false
|
||||||
|
t.integer :duration_value
|
||||||
|
t.string :duration_unit
|
||||||
|
|
||||||
|
t.string :notes_en
|
||||||
|
t.string :notes_jp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
25
db/migrate/20230311073806_create_character_skills.rb
Normal file
25
db/migrate/20230311073806_create_character_skills.rb
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
class CreateCharacterSkills < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
create_table :character_skills, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||||
|
t.references :character, type: :uuid
|
||||||
|
|
||||||
|
t.string :name_en, unique: true, null: false
|
||||||
|
t.string :name_jp, unique: true, null: false
|
||||||
|
|
||||||
|
t.string :description_en, unique: true, null: false
|
||||||
|
t.string :description_jp, unique: true, null: false
|
||||||
|
|
||||||
|
t.integer :type, null: false
|
||||||
|
t.integer :position, null: false
|
||||||
|
|
||||||
|
t.string :form
|
||||||
|
t.integer :cooldown, default: 0, null: false
|
||||||
|
t.integer :lockout, default: 0, null: false
|
||||||
|
t.integer :duration, array: true
|
||||||
|
t.boolean :recast, default: false, null: false
|
||||||
|
t.integer :obtained_at, default: 1, null: false
|
||||||
|
|
||||||
|
t.uuid :effects, array: true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
18
db/migrate/20230311073807_create_character_charge_attacks.rb
Normal file
18
db/migrate/20230311073807_create_character_charge_attacks.rb
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
class CreateCharacterChargeAttacks < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
create_table :character_charge_attacks, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||||
|
t.references :character, type: :uuid
|
||||||
|
|
||||||
|
t.string :name_en, unique: true, null: false
|
||||||
|
t.string :name_jp, unique: true, null: false
|
||||||
|
|
||||||
|
t.string :description_en, unique: true, null: false
|
||||||
|
t.string :description_jp, unique: true, null: false
|
||||||
|
|
||||||
|
t.integer :order, null: false
|
||||||
|
t.string :form
|
||||||
|
|
||||||
|
t.uuid :effects, array: true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
21
db/migrate/20230311073808_create_character_support_skills.rb
Normal file
21
db/migrate/20230311073808_create_character_support_skills.rb
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
class CreateCharacterSupportSkills < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
create_table :character_support_skills, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||||
|
t.references :character, type: :uuid
|
||||||
|
|
||||||
|
t.string :name_en, unique: true, null: false
|
||||||
|
t.string :name_jp, unique: true, null: false
|
||||||
|
|
||||||
|
t.string :description_en, unique: true, null: false
|
||||||
|
t.string :description_jp, unique: true, null: false
|
||||||
|
|
||||||
|
t.integer :position, null: false
|
||||||
|
t.integer :obtained_at
|
||||||
|
|
||||||
|
t.boolean :emp, default: false, null: false
|
||||||
|
t.boolean :transcendence, default: false, null: false
|
||||||
|
|
||||||
|
t.uuid :effects, array: true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
class AddFullAutoTogglesToGridCharacter < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
change_table(:grid_characters) do |t|
|
||||||
|
t.boolean :skill0_enabled, null: false, default: true
|
||||||
|
t.boolean :skill1_enabled, null: false, default: true
|
||||||
|
t.boolean :skill2_enabled, null: false, default: true
|
||||||
|
t.boolean :skill3_enabled, null: false, default: true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddQuickSummonToGridSummons < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :grid_summons, :quick_summon, :boolean, default: false, null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
6
db/migrate/20230311092753_add_nicknames_to_characters.rb
Normal file
6
db/migrate/20230311092753_add_nicknames_to_characters.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
class AddNicknamesToCharacters < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :characters, :nicknames_en, :string, array: true, default: [], null: false
|
||||||
|
add_column :characters, :nicknames_jp, :string, array: true, default: [], null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
6
db/migrate/20230311092803_add_nicknames_to_weapons.rb
Normal file
6
db/migrate/20230311092803_add_nicknames_to_weapons.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
class AddNicknamesToWeapons < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :weapons, :nicknames_en, :string, array: true, default: [], null: false
|
||||||
|
add_column :weapons, :nicknames_jp, :string, array: true, default: [], null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
6
db/migrate/20230311092812_add_nicknames_to_summons.rb
Normal file
6
db/migrate/20230311092812_add_nicknames_to_summons.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
class AddNicknamesToSummons < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :summons, :nicknames_en, :string, array: true, default: [], null: false
|
||||||
|
add_column :summons, :nicknames_jp, :string, array: true, default: [], null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
class AddGranblueIdToWeaponKeys < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
end
|
||||||
|
end
|
||||||
82
db/schema.rb
82
db/schema.rb
|
|
@ -10,19 +10,62 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
|
ActiveRecord::Schema[7.0].define(version: 2023_03_11_092812) do
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "btree_gin"
|
enable_extension "btree_gin"
|
||||||
enable_extension "pg_trgm"
|
enable_extension "pg_trgm"
|
||||||
enable_extension "pgcrypto"
|
enable_extension "pgcrypto"
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
enable_extension "timescaledb"
|
|
||||||
|
|
||||||
create_table "app_updates", primary_key: "updated_at", id: :datetime, force: :cascade do |t|
|
create_table "app_updates", primary_key: "updated_at", id: :datetime, force: :cascade do |t|
|
||||||
t.string "update_type", null: false
|
t.string "update_type", null: false
|
||||||
t.string "version"
|
t.string "version"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "character_charge_attacks", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||||
|
t.uuid "character_id"
|
||||||
|
t.string "name_en", null: false
|
||||||
|
t.string "name_jp", null: false
|
||||||
|
t.string "description_en", null: false
|
||||||
|
t.string "description_jp", null: false
|
||||||
|
t.integer "order", null: false
|
||||||
|
t.string "form"
|
||||||
|
t.uuid "effects", array: true
|
||||||
|
t.index ["character_id"], name: "index_character_charge_attacks_on_character_id"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "character_skills", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||||
|
t.uuid "character_id"
|
||||||
|
t.string "name_en", null: false
|
||||||
|
t.string "name_jp", null: false
|
||||||
|
t.string "description_en", null: false
|
||||||
|
t.string "description_jp", null: false
|
||||||
|
t.integer "type", null: false
|
||||||
|
t.integer "position", null: false
|
||||||
|
t.string "form"
|
||||||
|
t.integer "cooldown", default: 0, null: false
|
||||||
|
t.integer "lockout", default: 0, null: false
|
||||||
|
t.integer "duration", array: true
|
||||||
|
t.boolean "recast", default: false, null: false
|
||||||
|
t.integer "obtained_at", default: 1, null: false
|
||||||
|
t.uuid "effects", array: true
|
||||||
|
t.index ["character_id"], name: "index_character_skills_on_character_id"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "character_support_skills", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||||
|
t.uuid "character_id"
|
||||||
|
t.string "name_en", null: false
|
||||||
|
t.string "name_jp", null: false
|
||||||
|
t.string "description_en", null: false
|
||||||
|
t.string "description_jp", null: false
|
||||||
|
t.integer "position", null: false
|
||||||
|
t.integer "obtained_at"
|
||||||
|
t.boolean "emp", default: false, null: false
|
||||||
|
t.boolean "transcendence", default: false, null: false
|
||||||
|
t.uuid "effects", array: true
|
||||||
|
t.index ["character_id"], name: "index_character_support_skills_on_character_id"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "characters", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
create_table "characters", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||||
t.string "name_en"
|
t.string "name_en"
|
||||||
t.string "name_jp"
|
t.string "name_jp"
|
||||||
|
|
@ -50,9 +93,28 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
|
||||||
t.integer "max_hp_ulb"
|
t.integer "max_hp_ulb"
|
||||||
t.integer "max_atk_ulb"
|
t.integer "max_atk_ulb"
|
||||||
t.integer "character_id", default: [], null: false, array: true
|
t.integer "character_id", default: [], null: false, array: true
|
||||||
|
t.string "nicknames_en", default: [], null: false, array: true
|
||||||
|
t.string "nicknames_jp", default: [], null: false, array: true
|
||||||
t.index ["name_en"], name: "index_characters_on_name_en", opclass: :gin_trgm_ops, using: :gin
|
t.index ["name_en"], name: "index_characters_on_name_en", opclass: :gin_trgm_ops, using: :gin
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "effects", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||||
|
t.string "name_en", null: false
|
||||||
|
t.string "name_jp", null: false
|
||||||
|
t.string "description_en", null: false
|
||||||
|
t.string "description_jp", null: false
|
||||||
|
t.integer "accuracy_value"
|
||||||
|
t.string "accuracy_suffix"
|
||||||
|
t.string "accuracy_comparator"
|
||||||
|
t.jsonb "strength", array: true
|
||||||
|
t.integer "healing_cap"
|
||||||
|
t.boolean "duration_indefinite", default: false, null: false
|
||||||
|
t.integer "duration_value"
|
||||||
|
t.string "duration_unit"
|
||||||
|
t.string "notes_en"
|
||||||
|
t.string "notes_jp"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "data_migrations", primary_key: "version", id: :string, force: :cascade do |t|
|
create_table "data_migrations", primary_key: "version", id: :string, force: :cascade do |t|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -80,6 +142,10 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
|
||||||
t.jsonb "ring4", default: {"modifier"=>nil, "strength"=>nil}, null: false
|
t.jsonb "ring4", default: {"modifier"=>nil, "strength"=>nil}, null: false
|
||||||
t.jsonb "earring", default: {"modifier"=>nil, "strength"=>nil}, null: false
|
t.jsonb "earring", default: {"modifier"=>nil, "strength"=>nil}, null: false
|
||||||
t.jsonb "awakening", default: {"type"=>1, "level"=>1}, null: false
|
t.jsonb "awakening", default: {"type"=>1, "level"=>1}, null: false
|
||||||
|
t.boolean "skill0_enabled", default: true, null: false
|
||||||
|
t.boolean "skill1_enabled", default: true, null: false
|
||||||
|
t.boolean "skill2_enabled", default: true, null: false
|
||||||
|
t.boolean "skill3_enabled", default: true, null: false
|
||||||
t.index ["character_id"], name: "index_grid_characters_on_character_id"
|
t.index ["character_id"], name: "index_grid_characters_on_character_id"
|
||||||
t.index ["party_id"], name: "index_grid_characters_on_party_id"
|
t.index ["party_id"], name: "index_grid_characters_on_party_id"
|
||||||
end
|
end
|
||||||
|
|
@ -94,6 +160,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.integer "transcendence_step", default: 0, null: false
|
t.integer "transcendence_step", default: 0, null: false
|
||||||
|
t.boolean "quick_summon", default: false, null: false
|
||||||
t.index ["party_id"], name: "index_grid_summons_on_party_id"
|
t.index ["party_id"], name: "index_grid_summons_on_party_id"
|
||||||
t.index ["summon_id"], name: "index_grid_summons_on_summon_id"
|
t.index ["summon_id"], name: "index_grid_summons_on_summon_id"
|
||||||
end
|
end
|
||||||
|
|
@ -154,12 +221,13 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
|
||||||
t.integer "proficiency1"
|
t.integer "proficiency1"
|
||||||
t.integer "proficiency2"
|
t.integer "proficiency2"
|
||||||
t.string "row"
|
t.string "row"
|
||||||
t.boolean "ml", default: false
|
t.boolean "master_level", default: false, null: false
|
||||||
t.integer "order"
|
t.integer "order"
|
||||||
t.uuid "base_job_id"
|
t.uuid "base_job_id"
|
||||||
t.string "granblue_id"
|
t.string "granblue_id"
|
||||||
t.boolean "accessory", default: false
|
t.boolean "accessory", default: false
|
||||||
t.integer "accessory_type", default: 0
|
t.integer "accessory_type", default: 0
|
||||||
|
t.boolean "ultimate_mastery", default: false, null: false
|
||||||
t.index ["base_job_id"], name: "index_jobs_on_base_job_id"
|
t.index ["base_job_id"], name: "index_jobs_on_base_job_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -213,7 +281,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
|
||||||
t.integer "element"
|
t.integer "element"
|
||||||
t.integer "weapons_count"
|
t.integer "weapons_count"
|
||||||
t.uuid "job_id"
|
t.uuid "job_id"
|
||||||
t.integer "ml"
|
t.integer "master_level"
|
||||||
t.uuid "skill1_id"
|
t.uuid "skill1_id"
|
||||||
t.uuid "skill2_id"
|
t.uuid "skill2_id"
|
||||||
t.uuid "skill3_id"
|
t.uuid "skill3_id"
|
||||||
|
|
@ -231,6 +299,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
|
||||||
t.integer "summons_count"
|
t.integer "summons_count"
|
||||||
t.string "edit_key"
|
t.string "edit_key"
|
||||||
t.uuid "local_id"
|
t.uuid "local_id"
|
||||||
|
t.integer "ultimate_mastery"
|
||||||
t.index ["accessory_id"], name: "index_parties_on_accessory_id"
|
t.index ["accessory_id"], name: "index_parties_on_accessory_id"
|
||||||
t.index ["job_id"], name: "index_parties_on_job_id"
|
t.index ["job_id"], name: "index_parties_on_job_id"
|
||||||
t.index ["skill0_id"], name: "index_parties_on_skill0_id"
|
t.index ["skill0_id"], name: "index_parties_on_skill0_id"
|
||||||
|
|
@ -273,6 +342,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
|
||||||
t.boolean "xlb", default: false, null: false
|
t.boolean "xlb", default: false, null: false
|
||||||
t.integer "max_atk_xlb"
|
t.integer "max_atk_xlb"
|
||||||
t.integer "max_hp_xlb"
|
t.integer "max_hp_xlb"
|
||||||
|
t.string "nicknames_en", default: [], null: false, array: true
|
||||||
|
t.string "nicknames_jp", default: [], null: false, array: true
|
||||||
t.index ["name_en"], name: "index_summons_on_name_en", opclass: :gin_trgm_ops, using: :gin
|
t.index ["name_en"], name: "index_summons_on_name_en", opclass: :gin_trgm_ops, using: :gin
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -326,6 +397,9 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
|
||||||
t.boolean "awakening", default: true, null: false
|
t.boolean "awakening", default: true, null: false
|
||||||
t.boolean "limit", default: false, null: false
|
t.boolean "limit", default: false, null: false
|
||||||
t.boolean "ax", default: false, null: false
|
t.boolean "ax", default: false, null: false
|
||||||
|
t.integer "awakening_types", default: [], array: true
|
||||||
|
t.string "nicknames_en", default: [], null: false, array: true
|
||||||
|
t.string "nicknames_jp", default: [], null: false, array: true
|
||||||
t.index ["name_en"], name: "index_weapons_on_name_en", opclass: :gin_trgm_ops, using: :gin
|
t.index ["name_en"], name: "index_weapons_on_name_en", opclass: :gin_trgm_ops, using: :gin
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ namespace :granblue do
|
||||||
|
|
||||||
puts "Summon #{id}"
|
puts "Summon #{id}"
|
||||||
sizes.each do |size|
|
sizes.each do |size|
|
||||||
path = "#{Rails.root}/download/character-#{size}"
|
path = "#{Rails.root}/download/summon-#{size}"
|
||||||
download_images(url[size.to_sym], size, path)
|
download_images(url[size.to_sym], size, path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue