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

3627 Commits

Author SHA1 Message Date
alexvins
339e1cd98b [c::b] project file for minizip, lib & client update (wip) 2014-01-03 15:43:54 +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
cd8a0c01e4 Data for campaign win/loss conditions. All campaigns should now have
correct conditions.
All custom conditions are now validated using schema.

Note that some of scenarios may not work due to instant win/loss, mostly
because some placeholders fail to import (Mantis #1643)
2014-01-01 13:30:31 +00:00
beegee1
aff704d1ca - Fixed mantis #1643 2013-12-31 16:58:11 +00:00
beegee1
5971ceaa7f - Fixed hero / army strength handling 2013-12-31 16:11:18 +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
DjWarmonger
51e6961d08 Compile fix for MVS. 2013-12-29 15:48:56 +00:00
Ivan Savenko
a8b9258840 missing dll_linkage 2013-12-29 14:35:38 +00:00
Ivan Savenko
96cc1b0e75 fixed slow loading of map selection window 2013-12-29 12:18:02 +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
DjWarmonger
d2d1a2f544 Restored code from previous commit. 2013-12-28 19:37:35 +00:00
DjWarmonger
14065f8c80 Fixed #1637 - Water and Ice Elementals will now be immune to water damage spells. 2013-12-28 19:27:19 +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
DjWarmonger
344783efb5 An attempt to handle spawning objects. However, on a day of double growth, when multiple monsters spawn, game freezes. Looks like engine issue, code is commented out. 2013-12-28 16:39:47 +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
DjWarmonger
9ec299931d - Fixed VisitHero goal. Now heroes can exchange armies again.
- AI should not get lazy in endgame.
- Removed unused code.
2013-12-27 13:20:40 +00:00
DjWarmonger
e5b011abe0 - Fixed heroes stalling. Locked heroes now try to decompose their goals exhaustively, which FINALLY works as intended.
- Fixed multiple issues with ClearWayTo goal.
2013-12-26 09:53:37 +00:00
DjWarmonger
603cbd8850 Experiment: goal values calculated by Fuzzy Helper will be stored in "priority" field and used in consecutive calculations. 2013-12-25 16:05:11 +00:00
DjWarmonger
7af9b0ea74 Replaced AI vectors by sets for both performance and safety. 2013-12-25 13:38:20 +00:00
DjWarmonger
12bb9221d1 One more fix. 2013-12-24 22:12:12 +00:00
DjWarmonger
a8539b2b28 - Fixes for Quest Guard and goal completion, in particular For Sale map (#894)
- Fixes for ally players handling by AI
2013-12-24 22:01:16 +00:00
DjWarmonger
0c3ccda922 One more fix. 2013-12-23 21:22:42 +00:00
DjWarmonger
aec04d920e Endless crusade against AI issues and loopholes!
- Fixed #1126
- ClearWayTo and GatherArmy goals will also consider multiple subgoals
- GatherArmy may include building dwellings in town (experimental)
2013-12-23 20:46:01 +00:00
Ivan Savenko
7806bda663 fixed possibly duplicated skills on levelup 2013-12-23 16:05:19 +00:00
beegee1
11ca1ec1f8 - Fixed custom main hero handling (map options)
- Refactoring
2013-12-23 15:59:37 +00:00
DjWarmonger
362a54b4df More fixes and tweaks for AI, including #1590. 2013-12-21 21:31:28 +00:00
DjWarmonger
a6ce282f8a Dramatically reduced exploration complexity. AI will check only nearby objects. 2013-12-21 19:17:27 +00:00
DjWarmonger
473250e223 - Removed slow and buggy part of exploration code
- Various tweaks and performance improvements. remove_if on long vector is a bad idea.
2013-12-21 17:34:59 +00:00
DjWarmonger
5ec3685041 Fixed heroes getting stuck because their assigned tile was captured by another hero. 2013-12-21 07:37:23 +00:00
DjWarmonger
045af73f0d Some tweaks and performance improvements. 2013-12-20 21:10:43 +00:00
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
Ivan Savenko
41cb1603e1 Fix for #1624 :
- recreate adventure map interface on each scenario (to make sure that
there is no garbage data from prev. game)
- added check to avoid such situations in future
2013-12-20 15:00:48 +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
29f4a12814 - fixed some evil memory leaks
- fixed recursive dependency of castles
2013-12-19 19:43:16 +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
DjWarmonger
f8028f512d Fixed #1585 - destroyed war machines will be removed from hero's equipment. 2013-12-19 14:35:49 +00:00
beegee1
f0cbbbdb70 - Refactored method CGameState::init 2013-12-18 18:18:12 +00:00
beegee1
61fc216a6f - Fixed mantis #1421
- Fixed initial map selection in campaign bonus screen
2013-12-17 17:14:55 +00:00
beegee1
d1002f7e8f - Fixed starting another map from campaign bonus selection screen while playing a campaign mission 2013-12-17 12:12:25 +00:00
beegee1
b9b25ef552 - Fixed mantis #1422 (starting another scenario crashes VCMI for now)
- Refactoring
2013-12-16 18:39:56 +00:00
Ivan Savenko
7d7e65a316 changes in hero class format:
- new property: affinity (might/magic) since in mods it is impossible to
rely on odd/even numeric indexes
- property commander is now part of hero class
2013-12-13 18:27:54 +00:00
stopiccot
c5e0e48d98 Some OS X related fixes 2013-12-13 11:51:15 +00:00
Ivan Savenko
c7899fc14a - improved detection of missing files
Now vcmi will detect situations when file is present in another mod
which is not marked as dependency
2013-12-13 08:53:44 +00:00