Clone of Bael'Zharon's Respite @ https://github.com/boardwalk/bzr

SkillTable.h 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Bael'Zharon's Respite
  3. * Copyright (C) 2014 Daniel Skorupski
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  17. */
  18. #ifndef BZR_SKILLTABLE_H
  19. #define BZR_SKILLTABLE_H
  20. #include <map>
  21. struct SkillCategory
  22. {
  23. enum Value
  24. {
  25. kWeapon = 1,
  26. kNonWeapon = 2,
  27. kMagic = 3
  28. };
  29. };
  30. struct AttributeType
  31. {
  32. enum Value
  33. {
  34. kStrength = 1,
  35. kEndurance = 2,
  36. kQuickness = 3,
  37. kCoordination = 4,
  38. kFocus = 5,
  39. kSelf = 6
  40. };
  41. };
  42. class SkillTable
  43. {
  44. public:
  45. struct Skill
  46. {
  47. string name;
  48. string description;
  49. uint32_t icon;
  50. uint32_t trainCost;
  51. uint32_t specCost;
  52. SkillCategory::Value category;
  53. bool usableUntrained;
  54. uint32_t attribDivisor;
  55. AttributeType::Value attrib1;
  56. AttributeType::Value attrib2;
  57. };
  58. typedef map<uint32_t, Skill> container;
  59. SkillTable();
  60. container::const_iterator begin() const;
  61. container::const_iterator end() const;
  62. container::const_iterator find(uint32_t id) const;
  63. private:
  64. container skills_;
  65. };
  66. #endif