1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00
Commit Graph

269 Commits

Author SHA1 Message Date
b3c26615df Fixed map format regression: there is no default difficulty. 2019-01-26 17:05:35 +03:00
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
0ff2e1180d Throw std::runtime_exception instead of a pointer to new one
cf. https://isocpp.org/wiki/faq/exceptions#what-to-throw
2018-10-31 07:27:54 +01:00
ac66fc7f42 Full rework of pre-game interface and networking
New features for players:
* Loading for multiplayer. Any save could be used for multiplayer.
* Restart for multiplayer. All clients will restart together.
* Loading from single save.
* Hotseat mixed with network game. Multiple players per client.
* Now connection to server could be cancelled.
* Return to menu on disconnections instead of crashes.
* Restoring of last selected map, save or campaign on next run.

TLDR on important changes in engine code:
* UI: work with server separated from UI
* UI: all explitic blitting replaced with IntObject's
* UI: all new code use smart pointers instead of DISPOSE
* Gameplay always start through lobby controlled by server.
* Threads receiving netpacks now shared for lobby and gameplay.
* Campaigns: heroes for crossover now serialized as JsonNode.
2018-04-04 14:24:26 +07:00
6ddcb079a4 Enabled new secondary skills to be created (#438)
* Universities, Scholars and Witch Huts may offer new skills
* Moved encode/decodeSkill to CSkillHandler
* Refactored CSkill interface and CSkill::LevelInfo image storage
* Legacy game constants renamed to ORIGINAL_XXX_QUANTITY
2018-03-31 12:56:40 +07:00
f917ec5254 Revert "Fixed ancient backward compatibility regression"
This reverts commit 3c67e12620.
2018-02-28 15:00:38 +08:00
3c67e12620 Fixed ancient backward compatibility regression 2018-02-24 19:48:49 +03:00
3795985de9 Eliminate warnings / errors. Pull request #388 2018-02-11 15:17:14 +03:00
0b70baa95e Spells configuration version 2 (effect-based)
* Indirect spell effects loading
* Json serializer improvements
* spell->canBeCastAt do not allow useless cast for any spell
* Added proxy caster class for spell-created obstacles
* Handle damage from spell-created obstacles inside mechanics
* Experimental GameState integration/regression tests
* Ignore mod settings and load only "vcmi" mod when running tests
* fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests)
* Huge improvements of BattleAI regarding spell casts
* AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells.
* Possible fix for https://bugs.vcmi.eu/view.php?id=1811
* CStack factored out to several classes
* [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional
* [Battle] Allowed BattleAction have multiple destinations
* [Spells] Converted limit|immunity to target condition
* [Spells] Use partial configuration reload for backward compatibility handling
* [Tests] Started tests for CUnitState
* Partial fixes of fire shield effect
* [Battle] Do HP calculations in 64 bits
* [BattleAI] Use threading for spell cast evaluation
* [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state)
* Implemented https://bugs.vcmi.eu/view.php?id=2811
* plug rare freeze when hypnotized unit shots vertically
* Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense
* [BattleAI] Try to not waste a cast if battle is actually won already
* Extended JsonSerializeFormat API
* fixed https://bugs.vcmi.eu/view.php?id=2847
* Any unit effect can be now chained (not only damage like Chain Lightning)
** only damage effect for now actually uses "chainFactor"
* Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
2018-02-08 11:37:21 +03:00
26a222ac62 Change JsonType to enum class (#393)
Change enum JsonType to enum class JsonType
2017-11-27 00:18:18 +03:00
d7366f04a9 [Map format, PreGame] allow selection of any allowed faction 2017-11-16 02:06:07 +03:00
b8d0dfac5f [Map format] fixed player options "canPlay" field 2017-11-16 00:03:27 +03:00
8c0fab1dcf fixes 2017-08-12 14:36:37 +03:00
15138c23de Finished conversion to new logging API
* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
2017-08-11 23:06:27 +03:00
046e1a7c29 Prepared JsonNode for new logging API. 2017-08-11 16:27:42 +03:00
85e952f25f Logging cleanup 3 2017-08-10 20:17:10 +03:00
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
12b42f4495 Improved map format tests 2017-08-03 13:50:54 +03:00
9d9c026c85 Code style: serialize everything on own lines for easier debugging (#357) 2017-07-31 16:35:42 +03:00
a4c0ad94b1 Code style: remove default value hints in definitions (#342)
Some are outdated and this is something IDE are useful for.
2017-07-15 14:08:20 +03:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
dbcd79c48a Code cleanup: remove double and unneded semicolons 2017-07-12 22:01:10 +03:00
a31c28ec33 Unified war machine mechanics.
* it is possible to define new war machines
* added warMachine field to artifact configuration
2017-06-06 19:18:26 +03:00
c82afe7156 switch CMapService API to ResourceID 2017-06-04 22:42:48 +03:00
7e1b0d71c5 Added option for saving generated maps on client side (#307)
* new configuration option 'general.saveRandomMaps'
* maps being saved to 'userCachePath/RandomMaps'
* no deletion of old random maps
* map filename generated based on template name and random seed
2017-06-04 20:33:28 +03:00
c66c66c5ae Fixed https://bugs.vcmi.eu/view.php?id=2686 2017-05-29 12:42:23 +03:00
70a092f58c [Refactoring] use virtual method for object specific actions when new map object is created
* --TODO
* fixes CID 1366291, CID 1366297
2017-05-28 16:23:42 +03:00
fc55efb72d Fixed CID 1375681 2017-05-28 15:16:40 +03:00
7a1dd7bd7d Fixed CID 1375707 2017-05-28 14:40:34 +03:00
a85b4cf2a5 * WIP on event condition format
* Hero portrait serialization
* Fix town spells serialization

* Added support for float exponential part in Json
* Added support for int64 in Json
* Added basic Hero definitions serialization
* Added rumors serialization
* Advanced player info serialization.
* Added Disposed heroes serialization, (!) not covered with tests yet
* Added Local event serialization
* Added Pandoras box serialization
* Added Seer hut reward serialization
* Added CQuest serialization
* Added API for map object instance names serialization.
* Added random dwelling options serialization
* Advanced town options serialization
* Advanced hero options serialization
* More map format tests
* A lot of fixes, cleanup and refactoring
2017-05-27 00:23:19 +03:00
cc452bdfa9 Improved road routing so they can go under any passable object. 2016-12-21 10:10:37 +01:00
609c6f81bd Fixed a few CWE-457 2016-11-27 22:37:41 +03:00
384c5827ae Fixed CID 1197490, CID 1197491 2016-11-25 17:21:27 +03:00
ca13bb8412 Fixed CID 1366375, CID 1197633 2016-11-25 17:04:30 +03:00
4ba3c6fecc Fixed CID 1288855 2016-11-25 16:40:11 +03:00
1e60ba6516 Only delete CQuest in CMap destructor and not with IQuestObject
Quest information must remain accessible even if map object removed. Fix issue 2472
2016-09-13 01:30:47 +03:00
02f70464fb Fix mismatched-tags Clang warnings
They're not important at all, but sicne there only few of them left just fix them.
2016-09-08 19:42:59 +03:00
42e7128acc Fixed possible use-after-free crash with artifacts registration in RMG. 2016-09-08 14:48:48 +03:00
6dc47a2de0 Fixed use-after-free crash with quests registration in RMG.
* code taken from PR #200
2016-09-08 14:48:46 +03:00
437eadf1ed do not leak scenarioOpts in CMapInfo 2016-08-31 06:18:01 +03:00
452e28d183 Remove some useless includes found by cppclean
This of course was tested and shouldn't break anything
2016-08-26 04:42:16 +03:00
ec22da4412 CMap: fix objects memory leak on exit 2016-08-19 16:56:26 +03:00
2a9ddadedd Fixes. Everything works now. 2016-08-12 21:40:22 +02:00
9b58450cb0 Part 3 - first working draft, cut generation time by half. 2016-08-12 19:16:21 +02:00
19ea46a6d2 Part 2. 2016-08-11 09:20:50 +02:00
2410f0af61 - WeightedRule optimization - part 1
- comments, style
2016-08-11 07:49:08 +02:00
2bffd4e5c1 Moar optimization! 2016-08-09 13:40:46 +02:00
10dbbead2d Fix indentation of logging code and around it
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
8e3e574900 Fix map object appearance serialization 2016-02-26 02:03:14 +03:00
4a37ed99ea Fix duplicated block-visit regression 2016-02-26 00:42:49 +03:00