1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00
Commit Graph

171 Commits

Author SHA1 Message Date
eb3b51a6cf Remove save compatibility with 1.5.X 2025-03-18 11:35:15 +00:00
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
0548f325e4 Merge branch 'master' into 'develop' 2025-02-21 13:59:34 +00:00
989a437eef fixes #5346 2025-02-14 22:19:26 +01:00
4e6560c4c9 Fixes for issues detected by valgrind 2025-02-06 19:22:04 +00:00
ec970c7b22 Support for configuring minimal cost for moving between tiles
- Added `movementCostBase` parameter to game config that defines minimal
amount of movement points that will be spent when moving from one tile
on another while offroad (and cost of Fly / Town Portal spells)
- Added `BASE_TILE_MOVEMENT_COST` bonus type that allows modifying
`movementCostBase` on per-hero basis

Example usage for hota-like pathfinding skill
```json
"tileCostReduction" : {
	"type" : "BASE_TILE_MOVEMENT_COST",
	"val" : -15
}
```
2025-02-03 22:52:33 +00:00
ecdd394bb1 Use BattleHex as const ref wherever possible
Minor Fixes
Drop unused function from BattleHexArray
2025-01-21 13:23:17 +01:00
e829d723b2 Replace global bonus tree change counter with per-node counter 2025-01-12 12:23:07 +00:00
48473b18f6 move checks for invincible bonus to UnitState & cache 2025-01-10 21:15:37 +00:00
a44bbf4527 Merge pull request #5044 from MichalZr6/battle_hex_array
New container for BattleHexes. Refactors aiming for quick-battle better performance.
2025-01-10 15:32:05 +02:00
e27ca391b1 Fix counter-attack counting 2025-01-08 16:06:31 +00:00
dbe82b94f6 Changes following review:
- shared_ptr for destructibleEnemyTurns instead of raw pointer
- drop implicit int conversion for BattleHex class
  and implement toInt() instead
- implement necessary operators in BattleHex
- adjust code to work properly with JSON serializer
2025-01-08 07:24:43 +01:00
ac8104d56d SonarCloud recomendations.
Code review follow-up:
- Replace std::vector with boost::small_vector
- Rename function merge to insert
2025-01-06 23:28:45 +01:00
7a8edff419 minor fixes 2025-01-06 23:28:44 +01:00
8c3a417527 Cleanup 2025-01-06 23:18:20 +01:00
a99274d72e BattleHexArray - new container for BattleHexes 2025-01-06 23:18:18 +01:00
ef8408fa5a Fix tests
Regression from #5158
2025-01-06 21:18:28 +00:00
73d1675ae3 Code cleanup, fixes to discovered regressions 2025-01-05 15:41:42 +00:00
83b9a8d750 Fixes for regressions 2025-01-04 15:09:50 +00:00
dea1eba20b Rework and optimize turnInfo used by pathfinder 2025-01-04 15:09:50 +00:00
579b64cd39 Fix build 2025-01-04 15:09:50 +00:00
39d2f27589 Remove remaining usages of CCheckProxy class 2025-01-04 15:09:50 +00:00
919588f7ff Added cache for common hero-based bonuses 2025-01-04 15:09:50 +00:00
157d6d30c8 Move rest of commonly-accessed UnitState queries to bonus cache 2025-01-04 15:09:50 +00:00
05397e2aaf Caching of bonuses that are requested with different durations 2025-01-04 15:09:50 +00:00
16cfb51f3e Initial version of new bonus caching system 2025-01-04 15:09:50 +00:00
5c6ce47371 better fix 2024-12-30 18:08:49 +01:00
5caf12f22f Few more fixes to bonus caching 2024-12-22 13:27:40 +00:00
95a07ee5cb Use bonus system cache whenever possible 2024-12-21 18:47:11 +00:00
42b960417c Reworked bonus caching locking scheme:
- use concurrent map from tbb for faster access to already cached values
- use std::shared_mutex instead of boost::mutex to access bonuses
- accessing to values existing in cache is now done without locking main
mutex
2024-12-21 14:43:09 +00:00
ab45c58e26 Use small_vector for bonus list to reduce allocations 2024-12-21 14:43:08 +00:00
c3c5f73a63 Restore save compatibility with 1.5 2024-11-07 12:08:08 +00:00
e7bea6c3b8 Merge pull request #4852 from IvanSavenko/remove_vlc_entities_serialization
Remove remaining pointers to VLC entities from serializer
2024-11-06 22:01:11 +02:00
0969871835 Merge branch 'develop' into mechanical_bonus 2024-10-31 15:14:51 +02:00
01d787fb5a Removed remaining cases of serialization of VLC entities 2024-10-30 16:48:18 +00:00
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
db913d95e0 Merge pull request #4808 from Laserlicht/prism_breath
Bonus: prism breath
2024-10-28 12:29:41 +02:00
ee59bc4e71 Add bonus description generation for map objects 2024-10-25 18:36:02 +00:00
53b7c5da6f added MECHANICAL bonus 2024-10-24 21:30:51 +02:00
0991f02282 Bonus: prism breath 2024-10-20 22:02:56 +02:00
10ad0fc760 Split CHeroHandler.cpp/.h into 1 file per class
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +00:00
3dd4fa2528 Reduce usage of pointers to VLC entities
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.

CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.

VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town

VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
cb96b9959e Merge pull request #4623 from Laserlicht/invincible_bonus
INVINCIBLE bonus
2024-09-20 11:50:29 +03:00
5e3630adae adjust texts 2024-09-19 20:57:43 +02:00
b36c05df1d INVINCIBLE bonus 2024-09-19 03:14:45 +02:00
K
bda1adbdfd miniscule bonus system cleanup
update comments, remove one never used method, make another method private
2024-09-18 16:41:41 +02:00
9a08e2eb0f Merge pull request #4573 from kdmcser/stack_level_updater_for_commander
make TimesStackLevelUpdater support commander
2024-09-12 14:16:16 +03:00
b84d653a99 make TimesStackLevelUpdater support commander 2024-09-09 19:23:23 +08:00
K
a6c7fda649 avoid one loop in BonusList::totalValue() 2024-09-04 23:10:54 +02:00
82c37573fa Removed save compatibility with 1.4
All save compatibility checks targeting 1.4 saves have now been removed.
Saves from 1.5 can still be loaded in 1.6

Implemeted few TODO's in serialization that were postponed to avoid
breaking save compatibility in MP for 1.5.X releases.

Fixed missed case for loading black market object from 1.5 saves
2024-08-29 18:51:53 +00:00