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

197 Commits

Author SHA1 Message Date
DjWarmonger
bf3fe0e274 - Explore goal will also use fuzzy comparison
- Fixed AI afraid of town with Castle built: #1514, #1515, #1584
2013-12-20 16:49:51 +00:00
beegee1
68bdf71db6 - Fixed GCC compiler warnings
- Implemented move heroes to next scenario partially
2013-12-20 13:07:58 +00:00
DjWarmonger
6b3ca831c1 - Conquer goal will not use fuzzy logic as well. AI should play more aggresively.
- Removed unused code.
2013-12-20 13:01:44 +00:00
DjWarmonger
1b04f4fa9f Hopefully fixed ALL the cases when hero could use invalid path, for good. 2013-12-20 10:15:29 +00:00
DjWarmonger
d085f8eee8 First implementation of fuzzy logic in VisitTile goal. 2013-12-20 09:43:12 +00:00
DjWarmonger
983c0496d0 Some work towards fuzzy goal comparison. 2013-12-19 20:21:21 +00:00
Ivan Savenko
881a7cf862 - added check to avoid recursion in AI town building code
- restored previously missing AI shield during AI turn
2013-12-19 17:29:35 +00:00
Ivan Savenko
ee1b0459e6 Extended building dependencies:
- buiding/structure lists must use object format. This may break some
outdated mods.
- generic support for logical expressions that consist from and/or/not
operators.
- string ID's for buidings are now actually used.
2013-12-02 11:58:02 +00:00
beegee1
36a69aaa2f - Fixed VS project files (added missing .cpp files)
- Structured VS project files (added a filter for every subfolder)
2013-11-30 14:22:03 +00:00
DjWarmonger
2f698acf98 Compile fix - template specialization is defined before generic template. 2013-11-30 07:52:08 +00:00
DjWarmonger
8be4ca03c8 Uncommented Fuzzy code. Please let me know if it compiles on other platforms. 2013-11-25 11:55:48 +00:00
DjWarmonger
54c52869cf - Fixed some more cases when heroes could block each other
- More generous checking of complete goals and their dependencies
2013-11-24 19:15:08 +00:00
DjWarmonger
b0bdfff117 Compile fixes, refactoring 2013-11-24 15:30:17 +00:00
Ivan Savenko
27a30b5ff9 - compile fix
- fixed crash if json defines only one creature horde
2013-11-24 11:36:51 +00:00
DjWarmonger
74a1d09871 Fixed new issue with hero trying to visit himself. 2013-11-24 08:56:02 +00:00
DjWarmonger
cedb3ea82a Some more logging for goal completion.
Stub of fuzzy goal selection.
2013-11-24 08:21:51 +00:00
DjWarmonger
0ab7b498f5 VCAI is now functional again!
Implemented Visitor pattern for double-dispatch (actually only goal type dispatch).
2013-11-23 18:16:25 +00:00
DjWarmonger
e6bb39d3a4 More work on VCAI Goals, still derived functions are not called :/ 2013-11-23 12:30:10 +00:00
beegee1
3e4407593f - Refactoring for checking victory/loss conditions (use enum class instead of magic numbers)
- Improved showing player lost message for one special case
2013-11-17 17:57:04 +00:00
beegee1
39d3102905 - Fixed compilation errors on clang
- Removed compiler warnings of unused variables
2013-11-16 09:17:19 +00:00
DjWarmonger
900d7a03f0 Template magic. Implemented method chaining + clone pattern for Goals. 2013-11-15 17:30:16 +00:00
Ivan Savenko
3560bbb7f3 two patches/pull requests from janisozaur
- replace our custom bmap with std::map::at()
- compile fixes for editor
2013-11-12 10:45:42 +00:00
DjWarmonger
1657f124e1 - Compile fixes for MVS
- AI goals will now be handled by smart pointers
2013-11-09 21:29:46 +00:00
Ivan Savenko
55577d0ac4 - fixed missing DLL_LINKAGE
- use precalculated checksum for zip files
- UNUSED macro to silence some warnings
2013-11-09 13:49:36 +00:00
Ivan Savenko
ee6cdbeffe went through the rest of cppcheck warnings, mostly harmless 2013-11-07 12:48:41 +00:00
Ivan Savenko
0e3eae3095 patch from KroArtem 2013-11-03 12:51:25 +00:00
Ivan Savenko
c4716d0a9a - reordered files in cmake so files with long compile times will be
compiled first.
- changed format of modSettings.json, VCMI should properly update file
on the first run.
- implemented property "defaultTavern" that acts as default value for
"tavern" entry in hero class and town formats.
2013-11-03 12:07:23 +00:00
Ivan Savenko
012212698e compile fixes, cmake files update 2013-10-20 13:51:05 +00:00
DjWarmonger
c77fa499e7 Some more. 2013-10-19 11:37:22 +00:00
DjWarmonger
7b4964b882 Constructors for Goals. 2013-10-19 06:16:21 +00:00
DjWarmonger
f0248dd245 More AI refactoring. 2013-10-19 05:52:30 +00:00
DjWarmonger
9950bc6ec3 First part of AI refactoring. Trying to split AI into three distinct parts:
- Core with callback handling and processing
- Logic (goal decomposition)
- Utility and helper functions based on simple mechanics

Also, Goals will now be organized in object-oriented fashion.
2013-10-18 20:17:25 +00:00
Michał W. Urbańczyk
0e8fa04d9f Fixed #1487. 2013-10-13 15:24:02 +00:00
Michał W. Urbańczyk
30a0237fb8 Merged the 092c-compat branch. 2013-09-28 12:31:06 +00:00
Michał W. Urbańczyk
c6c53a5b1e Few more freeze-related fixes. 2013-09-28 00:30:12 +00:00
Michał W. Urbańczyk
d1807585ad Fixed at least two #1428 freezes, likely more.
They were occurring when AI hero visited bank that was also guarded by neutral creature nearby,
2013-09-27 23:46:58 +00:00
Michał W. Urbańczyk
b62bb096a7 Fixed #1430, work-around to make #1435 non-crashing.
Fixed at least one of the #1428 infinite turns cases.
2013-09-11 21:57:08 +00:00
Michał W. Urbańczyk
dd72261193 Fixed #1437. 2013-09-05 22:11:13 +00:00
Michał W. Urbańczyk
92246a2c17 * Fixed #1417 — infinite loop of AI trying to visit allied creture generator
* Fixed #1401 — battle AI won't attempt attacks with First Aid Tent
2013-08-25 13:03:29 +00:00
Ivan Savenko
5654fef901 - ZipArchive namespace for operations with zip archives, located in CZipLoader.h/cpp.
- new fields in mod format, for use with mod manager (check config/shemas/mod.json for details)
- removed some 0.92 compatibility from mods loading
- several compile fixes
2013-08-19 11:50:53 +00:00
Michał W. Urbańczyk
3b42cff3ec #1409 should not crash anymore.
Fixed crash on serializing empty path. [How did it got there...?]
operator<< for boost::optional.
2013-08-18 15:46:28 +00:00
Michał W. Urbańczyk
e9d51a2670 Fixed issue that allowed to build multiple boats in town. Renamed state() to sth more sensible. 2013-07-21 10:08:32 +00:00
Ivan Savenko
f82122d9be second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
Ivan Savenko
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
Ivan Savenko
dd808ef5cc bugfixing:
- support for one more Russian localisation, fixes #1321
 - fixed icon for level 1 town hall, #1294
 - correct portraits for first heroes from mods, #1297 and probably #1298
And a lot of gcc compile fixes
2013-06-23 19:35:54 +00:00
Michał W. Urbańczyk
4a0587d500 More work on auto-fight.
Dynamic libraries return smart-pointers to what they create.
2013-06-22 21:47:51 +00:00
Michał W. Urbańczyk
254f194220 Some very early work towards autofight feature.
Added EmptyAI to the solution.
Passing callbacks by shared_ptr.
2013-06-22 14:47:20 +00:00
Michał W. Urbańczyk
79026bdfde Introduced strongly typed QueryID.
Exchange between heroes is now a proper first-class query. Fixes #1269. #66 should also be finally fully fixed.
VC projects: /Zm flag to fix compilation issues with recent Boost.
2013-05-27 10:53:28 +00:00
Ivan Savenko
dca8e9fa6f - removed access to one wog file
- removed way to avoid dependency checking in identifiers resolution
- minor fixes
2013-05-21 22:11:44 +00:00
Michał W. Urbańczyk
5c2473d436 Support for saving/loading in player interfaces, including VCAI.
Minor changes.
2013-05-09 11:09:23 +00:00