1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-06-09 22:05:39 +02:00

86 Commits

Author SHA1 Message Date
Michał Zaremba 74669ce1aa Fix whitespaces 2026-06-07 19:22:47 +02:00
Ivan Savenko de4395f1f7 Added Calendar class to replace getDate() method
Calendar wraps all game date management, including week & month
duration.

Temporarily removed unused Lua bindings to getDate
2026-06-02 20:07:11 +03:00
Ivan Savenko e03d400442 Fix loading of Lua module on Android 2026-05-29 16:01:04 +03:00
Ivan Savenko 083cc0c669 Fix build, remove unused file 2026-05-27 03:08:11 +03:00
Ivan Savenko 35fd1d4975 Reorganize lua spell effects in more extensible for
- Added spell effect hanlder instead of global registry
- Removed script handler, in favor of module that injects itself into
the lib
2026-05-26 19:21:12 +03:00
Ivan Savenko 8eb01785cf Move CSpell into a separate file 2026-05-26 19:21:11 +03:00
Ivan Savenko 10ef7a829c Support for arbitrary tags for skills
Allows defining custom tags for skills, and testing for them later when
rolling for skills in randomization.

Existing flags were converted to tags.

List of predefined tags:
- `special` - skill is banned by default
- `onlyOnWaterMap` - skill is banned on random maps without water
- `wisdom` - for guaranteed rolls of Wisdom on levelup
- `spellSchool` - for guaranteed rolls of spell schools on levelup
- `bannedForUniversity` - to exclude skill from selection by University
- `bannedForWitchHut` - to exclude skill from selection by Witch Hut
- `bannedForScholar` - to exclude skill from selection by Scholar
(unused in H3)
2026-05-25 19:56:49 +03:00
Ivan Savenko 6ad93dd3eb Reworked Lua API type safety
- pushing type that is derived from type registered in Lua will now
correctly push type known to Lua
- Methods of types stored on stack as shared pointers now actually load
this as shared pointer
- It is now possible to return types other than Json from Lua function
2026-04-30 18:00:38 +03:00
Ivan Savenko 826db7e548 Lua refactoring part 1
- Scripting module and lua dependency are now required.
- Script context pool now only exists in gamestate
- removed unused pools from client and server
- scripts are now registered in pools on start instead of lazy
registering with caching
2026-04-30 18:00:30 +03:00
Ivan Savenko 3ab30dbb4d Merge branch 'vcmi/beta' into 'vcmi/develop' 2026-04-30 16:43:21 +03:00
Andrej Dudenhefner 410d2c0623 add aviation
- add EPathfindingLayer `AVIATE` (different from `AIR`, can hover over free land and water)
- add transitions: `LAND` <-> `AVIATE` <-> `AIR` (cannot stop over obstacle)
- add layer specification to `MoveHero` destination handling
- add path finder `AVIATE` rules
- add node storage `AVIATE` specifications
- add adventure map aviation interactions
- add EAdventureState `DISEMBARKING`
- add disembark shortcut Shift+D for `ADVENTURE_DISEMBARK`
- add cursor icons for aviation under CC-BY-SA license
- correct move point generation / consumption
- can buy an airship from Airship Yard on land and coast at fixed cost
- add localization
2026-04-21 10:47:10 +02:00
George King 1d0a6198ff [1.7.4] Add Reinforcements spell support (#7217)
* Reinforcements spell support

* Fix build

* Add forgotten change to allow moving creatures between hero and garrison

* Extract findNearestTown into TownRelatedSpellUtils

* Fix for exchange when exist garrisoned hero in destination town

* Improve handling when garrisoned hero exist in destination town

* Fix portrait position

* Update GUIClasses.cpp

* Fix flag position

* Update GUIClasses.cpp

* Update ReinforcementsEffect.cpp

* Rework to reflect latest advices

* Delete lib/spells/adventure/TownRelatedSpellUtils.cpp

* Delete lib/spells/adventure/TownRelatedSpellUtils.h

* Custom title text for Garrison dialog

* Add forgotten change

* ReRun CI
2026-04-19 12:10:24 +03:00
Boris Nagaev b05c0f8e6d Normalize local relative include directives
Normalize quoted local relative include directives to remove redundant
path segments while preserving relative includes.

This applies the normalizer across the tree and updates 108 includes in
64 files, including cases where paths inside lib/* redundantly used
../../lib/... and now correctly use ../... .

These paths compiled before because include resolution normalized them,
but they were longer and harder to audit.
2026-03-26 20:15:25 -05:00
Boris Nagaev 38bfd1c7e5 Fix broken relative local include paths
Many quoted local includes had an incorrect ../ depth and resolved to
non-existent files from the including file's directory.

This was easy to miss because normal target include directories and PCH
usage masked some failures, and several stale paths lived in files that
are only compiled in optional test configurations. As a result, the
problem mostly surfaced in stricter or broader fresh builds.

Audit all C++ and header local includes, keep them relative, and adjust
paths so each include resolves to an existing in-tree header. For
headers that were renamed or moved, update includes to their current
relative location instead of switching to include-root form.

A few legacy ERM tests also used dynamic_ptr_cast at call sites where we
had to replace stale headers. The helper/header path they relied on is
no longer present after 81af66d35b, so
those downcasts are now explicit dynamic_cast calls with the same intent.
2026-03-26 20:14:59 -05:00
Ivan Savenko 833153bd32 Remove NKAI 1 and fuzzylite from engine
As discussed on Discord:

- NKAI has been removed since it is now superseded by NKAI 2
- fuzzy logic as well as fuzzylite library itself is also removed - it
was disabled in 1.5 release or so, and AI developers have no interest in
using it

Player that use NKAI1 should automatically switch to NKAI2
2026-03-05 15:05:17 +02:00
Ivan Savenko fa2ab0e024 Merge pull request #6783 from Laserlicht/tactics
[1.7.2] implement disabling of tactics
2026-01-27 17:13:20 +02:00
Laserlicht 7e7ced8ec1 save successful 2026-01-25 15:27:54 +01:00
Laserlicht 1a5eaee157 implement disabling of tactics 2026-01-25 14:18:20 +01:00
Ivan Savenko 14daaa9d5e Fix obligatory skills interval
Fixes heroes receiving wisdom/magic schools at rate twice higher than
needed
2026-01-01 18:56:01 +00:00
Ivan Savenko 4f0e383680 Optimized storage for map tiles 2025-12-30 17:50:53 +02:00
Andrey Filipenkov 37b40c04bb fix whitespace 2025-12-25 13:20:20 +03:00
Simeon Manolov 9d6ec17f48 MMAI: an ML-powered combat AI 2025-12-15 02:50:32 +02:00
Ivan Savenko fb41b48787 Add AI configuration validation 2025-11-23 23:34:17 +02:00
Ivan Savenko a5816b0fe4 Removed VCAI 2025-11-23 22:48:34 +02:00
Ivan Savenko 1c746a840c Merge pull request #6033 from thehonestcto/feature/nullkiller2
WIP feature/nullkiller2 cloned, restructured, tested and with additional improvements
2025-11-23 20:55:24 +02:00
Laserlicht afb045ef14 show statistics ingame 2025-11-22 16:46:10 +01:00
Mircea TheHonestCTO 5c6f2faebb Merge branch 'develop' into feature/nullkiller2 2025-11-19 17:47:18 +01:00
Andrej Dudenhefner 497995c11f add BattleEnded pack which happens after BattleResultsApplied and losing heroes are removed 2025-11-14 12:48:46 +01:00
Mircea TheHonestCTO 00c93c7b6a Merge branch 'develop' into feature/nullkiller2 2025-10-28 22:30:39 +01:00
Laserlicht 120213509d netpacks for renaming 2025-10-05 02:46:19 +02:00
Mircea TheHonestCTO 08ae8bef5a refactor: improve comments in CGameInfoCallback and MapInfoCallback; empty line to avoid using separator as a comment in IDE 2025-09-27 03:25:45 +02:00
Opuszek c5751cc82b fixes crash when entering a shipyard 2025-09-12 15:57:46 +02:00
Mircea TheHonestCTO ed966ff612 fix const TerrainTile& CMap::getTile(const int3&) const: Assertion `isInTheMap(tile)' failed. for IBoatGenerator::bestLocation() and not only 2025-09-08 16:34:29 +02:00
Mircea TheHonestCTO 2e49d6aca9 fix: skip pass and priority pass if hero is not valid anymore to as extra checks for lost heroes 2025-09-04 00:56:36 +02:00
Mircea TheHonestCTO 9994bf035e Merge branch 'develop' into feature/nullkiller2 2025-08-30 08:07:44 +02:00
Mircea TheHonestCTO 6c5df87e9b fix CGameInfoCallback.cpp log to done print many empty lines 2025-08-28 01:53:25 +02:00
Mircea TheHonestCTO 22b2a425c4 NK2AI::AIGateway in CDynLibHandler.cpp 2025-08-24 21:04:26 +02:00
Mircea TheHonestCTO 57949d8323 NK2AI::AIGateway in CDynLibHandler.cpp 2025-08-24 15:32:57 +02:00
Opuszek 2ce985ffa0 Fixes crashes caused by CREATURE_TERRAIN_LIMITER 2025-08-23 18:40:16 +02:00
Mircea TheHonestCTO 39bd4a2d20 refactoring with guardingCreaturePosition 2025-08-15 00:19:51 +02:00
Mircea TheHonestCTO 423eb70e2e Merge branch 'develop' into fix/monthly-random-monsters-hiding-nearby-danger 2025-08-14 23:21:20 +02:00
Mircea TheHonestCTO 957c3d9eed move trace log behind #if 2025-08-11 21:24:50 +02:00
Mircea TheHonestCTO 77a8b0f8e6 fix: monthly monsters aren't linked with other map objects at creation, leaving Nullkiller unable to see the next danger after killing a monthly monster;
2 minor log trace renaming to make them easier to spot in logs when debugging
2025-08-11 21:02:27 +02:00
Laserlicht ecfe09f6b1 multilevel support 2025-08-01 02:21:44 +02:00
Ivan Savenko 241da5937d First semi-working version of antilag for hero movement 2025-07-19 18:04:20 +03:00
Ivan Savenko a0a99d7311 Fix build, fix sonar 2025-07-13 23:03:45 +03:00
Ivan Savenko b0c511149d Removed hardcoded checks for Summon Boat spell 2025-07-11 17:11:01 +03:00
Ivan Savenko 55bd4bc8bf Support for custom cursors for adventure map spells 2025-07-11 16:06:21 +03:00
Ivan Savenko e12765dca0 Fix sonar warnings, convert spaces -> tabs 2025-07-09 17:52:51 +03:00
Ivan Savenko c250ca6e49 Merge pull request #5847 from IvanSavenko/movement_fix
Fix incorrect movement gain from objects like Rally Flag
2025-06-30 11:59:04 +03:00