Add migrations for character skills
Adds new tables for: * Character skills * Character charge attacks * Character support skills * Ability effects Also adds flags on GridCharacter for whether an ability is enabled or disabled in full auto
This commit is contained in:
parent
67c004b2a4
commit
c8eb9187d6
5 changed files with 108 additions and 0 deletions
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,12 @@
|
|||
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
|
||||
|
||||
Í
|
||||
Loading…
Reference in a new issue