nordsoft
1b4d117790
deeper decoupling
2023-04-30 17:13:07 +04:00
nordsoft
e47bb3f1f9
Separate configuration and object
2023-04-30 00:59:02 +04:00
Ivan Savenko
7db67a3101
int3 now has proper hasher function
2023-04-20 22:04:24 +03:00
Konstantin
7a5775a9f9
vcmi: use std::optional
2023-04-17 00:43:13 +03:00
nordsoft
bfc75ccd39
Merge remote-tracking branch 'upstream/develop' into battle-dialog
2023-04-11 02:22:42 +04:00
nordsoft
ce3028bd73
Intermediate commit
2023-04-06 19:34:07 +04:00
Konstantin
11b237a23c
vcmi: massive refactoring v1
2023-04-05 22:33:12 +03:00
Ivan Savenko
06b35ce533
Merge pull request #1595 from vcmi/vkai-hack-to-workaround-freezes
...
VCAI: hard limit on iterations per turn
2023-03-31 18:15:58 +03:00
Ivan Savenko
a0e9e01b48
Renamed & reorganized all game mechanics settings names
2023-03-16 18:11:35 +02:00
Ivan Savenko
383387ef29
Integrated defaultMods into mod system
2023-03-16 17:55:09 +02:00
Konstantin
4617ce10e5
vcmi: allow showing more than one components in infobar
...
Up to 8, AFAIK. So, we can show multi-reward in infobox now.
One issue remain - cannot dynamically choose components size
based on text size.
2023-03-11 21:41:57 +03:00
Ivan Savenko
11e4d84749
Implemented View Earth / View Air spells
2023-03-05 17:48:02 +02:00
Andrii Danylchenko
2630fb2330
VCAI: hard limit on iterations per turn
2023-02-18 22:08:08 +02:00
Ivan Savenko
f8f6df02f3
Removed remaining hardcoded objects
2023-01-23 15:27:27 +02:00
Ivan Savenko
62e127fb59
Bonusing objects are now configured in json
2023-01-23 01:05:10 +02:00
Ivan Savenko
bfd6c40f25
Moved all once-per-hero visitable (sans Tree) to config
2023-01-22 22:58:53 +02:00
Ivan Savenko
05a1d7c6e3
All text for factions/towns/building are passed through translator
2023-01-20 15:18:36 +02:00
Ivan Savenko
fa6f7513e8
All heroes-related strings are passed through translator
2023-01-20 15:18:36 +02:00
Ivan Savenko
370e92a90a
Added workaround for no longer accessible hero in MoveHero
2022-12-25 16:12:26 +02:00
Ivan Savenko
405b2976d5
Renamed getUpgradeInfo -> fillUpgradeInfo
2022-12-25 14:03:43 +02:00
Ivan Savenko
25bceda4ea
Added convertToVisitablePos/convertFromVisitablePos to CGHeroInstance
...
This method replaces old convertPosition, but with more clear names and
without hardcoded magic constants.
2022-12-09 14:42:47 +02:00
Ivan Savenko
facf77b3ae
vstd::unique -> std::unique
2022-12-07 23:36:20 +02:00
Ivan Savenko
d85ee019ec
Removed CGHeroInstance::convertPosition method
2022-12-07 22:51:32 +02:00
Ivan Savenko
49cbd5adc9
CGHeroInstance::convertPosition is no longer static method
2022-12-07 22:34:08 +02:00
Ivan Savenko
2855606a88
Enabled & fixed -Woverloaded-virtual warning from gcc/cland
...
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
SoundSSGood
909dcb82fa
use ArtifactID
2022-11-29 00:32:18 +02:00
Andrey Filipenkov
ff635edc0b
wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
...
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Andrii Danylchenko
56a1984aa8
Remove extra non-printable characters
2022-04-27 09:22:18 +03:00
val-gaav
8baa97acd3
Update VCAI.cpp
2022-04-26 15:08:02 +03:00
Dmitry Orlov
ea2931c6ea
Fix: Get rid of 'Tile is not visible' error message
2022-01-30 12:31:07 +02:00
Andrii Danylchenko
3fa7e0976f
Nullkiller: update / fix build, core changes required for Nullkiller AI
2021-07-26 21:02:50 +03:00
Andrii Danylchenko
9c8d776398
Merge branch 'develop' into handlersAbstraction
...
# Conflicts:
# CI/linux/before_install.sh
# CI/mac/before_install.sh
# CI/mxe/before_install.sh
# lib/CModHandler.cpp
# lib/mapObjects/CObjectClassesHandler.cpp
# lib/mapObjects/CObjectClassesHandler.h
# lib/mapObjects/CommonConstructors.cpp
# server/CGameHandler.cpp
# test/CMakeLists.txt
# test/spells/effects/TeleportTest.cpp
2021-07-16 00:32:13 +03:00
Dmitry Orlov
0e5d427dc9
Fix: VCAI should not attempt to move Spellbook
2021-04-29 00:04:22 +03:00
AlexVinS
ecaa9f5d0b
Entities redesign and a few ERM features
...
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
John Bolton
c61bae4060
Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation.
2020-10-05 16:28:28 -07:00
John Bolton
a05ae78e67
Fixed lots of warnings.
...
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.
4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
Jacob Lundgren
cfe33e6b6e
3117: Fix crash after AI revisits teleporter
...
** Behavioral change: Fix AI heroes sometimes attempting to probe
teleport exits using data from a previously processed hero, causing
nullptr dereferences.
VCAI::moveHeroToTile has special case logic for revisiting tiles. This
logic could cause teleport exits to be stored in
teleportChannelProbingList, without the list subsequently being
cleared. If the processing of that hero ended immediately after that,
the next hero would believe that the list is accurate for them and
attempt to teleport while not standing on a teleporter.
2020-05-01 06:33:06 +03:00
Dydzio
545b07b8b8
Thread interruption fixes
2019-05-26 17:55:22 +02:00
Michał Kalinowski
ac6b477aa2
Simplify statements
...
-Simplify return statements across the code
2019-03-31 09:43:14 +03:00
Andrii Danylchenko
ffdf5ad180
AI: fix hero exchange logic, allow splitting weakest-fastest creature, refactoring
2019-03-17 11:54:02 +02:00
Andrii Danylchenko
5fb5ddfc67
ai fix town portal to occupied town
2019-02-26 22:50:46 +02:00
Alexander Shishkin
6165954e40
Merge pull request #546 from nullkiller/ai-pathfinding-update-paths
...
AI pathfinding const api and updatePaths
2019-02-14 20:33:00 +03:00
Dydzio
aafad18121
Style fixes
2019-02-12 19:47:19 +01:00
Dydzio
18e139d9e3
AI hero exchange improvement: split last creature stack
2019-02-12 17:20:59 +01:00
Andrii Danylchenko
35f696b695
AI pathfinding const api and updatePaths
2019-02-10 15:25:56 +02:00
Andrii Danylchenko
bf87a9774d
AI: stability fixes
2019-01-26 22:38:57 +02:00
Alexander Shishkin
b00e935e4d
Warnings fixes ( #538 )
...
Warnings fixes
* Suppress `missing-braces` for Clang
* Fixed many C4275 warnings
* Fixed almost all Clang/GCC warnings
* Silence most frequent MSVC warning.
* Fixed some pessimizing-move warnings
* Fixed some unused capture warnings
2019-01-19 13:52:02 +03:00
AlexVinS
da20aa2388
Use the same cost value in Pathfinder and fuzzy evaluations.
2019-01-17 10:54:41 +03:00
AlexVinS
4b5910c2f4
VCAI performance improvements
...
* Node graph initialization optimized.
* Fixed "Unathorized obstacle access".
* Pathfinding tracing disabled with ifdef.
* Misc bonus calculation optimizations.
* Removed timestamp from log lines. Date formatting eats too much CPU.
* Paths for all heroes in Client are now cached
2019-01-17 10:50:56 +03:00
Andrii Danylchenko
8fee46de7c
AI: town portal support
2019-01-17 10:40:23 +03:00
AlexVinS
9ec3d2ef64
Merge remote-tracking branch 'remotes/nullkiller/ai-refactor-exploration-according-to-new-pathfinder' into develop
2019-01-08 00:25:25 +03:00
Andrii Danylchenko
edc5abe49d
AI: tweak explore to work with new pathfinding.
2019-01-07 14:07:36 +02:00
Dydzio
3e1b623fb6
Refactor goal removal from resource manager queue
2019-01-01 15:41:52 +01:00
Dydzio
456132c06b
Fix code mistake
2019-01-01 14:19:52 +01:00
Dydzio
94df657d03
Check parent goals and resource manager for validity
2019-01-01 14:19:52 +01:00
Andrii Danylchenko
2c401931c4
AI: fix freeze on BuyArmy
2018-12-30 16:40:05 +02:00
Andrii Danylchenko
ee5a26da60
AI: fix freeze while endlesly trying to recruit hero which is not possible anylonger.
2018-12-25 15:04:03 +02:00
Andrii Danylchenko
035d279ae8
Refactor CGHeroInstance, make spells private
2018-12-23 15:49:26 +03:00
Andrii Danylchenko
5d022ba77c
AI: CompleteQuest goal and summon boat spell support
2018-12-23 15:49:26 +03:00
Andrii Danylchenko
e1b922f7b8
AI goals refactoring ( #524 )
2018-12-01 11:30:37 +03:00
Andrii Danylchenko
60c5f584a8
AI: GATHER_TROOPS improvements and fixes
2018-11-14 22:10:02 +02:00
Dydzio
d5063e53a0
Do not evaluate goals related to removed hero
2018-11-07 21:04:15 +01:00
Andrii Danylchenko
3871ed0085
Hero try to execute a quest to kill himself
2018-11-05 22:24:15 +02:00
Dydzio
9f3d718e3b
Allow AI to be aware of invisible heroes deletion
2018-11-02 16:35:25 +01:00
Alexander Shishkin
e26f6ff15f
Merge pull request #505 from janisozaur/catch-by-ref
...
Catch exceptions by const-ref, not by value
2018-10-30 05:08:30 +03:00
Michał Janiszewski
7be9aa4868
Prevent shadowing of function arguments by local vars
2018-10-29 16:56:14 +01:00
Michał Janiszewski
9822a8f2df
Catch exceptions by const-ref, not by value
2018-10-29 16:41:54 +01:00
Andrii Danylchenko
72aff02418
AI pathfinding: buy boat
2018-10-21 14:17:55 +03:00
AlexVinS
be45c8cb43
Updated C::B projects, fixed a few warnings
2018-10-10 16:07:28 +03:00
Andrii Danylchenko
cf213a5acf
#2983б #2910 and a few other bugs fixed
2018-10-06 16:35:31 +03:00
Andrii Danylchenko
49c872e4ec
AI: replace SectorMap with new PathfinderManager
2018-10-06 16:35:31 +03:00
AlexVinS
99f167a44c
AIhelper should be owned by AI instance.
2018-09-02 18:04:38 +03:00
DjWarmonger
5f39e92eb4
Merge branch 'develop' into VCAI_fixes
2018-08-22 08:06:13 +02:00
DjWarmonger
f484baea9f
Merge pull request #474 from vcmi/FuzzyHelperRework
...
FuzzyHelper refactoring + Ai Map Object Evaluation improvements
2018-08-22 07:33:09 +02:00
DJWarmonger
2f4b463459
- Fixed major bugs with building dwellings. ResourceManager doesn't support building in future turns.
...
- Tweaks for trading
2018-08-21 12:55:31 +02:00
Dydzio
243ce7370a
This fixes crash... idk why
2018-08-20 15:20:47 +02:00
Dydzio
158b3c0b80
Initial implementation of invalid VisitObj removal
2018-08-20 14:43:51 +02:00
AlexVinS
de5f1461ba
Fixed https://bugs.vcmi.eu/view.php?id=2998
2018-08-12 15:02:10 +03:00
Dydzio
72b206347f
Split Fuzzy.cpp/h
2018-08-10 18:27:57 +02:00
Dydzio
bd3d27c79b
Leftover stuff: rename GET_OBJ
2018-08-10 16:48:42 +02:00
Dydzio
3961b4ac93
Rename GetObj->VisitObj to reflect new functionality
2018-08-10 16:45:00 +02:00
Dydzio
f91c85a900
Crash fix
2018-08-10 01:04:31 +02:00
Dydzio
5065f5a104
Fixes
2018-08-10 00:33:18 +02:00
Dydzio
fa97940b4f
Improve wander logging
2018-08-09 18:24:04 +02:00
Dydzio
ff2ac5b34b
Minor fixes
2018-08-09 18:04:49 +02:00
Dydzio
1377338a41
Restore old code line
2018-08-09 17:45:58 +02:00
Dydzio
616a6bbdf7
New object target handling in wander
2018-08-09 16:28:15 +02:00
Dydzio
2365946b62
Elementar GetObj - first attempt
2018-08-09 13:17:58 +02:00
DJWarmonger
4b602c42ff
Fix for fix, ugh.
2018-08-08 14:26:21 +02:00
DJWarmonger
d07a77f34b
- Tweaks for GatherArmy
...
- Tweaks for exploration
- Increased default priority of BuyArmy, SIGNIFICANT improvement!
2018-08-08 12:38:32 +02:00
DJWarmonger
a9ef8fe32f
- Fixed Border Gates logic
...
- VCAI may now walk onto removable objects when exploring
2018-08-08 10:52:52 +02:00
DJWarmonger
a827c083d8
Remove useless code
2018-08-06 21:54:17 +02:00
DJWarmonger
4d701736f9
Important changes:
...
- Fixed goal completion logic
- WIN can't be completed
2018-08-06 20:25:39 +02:00
DJWarmonger
36e44adc8c
rebase
2018-08-06 10:02:59 +02:00
DJWarmonger
f5ba181173
Refactoring: Move SectorMap to separate file
2018-08-04 21:59:30 +02:00
DJWarmonger
6615870045
Rebase
2018-08-04 15:59:59 +02:00
DJWarmonger
9e34ef5534
AI will not try to sell reserved resources.
2018-08-04 11:51:19 +02:00
DJWarmonger
2aa0a6fe2f
More fixes for trading. Seems to work now.
2018-08-04 10:20:40 +02:00
DJWarmonger
a5ca32ad38
Some checks and log for CollectRes goal.
2018-08-04 09:24:43 +02:00
Andrii Danylchenko
4141e8e7b0
[2982] AI: unexpected error in AI logic when take resource on adjasent tile
2018-08-01 21:49:15 +03:00