StringConstants.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /*
  2. * constants/StringConstants.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "GameConstants.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. ///
  14. /// String ID which are pointless to move to config file - these types are mostly hardcoded
  15. ///
  16. namespace GameConstants
  17. {
  18. const std::string RESOURCE_NAMES [RESOURCE_QUANTITY] = {
  19. "wood", "mercury", "ore", "sulfur", "crystal", "gems", "gold"
  20. };
  21. const std::string PLAYER_COLOR_NAMES [PlayerColor::PLAYER_LIMIT_I] = {
  22. "red", "blue", "tan", "green", "orange", "purple", "teal", "pink"
  23. };
  24. const std::string ALIGNMENT_NAMES [3] = {"good", "evil", "neutral"};
  25. const std::string DIFFICULTY_NAMES [5] = {"pawn", "knight", "rook", "queen", "king"};
  26. }
  27. namespace NPrimarySkill
  28. {
  29. const std::string names [GameConstants::PRIMARY_SKILLS] = { "attack", "defence", "spellpower", "knowledge" };
  30. }
  31. namespace NSecondarySkill
  32. {
  33. const std::string names [GameConstants::SKILL_QUANTITY] =
  34. {
  35. "pathfinding", "archery", "logistics", "scouting", "diplomacy", // 5
  36. "navigation", "leadership", "wisdom", "mysticism", "luck", // 10
  37. "ballistics", "eagleEye", "necromancy", "estates", "fireMagic", // 15
  38. "airMagic", "waterMagic", "earthMagic", "scholar", "tactics", // 20
  39. "artillery", "learning", "offence", "armorer", "intelligence", // 25
  40. "sorcery", "resistance", "firstAid"
  41. };
  42. const std::vector<std::string> levels =
  43. {
  44. "none", "basic", "advanced", "expert"
  45. };
  46. }
  47. namespace EBuildingType
  48. {
  49. const std::string names [46] =
  50. {
  51. "mageGuild1", "mageGuild2", "mageGuild3", "mageGuild4", "mageGuild5", // 5
  52. "tavern", "shipyard", "fort", "citadel", "castle", // 10
  53. "villageHall", "townHall", "cityHall", "capitol", "marketplace", // 15
  54. "resourceSilo", "blacksmith", "special1", "horde1", "horde1Upgr", // 20
  55. "ship", "special2", "special3", "special4", "horde2", // 25
  56. "horde2Upgr", "grail", "extraTownHall", "extraCityHall", "extraCapitol", // 30
  57. "dwellingLvl1", "dwellingLvl2", "dwellingLvl3", "dwellingLvl4", "dwellingLvl5", // 35
  58. "dwellingLvl6", "dwellingLvl7", "dwellingUpLvl1", "dwellingUpLvl2", "dwellingUpLvl3", // 40
  59. "dwellingUpLvl4", "dwellingUpLvl5", "dwellingUpLvl6", "dwellingUpLvl7", "dwellingLvl8",
  60. "dwellingUpLvl8"
  61. };
  62. }
  63. namespace NFaction
  64. {
  65. const std::string names [GameConstants::F_NUMBER] =
  66. {
  67. "castle", "rampart", "tower",
  68. "inferno", "necropolis", "dungeon",
  69. "stronghold", "fortress", "conflux"
  70. };
  71. }
  72. namespace NArtifactPosition
  73. {
  74. inline constexpr std::array namesHero =
  75. {
  76. "head", "shoulders", "neck", "rightHand", "leftHand", "torso", //5
  77. "rightRing", "leftRing", "feet", //8
  78. "misc1", "misc2", "misc3", "misc4", //12
  79. "mach1", "mach2", "mach3", "mach4", //16
  80. "spellbook", "misc5" //18
  81. };
  82. inline constexpr std::array namesCreature =
  83. {
  84. "creature1"
  85. };
  86. inline constexpr std::array namesCommander =
  87. {
  88. "commander1", "commander2", "commander3", "commander4", "commander5", "commander6", "commander7", "commander8", "commander9"
  89. };
  90. const std::string backpack = "backpack";
  91. }
  92. namespace NMetaclass
  93. {
  94. const std::string names [16] =
  95. {
  96. "",
  97. "artifact", "creature", "faction", "experience", "hero",
  98. "heroClass", "luck", "mana", "morale", "movement",
  99. "object", "primarySkill", "secondarySkill", "spell", "resource"
  100. };
  101. }
  102. namespace NPathfindingLayer
  103. {
  104. const std::string names[EPathfindingLayer::NUM_LAYERS] =
  105. {
  106. "land", "sail", "water", "air"
  107. };
  108. }
  109. namespace MappedKeys
  110. {
  111. static const std::map<std::string, BuildingSubID::EBuildingSubID> SPECIAL_BUILDINGS =
  112. {
  113. { "mysticPond", BuildingSubID::MYSTIC_POND },
  114. { "castleGate", BuildingSubID::CASTLE_GATE },
  115. { "portalOfSummoning", BuildingSubID::PORTAL_OF_SUMMONING },
  116. { "library", BuildingSubID::LIBRARY },
  117. { "escapeTunnel", BuildingSubID::ESCAPE_TUNNEL },
  118. { "treasury", BuildingSubID::TREASURY },
  119. { "bank", BuildingSubID::BANK }
  120. };
  121. static const std::map<std::string, EMarketMode> MARKET_NAMES_TO_TYPES =
  122. {
  123. { "resource-resource", EMarketMode::RESOURCE_RESOURCE },
  124. { "resource-player", EMarketMode::RESOURCE_PLAYER },
  125. { "creature-resource", EMarketMode::CREATURE_RESOURCE },
  126. { "resource-artifact", EMarketMode::RESOURCE_ARTIFACT },
  127. { "artifact-resource", EMarketMode::ARTIFACT_RESOURCE },
  128. { "artifact-experience", EMarketMode::ARTIFACT_EXP },
  129. { "creature-experience", EMarketMode::CREATURE_EXP },
  130. { "creature-undead", EMarketMode::CREATURE_UNDEAD },
  131. { "resource-skill", EMarketMode::RESOURCE_SKILL },
  132. };
  133. }
  134. VCMI_LIB_NAMESPACE_END