Skip to content
Closed
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
23 changes: 23 additions & 0 deletions make-legendary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,26 @@ function PrintSkillClassList()
print('For example: Medical will make all medical skills legendary')
end

function FortressLegendary()
local count = 0
local units = dfhack.units.getCitizens()

if #units == 0 then
qerror('No fortress citizens found. Are you in fortress mode?')
return
end

for _, unit in ipairs(units) do
for i in ipairs(df.job_skill) do
legendize(unit, i)
end
print('The secrets of the depths have been mastered by ' .. getName(unit))
count = count + 1
end

print(string.format('\nMade %d fortress citizens legendary!', count))
end

--main script operation starts here
----
local opt = ...
Expand All @@ -98,6 +118,9 @@ elseif opt == 'classes' then
elseif opt == 'all' then
BreathOfArmok()
return
elseif opt == 'fortress' then
FortressLegendary()
return
elseif df.job_skill_class[opt] then
LegendaryByClass(opt)
return
Expand Down
Loading