Advertisement
Guest User

Untitled

a guest
Aug 19th, 2013
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. in staff.lua:
  2.     -- number of staff includes consultant
  3.     local staff_count = room:getStaffCount() - 1
  4.     -- update general skill
  5.     self:trainSkill(room.staff_member, "skill", general_thres, room_factor, staff_count)
  6.  
  7. l343:
  8. function Staff:trainSkill(consultant, trait, skill_thres, room_factor, staff_count)
  9.   -- TODO: tweak/rework this algorithm
  10.   -- TODO: possibly adjust based upon consultant's skill level?
  11.   --       possibly based on attention to detail?
  12.   local constant = 12.0
  13.   local staff_factor = constant + (staff_count-1)*(constant/6.0)
  14.   local delta = room_factor / (skill_thres * staff_factor)
  15.   self:updateSkill(consultant, trait, delta)
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement