fix weapon proficiency parsing from wiki data
This commit is contained in:
parent
b141cd07c4
commit
ee96bf3ce8
1 changed files with 5 additions and 2 deletions
|
|
@ -104,8 +104,11 @@ module Granblue
|
||||||
suggestions[:element] = Wiki.elements[element_key]
|
suggestions[:element] = Wiki.elements[element_key]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Proficiency (weapon type)
|
# Proficiency (weapon type) - wiki uses |weapon= field, not |type=
|
||||||
suggestions[:proficiency] = Wiki.proficiencies[data['type']] if data['type'].present?
|
if data['weapon'].present?
|
||||||
|
proficiency_key = data['weapon'].strip.capitalize
|
||||||
|
suggestions[:proficiency] = Wiki.proficiencies[proficiency_key]
|
||||||
|
end
|
||||||
|
|
||||||
# Stats - weapons use hp1/hp2/hp3/hp4 and atk1/atk2/atk3/atk4
|
# Stats - weapons use hp1/hp2/hp3/hp4 and atk1/atk2/atk3/atk4
|
||||||
suggestions[:min_hp] = data['hp1'].to_i if data['hp1'].present?
|
suggestions[:min_hp] = data['hp1'].to_i if data['hp1'].present?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue