1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-18 17:40:48 +02:00
Commit Graph

3898 Commits

Author SHA1 Message Date
Arseniy Shestakov
e9bfbb70c1 Ambient sounds: implement chebyshev distance for getTilesInRange 2018-01-02 09:48:17 +01:00
DjWarmonger
c2a0b13332
Merge pull request #371 from dydzio0614/NewAbilities
Tested and approved. Congrats!
2017-12-29 14:19:05 +01:00
Michał Kalinowski
26a222ac62 Change JsonType to enum class (#393)
Change enum JsonType to enum class JsonType
2017-11-27 00:18:18 +03:00
Dydzio
6df536bb31 Siege tower handling improvements (#392)
* Fix bug #2581 - siege tower damage
* Improved siege tower damage calculation a bit
2017-11-18 12:41:07 +03:00
AlexVinS
d7366f04a9 [Map format, PreGame] allow selection of any allowed faction 2017-11-16 02:06:07 +03:00
AlexVinS
b8d0dfac5f [Map format] fixed player options "canPlay" field 2017-11-16 00:03:27 +03:00
godric3
5a01aba9c8 fix for banks(crypt, ships) not giving morale penalty (#384)
* fix for banks(crypt, ships) not giving morale penalty
also texts should be closer to original now
2017-11-15 23:16:44 +03:00
AlexVinS
d93ef36750 Fixed https://bugs.vcmi.eu/view.php?id=2818 2017-11-15 15:54:54 +03:00
Dydzio
c6731f3b90 Fix code formatting 2017-11-13 14:18:38 +01:00
Dydzio
da6d01b0c7 Ability rename + bugfix + changelog extend 2017-11-13 01:59:41 +01:00
DJWarmonger
8f42cdea67 Refactoring: use private pointer to CMapGenerator 2017-11-03 21:03:51 +01:00
Alexander Shishkin
fd4ecbd40b
Merge pull request #385 from Chocimier/altar
Fixed "Altar of Sacrifice only sacrifices creatures one kind at a time"
* https://bugs.vcmi.eu/view.php?id=2607
2017-10-28 14:04:34 +03:00
AlexVinS
c39cd5f951 Town building build mode fixes
* CGameHandler::buildStructure was using wrong requirements for buildings in auto mode.
* Build mode loading was wrong in case of omitted value
* Show town hall slot for not built building only if it have normal build mode
2017-10-28 03:27:39 +03:00
Piotr Wójcik
f145b4be91 Correctly sacrifice many stacks or many atrifacts, fixes #2607 2017-10-14 21:30:56 +02:00
ArseniyShestakov
4149662845 Merge pull request #376 from vcmi/newAnimations
New animations
2017-10-11 16:18:06 +03:00
Hao Hu
9cc2464cf6 Fixing bugs for external dwelling bonus of Golem Factory (#382)
* Fixing bugs for external dwelling bonus of Golem Factory.

[Problem]
  The occupied Golem Factory on adventure map doesn't give
  the player corresponding weekly growth bonus.

[Solution]
  1. Add the dwelling (of multiple generators) to a player's dewelling set.
  2. Created helper function to calculate external dwelling bonus
  points.

[Test]
  Manual testing on the map, works fine.

https://bugs.vcmi.eu/view.php?id=2789
2017-10-07 17:42:33 +03:00
godric3
e3f0126e41 Removed unnecessary code, fix #2737
bonus value is added to desciption inside Bonus
2017-10-05 16:50:39 +02:00
godric3
2a22d9ec12 Add terrain overlays morale and luck bonuses description, fix #2740 2017-10-05 14:53:39 +02:00
godric3
7d8adcc083 Add missing artifact name in wagon text, fix #2763 2017-10-05 14:52:51 +02:00
Arseniy Shestakov
ae13123129 CPlayerInterface: don't stop hero movement on embark / disembark
When hero have free boarding bonus there no reason to stop movement.
2017-09-16 10:42:27 +03:00
Dydzio
1162923d93 update VS files 2017-09-13 02:04:37 +03:00
AlexVinS
270e1b75ce Support for creature 2-hex attack, alternate death and cast animation types
* margin option .json animation
* Use ranged attack animation for spell cast if there is no cast animation, display cast animation only on active casting.
2017-09-12 19:51:54 +03:00
Henning Koehler
feba7e1979 tactics distance increased to 1 + bonus (#375) 2017-09-10 00:26:56 +03:00
Dydzio
eab8e8f869 Fixed "commit merge" fail 2017-09-09 21:27:22 +02:00
Dydzio
14c07afd3c Merge branch 'develop' into NewAbilities 2017-09-09 21:04:40 +02:00
Dydzio
3eef689005 Add TERMINATOR ability support, small fixes 2017-09-09 21:01:12 +02:00
ArseniyShestakov
d01ecbba90 Merge pull request #372 from vcmi/guiCleanup2
Gui cleanup2
2017-09-07 02:46:54 +03:00
Henning Koehler
a7104377d6 fixed CREATURE_TYPE_LIMITER for creatures without a stack instance (#374) 2017-09-06 15:27:26 +03:00
AlexVinS
3bbff27127 Wiped CDefEssential 2017-09-06 15:13:28 +03:00
Dydzio
7cbd9acd67 Add BLOCK_MAGIC_BELOW bonus 2017-09-06 00:03:32 +02:00
Dydzio
59764d8349 Implemented SHOOTS_ALL_ADJACENT 2017-09-05 23:45:31 +02:00
Dydzio
5c17e172b6 Revert some changes, update WIDE_BREATH 2017-09-05 22:29:31 +02:00
AlexVinS
3a9d73da23 [c::b] Update project, fixed build 2017-09-05 14:31:34 +03:00
ArseniyShestakov
ca066841f1 Merge pull request #370 from vcmi/issue/2780
Issue/2780
2017-09-05 01:21:58 +03:00
Dydzio
4cab76900f Add SYNERGY_TARGET and [wip]-SHOOTS_ALL_ADJACENT 2017-09-04 23:32:24 +02:00
AlexVinS
2f7968b803 Fixed wrong animation paths 2017-09-04 18:41:22 +03:00
Henning Koehler
37df5c9d88 reworked mod loading to follow standard approach 2017-09-03 23:49:36 +12:00
Henning Koehler
cd35ece10c fixed DLL_LINKAGE for << operators 2017-08-31 10:29:25 +12:00
Henning Koehler
03b7da93e2 use logMod for all mod-related logging 2017-08-31 09:23:19 +12:00
Henning Koehler
abdca71828 skill names and descriptions are fully managed by CSkillHandler 2017-08-30 22:35:23 +12:00
Henning Koehler
dba5186a6f fixed skill schema definition 2017-08-30 20:01:09 +12:00
Henning Koehler
3764ec8be1 more code format issues 2017-08-30 19:47:06 +12:00
Henning Koehler
654ca96e9d fixed code format and other minor issues 2017-08-30 19:19:54 +12:00
Henning Koehler
36d671b093 changed indentation from spaces to tabs 2017-08-30 16:23:03 +12:00
Henning Koehler
aadb5d93f7 added comment (and commented-out code) about skill legacy data 2017-08-30 16:03:24 +12:00
Henning Koehler
899e8403f7 skills.json uses base and struct for effects 2017-08-30 10:25:36 +12:00
Henning Koehler
3fe9bc34b8 CGHeroInstance::recreateSecondarySkillsBonuses() restores bonuses for all levels 2017-08-28 23:59:01 +12:00
Henning Koehler
9b3c61616f made diplomacy join chance bonus-based 2017-08-28 23:33:19 +12:00
Henning Koehler
69a538a600 added bonus type MANUAL_CONTROL 2017-08-28 20:09:27 +12:00
Henning Koehler
5091b117e2 fixed serialization for older savegames 2017-08-28 13:56:00 +12:00
Henning Koehler
aa15feba62 moved SECONDARY_SKILL_VAL2 to end of list 2017-08-28 00:17:59 +12:00
Henning Koehler
7e5c1ec7f8 made artillery bonus-based; supports multiple bonus shots 2017-08-27 21:05:17 +12:00
Henning Koehler
8bdb8f01ca made scholar skill bonus-based 2017-08-27 20:10:25 +12:00
Henning Koehler
0153d0fc78 made fire/air/water/earth magic skills bonus-based 2017-08-27 19:37:54 +12:00
Henning Koehler
25e6b5cc07 added bonus type SECONDARY_SKILL_VAL2; refactored CSkillHandler::defaultBonus; made eagleEye level bonus-based 2017-08-27 17:40:52 +12:00
Henning Koehler
9bbfb57b93 cleaned up secondary skill bonus merging 2017-08-27 15:35:04 +12:00
Henning Koehler
06d2507371 log file loading 2017-08-27 12:59:09 +12:00
Henning Koehler
fc77c40a82 made ballistics bonus-based 2017-08-26 21:16:05 +12:00
Henning Koehler
19e619f61e wisdom is now bonus-based 2017-08-26 20:49:29 +12:00
Henning Koehler
1fa6cbe514 scouting uses SIGHT_RADIUS bonus 2017-08-26 18:01:39 +12:00
Henning Koehler
e8c32e05d8 turned pathfinding effect into a bonus 2017-08-26 14:59:24 +12:00
Henning Koehler
c9ef773da0 fixed logging after rebase 2017-08-26 14:06:47 +12:00
Henning Koehler
91fac7755a made tactics skill configurable 2017-08-26 10:08:06 +12:00
Henning Koehler
3cc84e5975 moved contains functions for multimap to Globals.h 2017-08-26 10:08:06 +12:00
Henning Koehler
c0740e3623 fixed crash when loading neutral faction; skills.json no longer requires index values 2017-08-26 10:08:06 +12:00
Henning Koehler
0357a4fe3b enabled config of skill descriptions 2017-08-26 10:08:06 +12:00
Henning Koehler
8c7895239e always load objects with index at specified position 2017-08-26 10:08:06 +12:00
Henning Koehler
64e2db6a0f added sufficient debug to diagnose - problem is with lack of original data 2017-08-26 10:08:06 +12:00
Henning Koehler
d8648288f0 added debug info to skill loading 2017-08-26 10:08:06 +12:00
Henning Koehler
993b7bf614 skills are initialized properly (and file loading isn't actually working yet) 2017-08-26 10:08:06 +12:00
Henning Koehler
05cf95400c loading secondary skill bonuses from config/skills.json works (kind of) 2017-08-26 09:33:08 +12:00
Henning Koehler
9811fbe02c updateSkill attempts to update existing bonus instead of adding new 2017-08-26 09:33:08 +12:00
Henning Koehler
a6c3352d7c moved secondary skill default bonus initialization into CSkillHandler 2017-08-26 09:33:08 +12:00
Henning Koehler
159e27a0ab changed CBonusSystemNode* to BonusList in CSkill 2017-08-26 09:33:08 +12:00
Henning Koehler
fbab52eb18 added basic handler for loading secondary skill bonuses 2017-08-26 09:33:08 +12:00
Arseniy Shestakov
8180e4d5c5 VCMIDirs: improvements for development on Mac and Linux
Also added /usr/share/games in VCMIDirsXDG::dataPaths for mantis#2189.
2017-08-25 08:43:27 +03:00
Dydzio
1df939bf70 Working FIRST_STRIKE ability 2017-08-19 20:39:24 +02:00
Dydzio
5ba8d64b63 Working WIDE_BREATH ability 2017-08-19 19:16:44 +02:00
Dydzio
8cae811d11 Merge branch 'kuririn' into NewAbilities 2017-08-19 18:40:06 +02:00
Dydzio
ea17b0f458 Major overhaul of VS related files 2017-08-19 15:58:55 +02:00
Dydzio
e3ba491fa1 Use multi-core compile by default, fix VCMI_client path 2017-08-19 13:27:24 +02:00
FeniksFire
f331386b6f Dimension door movement points fix
When hero with one move point make dimension doors then he can have on
graphics full move points. Caused by substraction that make unsigned
variable < 0.
2017-08-18 21:35:48 +02:00
Arseniy Shestakov
2b3a467728 CMake: structure changes and other small improvements
- Now cmake_minimum_required used properly and set to 2.8.12
- cmake_modules/CMakeCPackOptions.cmake.in is removed
2017-08-16 16:10:08 +03:00
Arseniy Shestakov
fee999300e VCMIDirs: add hack to run from single directory on Mac and Linux
Also change working directory to where binary is on all platforms except Android
2017-08-16 16:10:08 +03:00
Arseniy Shestakov
40af43c46e CMake: massive rework for Mac build and other improvements
- macOS: RPATH-related code all removed or disabled
- macOS: new osx/CMakeLists.txt to run some install-code running after all subdirectories
- Assets copying into the runtime output directory implemented for Mac and Linux development
2017-08-16 16:10:07 +03:00
Arseniy Shestakov
56f89270db macOS: full rework of Mac packaging process
- Most of outdated CMakeLists code removed.
- All Mac-specific code is removed include Sparkle support and vcmibuilder app.
- DMG buidling reimplemented using macdeployqt command.
2017-08-16 16:10:07 +03:00
Arseniy Shestakov
193f492b99 CMake: cleanup, project generation and other improvements
- Use EXCLUDE_FROM_ALL for FuzzyLite and GoogleTest to avoid inclusion of unneded headers and libraries into installers.
- Set minimum CMake version only in main CMakeLists.txt
- Set project name only in main CMakeLists.txt
- Visual Studio: add assign_source_group function to generate proper filesystem tree
- Visual Studio: set PROJECT_LABEL so generated projects have same names binaries on Windows
- Visual Studio: enabled USE_FOLDERS for projects grouping. This also possibly affect other IDEs.
- Added add_subdirectory_with_folder function to make sure 3rd-party libraries are affected by USE_FOLDERS.
2017-08-16 16:10:07 +03:00
AlexVinS
0868164147 (int) -> static_cast<int> 2017-08-12 15:43:41 +03:00
AlexVinS
8c0fab1dcf fixes 2017-08-12 14:36:37 +03:00
AlexVinS
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
AlexVinS
a8a3230798 Logging cleanup (server). 2017-08-11 16:50:00 +03:00
AlexVinS
046e1a7c29 Prepared JsonNode for new logging API. 2017-08-11 16:27:42 +03:00
AlexVinS
64d9dadd64 Logging cleanup. 2017-08-11 15:47:50 +03:00
AlexVinS
143ff682bc Logging cleanup 2017-08-10 21:59:55 +03:00
AlexVinS
96eb9c0ac7 tweak 2017-08-10 20:57:36 +03:00
AlexVinS
85e952f25f Logging cleanup 3 2017-08-10 20:17:10 +03:00
AlexVinS
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
AlexVinS
18b8e1c7ad Tweaked CBonusTypeHandler 2017-08-09 12:18:49 +03:00
ArseniyShestakov
cb40c093f8 Avoid boost::optional assignment for Boost 1.64 compatibility (#360)
Two options here: to use emplace from 1.56 or boost::make_optional.
Unfortunately Ubuntu 14.04 is using 1.54 and I'd rather not to break it.
2017-08-05 16:09:29 +03:00
AlexVinS
12b42f4495 Improved map format tests 2017-08-03 13:50:54 +03:00
AlexVinS
3de0fa37f8 Possible fix for https://bugs.vcmi.eu/view.php?id=2759 2017-08-01 17:00:26 +03:00
ArseniyShestakov
9d9c026c85 Code style: serialize everything on own lines for easier debugging (#357) 2017-07-31 16:35:42 +03:00
Piotr
f931b19a16 Show correct quantity of guards of dwelling, fixes #2502 (#356) 2017-07-26 00:00:29 +03:00
Fay
80f149e296 Better android input handling: sending notifications about CInputText changes to java so that we can display textinput overlay there; (#354) 2017-07-23 20:23:48 +03:00
Piotr
069f295165 Do not summon boat from another boat, fixes #2294 (#353) 2017-07-22 23:47:29 +03:00
Fay
747ef0d222 Fix for failing vcmi-android build; (#352) 2017-07-22 22:27:25 +03:00
FeniksFire
b56d05b75b Fix handling damage in bridge in fortress (#349)
Remove "Moat" obstacle on bridge hex from affected obstacles by creature,
when bridge is opened/destroyed.

Resolves: https://bugs.vcmi.eu/view.php?id=2577
2017-07-20 18:15:47 +03:00
Arseniy Shestakov
cdd9dbc7f1 Code style: avoid some ambiguous else if indentation
If some code intentionally want to break else if to achieve specific indentation there must be braces.
2017-07-19 03:42:26 +03:00
Arseniy Shestakov
6d9f99d4de Code style: and one more pass on lambda expressions parameter list 2017-07-19 02:11:17 +03:00
Arseniy Shestakov
b540ab73ed Code style: add empty parameters list to more lambda expressions 2017-07-19 01:39:38 +03:00
Dydzio
8314e8234f Fix water wheel gold amount (#348) 2017-07-18 15:00:30 +03:00
Arseniy Shestakov
2da3d8a563 Code style: remove senseless comments 2017-07-18 00:04:00 +03:00
AlexVinS
ef73f416dc fixed resurrection corner case 2017-07-17 02:50:38 +03:00
ArseniyShestakov
b52cfe5283 Code style: use parentheses for creating heap-based objects (#344) 2017-07-16 12:58:05 +03:00
AlexVinS
21c0c95049 tweak 2017-07-16 01:53:13 +03:00
AlexVinS
f1a4831813 [Spells] Get rid of SpellTargetingContext. 2017-07-16 01:43:50 +03:00
AlexVinS
7374689301 Fixed https://bugs.vcmi.eu/view.php?id=2715 2017-07-16 00:02:55 +03:00
ArseniyShestakov
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
Dydzio
0cb6515ae8 VCAI tweaks (#311)
* Add extra priority support for town capture evaluation
* Improve building algorithm
* GatherArmy: check free gold instead of total for when hiring heroes
2017-07-15 01:15:08 +03:00
Dydzio
98140aab6b Add option to toggle monthly artifact change in black market (#341)
* Add black market art change as hardcodedFeature
2017-07-15 00:46:18 +03:00
ArseniyShestakov
ea0ceb1805 Merge pull request #323 from vcmi/CStackTweaks
CStack tweaks
2017-07-15 00:42:08 +03:00
ArseniyShestakov
006fa6c6df Merge pull request #332 from FeniksFire/SmallBugFix
Fix handling damage from obstacles
2017-07-15 00:09:37 +03:00
AlexVinS
df13851176 fixed wrong battle result 2017-07-14 23:43:03 +03:00
AlexVinS
9586fd9b0a quick fix 2017-07-14 19:14:34 +03:00
Arseniy Shestakov
98406d127d CGMonolith: fix crash on initialization here too 2017-07-14 16:50:29 +03:00
ArseniyShestakov
77ca27b90b Merge pull request #340 from dydzio0614/navalbattlefieldfix2
Add proper handling for ship-to-ship battlefield
2017-07-14 16:30:40 +03:00
Dydzio
50b0773aab Formatting change 2017-07-14 15:24:50 +02:00
Arseniy Shestakov
4bf1c9a9a3 Campaigns: fix crash on CMap::instanceNames serialization 2017-07-14 15:37:40 +03:00
Arseniy Shestakov
ee7862b12f CGSubterraneanGate: fix crash on initialization
There is some reason it's appear in campaign maps.
2017-07-14 15:03:55 +03:00
Arseniy Shestakov
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
Dydzio
85eb159e58 Minor code simplify 2017-07-13 21:44:22 +02:00
Dydzio
18f2e0ed96 Invalidate unavailable tiles as obstacle candidates 2017-07-13 18:51:56 +02:00
Dydzio
ee3f6c9b88 Block appropiate hexes on ship-to-ship battlefield 2017-07-13 16:47:28 +02:00
Dydzio
7bf1b91235 Visual Studio files tweaks 2017-07-13 13:18:40 +02:00
Arseniy Shestakov
dbcd79c48a Code cleanup: remove double and unneded semicolons 2017-07-12 22:01:10 +03:00
AlexVinS
78885b8acc fixed possible race condition 2017-07-12 18:51:36 +03:00
AlexVinS
a85bf3638f fixed illegal memory access 2017-07-12 18:32:22 +03:00
AlexVinS
1fe01b7254 Moved defensive stance log message building to server side. 2017-07-10 04:05:36 +03:00
AlexVinS
2d0613b40b Added some CHealth tests. 2017-07-09 22:15:06 +03:00
AlexVinS
ea3502ed60 Removed CStack::totalHealth() 2017-07-09 20:23:51 +03:00
AlexVinS
44fc0cb57b Broken CHealth dependency on CStack 2017-07-09 19:49:52 +03:00
AlexVinS
f0713c1d36 Better handling of HYPNOTISED stacks in case of spellcasting 2017-07-09 16:55:10 +03:00
FeniksFire
43d324b561 Fix handling damage when stack wait in moat.
Currently stack don't take any damage from moat when he stay in same
place.
2017-07-09 15:07:20 +02:00
AlexVinS
00bd1bd100 formatting 2017-07-09 15:49:37 +03:00
AlexVinS
7bf8c9bd69 fixed and cleanup 2017-07-08 21:20:38 +03:00
AlexVinS
4f14f22d3a Unified CStack ammo, casts and counterattacks
* it is possible now to add casts and shoots OTF (f.e. with spell bonus)

Centralized stack 'ammo' loading from bonus system.
* introduced small proxy class for local bonus cache
(no need to use global cache if particular selector used on node only in one place)
* handle killing resurrected creatures
* use IBonusBearer::MaxHealth() where possible
* Fixed https://bugs.vcmi.eu/view.php?id=2486
* Possible fix for 0 HP after resurrection.
* Hack-fixed https://bugs.vcmi.eu/view.php?id=2584
* Unified CStack health API
* Use CHealth for CStack count and health points
* increased SERIALIZATION_VERSION
2017-07-08 20:29:59 +03:00
Victor Luchits
06c1df9901 Change minizip library output path to match vcmi 2017-07-07 13:08:53 +03:00
Victor Luchits
30cc2f6a01 Change the output path for cmake so all files go into the same root directory 2017-07-07 13:08:53 +03:00
Arseniy Shestakov
fab6f409f6 Fix 2017-07-04 22:07:24 +03:00
Arseniy Shestakov
6084950f31 CMake: restore Android build 2017-07-04 22:06:00 +03:00
AlexVinS
5f1fadf71c Fixed https://bugs.vcmi.eu/view.php?id=2706 2017-07-04 11:21:22 +03:00
ArseniyShestakov
b670bcb46f Merge pull request #313 from vcmi/spellCastQuery
Spell cast query
2017-07-04 02:43:22 +03:00
AlexVinS
dbaf3cb023 Cleanup & formatting 2017-07-04 01:32:40 +03:00
FeniksFire
8577445b10 Simple fix: http://bugs.vcmi.eu/view.php?id=2366 2017-07-03 22:41:16 +03:00
AlexVinS
a65befaa08 Moved town portal logic to mechanics class 2017-07-03 21:43:04 +03:00
AlexVinS
3d1a84875e Queries refactoring
* Moved SUMMON_BOAT special case to mechanics
* Partially moved Town portal logic to mechanics class
* Added generic query reply to CCallback
* Redesigned Queries so that base API do not depends on CGameHandler
* Got rid of CGameHandler::castSpellRequest
* Removed CGameHandler::castSpell
* Added new Query type for town portal dialog (not used yet)
2017-07-03 21:43:04 +03:00
AlexVinS
f463dc2fa3 fixed war machine spawning 2017-07-03 21:42:17 +03:00
ArseniyShestakov
5dfb7a5771 Merge pull request #317 from vcmi/attackerOwned
Refactored CStack::attackerOwned to CStack::side
2017-07-03 16:19:54 +03:00
Alexander Shishkin
d8545d9c3b Merge pull request #321 from viciious/nodecompare_fix
Fix NodeComparer::operator() to provide strict weak ordering
2017-07-03 13:11:46 +03:00
Victor Luchits
e9e311f142 Fix NodeComparer::operator() to follow strict weak ordering rules
This fixes annoying assertion failures in MSVC builds
2017-07-02 22:59:41 +03:00
Dydzio
ef2ff0c752 Precompiled header path also needs fix 2017-07-01 20:05:10 +02:00
Dydzio
f61398b0ee improve VS build filters file 2017-07-01 19:29:27 +02:00
AlexVinS
4f8c7bd4bb CStack refactoring
* removed all occurrences of attackerOwned
* Use BattleSide enum
* more tweaks
2017-07-01 19:17:08 +03:00
ArseniyShestakov
2f305cc68d Remove code related to duel mode (#312)
Remove code related to duel mode
2017-07-01 16:30:13 +03:00
Piotr Wójcik
7bc9853175 Squashed commit of PR #314:
commit 437c6c6fd4931abe69d3b7fe501b231a74182159
Author: Piotr Wójcik <chocimier@tlen.pl>
Date:   Sat Jun 24 18:36:16 2017 +0200

    Rename CPlayersVisited to CTeamVisited

commit baf1423cd9b090eaaa0a6962f2bd0f440e2e0747
Author: Piotr Wójcik <chocimier@tlen.pl>
Date:   Wed Jun 21 16:41:37 2017 +0200

    Share visited status of CPlayersVisited objects across team
2017-06-30 23:51:43 +03:00
Arseniy Shestakov
29e50cc21c Fix include for SiegeInfo / SideInBattle. Lost them on rebase 2017-06-29 02:27:41 +03:00
Arseniy Shestakov
fb19a3a068 CMake: update all CMakeLists to include actual sources and headers
This make it easier to use project with newer CMake and Qt Creator.
I decided against using GLOB since we don't rename files that much.
2017-06-29 02:03:37 +03:00
Arseniy Shestakov
2ce02202c1 Fix more includes and move SideInBattle / SiegeInfo into battle 2017-06-29 02:02:05 +03:00
AlexVinS
ab4c848169 fixed relative include paths 2017-06-29 00:09:35 +03:00
FeniksFire
8ccdda6d2d Improve formatting, update other config information about includes. 2017-06-27 17:00:44 +02:00
FeniksFire
4113bdab01 Moving some files from lib to the battle subdirectory. 2017-06-26 15:26:08 +02:00
FeniksFire
221386a39d Refactoring.
Dividing CBattleCallback into smaller files with classes.
2017-06-24 15:51:07 +02:00
DJWarmonger
5a31cc831d Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
Trying to sort out git tree.
2017-06-16 21:49:49 +02:00
AlexVinS
02ae95aca3 Fixed random map format test crash 2017-06-14 12:40:46 +03:00
AlexVinS
86f9df5f68 Made gamestate lock static 2017-06-14 07:59:41 +03:00
AlexVinS
648b122b10 Fix old savegame corruption in PR 301 2017-06-14 01:43:26 +03:00
AlexVinS
0f5202689e Cumulative spell effects
* Added experimental support for cumulative effects for ENCHANTED bonus
* Updated and fixed SPECIAL_PECULIAR_ENCHANT processing
* Initial implementation of cumulative spell effects.
* Scheme for new spell feature - cumulative bonus.
2017-06-13 21:50:50 +03:00
DJWarmonger
9623f7caf3 - Restored MSVS project files
- Fixed VCAI bu pointed out by Tow
2017-06-11 08:01:41 +02:00
AlexVinS
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
Arseniy Shestakov
1a60c1a94b Shared memory refactoring and command line control options
Now client accept following options:
 --disable-shm - disable shared memory usage
 --enable-shm-uuid - use UUID for shared memory identifier
UUID is useful when a lot of clients starting simultaneously.
Needed for testing and was easier to implement than alternatives.
2017-06-06 07:30:16 +03:00
Arseniy Shestakov
18161d3688 Client: implement spectator mode via command-line options
If running with --spectate/-s CPlayerInterface will appear even without human players.
Following command-line options also available:
 --spectate-ignore-hero
 --spectate-hero-speed=N
 --spectate-battle-speed=N
 --spectate-skip-battle
 --spectate-skip-battle-result
Boolean options can also be changed in runtime via client console:
 set spectate-ignore-hero on / off
Spectator mode also:
 - Work with --onlyAI option when starting game or loading saves.
 - Allow to use any cheat codes.
 - Give recon on towns and heroes.
2017-06-06 07:30:16 +03:00
AlexVinS
9f1451c1a3 [Map format] more correct handling of default hero primary skills 2017-06-06 02:37:07 +03:00
AlexVinS
4b2a118ffa fixed assertion if hero instance in VCMI map have 0 at one of primary skills 2017-06-06 02:01:24 +03:00
AlexVinS
195e979a18 get rid of CBattleInfoCallback::battleCanCastThisSpell 2017-06-05 23:46:55 +03:00
AlexVinS
6c308956f9 get rid of CBattleInfoCallback::battleCanCastThisSpellHere 2017-06-05 23:25:48 +03:00
AlexVinS
2cfb2e6ae0 get rid of CPlayerBattleCallback::battleCanCastThisSpell 2017-06-05 22:53:42 +03:00
AlexVinS
4d430f6ad8 get rid of CPlayerBattleCallback::battleCanCastSpell 2017-06-05 22:16:12 +03:00
AlexVinS
1d1519db5c ENCHANTER_CASTING trigger tweak 2017-06-05 21:41:27 +03:00
AlexVinS
66cfc2fef9 CSpell::canBeCast tweaks 2017-06-05 21:30:25 +03:00
AlexVinS
c82afe7156 switch CMapService API to ResourceID 2017-06-04 22:42:48 +03:00
Alexander Shishkin
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
Arseniy Shestakov
d84f61fc96 CConnection: use std::static for port conversion
Apperantly boost::lexical on Windows will add commas into output.
2017-06-04 16:48:04 +03:00
Arseniy Shestakov
6642816b1e Client: server port and testing options cleanup
Now we only pass port as ui16 instead of std::string
2017-06-04 08:49:23 +03:00
ArseniyShestakov
5b0a0d5959 Merge pull request #305 from vcmi/networkImprovements
Network and multiplayer improvements
2017-06-02 15:27:08 +03:00
Arseniy Shestakov
bc6f65af04 PlayerCheated: new netpack to apply losing / winning cheat code 2017-06-02 03:34:50 +03:00
Arseniy Shestakov
4b0f702e7e Add LeaveGame netpack and avoid replying on it and CloseServer 2017-06-02 02:51:44 +03:00
Arseniy Shestakov
cc163c4e05 Refactoring of networking code on server and client
* Avoid server crash on dummy connect / disconnect.
* Avoid server crash when host left from PreGame.
* Server print it's state with name when it's waiting for connection or in pregame.
* Server will use random port if specified port is busy.
2017-06-02 02:44:39 +03:00
Piotr
9d5d291e6b Do not show whether Witch Hut is visited by hero, if was not visited by player yet, fixes #2604 (#304) 2017-06-01 23:36:46 +03:00
Arseniy Shestakov
db5a52a0f8 Multiplayer: gracefully handle player loss unless it's a host
We don't want server to shutdown after just one of players lost the game.
2017-05-31 08:04:26 +03:00
AlexVinS
c66c66c5ae Fixed https://bugs.vcmi.eu/view.php?id=2686 2017-05-29 12:42:23 +03:00
FeniksFire
039e3842fc Aesthetic changes in BattleHex (#303) 2017-05-29 10:33:34 +03:00
AlexVinS
8a494b7820 fix 2017-05-28 18:42:36 +03:00
AlexVinS
9718ef1543 Fix 2017-05-28 18:40:13 +03:00
AlexVinS
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
AlexVinS
fc55efb72d Fixed CID 1375681 2017-05-28 15:16:40 +03:00
AlexVinS
a7ed27c73f Fixed CID 1375705, CID 1375709, CID 1375708 2017-05-28 14:40:35 +03:00
AlexVinS
7a1dd7bd7d Fixed CID 1375707 2017-05-28 14:40:34 +03:00
FeniksFire
1f215d2306 Fix http://bugs.vcmi.eu/view.php?id=2677. 2017-05-28 12:23:03 +02:00
DJWarmonger
4d1fb67594 Sanity check for Coverity #1366290.
(Vector should never be empty, especially for chosen zone).
2017-05-27 21:37:05 +02:00
DJWarmonger
346d2ac588 Possible fix for #2681. 2017-05-27 14:57:45 +02:00
AlexVinS
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
Dydzio
5127061e28 Commander skill description support (#266)
* Added commander skill description support

* Add support for ZNPC00.txt not found
2017-05-26 22:58:33 +03:00
Fay
b5daa24982 Android support (#299)
* AI libs registering shenanigans on android;
* Fixed resolution aspect + mouse event scaling;
* Proper server init/deinit (through android IPC);
Enabled threaded init in CMT;
* Prevented a deadlock in logger on some devices;
* Fixed frozen intro frame after interrupting the video;
Added android progressbar displaying during initial data loading;
* Hacky fix for choppy animations during heroes movement (should look better now, but it's definitely not a good solution);
* Changes/fixes for new android launcher building process;
* Fixed app hang after getting SDL_QUIT when activity was destroyed;
* Functioanal, configurable advmap swiping support;
* VCMI changes cleanup;
Added few missing VCMI_ANDROID guards on swipe mechanics;
* Removed unneeded sleep in server startup code for android;
* Removed android ioapi hack (fixed in newest ndk);
* Removed unused android's library loading logic;
* Added android's swipe option to settings schema;
* Moved NO_STD_TOSTRING to be defined in global.h instead of build files;
2017-05-25 20:57:20 +03:00
Piotr Wójcik
e3992de50e Give hero move points at day of visiting stable, fixes #2598 2017-05-11 20:52:10 +02:00
AlexVinS
3c893a6bec Few spell-related tweaks 2017-03-18 14:08:02 +03:00
AlexVinS
9bf4b2a1b0 [C::B] projects updated 2017-03-18 13:21:23 +03:00
DjWarmonger
b06e20bba3 Compilation fixes for MSVS 2017-03-17 19:55:52 +01:00
FeniksFire
3de891b4b4 Moving/dividing classes from BattleState to separate files. 2017-03-17 16:48:44 +01:00
dydzio
7ef7711a47 Cleanup after last MSVS compilation fixes 2017-03-15 22:58:25 +01:00
FeniksFire
450075bec2 Fill a gap in lib/CMakeLists.txt 2017-03-10 17:39:11 +01:00
DjWarmonger
84bdc5c994 Compilation fixes for MSVS.
Apparently it doesn't like structs converted to class, needs more investigation.
2017-03-02 10:58:14 +01:00
Alexander Shishkin
0af7ee393b Merge pull request #270 from FeniksFire/develop
Making unit tests for BattleHex and some estetic improvements.
2017-02-21 23:56:26 +03:00
FeniksFire
873cee5adf Small fix. 2017-02-10 19:31:50 +01:00
FeniksFire
e3ffdca65f During the unit tests I saw that hex can take from occupiedHex() signed
values and then he get stupid value. So changing from ui16 to si16.
2017-02-09 20:08:34 +01:00
dydzio
21f4a0ba60 Implement ranged counterattack 2017-02-04 10:33:45 +01:00
Dydzio
6c8ef79727 Merge branch 'develop' into MakeWOGGreatAgain 2017-02-01 23:14:36 +01:00
DjWarmonger
6d37c8bceb Merge pull request #272 from dydzio0614/bug2600
Nice, thanks :)
2017-02-01 17:57:58 +01:00
dydzio
4c4539b00e Rename ADVANCED_CATAPULT bonus to reflect the purpose better 2017-02-01 15:05:46 +01:00
dydzio
a8f04aede7 Extend creature siege support. Fix bug #2600 2017-02-01 11:25:57 +01:00
FeniksFire
de7184d68d Making unit tests for BattleHex and some estetic improvements. 2017-01-29 16:38:13 +01:00
dydzio
2f1f725ae6 Code improvements, minor fixes 2017-01-29 11:50:37 +01:00
dydzio
f5b5fa149f Build #1 2017-01-28 12:28:30 +01:00
dydzio
3e285c2004 Add santa gremlin missing creature ability, fix shooter init bug 2017-01-26 20:53:28 +01:00
AlexVinS
c86304ac3b Fixed http://bugs.vcmi.eu/view.php?id=2634 2017-01-26 10:52:19 +03:00
AlexVinS
0b3c1c7185 Fixed http://bugs.vcmi.eu/view.php?id=2639 2017-01-26 10:44:30 +03:00
dydzio
daec6d933c Add "WoG werewolf"-like ability support 2017-01-22 20:28:08 +01:00
dydzio
c310138fc3 Add WoG ghost ability support 2017-01-20 15:48:45 +01:00
DjWarmonger
73c62f1b4c Restore cut ring around main town. 2016-12-21 22:23:55 +01:00
DjWarmonger
4b3a878c00 Fix for passability. 2016-12-21 13:37:19 +01:00
DjWarmonger
a0596ebecf Add clearance under town to ensure passability. 2016-12-21 10:43:24 +01:00
DjWarmonger
cc452bdfa9 Improved road routing so they can go under any passable object. 2016-12-21 10:10:37 +01:00
DjWarmonger
f78b524731 - Remove obstacle in front of player-owned towns
- Allow obstacles to touch town object
2016-12-20 15:23:47 +01:00
DjWarmonger
e37c35e439 Zone guard will cause object be placed as far away from it as possible in both zones. 2016-12-20 11:58:39 +01:00
DjWarmonger
ee3aec55f2 Correct implementations of A* algorithm. Seemingly fixes #2496, it's also faster. 2016-12-15 16:29:23 +01:00
DjWarmonger
63d33a1e7c Extract priority queue construction for reuse. 2016-12-15 12:58:16 +01:00
DjWarmonger
4102546977 Corrected road generation - they will be straight whenever possible. 2016-12-15 12:36:47 +01:00
DjWarmonger
27ff9efd4b Fixed #1713 2016-12-12 21:38:12 +01:00
DjWarmonger
80d5f7b4a4 Updated project files to MVS 2015 (in fact, it's trivial). 2016-12-12 19:14:45 +01:00
dydzio
c45a256816 Further fix for mantis #2599 2016-12-10 13:34:58 +01:00
AlexVinS
7126bd61a4 Fixed CID 1197343 2016-12-05 03:12:11 +03:00
AlexVinS
478890df5f Fixed CID 1366431, CID 1366430 2016-12-05 02:55:05 +03:00
Dydzio
a77863145a Regression fix - enemy hero info crash 2016-12-03 09:52:19 +01:00
AlexVinS
36598d8695 Fixed CID 1197474, CID 1366358 2016-11-28 19:35:33 +03:00
AlexVinS
394d6e0677 Fixed random crash on resurrection 2016-11-28 19:35:31 +03:00
AlexVinS
c23d3ac83c Fixed CID 1366432 2016-11-28 03:59:03 +03:00
AlexVinS
60bd54c9b3 Changed playerToSide return type to signed 2016-11-28 03:33:39 +03:00
AlexVinS
2a62ca9522 Fixed CID 1197353 2016-11-28 02:50:43 +03:00
AlexVinS
609c6f81bd Fixed a few CWE-457 2016-11-27 22:37:41 +03:00
AlexVinS
3216422307 Fixed a few CWE-457 2016-11-27 22:07:01 +03:00
AlexVinS
abe4beebc6 Fixed CID 1197516 2016-11-27 19:13:40 +03:00
AlexVinS
c4ab962cc0 Fixed a few CWE-457 2016-11-27 17:48:18 +03:00
AlexVinS
8b4f1fc938 Fixed CID 1288850 2016-11-26 22:24:16 +03:00
AlexVinS
30663f15ea Fixed CID 1288863 2016-11-26 22:12:52 +03:00
AlexVinS
96bc191480 Fixed CID 1366296 2016-11-26 21:45:58 +03:00
AlexVinS
c9e564bed8 Fixed CID 1366332 2016-11-26 21:14:21 +03:00
AlexVinS
7d2874bf12 Fixed CID 1366292 2016-11-26 21:11:21 +03:00
AlexVinS
121dd6c63a Fixed CID 1366333 2016-11-26 21:06:34 +03:00
AlexVinS
0a4e5fcdca Fixed CID 1366337 2016-11-26 20:54:07 +03:00
AlexVinS
7793a57b0a Fixed remaining CWE-457 in NetPacks.h 2016-11-26 20:50:07 +03:00
AlexVinS
86e33a4c45 [Refactoring] Unified SetResources NetPack API. 2016-11-26 15:14:43 +03:00
DjWarmonger
5058d5771e Merge branch 'develop' of https://github.com/vcmi/vcmi into develop 2016-11-25 20:54:53 +01:00
AlexVinS
47085e8d78 Fixed CID 1366361 2016-11-25 22:20:40 +03:00
DjWarmonger
4789262200 Merge branch 'develop' of https://github.com/vcmi/vcmi into develop 2016-11-25 19:54:44 +01:00
AlexVinS
dc1015fac9 Fixed CID 1197411 2016-11-25 21:51:27 +03:00
DjWarmonger
2ac72bf75b Merge branch 'develop' of https://github.com/vcmi/vcmi into develop 2016-11-25 19:37:29 +01:00
AlexVinS
d81c611ad7 Fixed CID 1197423, CID 1197567 2016-11-25 21:35:47 +03:00
DjWarmonger
56b201e7e8 Fixed CID 1366289 and 1366290. 2016-11-25 19:32:54 +01:00
AlexVinS
a8cadfe25c Fixed a few CWE-457 in NetPacks.h 2016-11-25 21:04:38 +03:00
AlexVinS
384c5827ae Fixed CID 1197490, CID 1197491 2016-11-25 17:21:27 +03:00
AlexVinS
ca13bb8412 Fixed CID 1366375, CID 1197633 2016-11-25 17:04:30 +03:00
AlexVinS
5a3854a8de Fixed CID 1288852, CID 1243202 2016-11-25 16:51:31 +03:00
AlexVinS
4ba3c6fecc Fixed CID 1288855 2016-11-25 16:40:11 +03:00
AlexVinS
6d3259909e Fixed CID 1288858 2016-11-25 16:17:38 +03:00
AlexVinS
fa4e00573f Fixed CID 1366350 2016-11-25 15:34:38 +03:00
AlexVinS
692d23e580 Fixed CID 1366376 2016-11-25 13:38:26 +03:00
AlexVinS
bd4040245f Fixed CID 1288859 2016-11-24 22:34:42 +03:00
AlexVinS
db40e125eb Fixed CID 1243181, CID 1197449, CID 1366374, CID 1366377, CID 1366359 2016-11-24 21:56:30 +03:00
AlexVinS
52c610bbb0 Silence "X doesn't have a base stack!" warning (fixed version) 2016-11-18 18:35:05 +03:00
AlexVinS
2af7331088 Revert "Silence "X doesn't have a base stack!" warning"
This reverts commit 6d13c8938c.
2016-11-18 17:49:55 +03:00
AlexVinS
dc39fb2d14 Removed useless CPack::type field.
* it was an ancient network protocol artifact
2016-11-18 17:45:59 +03:00
AlexVinS
ebb88f4133 There no point for struct MetaString and struct Component to have CPack as base 2016-11-18 16:58:22 +03:00
AlexVinS
6d13c8938c Silence "X doesn't have a base stack!" warning 2016-11-18 15:52:45 +03:00
AlexVinS
931656f24a possible fix for http://bugs.vcmi.eu/view.php?id=2612 2016-11-18 14:27:20 +03:00
AlexVinS
f8bf2c3746 Fixed http://bugs.vcmi.eu/view.php?id=2611 2016-11-18 12:56:58 +03:00
AlexVinS
713403a0e4 Cleanup 2016-11-13 13:15:36 +03:00
AlexVinS
4ff4e41e81 fixed typo 2016-11-13 13:13:41 +03:00
AlexVinS
2aa8c79a2c fixed boost::optional load, regression from https://github.com/vcmi/vcmi/pull/212 2016-11-13 11:46:26 +03:00
Alexander Shishkin
a73ca79ed1 Merge pull request #257 from vcmi/mapHandlerRefactoring2
Map handler refactoring, part 2.
2016-11-12 09:20:45 +03:00
dydzio
5c07e1c432 Minor typo fixes 2016-11-10 11:51:47 +01:00
AlexVinS
a8a661b159 Map handler refactoring, part 2. 2016-11-08 00:19:53 +03:00
AlexVinS
aad675a7c4 Revert "Merge branch 'p254_4' into develop"
This reverts commit 37f68713a7, reversing
changes made to 4477b7c35d.
2016-11-08 00:17:20 +03:00
AlexVinS
46196daa07 cleanup 2016-11-06 05:27:56 +03:00
AlexVinS
f538aae95e Partial fix for http://bugs.vcmi.eu/view.php?id=2590 2016-11-02 14:52:02 +03:00
DjWarmonger
db13d7a708 Version 0.99 updates. 2016-11-01 18:25:09 +01:00
DjWarmonger
9db3bfcbf2 Merge pull request #212 from vcmi/refactoring/serialization2
Apparently it works - both new and old saves load at least.
2016-11-01 17:25:39 +01:00
DjWarmonger
aa0c745202 Compile fixes for MSVS. 2016-11-01 16:48:34 +01:00
AlexVinS
dad0569bc7 Relaxed cast requirements for Quicksand 2016-10-31 15:38:53 +03:00
Arseniy Shestakov
e79c522c4b Serializer refactoring: fix FileStream usage for game loading
Miss this one rebase. Without this one non-English characters in paths to saves cause issues.
2016-10-30 15:46:44 +03:00
Ivan Savenko
a1cca251ec Possible fix for selection of incorrect method for serialization of vector<bool> 2016-10-30 11:42:53 +02:00
Vadim Markovtsev
99a3a58cbb Add commander resurrection info window upon entering town 2016-10-29 21:55:00 +02:00
Arseniy Shestakov
e13f98e38e Compilation fix for VS2015 suggested by Ivan and tested by @dydzio0614
It's compiled without it by Clang / GCC, but not MSVC++
2016-10-29 21:29:25 +03:00
Ivan Savenko
256f43f467 Fixes zero-initialized fileVersion member in deserializer 2016-10-29 19:52:19 +03:00
Vadim Markovtsev
9f967b4d7a Fix formatting 2016-10-29 17:00:12 +02:00
Arseniy Shestakov
ba5ad286cd Serializer refactoring: fix paths to work in Visual Studio 2016-10-28 13:52:42 +03:00
Vadim Markovtsev
c696746017 Fix some compilation warnings 2016-10-28 08:07:05 +02:00
AlexVinS
3a040c1730 Updated project files 2016-10-27 19:18:52 +03:00
Arseniy Shestakov
ba1929728a Drop old now unused serializer files 2016-10-27 18:44:00 +03:00
Arseniy Shestakov
5f1254a29e Apply some of Vadim's changes
I intentionally didn't transfer changes in CLoadIntegrityValidator since not really agree with them.
2016-10-27 18:39:17 +03:00
AlexVinS
8f349b5105 CTypeList: Apply changes from a50a32405d
Use weak_ptr for TypeDescriptor cross-links. Fixed total TypeDescriptor memory leak.
2016-10-27 18:12:30 +03:00
Ivan Savenko
5b76c3f4eb Rebase of codebase changes for refactored serializer
Some of newer fixes not yet merged there and save compatibility a bit off.
2016-10-27 18:12:20 +03:00
Ivan Savenko
3d1b1f4ba8 Add files for rebased serializer refactoring done by Ivan 2016-10-27 17:26:22 +03:00
AlexVinS
1ccb0d98be Disabled git version of C::B projects 2016-10-27 16:27:10 +03:00
Vadim Markovtsev
da1c9cf249 Fix rebuilding everything on HEAD change 2016-10-23 16:56:53 +02:00
Vadim Markovtsev
d0beb27197 Add git commit hash into the version string 2016-10-23 15:45:47 +02:00
Vadim Markovtsev
4bcc43d3d0 Fix Mantis #2234
CPlayerInterface instances were removed from CClient::playerint with
clear() and finish() was not called on each. Added multiple insurance.
2016-10-22 16:22:00 +02:00
Vadim Markovtsev
baa7a84db3 Fix memory corruption during loading artifacts from mods 2016-10-22 10:00:55 +02:00
Alexander Shishkin
4876cc178d Merge pull request #240 from vcmi/spellWindowRewrite
Spell window rewrite
2016-10-17 07:58:56 +03:00
AlexVinS
bc2f0ba6f1 fixed spell school ordering http://bugs.vcmi.eu/view.php?id=91 2016-10-17 03:33:29 +03:00
Vadim Markovtsev
89f506658e Fix issue #2068 - maps list update 2016-10-16 22:15:37 +02:00
AlexVinS
153af6e07b cleanup 2016-10-16 02:47:03 +03:00
AlexVinS
f760e22707 Fixed two recursive infinite loops in case of alternate buildings.
* introduced in https://github.com/vcmi/vcmi/pull/211
2016-10-15 04:19:47 +03:00
AlexVinS
cf143cd257 Hack-fix crash in CGTownInstance::genBuildingRequirements related to alternate town buildings
* this disables features of #211, but actual problem may be deeper inside logical expressions
2016-10-14 23:46:24 +03:00
Vadim Markovtsev
76ac9991ed Format code 2016-10-12 17:22:35 +02:00
AlexVinS
552f28c10b fix 2016-10-11 21:25:22 +03:00
AlexVinS
ef9bff9006 fixes related to http://bugs.vcmi.eu/view.php?id=2520 2016-10-11 20:04:30 +03:00
AlexVinS
9834db1b7d simplified CGScholar::onHeroVisit 2016-10-11 20:04:28 +03:00
AlexVinS
4173a5064c Fixed http://bugs.vcmi.eu/view.php?id=2545 2016-10-11 20:04:27 +03:00
AlexVinS
24585cde87 complete fix for http://bugs.vcmi.eu/view.php?id=2507 2016-10-11 18:19:42 +03:00
AlexVinS
5c3f84138b fixed random reward generation in CGVisitableOPW 2016-10-11 18:00:54 +03:00
AlexVinS
7db7ece143 Do not send netpack inside netpack handler. 2016-10-09 19:38:13 +03:00
Piotr Wójcik
bb890098df Fix regression for week-visitable objects 2016-10-09 18:51:41 +03:00
Hao Hu
9ec9cffe9b Bug fix for berserk: fixed the issue that the berserk affected stack
won't attack the nearest live stack.
2016-10-07 23:50:34 -04:00
Vadim Markovtsev
34cf92cb9b Change logging style 2016-10-03 20:32:01 +02:00
Vadim Markovtsev
eac5aab396 Survive client<->server ABI mismatch 2016-10-02 22:45:00 +02:00
Vadim Markovtsev
a4e550e3cf Add log levels report 2016-10-02 22:45:00 +02:00
ArseniyShestakov
6f82dc3e15 Merge pull request #230 from dydzio0614/CommanderExperience
Some repair for WoG commanders
2016-10-02 19:29:55 +03:00
Dydzio
b84e680f57 Revert changing class structure 2016-10-02 16:57:26 +02:00
dydzio
02e795d508 Fix commander appearing in battles while dead 2016-10-02 16:25:20 +02:00
AlexVinS
5fa9d64d78 Do not allow cast if it affects only "wrong" targets 2016-10-02 16:46:04 +03:00
AlexVinS
cd5c0b3297 Style tweaks. 2016-10-02 15:22:55 +03:00
AlexVinS
34a494ade0 hack-fixed http://bugs.vcmi.eu/view.php?id=2533 2016-10-02 12:39:25 +03:00
AlexVinS
affbc71c56 cleanup 2016-10-02 11:58:53 +03:00
Arseniy Shestakov
04eb0e3787 CGameState::battleGetBattlefieldType: avoid crash on tile 0,0,0
Fix issue 2524
2016-10-02 08:39:01 +03:00
AlexVinS
c5440a1c6c Fixed http://bugs.vcmi.eu/view.php?id=2541 2016-10-02 01:32:28 +03:00
AlexVinS
8aa57f0cbc fix 2016-10-02 01:07:13 +03:00
AlexVinS
799b8519e0 Allow cast avdmap spells without spellbook
* fixes http://bugs.vcmi.eu/view.php?id=1898
* partial fix for http://bugs.vcmi.eu/view.php?id=482
* fixes http://bugs.vcmi.eu/view.php?id=2155
2016-10-01 17:21:39 +03:00
AlexVinS
f124db9f61 Get rid of Bonus::sourceSpell()
* now bonus API looks more or less clean
2016-10-01 14:47:21 +03:00
AlexVinS
c2a6c268c0 Cleanup terrain overlay bonuses, fixed CURSED_GROUND 2016-10-01 14:10:09 +03:00
AlexVinS
b6368e23ab cleanup 2016-10-01 11:05:58 +03:00
AlexVinS
f6bfba0ced Unified Dispell-related bonus selectors 2016-10-01 10:31:59 +03:00
AlexVinS
96c17505ae get rid of IBonusBearer::getSpellBonuses & Selector::anyRange 2016-10-01 09:07:18 +03:00
AlexVinS
c243ae6f3e Get rid of IBonusBearer::getEffect 2016-10-01 08:28:33 +03:00
AlexVinS
a1ff409080 Tweak
* handle BIND_EFFECT by bonus type
2016-10-01 08:04:39 +03:00
AlexVinS
04f7b4f951 Cleanup 2016-10-01 07:47:39 +03:00
AlexVinS
730e3b6d0f Explicit use of limit selector in CBattleInfoCallback::getRandomBeneficialSpell
* reverted changes in IBonusBearer::hasBonusFrom just in case
2016-10-01 07:28:03 +03:00
AlexVinS
902117d812 Get rid of IBonusBearer::getBonusesCount it had only one usage 2016-10-01 06:51:12 +03:00
AlexVinS
2f7e10a06f Use range limit selector when modifying bonus lists and checking for spell bonuses
* fixes http://bugs.vcmi.eu/view.php?id=2532
2016-09-30 17:12:28 +03:00
AlexVinS
887794e88b Remove UNTIL_BEING_ATTACKED bonuses after any received damage.
* fixes http://bugs.vcmi.eu/view.php?id=2528
2016-09-30 02:09:02 +03:00
AlexVinS
245d17a9e9 Fixed typo bonus duration enum. Mod compatibility retained. 2016-09-30 01:57:33 +03:00
AlexVinS
8aa31f4073 Fixed http://bugs.vcmi.eu/view.php?id=2529 2016-09-30 01:54:40 +03:00
AlexVinS
72461c5c2e Fixed http://bugs.vcmi.eu/view.php?id=2268 2016-09-29 23:14:22 +03:00
AlexVinS
9097ffbd8a Handle HYPNOTIZE effect in case of FEAR and ENCHANTED effects 2016-09-29 22:26:28 +03:00
AlexVinS
83b3c700dd Handle HYPNOTIZE effect in case of mana drain 2016-09-29 21:47:41 +03:00
AlexVinS
688dc4c189 tweaks 2016-09-29 19:37:59 +03:00
AlexVinS
d195bfb62d Possibly fixed http://bugs.vcmi.eu/view.php?id=2291 2016-09-29 18:55:07 +03:00
AlexVinS
fed26e1ac9 Merge remote-tracking branch 'remotes/vmarkovtsev/BonusList-shared_ptr' into develop
# Conflicts:
#	lib/spells/CDefaultSpellMechanics.cpp
2016-09-29 17:12:05 +03:00
AlexVinS
7ce33bc07a Dispell fixes 2016-09-29 16:50:33 +03:00
Vadim Markovtsev
2c1dddde33 Fix memory problems with BonusList
Bonus * -> std::shared_ptr<Bonus>

This cures the following problems:

1) Memory corruption at exit. Some Bonus-es were deleted twice (mods?).
2) Memory leaks. Some Bonuses were not deleted.
3) Reduce the number of "Orphaned child" messages.

Valgrind reports 0 leaked memory now and no invalid reads/writes.
2016-09-29 15:08:00 +02:00
AlexVinS
d79e336e4b Reworked SetStackEffect::applyGs
* fixed applying different duration effects from spells (f.e. Blind)
* reduced code duplication
2016-09-29 15:23:28 +03:00
AlexVinS
34b8b2c91b Fixed Berserk spell effect aka Bonus::ATTACKS_NEAREST_CREATURE
* issue http://bugs.vcmi.eu/view.php?id=2513
* fix is not retroactive
2016-09-29 14:11:15 +03:00
AlexVinS
e91a6d45e8 Probably fixed http://bugs.vcmi.eu/view.php?id=2523 2016-09-29 10:45:22 +03:00
DjWarmonger
e77d408e92 Merge pull request #222 from dydzio0614/HeroBattleWindow
Looks OK to me, thanks! :)
2016-09-28 21:06:59 +02:00
dydzio
68af6a0c19 Refactoring InfoAboutHero + GetHeroInfo 2016-09-28 13:22:33 +02:00
AlexVinS
30aa379a9d Fixed http://bugs.vcmi.eu/view.php?id=2521
* show icons at visitable position
* do not duplicate visible objects icons
2016-09-28 07:58:15 +03:00
dydzio
f9b5ca3374 Remove max mana info leak + tiny refactor 2016-09-28 00:20:45 +02:00
dydzio
d831c087d9 Extending hero info callback
Allow to check battle enemy hero details + adding max spell points to available data
2016-09-27 22:47:24 +02:00
AlexVinS
a03419e7d9 Fixed http://bugs.vcmi.eu/view.php?id=2269 2016-09-24 11:25:29 +03:00
AlexVinS
7874dffa7d fixed http://bugs.vcmi.eu/view.php?id=2282 2016-09-24 10:06:24 +03:00
AlexVinS
849e3fc04e Fixed http://bugs.vcmi.eu/view.php?id=2506 2016-09-24 09:27:58 +03:00
ArseniyShestakov
6c63041d1a Merge pull request #198 from vcmi/SpellsRefactoring8
No reason to not merge this now.
2016-09-24 05:29:55 +03:00
AlexVinS
7618e294c2 More fixes to not place obstacles on wall parts 2016-09-24 04:55:48 +03:00
AlexVinS
cffc4b2ab5 fixed patch obstacle placement inside walls 2016-09-23 20:27:55 +03:00
AlexVinS
bac0b026e5 Do not place obstacles on wall parts 2016-09-23 13:14:12 +03:00
AlexVinS
44753866ec Fixed Clone links cleanup. 2016-09-23 12:20:41 +03:00
Arseniy Shestakov
bb05db90e5 CRewardableObject::onHeroVisit: avoid crash on pickable objects
Missed this problem when tested #214
2016-09-23 11:47:07 +03:00
ArseniyShestakov
50b271393c Merge pull request #214 from Chocimier/iss1975
Properly check if corpse was visited
2016-09-23 06:26:10 +03:00
AlexVinS
ea2e336f54 Merge branch 'develop' into SpellsRefactoring8 2016-09-22 16:40:32 +03:00
Piotr Wójcik
97d358b70f Marking visited for team
Also no longer gives reward every player
2016-09-20 22:05:44 +02:00
Dydzio
bd651ec5ef Improve pandora box secondary skill handling 2016-09-20 12:40:58 +02:00
Dydzio
563a5d53c0 Update secondary skill handling. Fix issue 2307
Also making secondary skill icon display behavior same as in H3 during popup message.
2016-09-19 20:05:57 +02:00