Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Template for new versions:
## New Features

## Fixes
- `make-legendary`: ``make-legendary all`` will no longer corrupt souls

## Misc Improvements

Expand Down
12 changes: 8 additions & 4 deletions make-legendary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ function getName(unit)
end

function legendize(unit, skill_idx)
utils.insert_or_update(unit.status.current_soul.skills,
{new=true, id=skill_idx, rating=df.skill_rating.Legendary5},
'id')
if skill_idx >= 0 and skill_idx <= df.job_skill._last_item then
utils.insert_or_update(unit.status.current_soul.skills,
{new=true, id=skill_idx, rating=df.skill_rating.Legendary5},
'id')
end
end

function make_legendary(skillname)
Expand Down Expand Up @@ -50,7 +52,9 @@ function BreathOfArmok()
return
end
for i in ipairs(df.job_skill) do
legendize(unit, i)
if i >= 0 then
legendize(unit, i)
end
end
print('The breath of Armok has engulfed ' .. getName(unit))
end
Expand Down
Loading