645b95ba02
Renamed LibClasses * VLC
to GameLibrary * LIBRARY
2025-02-21 16:54:56 +00:00
2362c6da21
Fixes for multiple new issues from Sonar
2025-02-21 15:57:39 +00:00
a1593948b7
Restore LF, use JsonKeys for logging, fix BattleHex description
2025-01-21 13:23:17 +01:00
ecdd394bb1
Use BattleHex as const ref wherever possible
...
Minor Fixes
Drop unused function from BattleHexArray
2025-01-21 13:23:17 +01:00
8f63a82d60
Minor changes with BattleHex and BattleHexArray
2025-01-21 13:23:17 +01:00
40bff74195
Use small vector for unit list
2025-01-10 18:58:46 +00:00
797b62fd46
Try to implement lazy evaluation for reachability map
2025-01-10 17:43:45 +00:00
2d5b5d94e7
Optimize computation of reachability map
2025-01-10 15:38:28 +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
dad6437661
Refactor BattleHex, remake the use of precomputed neighbouring tiles containers.
...
- Moved short, frequently used functions to the BattleHex header for inlining
- Made BattleHex a class with a private hex value
- Moved getClosestTile implementation back to BattleHex
- Enabled access to static precomputed data in BattleHexArray via BattleHex
(note: circular dependency prevented static precomputed containers being directly placed in BattleHex)
2025-01-06 23:28:46 +01:00
fb9a3da651
Unit.cpp refactor and some other minor changes
2025-01-06 23:28:44 +01:00
5f799d41b3
Use cached neighbouring tiles where possible
2025-01-06 23:18:19 +01:00
a99274d72e
BattleHexArray - new container for BattleHexes
2025-01-06 23:18:18 +01:00
78fc6d0e41
Remove unused code
2025-01-04 15:09:50 +00:00
bb7cf3ffbf
Use existing callback method instead of custom one in AI
2024-12-14 14:53:34 +00:00
df21a77857
Battle-AI-improvements
...
When defending the AI is now much smarter to use their defensive-structures like walls, towers and the moat to their advantage instead of allowing them to be lured out and killed in the open.
A penalty-multiplier is now applied when deciding which units to walk towards. If an ally is closer than us to the enemy unit in question, we reduce our score for walking towards that unit too. This shall help against baiting a whole flock of AI-stacks to overcommit on chasing an inferior stack of the enemy.
2024-12-05 21:09:24 +01:00
a1a03d4b74
Merge remote-tracking branch 'upstream/develop' into develop
2024-09-12 14:54:39 +02:00
48b0a222a0
Merge pull request #4570 from kdmcser/crash_fix
...
fix Ballista Bank Mod auto combat crash
2024-09-12 14:16:41 +03:00
312403962b
Update BattleExchangeVariant.cpp
...
fix.compile error
2024-09-11 11:39:03 +08:00
bb759dc2b8
fix compile error
2024-09-11 01:43:30 +08:00
58cdbccf21
Update AI/BattleAI/BattleExchangeVariant.cpp
...
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com >
2024-09-10 15:29:11 +08:00
c5b598b277
fix Ballista Bank Mod auto combat crash
2024-09-08 01:05:03 +08:00
9361278f81
Merge remote-tracking branch 'upstream/develop' into develop
2024-09-03 21:16:01 +02:00
dfa992951b
Revert "Merge branch 'fix-battle-ai' into develop"
...
This reverts commit b489816d29
, reversing
changes made to 5ee7061ab7
.
2024-09-03 20:57:05 +02:00
64fad53532
Revert "Merge branch 'pr/4528' into develop"
...
This reverts commit f4578c6d3a
, reversing
changes made to ac8e5b3711
.
2024-09-03 20:51:13 +02:00
f9442208da
BattleAI: avoid standing in moat
2024-09-03 13:02:58 +03:00
b489816d29
Merge branch 'fix-battle-ai' into develop
2024-09-02 17:28:11 +02:00
3f916ab543
BattleAI: avoid standing in moat
2024-09-02 15:31:36 +03:00
f4578c6d3a
Merge branch 'pr/4528' into develop
2024-08-30 22:09:43 +02:00
987a51cccb
Merge remote-tracking branch 'upstream/develop' into develop
2024-08-30 16:45:06 +02:00
c3e76f19e1
Add workaround for very common crash in BattleAI
2024-08-30 12:25:55 +00:00
644d6f4529
Merge pull request #4507 from vcmi/fix-battle-ai
...
Battle AI: fix firewall, fix haste spellcast evaluation for waits and…
2024-08-30 14:36:05 +03:00
aea05b3fb8
Merge remote-tracking branch 'upstream/develop' into develop
2024-08-29 14:42:37 +02:00
7ae7c13964
drop setting reachability for turrets
2024-08-28 15:22:00 +02:00
3d39963a1c
Merge branch 'master' into 'develop'
2024-08-26 14:01:00 +00:00
d55996cc46
Battle AI: fix firewall, fix haste spellcast evaluation for waits and movements, allow location spells
2024-08-26 11:31:00 +03:00
bfd6ee2b09
Merge remote-tracking branch 'upstream/develop' into develop
2024-08-24 12:25:03 +02:00
ff8a745a50
BattleAI: optional simulation depth
2024-08-21 23:27:42 +03:00
22de88ad68
BattleAI: count wait correctly for fast creatures
2024-08-21 22:18:41 +03:00
337f99942b
BattleAI: remove boost for archers while moving as actual stack may be small
2024-08-21 22:18:41 +03:00
bc80532f29
BattleAI: improve movement towards unreachable
2024-08-21 22:18:40 +03:00
8cdfa26fb5
BattleAI: fix bait for archers when need to go long way
2024-08-21 22:18:40 +03:00
b3fc6743d9
BattleAI: better retaliation calculation
2024-08-21 22:18:40 +03:00
e6d907af55
Merge remote-tracking branch 'upstream/develop' into develop
2024-08-18 09:52:59 +02:00
d09fb07362
Use throwing ::at to prevent undefined behavior
2024-08-15 13:14:51 +00:00
068e3bdc59
Fix endless loop
...
Fixed an endless-loop caused by someone removing this ", turn++".
2024-08-12 19:47:15 +02:00
2a05fbdd50
Unified handling of battle sides ID's
...
- Replaced BattleSide namespace-enum with enum class
- Merged two different BattleSide enum's into one
- Merged BattlePerspective enum into BattleSide enum
- Changed all places that use integers to represent battle side to use
BattleSide enum
- Added BattleSideArray convenience wrapper for std::array that is
always 2-elements in size and allows access to its elements using
BattleSide enum
2024-08-11 20:54:44 +00:00
51b8bc9fc3
BattleAI: fix shhoters waiting and reduce strength of our loss affecting decissions
2024-08-04 17:50:19 +03:00
801e919e7e
BattleAI: fix ap calculation in exchange variant
2024-08-03 20:35:20 +03:00
4e83deca92
BattleAI: fix waited attack calculation
2024-07-22 20:39:33 +03:00