1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
Commit Graph

400 Commits

Author SHA1 Message Date
Ivan Savenko
cb96b9959e
Merge pull request #4623 from Laserlicht/invincible_bonus
INVINCIBLE bonus
2024-09-20 11:50:29 +03:00
Ivan Savenko
65355925e9
Merge pull request #4595 from Laserlicht/cast_without_skip
Bonus for spell: cast without skip the turn
2024-09-19 16:17:48 +03:00
Laserlicht
b36c05df1d INVINCIBLE bonus 2024-09-19 03:14:45 +02:00
Laserlicht
735af83294 castSpellThisTurn to bool var 2024-09-18 21:24:27 +02:00
Laserlicht
0aaafc4c8a cast without skip 2024-09-14 15:10:24 +02:00
Ivan Savenko
90733cfe0e Do not place obstacles during sieges 2024-09-14 11:02:23 +00:00
Ivan Savenko
4772311160 Fix positioning of defender war machines 2024-09-12 20:27:32 +00:00
Ivan Savenko
6c0b9415c0 Fix positioning of defender units in non-bank battles 2024-09-12 20:11:26 +00:00
Ivan Savenko
45c8553ecb Remove old code 2024-09-12 12:11:18 +00:00
Ivan Savenko
d20d9bd96b Fix generation of placeholders for banks 2024-09-12 12:11:18 +00:00
Ivan Savenko
2ee4e42348 Implement placeholders for creature banks messages 2024-09-12 12:11:18 +00:00
Ivan Savenko
39a2c29c97 Removed creatureBank flag from battle, battles now receive BattleLayout
struct that defines how units are placed in combat
2024-09-12 12:11:18 +00:00
Ivan Savenko
8225eb454e Added GameSettings to gamestate, potentially allowing to define game
settings per map (or in random map template)
2024-09-05 15:16:27 +00:00
Ivan Savenko
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
Ivan Savenko
8371232d29
Merge pull request #4504 from Laserlicht/hota_bonus
disintegrate bonus
2024-08-28 14:00:11 +03:00
Ivan Savenko
897bc65e64
Merge pull request #4508 from kaja47/dead-code-must-die
remove never used code in CBonusSystemNode
2024-08-26 19:11:03 +03:00
Ivan Savenko
3d39963a1c Merge branch 'master' into 'develop' 2024-08-26 14:01:00 +00:00
K
462c79e190 remove never used code in CBonusSystemNode
Method CBonusSystemNode::getAllBonuses have 'root' parameter which is never
set to anythig else than nullptr. This patch removes the parameter and all
code that depends on it as preparatory work for further bonus system
optimization.
2024-08-25 14:15:21 +02:00
Laserlicht
9c4d4e89d6 disintegrate 2024-08-24 00:29:36 +02:00
Andrii Danylchenko
8cdfa26fb5 BattleAI: fix bait for archers when need to go long way 2024-08-21 22:18:40 +03:00
Ivan Savenko
d09fb07362 Use throwing ::at to prevent undefined behavior 2024-08-15 13:14:51 +00:00
Ivan Savenko
49c5f650f7
Merge pull request #4437 from IvanSavenko/battle_sides
Unified handling of battle sides ID's
2024-08-14 18:37:05 +03:00
Ivan Savenko
cd6d55fe75 Do not try to shoot at 2nd hex of wide creatures 2024-08-14 10:38:59 +00:00
Ivan Savenko
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
Andrii Danylchenko
8e79263b21
Merge pull request #4323 from vcmi/battle-ai-fixes
Battle ai fixes
2024-08-10 10:48:35 +03:00
Ivan Savenko
a4dd510735
Merge pull request #4358 from IvanSavenko/integer_divide
Add helper functions for integer division rounding
2024-08-06 18:10:03 +03:00
Ivan Savenko
b7391f49f6 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-08-05 10:36:10 +00:00
Ivan Savenko
81e6207df0 Add helper functions for integer division rounding
Added set of functions that perform integer division with different
rounding modes:
- divideAndCeil - rounds up to next integer
- divideAndRound - rounds to nearest integer
- divideAndFloor - rounds to previous integer (equivalent to default
division)

Intended for use in library, where usage of floating point might lead to
desync in multiplayer games.

Replaced some cases that I knew of, including recent handicap PR
2024-08-03 13:52:14 +00:00
Andrii Danylchenko
3d856bfa9d Merge remote-tracking branch 'origin/develop' into battle-ai-fixes 2024-08-03 12:54:25 +03:00
Ivan Savenko
434a2fb0fb Explicitly specify to use ranged or melee attack for damage estimation 2024-07-29 17:13:31 +00:00
Andrii Danylchenko
9edb0afff8 BattleAI: fix dragonbreath retaliation 2024-07-28 14:41:32 +03:00
Ivan Savenko
6ac3752325
Merge pull request #4330 from Laserlicht/spellbook
check spellbook
2024-07-27 19:34:50 +03:00
Laserlicht
e46f5f705b
better approach 2024-07-26 20:34:47 +02:00
Ivan Savenko
ec63f3eeac
Merge pull request #4314 from IvanSavenko/tower_target_selection
Implemented simple target selection logic for arrow towers
2024-07-26 14:22:13 +03:00
Andrii Danylchenko
33e0eeaa8a BattleAI: fix dragon breath 2024-07-22 20:39:32 +03:00
Ivan Savenko
4aa73b40c9 Split CTownHandler into smaller chunks 2024-07-21 18:21:48 +00:00
Ivan Savenko
5bd9a32d97 Implemented simple target selection logic for arrow towers 2024-07-21 13:16:33 +00:00
Ivan Savenko
1aa391fdf8 Split CGeneralTextHandler file into 1 file per class form
All text processing code is now located in lib/texts.
No changes other than code being moved around and adjustment of includes

Moved without changes:
Languages.h           -> texts/Languages.h
MetaString.*          -> texts/MetaString.*
TextOperations.*      -> texts/TextOperations.*

Split into parts:
CGeneralTextHandler.* -> texts/CGeneralTextHandler.*
                      -> texts/CLegacyConfigParser.*
                      -> texts/TextLocalizationContainer.*
                      -> texts/TextIdentifier.h
2024-07-20 12:55:17 +00:00
Ivan Savenko
2020d96070
Merge pull request #4071 from IvanSavenko/fix_rng_syncronization
[1.6] Fix potential desync if client uses different stdlib with different random number generators
2024-07-19 13:08:09 +03:00
Ivan Savenko
662254155a Merge branch 'vcmi/master' into 'vcmi/develop' 2024-07-17 13:57:36 +00:00
Ivan Savenko
63bcf7d83c Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
Ivan Savenko
60a51e98de Remove usage of std::function from CRandomGenerator 2024-07-16 13:13:07 +00:00
Dydzio
3836f132d3 Fix alternative actions to support more than 2 actions + simplify logic 2024-07-15 00:41:05 +02:00
Andrii Danylchenko
a4b6fc75dd BattleAI: fix moving to unreachable in case of back-to-back 2-hex 2024-07-14 11:46:45 +03:00
Ivan Savenko
74723bf77e
Merge pull request #4254 from smanolloff/fix-battle-queue
Fix battle turn order for current turn
2024-07-12 14:45:15 +03:00
Simeon Manolov
941cd6768f
Fix battle turn order for current turn 2024-07-12 11:39:57 +03:00
Ivan Savenko
6b8f94e6e7 Merge remote-tracking branch 'vcmi/master' into develop 2024-07-11 17:43:44 +00:00
Tomasz Zieliński
bfa93be765 Limit predicted damage / loses to actual stack health 2024-07-09 06:39:41 +02:00
Alexander Wilms
31e1d39f92 Fix issues introduced by fixing typos 2024-06-27 08:38:04 +00:00
Alexander Wilms
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00