Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. class Scene_ItemBase < Scene_MenuBase
  2. def item_usable?
  3. return false unless user.usable?(item)
  4. if item.id == SkillLevel::RESETITEM
  5. return false if item_target_actors[0].class.auto_sp
  6. return true
  7. elsif item.id == Point_Tree::RESET_ITEM and item.is_a?(RPG::Item)
  8. return true
  9. else
  10. item_effects_valid?
  11. end
  12. end
  13. end
  14.  
  15. class Game_Actor < Game_Battler
  16.  
  17. #基礎屬性的計算,添加了被動技能的提升,按默認的先加後乘
  18. def param(param_id)
  19. value = param_base(param_id) + param_plus(param_id) +
  20. skill_plus(param_id) + state_param_plus(param_id) + point_plus(param_id)
  21. value *= param_rate(param_id) * param_buff_rate(param_id) *
  22. skill_rate(param_id) * state_param_rate(param_id)
  23. [[value, param_max(param_id)].min, param_min(param_id)].max.to_i
  24. end
  25.  
  26.  
  27.  
  28. #附加屬性xparam的計算,命中暴擊什麼的,迭代加算。
  29. def xparam(xparam_id)
  30. xp = state_xparam(xparam_id) + @skills.inject(super(xparam_id)) do |plu,skl|
  31. plu + SkillLevel.formula(self.skill_level(skl),$data_skills[skl].xparam(xparam_id))
  32. end
  33. for i in 0 .. POINT_KIND-1
  34. xp+=(@point[i+1]*POINT_ADD_XPARAM[i][xparam_id]/10000.0)
  35. end
  36. xp
  37. end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement