1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
Commit Graph

458 Commits

Author SHA1 Message Date
DjWarmonger
e074c9b310 Merge branch 'develop' of https://github.com/vcmi/vcmi into develop 2014-05-18 09:00:32 +02:00
DjWarmonger
e2d44f6ac6 Fixed #868 - wrong battlefield in ship-to-ship combat 2014-05-18 08:52:03 +02:00
Macron1Robot
e4cbfe7f0b Bug 0001789 correction (incorrect battle field detection) 2014-05-18 03:16:53 +04:00
Macron1Robot
907caedb13 Added "produce" section in "building" structure. Changed dailyIncome. 2014-04-26 18:23:35 +04:00
Macron1Robot
b7b890acff Added "tavernVideo","guildBackground" to "faction" JSON config and schema. If "primaryResource" is set to "gold", silo will generate 500 gold per day 2014-04-24 23:36:18 +04:00
DjWarmonger
30b79588db - Moved gameState::guardingCreaturePosition() to CMap so it doesn't need to be recalculated many times for every player.
- Some optimizations with local cb pinter in VCAI.
2014-04-01 11:53:28 +00:00
DjWarmonger
ec54381b12 Some more optimization. 2014-03-31 15:26:47 +00:00
DjWarmonger
a64df5718f Some nontrivial optimizations based on profiling results:
- Movement bonuses will be calculated ONCE per pathfinder loop
- Goals will be sorted by hero to reduce number of calculatePaths calls
2014-03-31 14:26:09 +00:00
DjWarmonger
8683c8c0eb - Added and improved some propagators, including Crystal Dragons ability (#1232)
- Minor refactoring in AI
2014-03-29 21:39:19 +00:00
Ivan Savenko
9c0df68cb8 Fixing spelling mistakes. Patch from josch, fixes #1759 2014-03-23 12:59:03 +00:00
beegee1
fe1b16a7ec Some preparation towards mantis #1743:
- refactored CRandomGenerator (added util methods, improved method names)
- usages of std::minstd_ran are replaced by CRandomGenerator (not in entire code base, C rand() usages are still not replaced)
- refactored getArtSync method of CArtHandler -> now named pickRandomArtifact
- fixed some compiler warnings
- updated source code URL in VCMI spec
2014-03-17 19:51:07 +00:00
alexvins
4203d69525 Part 2 of new spell configuration
1) spell handler refactored to support modding in general way
2) imunnity icons moved to WoG as they depends on wog`s graphics
3) introduced new class template for handlers (todo: use this in other handlers)
4) save format changed
5) introduced "absolute immunity" - unaffected by "the Orb" etc. (todo: use it in config)
6) new format documented on wiki, added json schema.

* more split of registertypes - fixes 32 mingw build
2014-03-07 13:21:09 +00:00
Michał W. Urbańczyk
fe4171eb63 Fixed #1719. 2014-03-01 17:41:29 +00:00
beegee1
55a4561926 - fixed mantis #1729 2014-02-26 19:51:44 +00:00
Ivan Savenko
78609871ae bugfixing:
- fixed parsing of campaign bonuses (conversion to building ID)
- CONTROL event condition can be also fulfilled by allies
- fix for crash on opening exchange window in Russian version
2014-02-26 17:32:42 +00:00
Ivan Savenko
8d36bcabce Split registerTypes into multiple files, now in lib/registerTypes
directory in order to reduce huge memory usage by gcc
2014-02-24 19:57:33 +00:00
beegee1
d0a5a6eab4 - Implemented hero recreate handling correctly 2014-02-23 13:52:06 +00:00
beegee1
8a9f2781c2 - Fixed #1674 (Xeron should be re-created on AB campaign)
- Remove all hero placeholders after placing campaign heroes
2014-02-19 19:14:32 +00:00
Ivan Savenko
b5568edcc0 fixed compilation with gcc/clang
fix for #1699
2014-02-19 07:27:41 +00:00
Michał W. Urbańczyk
1e555a8ee3 Improved serializer. See: http://forum.vcmi.eu/viewtopic.php?p=11562#11562
Save format changed, removed compatibility workarounds.
2014-02-19 01:04:27 +00:00
Ivan Savenko
8d178fbcf5 Minor fixes:
- fog of war will be initialized after bonuses are set (needed if heroes
have scouting or arts with sight bonus)
- victory condition "control all dwellings" also requires golem factory/
- it is possible to dismiss troops during exchange between heroes
2014-02-09 19:47:23 +00:00
Ivan Savenko
7f07a30d7d More fixes for map-specific crashes, fixes #1427 and #733
- if special victory condition is present AND there is only one player
normal victory condition will be disabled
- added new triggered condition, constant value
- if target of CONTROL/DESTROY condition is removed from map, triggered
condition will be replaced with constant
- fixed randomization of armies with random stacks
2014-02-09 12:10:02 +00:00
Michał W. Urbańczyk
30aa07f86c Fixed #1652. 2014-02-09 09:57:00 +00:00
Michał W. Urbańczyk
343dd1a7d1 Properly removing stuff from hero, fixes #1646. 2014-02-08 23:07:33 +00:00
Michał W. Urbańczyk
d6f8a6d4bf Preparing crossover heroes works on deep copies of heroes, so the original post-mission state is not lost in the process. 2014-02-08 22:14:54 +00:00
Michał W. Urbańczyk
43ef565e7e Added serializer-based class able to make deep copies of objects — CMemorySerializer.
CGameState::init will work on the deep copy of StartInfo.
Some casts to reduce warnings.
2014-02-08 21:54:35 +00:00
Ivan Savenko
e6f433795b - fixed some crashes on staring a map/campaign 2014-02-08 21:05:24 +00:00
beegee1
d4fd361d4b - fixed #1643 -> hero placeholder handling
- fixed bug when loading victory/loss conditions of the 3rd scenario in the first ROE campaign
- fixed bug when loading artifacts to hero of the 3rd scenario in the first ROE campaign (due to corrupt H3M map)
- implemented function object to quickly find a object by it's sub ID in a list
- added netbackbase.h to header list in CMake
- removed false message which said that the server loaded the map successfully
2014-01-30 18:56:31 +00:00
beegee1
22e119770a Fixed mantis #1645 2014-01-03 16:36:22 +00:00
Ivan Savenko
2c4c964a45 Large rewrite of adventure map objects:
- replaced CDefObjInfo with ObjectTemplate class
- ObjectTempate is a direct member of objects instead of pointer with
shared ownership across CMap, handler and game objects
- simplified handling of objects that can change appearance (e.g. towns)
- all object queries regarding object appearance/blockmaps use h3m pos
instead of relative positions
- removed need of modhandler::reload
- cleanup of some old code
2014-01-02 23:48:38 +00:00
beegee1
aff704d1ca - Fixed mantis #1643 2013-12-31 16:58:11 +00:00
Ivan Savenko
7e02f6b670 Support for overriding victory/defeat conditions from h3m map or
campaign:
- new file MapFormatJson that implements small subset of Json map
format, as described on wiki
- vcmi will read overrides from file config/mapOverrides.json (currently
empty)
- Json writer for logical expressions

TODO: write data for map overrides
2013-12-30 23:09:58 +00:00
beegee1
a03d01bd3f - Updated TODOs, removed unused method declaration, updated comments
- Fixed hero strength calculation (power, knowledge should be included as well)
2013-12-30 20:04:24 +00:00
beegee1
9d0387140f - Fixed bug when the type id of the hero placeholder is the same as a already placed hero or prisoned hero 2013-12-30 15:34:28 +00:00
Ivan Savenko
0c5be52a42 Win/loss conditions based on logical expressions, yet another large
changeset:
- victory/defeat will be detected using triggered events
- vcmi will convert h3 conditions into set of triggered events
- it is possible to either change number of days without towns or even
remove this loss condition completely
- possibility of custom win/loss text and icons in pregame (no longer
connected to win/loss conditions)

Still missing:
- No interface to pass custom events/victory conditions into the game 
- AI would benefit from improvemets (handle all victory conditions,
select best one to fulfill)
- You have X days till defeat message still hardcoded to 7 days
2013-12-29 11:27:38 +00:00
beegee1
b8eddcd9a8 - Moved place bonus hero before normal random hero and starting hero placement -> same behaviour as in OH3
- Moved placing campaign heroes before random object generation -> same behaviour as in OH3
- Refactored pickHero into pickNextHeroType (hero generation sequence) and pickUnusedHeroTypeRandomly
- Added a SIGSEV violation handler to vcmiserver executable for logging stacktrace (for convenience only)
- Fixed Fuzzy.cpp and VCAI.h compilation on Clang
- Added a handleException function in addition to our macros (no use of macros, enables debugging support, does not re-throw, catches ...-case too)
2013-12-28 12:47:55 +00:00
beegee1
68bdf71db6 - Fixed GCC compiler warnings
- Implemented move heroes to next scenario partially
2013-12-20 13:07:58 +00:00
beegee1
f0cbbbdb70 - Refactored method CGameState::init 2013-12-18 18:18:12 +00:00
beegee1
b9b25ef552 - Fixed mantis #1422 (starting another scenario crashes VCMI for now)
- Refactoring
2013-12-16 18:39:56 +00:00
beegee1
2d095cf20a - Fixed days without castle counter
- Fixed 'you have only 0 days...' message
- Checks victory/loss conditions every player turn instead of every day
- Fixed mantis #1463
2013-12-06 19:44:11 +00:00
Ivan Savenko
b1e638d1af More fixes:
- logical expressions should compile without cpp include
- fixed #1608 and #1610
2013-12-04 03:54:02 +00:00
Ivan Savenko
3d3f93275d Multiple minor fixes:
- fixed starting armies of some heroes, including Bron #1602
- (debian) added vcmi-dbg package with debug information
- proper randomization of hero secondary skills, fixes #1603
- second capitol will show up as disabled immediately #1604
- proper deserialization of boost::variant
- empty file will no longer crash JsonNode parser
- fixed some compiler warnings
2013-12-03 09:03:37 +00:00
beegee1
c786a3076a - Refactored victory loss condition checks
- Added toString() method to EVictoryLossCheckResult enum class to improve debugging
- Removed mostly unused CFunctionList2
- Added missing header files for vcmiclient project to CMakeLists
- Tweaked SDL suggests bpp message a bit
- Added showInfoDialogAndWait (info dialog and waits, used from client thread) and showOkDialog (callback to ok click, used from GUI thread) to player interface
- Added showOkDialog method to CInfoWindow (unused for now, but may be used later)
2013-11-30 09:43:31 +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
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
Ivan Savenko
f56cccb716 - fixed bug where having towns with less than 16 heroes would result in
invalid random heroes on map start.
2013-11-12 10:09:55 +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
71d6b0fea9 - Fixed some warnings from cppcheck
- Minor improvements to JSON validation
- Cleanup in SDL_Extensions.cpp
- Implemented new propery for creature format: idle animation duration
- Disabled idle animation of some of conflux creatures (was clearly
broken)
2013-11-06 13:42:58 +00:00
Ivan Savenko
0e3eae3095 patch from KroArtem 2013-11-03 12:51:25 +00:00