Skip to content

Commit

Permalink
Merge pull request #13 from Proffitt/main
Browse files Browse the repository at this point in the history
Parenthesis handling update.
  • Loading branch information
bmos authored Oct 25, 2021
2 parents 7007617 + 9f44a4f commit 6f3b000
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/upgradespells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,15 @@ local function trim_spell_name(string_spell_name)
string_spell_name = string_spell_name:gsub('Quickened', '')
end

-- remove anything after open parentheses
local number_name_end = string.find(string_spell_name, '%(')
string_spell_name = string_spell_name:sub(1, number_name_end)

-- remove certain sets of characters
string_spell_name = string_spell_name:gsub('%u%u%u%u', '')
string_spell_name = string_spell_name:gsub('%u%u%u', '')
string_spell_name = string_spell_name:gsub('AP%d+', '')
string_spell_name = string_spell_name:gsub('%u%u', '')
string_spell_name = string_spell_name:gsub('.+:', '')
string_spell_name = string_spell_name:gsub(',.+', '')
string_spell_name = string_spell_name:gsub('%[%a%]', '')
string_spell_name = string_spell_name:gsub('%[.-%]', '')
string_spell_name = string_spell_name:gsub('%(.-%)', '')
string_spell_name = string_spell_name:gsub('%A+', '')

-- remove uppercase D or M at end of name
Expand Down

0 comments on commit 6f3b000

Please sign in to comment.