From ee96bf3ce81e955555a9c4a0f1af8e304ec66cea Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 14 Dec 2025 21:50:25 -0800 Subject: [PATCH] fix weapon proficiency parsing from wiki data --- lib/granblue/parsers/suggestion_parser.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/granblue/parsers/suggestion_parser.rb b/lib/granblue/parsers/suggestion_parser.rb index 91ac109..dda48a2 100644 --- a/lib/granblue/parsers/suggestion_parser.rb +++ b/lib/granblue/parsers/suggestion_parser.rb @@ -104,8 +104,11 @@ module Granblue suggestions[:element] = Wiki.elements[element_key] end - # Proficiency (weapon type) - suggestions[:proficiency] = Wiki.proficiencies[data['type']] if data['type'].present? + # Proficiency (weapon type) - wiki uses |weapon= field, not |type= + 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 suggestions[:min_hp] = data['hp1'].to_i if data['hp1'].present?