Settings.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Settings.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. VCMI_LIB_NAMESPACE_BEGIN
  12. class JsonNode;
  13. class ResourcePath;
  14. VCMI_LIB_NAMESPACE_END
  15. namespace NK2AI
  16. {
  17. class Settings
  18. {
  19. int maxRoamingHeroes;
  20. int maxRoamingHeroesPerTown; // added on top of @link maxRoamingHeroes
  21. int mainHeroTurnDistanceLimit;
  22. int scoutHeroTurnDistanceLimit;
  23. int threatTurnDistanceLimit;
  24. int maxPass;
  25. int maxPriorityPass;
  26. int pathfinderBucketsCount;
  27. int pathfinderBucketSize;
  28. float maxGoldPressure;
  29. float retreatThresholdRelative;
  30. float retreatThresholdAbsolute;
  31. float safeAttackRatio;
  32. float maxArmyLossTarget;
  33. bool allowObjectGraph;
  34. bool useTroopsFromGarrisons;
  35. bool useOneWayMonoliths;
  36. bool updateHitmapOnTileReveal;
  37. bool openMap;
  38. bool useFuzzy;
  39. public:
  40. explicit Settings(int difficultyLevel);
  41. int getMaxPass() const { return maxPass; }
  42. int getMaxPriorityPass() const { return maxPriorityPass; }
  43. float getMaxGoldPressure() const { return maxGoldPressure; }
  44. float getRetreatThresholdRelative() const { return retreatThresholdRelative; }
  45. float getRetreatThresholdAbsolute() const { return retreatThresholdAbsolute; }
  46. float getSafeAttackRatio() const { return safeAttackRatio; }
  47. float getMaxArmyLossTarget() const { return maxArmyLossTarget; }
  48. int getMaxRoamingHeroes() const { return maxRoamingHeroes; }
  49. int getMaxRoamingHeroesPerTown() const { return maxRoamingHeroesPerTown; }
  50. int getMainHeroTurnDistanceLimit() const { return mainHeroTurnDistanceLimit; }
  51. int getScoutHeroTurnDistanceLimit() const { return scoutHeroTurnDistanceLimit; }
  52. int getThreatTurnDistanceLimit() const { return threatTurnDistanceLimit; }
  53. int getPathfinderBucketsCount() const { return pathfinderBucketsCount; }
  54. int getPathfinderBucketSize() const { return pathfinderBucketSize; }
  55. bool isObjectGraphAllowed() const { return allowObjectGraph; }
  56. bool isGarrisonTroopsUsageAllowed() const { return useTroopsFromGarrisons; }
  57. bool isOneWayMonolithUsageAllowed() const { return useOneWayMonoliths; }
  58. bool isUpdateHitmapOnTileReveal() const { return updateHitmapOnTileReveal; }
  59. bool isOpenMap() const { return openMap; }
  60. bool isUseFuzzy() const { return useFuzzy; }
  61. };
  62. }