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