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

799 Commits

Author SHA1 Message Date
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
DjWarmonger
a9b10c8099 - Changed aggregation method so now fuzzy engine takes all the factors into consideration
- Heroes now will use real path cost and their movement, which has numerous advantages:
* Actual movement cost is taken into consideration
* Groups of heroes will keep order
* Fastest heroes will be used for exploration first
2014-02-07 08:23:31 +00:00
Michał W. Urbańczyk
e5312887d1 Fixed possible crash at the game start (when victory conditions are checked before currentPlayer is set). 2014-02-01 16:08:01 +00:00
Michał W. Urbańczyk
679c3c5830 Split conditions fixed (it should be impossible to take units from ally). 2014-01-30 14:04:09 +00:00
Ivan Savenko
3779a54ddd - probably fixed 1671
- fixed missing loss condition in Birth of Barbarian
- fixed some bugs found by cppcheck
2014-01-30 11:08:37 +00:00
Ivan Savenko
c5b74a2dce Miscellaneous fixes:
- proper block of "back" button in campaign menu.
- proper block of AI switch in battles
- vertical garrisons can now be attacked from top
- better UI logging, vcmi will print to log file all pressed buttons
- server will not try to build already existing building
2014-01-13 17:44:21 +00:00
Ivan Savenko
fb5c9fc972 - creatures availability tests no longer check for built buildings.
Fixes #1650
- do not crash if town has 0 creatures on some dwelling level
- do not crash if dwelling for some level is not present in town at all
2014-01-11 18:12:09 +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
Ivan Savenko
2b9e074d54 - implements level limit (Mantis #1620)
- added workaround to weird bug where vcmi fails to find objects for
win/loss conditions
2014-01-01 16:12:53 +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
Ivan Savenko
f6c1dace6c Minors:
- By default, cmake will keep debug info
- removed warnings from adventure map infobox (part of #1636)
- adventure map infobox will refresh on artifact changes (part of #1636)
- moved terrain music files to terrains.json file
- player should act before AI in all games, not only campaigns
2013-12-28 18:57:08 +00:00
beegee1
68bdf71db6 - Fixed GCC compiler warnings
- Implemented move heroes to next scenario partially
2013-12-20 13:07:58 +00:00
DjWarmonger
f8028f512d Fixed #1585 - destroyed war machines will be removed from hero's equipment. 2013-12-19 14:35:49 +00:00
beegee1
61fc216a6f - Fixed mantis #1421
- Fixed initial map selection in campaign bonus screen
2013-12-17 17:14:55 +00:00
beegee1
69eee05ccc - Partially fixed mantis #1065 (Gate with hex 95 can't be attacked)
- Fixed 'catapult tried to attack non-catapultable hex!' problem, now catapult attacks attackable wall parts only
- Fixed problem that the server performed applying damage on a wall part twice
- Added methods for checking what wall parts are attackable and if a wall part is potentially attackable
- Added functionality to trace net packages
- Added functionality to trace std::vectors
- Added tracing for CatapultAttack(CPack)
- Updated various toString methods to use {} instead of []
- Refactoring
2013-12-08 17:54:13 +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
122db9963b More string ID's for buildings:
- town hall slots now use string ID's
- converted building requirements to new format
- "upgrades" property from buildings now uses string ID's
- several fixes for improved support of alternative creatures
- removed no longer needed "id" property from structures

Old mods should still work but will produce error messages during
validation
2013-12-04 10:36:39 +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
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
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
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
Ivan Savenko
f838cceddd - fixes Inferno Castle Gate 2013-10-17 13:54:12 +00:00
Michał W. Urbańczyk
5c6d12400f Fixed AI detection of battle end (solves some freezes). 2013-09-29 20:54:29 +00:00
Michał W. Urbańczyk
0abbe71b25 Merged fixes from the branch. 2013-09-28 00:58:33 +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
4f29b526ca The battle callback method battleGetAllStacks will by default omit the arrow turrets. Fixes #1453, #1455 and related. 2013-09-27 19:42:17 +00:00
DjWarmonger
d06b02638b Partially implemented #481 2013-09-17 12:02:33 +00:00
DjWarmonger
39f9069ed9 Implemented deterministic secondary skills, #1166. 2013-09-09 15:23:59 +00:00
DjWarmonger
99352a7220 Fixed crashes when clone dies #1357, #1441. 2013-09-08 17:43:10 +00:00
Michał W. Urbańczyk
385f4ab7f5 #1153 and #1395 should be fixed. Terrible, terrible, terrible.
Fixed crash in battles, when attempted to access <0 screen coordinates.
2013-09-01 22:55:57 +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
38c1542d9d Fixed crash on battle end — don't attempt giving exp to loser (hero is removed -> can't get exp -> crash). 2013-08-18 17:49:31 +00:00
Ivan Savenko
c81a31c74a - catapult attacks should be identical to H3
- catapult may miss and attack another part of wall instead (this is how it works in H3)
- minor fixes
2013-08-06 11:20:28 +00:00
DjWarmonger
6057226665 Fixed in r1364. It's all about logic! 2013-08-04 06:16:17 +00:00
Ivan Savenko
b87897096c Filesystem handling is now more flexible
- removed CResourceLoader class in favor of one that implements resource loader interface
- removed global pool of files, in favour of more dynamic approach
- renamed some files to match current situation
All these changes are needed mostly for future mod manager + .zip support
2013-07-28 14:49:50 +00:00
DjWarmonger
abaa5b1c59 Fixed #1352. Implemented correct death stare algorithm. 2013-07-28 08:48:29 +00:00
DjWarmonger
5f310aa20f Fixed all issues with Resurrection: #123, #1358 2013-07-27 19:01:31 +00:00
Michał W. Urbańczyk
d8a27d8f3c Refactored player-specific data into single struct BattleState. 2013-07-21 22:01:29 +00:00
Ivan Savenko
491bd557ef fixed several bugs reported on forum:
- necromancy issues
- fix for lookout tower
- Sir Mullich is unavailable
- first hero is awakened on next turn
- give 500 XP on defeating hero
2013-07-21 18:27:33 +00:00
Michał W. Urbańczyk
1e11904d8a Fixed Remove Obstacle. TODO: limit its working on spell-created obstacles depending on spell school level. 2013-07-21 10:25:12 +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
DjWarmonger
9277c695a5 Fixed #1361. 2013-07-20 08:54:43 +00:00
Ivan Savenko
4ac2a6e8b6 minor refactoring of VCMIDirs, bugfixing
- VCMIDirs represent XDG specification more closely (partial #1310)
- Minor bugfixing, including #1327 #1328 and #1306
2013-07-08 20:55:22 +00:00
Ivan Savenko
146a5e5ef8 Made speed of most of battle animations time-based
- speed of creature-related animation no longer depends on framerate
- most of values from cranim.txt are now used correctly
- removed BMPPalette struct in favor of SDL_Color
- animation group "DEAD" that is used to display dead stacks, by default consists from last frame of "DEATH" group

Notes:
- animation speed may still need some adjustments
- range of config property "battle/animationSpeed" has been changed. This may result in extremely fast animation. To fix - change animation speed via options.
2013-07-06 16:10:20 +00:00
Michał W. Urbańczyk
a1f545792b Compile fixes specific for VS 2012"
* Reverted std::bind to boost::bind. std::bind on Visual 2012 doesn't work in some cases (especially with std::ref), not sure why [but it seems to be a bug, since 2013 preview compiles the same code fine]. 
 * Move assignment operator for VS 2012.
2013-07-02 15:23:32 +00:00