Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def level_up
- last_level = @level
- @level += 1
- mhpincrease = $data_classes[@class_id].params[Enums::Param::MAXHP, @level] - $data_classes[@class_id].params[Enums::Param::MAXHP, last_level]
- add_param(Enums::Param::MAXHP, mhpincrease)
- mmpincrease = $data_classes[@class_id].params[Enums::Param::MAXMP, @level] - $data_classes[@class_id].params[Enums::Param::MAXMP, last_level]
- add_param(Enums::Param::MAXMP, mmpincrease)
- $data_classes[@class_id].learnings.each { |learning| learn_skill(learning.skill_id) if learning.level == @level }
- self.points += LEVEL_UP_POINTS
- end
- def level_down
- $data_classes[@class_id].learnings.each { |forgetting| forget_skill(forgetting.skill_id) if forgetting.level == @level }
- last_level = @level
- @level -= 1
- mhpdecr = $data_classes[@class_id].params[Enums::Param::MAXHP, @level] - $data_classes[@class_id].params[Enums::Param::MAXHP, last_level]
- add_param(Enums::Param::MAXHP, mhpdecr)
- mmpdecr = $data_classes[@class_id].params[Enums::Param::MAXMP, @level] - $data_classes[@class_id].params[Enums::Param::MAXMP, last_level]
- add_param(Enums::Param::MAXMP, mmpdecr)
- self.points -= LEVEL_UP_POINTS
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement