259fcedc85
Fix flying units move into damaging obstacles
2024-10-03 23:03:36 +02:00
a1384bf47f
defending, when not possible to attack invincible
2024-09-19 20:54:50 +02:00
f9442208da
BattleAI: avoid standing in moat
2024-09-03 13:02:58 +03:00
39e5ba32f6
Merge pull request #4530 from IvanSavenko/town_fortifications
...
Support for configurable town fortifications
2024-08-31 13:59:40 +03:00
36c1ed670f
Support for configurable town fortifications
...
Removed most of hardcoded checks for fort level or for presence of fort/
citadel/castle buildings.
It is now possible to define which parts of town fortifications are
provided by town buildings
Configuration for H3-like fortifications is provided in
buildingsLibrary.json and will be used automatically by mods as long as
mods have buidings named "fort", "citadel" and "castle".
Alternatively, mods can separately define:
- hitpoints of walls (shared value for all sections)
- hitpoints of central, upper and lower towers (separate values)
- presence of moat
- shooters for each tower (separate values)
2024-08-28 19:42:14 +00:00
ed36b1a882
Battle AI: fix casting Implosion when it kills target stack, fix casting summon elementals
2024-08-26 16:58:27 +03: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
ff8a745a50
BattleAI: optional simulation depth
2024-08-21 23:27:42 +03:00
bc80532f29
BattleAI: improve movement towards unreachable
2024-08-21 22:18:40 +03:00
26609d7a4f
BattleAI refactoring
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
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
33e0eeaa8a
BattleAI: fix dragon breath
2024-07-22 20:39:32 +03:00
1c522c49b6
Fix possible crash on trying to move to invalid battlefield hexes
2024-07-20 18:28:13 +00:00
6b8f94e6e7
Merge remote-tracking branch 'vcmi/master' into develop
2024-07-11 17:43:44 +00:00
98415e98da
Spellcasting-bug-fix
...
Fixed a bug that prevented the AI from using spells when attacking an enemy settlement that has towers.
The bug was caused by noticing how greatly effective spells would be against towers but not being able to actually target them.
By skipping invalid targets, this no longer is an issue.
2024-07-10 14:36:35 +00:00
02e429e973
Fix typos using https://github.com/crate-ci/typos
...
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
a9cf322f61
Merge pull request #4161 from vcmi/fix-4142
...
#4142 - sometimes Battle AI wants to attack unit which is behind a lo…
2024-06-19 21:28:58 +03:00
fc32078a3a
#4142 - sometimes Battle AI wants to attack unit which is behind a lot of obstackles and other units
2024-06-18 20:03:07 +03:00
b7efa6c8cc
Fixed potential thread races in Battle AI
2024-06-17 16:15:19 +00:00
0935f931fa
BattleAI: fix bypassing 2-hex moat
2024-04-20 15:28:57 +03:00
a9866bb5c6
Added RandomGeneratorUtil::nextItemWeighted convenience method
2024-01-31 00:17:40 +02:00
d5c4478816
Remove most of non-const access to VLC entities
2024-01-19 13:54:49 +02:00
a582cb554e
Merge pull request #3500 from IvanSavenko/fix_dendroid_bind
...
[1.4.3] Fix handling of Dendroid's Bind ability
2024-01-15 12:02:06 +02:00
0d0d3d8c80
Renamed speed -> getMovementRange, remove misleading default parameter
2024-01-14 17:14:36 +02:00
3602be5eab
BattleAI: remove adjustPositions method as it gives more troubles than usefulness
2024-01-14 10:23:44 +02:00
1a1ae5cd8b
BattleAI: fixes
2024-01-02 17:35:10 +02:00
85de3143ff
Fixed Genie spellcasting logic to account for spell immunities
2023-12-24 01:13:19 +02:00
fe39faf36c
Add UNTIL_OWN_ATTACK bonus duration and use for berserk
2023-12-19 19:52:40 +01:00
5cbc75d3b7
Merge remote-tracking branch 'upstream/develop' into develop
2023-10-29 13:35:37 +00:00
0232ae5327
AI/BattleAI/BattleEvaluator.cpp: Convert this integer literal to a bool literal.
...
Integer literals should not be cast to bool
2023-10-29 13:34:19 +00:00
af330ff038
AI/BattleAI/BattleEvaluator.cpp: Remove this redundant cast.
...
Redundant casts should not be used
2023-10-27 18:19:17 +00:00
870fbd50e3
BattleAI: bigger reachability map
2023-10-22 21:37:55 +03:00
9eb9404f28
BattleAI: divide only positive part of score onto turns count
2023-10-22 21:37:54 +03:00
036df2e0ad
Support multiple battles in AI
2023-09-06 16:03:46 +03:00
3a88180494
Separated game and battle callback (server & client only)
2023-09-06 16:03:39 +03:00
86a7f5f5cd
Removed getStr(bool), replaced with similar toString()
2023-09-04 22:21:02 +03:00
5f13a0bbda
BattleAI: spellcast fixes and floating point score
2023-08-26 14:17:33 +03:00
dc88f14e0b
BattleAI: positive/negative effect multiplier
2023-08-26 13:06:51 +03:00