add max_level to wiki import suggestions
This commit is contained in:
parent
7f2db88a6c
commit
9f2d9abdb5
1 changed files with 50 additions and 1 deletions
|
|
@ -132,13 +132,17 @@ module Granblue
|
||||||
suggestions[:max_atk_flb] = data['atk3'].to_i if data['atk3'].present?
|
suggestions[:max_atk_flb] = data['atk3'].to_i if data['atk3'].present?
|
||||||
suggestions[:max_atk_ulb] = data['atk4'].to_i if data['atk4'].present?
|
suggestions[:max_atk_ulb] = data['atk4'].to_i if data['atk4'].present?
|
||||||
|
|
||||||
# Uncap status - weapons use evo_max (4=FLB, 5=ULB)
|
# Uncap status - weapons use evo_max (4=FLB, 5=ULB, 6=transcendence)
|
||||||
if data['evo_max'].present?
|
if data['evo_max'].present?
|
||||||
evo = data['evo_max'].to_i
|
evo = data['evo_max'].to_i
|
||||||
suggestions[:flb] = evo >= 4
|
suggestions[:flb] = evo >= 4
|
||||||
suggestions[:ulb] = evo >= 5
|
suggestions[:ulb] = evo >= 5
|
||||||
|
suggestions[:transcendence] = evo >= 6
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Max level based on rarity and uncap status
|
||||||
|
suggestions[:max_level] = calculate_weapon_max_level(suggestions[:rarity], suggestions[:flb], suggestions[:ulb], suggestions[:transcendence])
|
||||||
|
|
||||||
# Series (e.g., "Revenant", "Optimus", etc.)
|
# Series (e.g., "Revenant", "Optimus", etc.)
|
||||||
suggestions[:series] = data['series'] if data['series'].present?
|
suggestions[:series] = data['series'] if data['series'].present?
|
||||||
|
|
||||||
|
|
@ -196,6 +200,9 @@ module Granblue
|
||||||
suggestions[:transcendence] = evo >= 6
|
suggestions[:transcendence] = evo >= 6
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Max level based on rarity and uncap status
|
||||||
|
suggestions[:max_level] = calculate_summon_max_level(suggestions[:rarity], suggestions[:flb], suggestions[:ulb], suggestions[:transcendence])
|
||||||
|
|
||||||
# Series (e.g., "Optimus", "Arcarum", etc.)
|
# Series (e.g., "Optimus", "Arcarum", etc.)
|
||||||
suggestions[:series] = data['series'] if data['series'].present?
|
suggestions[:series] = data['series'] if data['series'].present?
|
||||||
|
|
||||||
|
|
@ -415,6 +422,48 @@ module Granblue
|
||||||
|
|
||||||
promotions.uniq.sort
|
promotions.uniq.sort
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Calculate max level for weapons based on rarity and uncap status
|
||||||
|
# R weapons: max 50
|
||||||
|
# SR weapons: max 75
|
||||||
|
# SSR weapons: max 100 (FLB: 150, ULB: 200, Trans: 250)
|
||||||
|
def self.calculate_weapon_max_level(rarity, flb, ulb, transcendence)
|
||||||
|
case rarity
|
||||||
|
when 1 then 50 # R
|
||||||
|
when 2 then 75 # SR
|
||||||
|
else # SSR (3+)
|
||||||
|
if transcendence
|
||||||
|
250
|
||||||
|
elsif ulb
|
||||||
|
200
|
||||||
|
elsif flb
|
||||||
|
150
|
||||||
|
else
|
||||||
|
100
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Calculate max level for summons based on rarity and uncap status
|
||||||
|
# R summons: max 30
|
||||||
|
# SR summons: max 60
|
||||||
|
# SSR summons: max 100 (FLB: 150, ULB: 200, Trans: 250)
|
||||||
|
def self.calculate_summon_max_level(rarity, flb, ulb, transcendence)
|
||||||
|
case rarity
|
||||||
|
when 1 then 30 # R
|
||||||
|
when 2 then 60 # SR
|
||||||
|
else # SSR (3+)
|
||||||
|
if transcendence
|
||||||
|
250
|
||||||
|
elsif ulb
|
||||||
|
200
|
||||||
|
elsif flb
|
||||||
|
150
|
||||||
|
else
|
||||||
|
100
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue