Make skill-change actually work with level

It was trying to set the level to the string "Proficient" instead of 5, same for every other skill level. There was no workaround, especially since it expected numbers for the value.
develop
Putnam3145 2015-02-11 16:08:23 -08:00
parent 0f01583972
commit 38fbf67262
1 changed files with 3 additions and 3 deletions

@ -36,7 +36,7 @@ arguments
set the skill that we're talking about
-mode (add/set)
are we adding experience/levels or setting them?
-granularity (experience/levels)
-granularity (experience/level)
direct experience, or experience levels?
-unit id
id of the target unit
@ -87,9 +87,9 @@ if args.granularity == granularity.experience then
end
elseif args.granularity == granularity.level then
if args.mode == mode.set then
skill.rating = df.skill_rating[args.value]
skill.rating = args.value
elseif args.mode == mode.add then
skill.rating = df.skill_rating[args.value + df.skill_rating[skill.rating]]
skill.rating = args.value + skill.rating
else
error 'bad mode'
end