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

3607 Commits

Author SHA1 Message Date
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