Update XLB to transcendence for summons

This commit is contained in:
Justin Edmund 2024-01-13 10:58:35 -08:00
parent fa3fdc3a42
commit 86ea169319
4 changed files with 9 additions and 10 deletions

View file

@ -36,7 +36,7 @@ module Api
max_uncap_level = max_uncap_level(summon)
greater_than_max_uncap = summon_params[:uncap_level].to_i > max_uncap_level
can_be_transcended = summon.xlb && summon_params[:transcendence_step] && summon_params[:transcendence_step]&.to_i&.positive?
can_be_transcended = summon.transcendence && summon_params[:transcendence_step] && summon_params[:transcendence_step]&.to_i&.positive?
uncap_level = if greater_than_max_uncap || can_be_transcended
max_uncap_level
@ -44,7 +44,7 @@ module Api
summon_params[:uncap_level]
end
transcendence_step = if summon.xlb && summon_params[:transcendence_step]
transcendence_step = if summon.transcendence && summon_params[:transcendence_step]
summon_params[:transcendence_step]
else
0
@ -114,11 +114,11 @@ module Api
private
def max_uncap_level(summon)
if summon.flb && !summon.ulb && !summon.xlb
if summon.flb && !summon.ulb && !summon.transcendence
4
elsif summon.ulb && !summon.xlb
elsif summon.ulb && !summon.transcendence
5
elsif summon.xlb
elsif summon.transcendence
6
else
3

View file

@ -179,7 +179,7 @@ class SummonParser
info[:flb] = hash['evo_max'].to_i >= 4
info[:ulb] = hash['evo_max'].to_i >= 5
info[:xlb] = hash['evo_max'].to_i == 6
info[:transcendence] = hash['evo_max'].to_i == 6
info[:rarity] = rarity_from_hash(hash['rarity'])
info[:series] = hash['series']
@ -205,7 +205,7 @@ class SummonParser
release_date: parse_date(hash['release_date']),
flb_date: parse_date(hash['4star_date']),
ulb_date: parse_date(hash['5star_date']),
xlb_date: parse_date(hash['6star_date'])
transcendence_date: parse_date(hash['6star_date'])
}
info[:links] = {

View file

@ -91,7 +91,7 @@ def seed_summons
s.series = row['series']
s.flb = row['flb']
s.ulb = row['ulb']
s.xlb = row['xlb']
s.transcendence = row['transcendence']
s.subaura = row['subaura']
s.limit = row['limit']
s.max_level = row['max_level']
@ -176,7 +176,6 @@ def seed_jobs
end
puts "There are now #{Job.count} rows in the jobs table."
end
def seed_job_skills

View file

@ -37,7 +37,7 @@ namespace :granblue do
size)} \n")
end
if s.xlb
if s.transcendence
f.write("#{build_summon_url("#{s.granblue_id}_03",
size)} \n")
end