Ivan Savenko
bdb8e0ee5c
Introduced string identifiers for H3 texts, still WIP
2023-01-01 14:56:44 +02:00
Ivan Savenko
5d80457eda
Merge with vcmi/develop branch
2022-12-30 00:52:23 +02:00
Ivan Savenko
7a35bcc812
Merge pull request #1221 from IvanSavenko/warnings_fix
...
Fix remaining compiler warnings
2022-12-29 21:51:55 +02:00
Ivan Savenko
bb65246aa3
Merge remote-tracking branch 'vcmi/develop' into battle_improvements
2022-12-26 01:15:44 +02:00
Ivan Savenko
405b2976d5
Renamed getUpgradeInfo -> fillUpgradeInfo
2022-12-25 14:03:43 +02:00
Nordsoft91
64fb4a744e
Merge pull request #1269 from vcmi/beta
...
Merge android fix into develop
2022-12-24 22:07:04 +04:00
nordsoft
2953b8fe9d
Fix android build
2022-12-23 19:12:48 +04:00
Ivan Savenko
325c29da0d
Merge remote-tracking branch 'vcmi/develop' into battle_improvements
2022-12-23 14:51:34 +02:00
nordsoft
1250f67771
Fix android build
2022-12-23 16:42:32 +04:00
Ivan Savenko
eb20a4b208
Merge remote-tracking branch 'vcmi/develop' into warnings_fix
2022-12-23 14:40:45 +02:00
Ivan Savenko
f073c676f9
Merge 1.1 release into develop
2022-12-23 14:17:18 +02:00
Ivan Savenko
9248e06ae0
Demon summon is now a spell. DEMON_SUMMONING bonus has been removed
2022-12-22 23:11:55 +02:00
Ivan Savenko
b2279484fc
Merge pull request #1227 from Shatur/opendingux
...
Port to OpenDingux handhelds
2022-12-22 16:56:55 +02:00
Ivan Savenko
b423b3fa6b
Fix dragon breath & fire shield
2022-12-21 18:04:54 +02:00
nordsoft
12d4204334
Fix closing server on ios
2022-12-19 01:37:38 +04:00
Ivan Savenko
52fc5b3c39
Exploded mines now send ACTIVATE flag to client to play effect
2022-12-17 19:37:00 +02:00
Ivan Savenko
deffba01b9
All battle effects are now fully client sided
2022-12-17 17:35:15 +02:00
Ivan Savenko
ced2ece954
Fixes #809 - do not print error message after stepping onto mine
2022-12-17 14:40:54 +02:00
Ivan Savenko
a1ab90fb05
Creatures with double strike will not hit 2nd time after blinding
2022-12-16 21:52:46 +02:00
Andrii Danylchenko
56bf8ec2c4
#1228 - prevent second AI activation on AI defeat due to wrong EndTurn packet
2022-12-14 22:13:26 +02:00
Ivan Savenko
60a00b450e
Multiple fixes & improvements to animation ordering
2022-12-13 21:31:49 +02:00
Ivan Savenko
c79634b6a7
Moved all animation ordering logic to callers
...
Previously, CBattleAnimation & inheritors were controlling animation
ordering - e.g. which animations should play after which.
Now, this is controlled by caller, e.g. BattleInterface & its
controllers.
H3 animations are fairly linear and can be split in stages which are
already somewhat implemented via waitForAnims
2022-12-13 21:31:49 +02:00
Ivan Savenko
b3deea24e0
Earthquake spell: do not target already destroyed sections
2022-12-13 21:31:49 +02:00
Hennadii Chernyshchyk
de33eb44f9
Port to OpenDingux handhelds
2022-12-13 03:55:54 +02:00
Ivan Savenko
25bceda4ea
Added convertToVisitablePos/convertFromVisitablePos to CGHeroInstance
...
This method replaces old convertPosition, but with more clear names and
without hardcoded magic constants.
2022-12-09 14:42:47 +02:00
Ivan Savenko
facf77b3ae
vstd::unique -> std::unique
2022-12-07 23:36:20 +02:00
Ivan Savenko
d85ee019ec
Removed CGHeroInstance::convertPosition method
2022-12-07 22:51:32 +02:00
Ivan Savenko
49cbd5adc9
CGHeroInstance::convertPosition is no longer static method
2022-12-07 22:34:08 +02:00
Ivan Savenko
908e6892f3
Removed CGHeroInstance::getPosition pseudo-override
...
Now access to hero visible position is always done via visitablePos
2022-12-07 22:10:08 +02:00
Ivan Savenko
2855606a88
Enabled & fixed -Woverloaded-virtual warning from gcc/cland
...
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
Ivan Savenko
fd97b51183
Yet another attempt to fix Windows compile:
...
when building vcmi_lib statically (or linking against static vcmi_lib)
do not place dllexport/dllimport tags
2022-12-06 18:35:24 +02:00
Ivan Savenko
fa23965d0b
Renamed for consistency BUILD_SINGLE_APP -> ENABLE_SINGLE_APP_BUILD
2022-12-06 00:00:56 +02:00
Ivan Savenko
6463e906d5
vcmi can be compiled as single app on Linux
...
TODO: check compilation on Win/Mac using Github Actions
2022-12-05 21:36:02 +02:00
Ivan Savenko
848454d48a
Check for end-of-battle after opening spells are cast, fixes potentially
...
infinite battle
2022-12-02 21:38:59 +02:00
nordsoft
b7cab0e01d
Merge remote-tracking branch 'upstream/develop' into battle-dialog
2022-11-30 01:03:57 +04:00
nordsoft
e865f484ff
Fix some problems with network game
2022-11-30 00:10:40 +04:00
Nordsoft91
89b8b87a6b
Merge pull request #1156 from vcmi/features/online
...
Online mode
2022-11-29 20:43:39 +04:00
nordsoft
e9e172164c
Implemented correct logic for battle queries
2022-11-25 03:02:34 +04:00
nordsoft
52375468e4
Remove unused variable
2022-11-23 01:02:17 +04:00
SoundSSGood
e6e669d024
ArtifactUtils::isSlotBackpack() func + refactoring
2022-11-18 23:13:44 +02:00
SoundSSGood
e9ab894638
backpack assemble
2022-11-18 01:55:29 +02:00
SoundSSGood
2d078132bf
assemble in backpack initial
2022-11-17 19:43:54 +02:00
nordsoft
b253b19dc3
Support draw scenario (doesnt work properly)
2022-11-16 02:50:47 +04:00
nordsoft
9b597fc8d4
Merge remote-tracking branch 'upstream/develop' into battle-dialog
2022-11-15 23:08:20 +04:00
nordsoft
915d215076
Fix connections amount problem
2022-11-15 22:09:47 +04:00
nordsoft
694fedc662
Fix crash due to passing args
2022-11-15 22:09:46 +04:00
nordsoft
e7a8466e2b
Merge remote-tracking branch 'upstream/develop' into lobby
2022-11-15 22:09:46 +04:00
Andrii Danylchenko
6974d4ea53
Merge pull request #1130 from IvanSavenko/banned_skills_fix
...
Fixes #1096 - do not propose banned skills on levelup
2022-11-15 09:32:12 +02:00
Ivan Savenko
729357824b
Added common method for secondary skill availability checks
2022-11-14 19:08:49 +02:00
SoundSSGood
f9738f0d0b
nullptr checks
2022-11-13 16:28:26 +02:00
SoundSSGood
aef87dd482
Apply suggested cosmetic changes
2022-11-13 15:28:09 +02:00
nordsoft
eeeca5ba8d
Add additional logging
2022-11-11 18:00:09 +04:00
SoundSSGood
3142f32cbb
Fix for callback return. More code optimization
2022-11-11 01:28:04 +02:00
SoundSSGood
30db38c0fe
Unified CGameHandler::bulkMoveArtifacts and CGameHandler::bulkSwapArtifacts to one
2022-11-10 20:11:26 +02:00
SoundSSGood
ad47a7573c
Code style. Typo. Code clean up.
2022-11-10 18:29:39 +02:00
SoundSSGood
b9087e2d63
Apply suggestions from code review
...
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2022-11-10 17:45:54 +02:00
SoundSSGood
f2afd9e831
Update server/CGameHandler.cpp
...
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2022-11-10 17:37:50 +02:00
nordsoft
9ffc50457a
Bypass command line args to vcmiserver
2022-11-08 18:05:47 +04:00
nordsoft
97e5fc8a07
Lobby works
2022-11-08 04:44:34 +04:00
SoundSSGood
3a3b559a0b
attempt to fix the build
2022-11-07 14:20:28 +02:00
SoundSSGood
203c54e956
BulkMoveArtifacts structure optimization
2022-11-07 14:13:36 +02:00
SoundSSGood
0032947735
regression fixed. Artifact assemble dialog shows multiple times.
2022-11-07 00:36:13 +02:00
SoundSSGood
a35db9a696
server blocksPack upd
2022-11-07 00:19:43 +02:00
SoundSSGood
f72a3e3884
function ArtifactUtils::checkSpellbookIsNeeded for the artifacts like a Titan's thunder
2022-11-07 00:18:05 +02:00
SoundSSGood
0f391e19d5
server side funcs
2022-11-06 23:59:30 +02:00
SoundSSGood
95ab343116
Net Packs BulkMoveArtifacts structure and BulkMoveArtifacts::applyCl
2022-11-06 23:54:50 +02:00
nordsoft
4ccad9178e
Fix potential BattleInfo destruction before usage
2022-11-06 21:46:56 +04:00
nordsoft
e9cf3ede2a
Try to handle queries by ai
2022-11-05 06:34:38 +04:00
nordsoft
0c4e50b63c
Initial prototype works
2022-11-05 03:35:51 +04:00
nordsoft
48925a50f2
Development
2022-11-05 03:35:46 +04:00
nordsoft
219a282916
First step
2022-11-05 03:35:32 +04:00
nordsoft
6eb43d3834
Minor changes
2022-10-27 01:39:57 +04:00
nordsoft
21a1706627
First working prototype
2022-10-27 00:52:39 +04:00
nordsoft
dd45d1a9cf
Develop game part
2022-10-25 05:27:53 +04:00
nordsoft
2645843d4f
Fix dead server
2022-10-08 22:23:02 +04:00
nordsoft
63b29cbaea
Code review tweaks
2022-10-08 19:52:53 +04:00
nordsoft
e718f7fe39
Fix reconnection
2022-10-06 19:23:34 +04:00
nordsoft
ea49b8cf40
Cleanup code
2022-10-06 17:56:54 +04:00
nordsoft
16e185343a
Add host commands to control game
2022-10-06 15:54:46 +04:00
nordsoft
895ec2d302
Make console available during other players' turn
2022-10-05 19:04:51 +04:00
nordsoft
3ff38b84a2
Support hotseat over multiplier
2022-10-05 01:54:31 +04:00
nordsoft
77ff6a64e6
Show message about client connecting and disconnecting
2022-10-05 00:51:34 +04:00
nordsoft
930f03e812
uuid check
2022-10-04 20:54:40 +04:00
nordsoft
0ea5a8fbe7
Merge remote-tracking branch 'upstream/develop' into mp-disconnection
...
# Conflicts:
# server/CVCMIServer.cpp
2022-10-04 17:41:43 +04:00
nordsoft
722acb2a1d
Reconnection works
2022-10-04 05:42:14 +04:00
nordsoft
16a5414247
Reconnection partially works
2022-10-04 05:09:03 +04:00
nordsoft
b91bb41a80
One step forward
2022-10-04 02:25:22 +04:00
Andrii Danylchenko
5c44c8f4da
Merge pull request #1011 from kambala-decapitator/fix-multiple-heals
...
allow healing ability only before first turn of each round
2022-10-03 21:43:08 +03:00
Andrii Danylchenko
382b3ae94a
Merge pull request #1041 from vcmi/nkai-fixes
...
NKAI: android fixes
2022-10-03 20:30:05 +03:00
Andrii Danylchenko
04490b709a
Merge pull request #1000 from vcmi/multiplayer
...
Multiplayer
2022-10-03 20:16:39 +03:00
nordsoft
512cf014aa
Freeze current state
2022-10-03 20:47:00 +04:00
nordsoft
f4b7cf8196
Transfer player ownership to AI
2022-10-03 20:47:00 +04:00
Andrey Filipenkov
52371a4d3e
allow healing ability before first turn attempt of each round
2022-10-03 15:48:39 +03:00
Andrii Danylchenko
8f599ed043
NKAI: android fixes
2022-10-03 09:01:15 +03:00
Andrii Danylchenko
2434fe3f6f
NK: fix AI speed
2022-10-01 13:49:27 +03:00
nordsoft
fea05a4320
Finally game restart works
...
# Conflicts:
# lib/CGameState.cpp
# server/CVCMIServer.cpp
2022-09-29 21:08:05 +04:00
Andrii Danylchenko
dae726b82d
Merge pull request #1005 from kambala-decapitator/ios-min-12
...
raise iOS deployment target to 12.0
2022-09-29 19:57:04 +03:00
nordsoft
cbfa125085
Remove commented line
2022-09-29 14:29:57 +04:00
Tomasz Zieliński
20c102e648
Remove T prefix from new typedefs
2022-09-29 11:44:46 +02:00
nordsoft
bebe0dd86c
Some change
2022-09-29 00:35:38 +04:00
nordsoft
2eb497b477
Looks like everything works
2022-09-28 23:38:41 +04:00
nordsoft
7ee4fca120
Pass whole gamestate over network
2022-09-28 23:15:05 +04:00
Tomasz Zieliński
f386f42166
Merge remote-tracking branch 'origin/develop' into terrain-rewrite
...
# Conflicts:
# lib/Terrain.cpp
# lib/Terrain.h
# lib/battle/CBattleInfoEssentials.cpp
# lib/rmg/ObstaclePlacer.cpp
# lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
Andrey Filipenkov
53ac61b52b
iOS: don't create unused CConsoleHandler
2022-09-27 07:05:10 +03:00
Nordsoft91
d4f97aadf0
Merge branch 'develop' into incomatibility-response
2022-09-25 13:26:07 +04:00
Tomasz Zieliński
4ea57ea7fc
A variety of suggested style tweaks
2022-09-25 09:33:56 +02:00
Andrey Filipenkov
9f46bf5bff
Apply suggestions from code review
...
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2022-09-24 15:55:26 +03:00
Andrey Filipenkov
605d5b6481
add dedicated macro when building as single process
...
fix kambala-decapitator/vcmi#40
2022-09-24 15:55:25 +03:00
Andrey Filipenkov
cd4b68c034
fix repeated launches of single player
...
now server actually terminates
2022-09-24 15:55:22 +03:00
Andrey Filipenkov
342a859a3f
fix typo
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
24a5dd797c
fix starting local server
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
de05479532
Revert "attempt to run server in a separate app"
...
This reverts commit 99fe55b295ad95033626c15011cfe49779269156.
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
e61e283b75
[iOS] remove everything related to server app
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
c6e51852d0
add ability to build VCMI as single process
...
"Client process -> shared VCMI lib <- Server process" is turned into "shared Client-VCMI lib -> process <- static Server-VCMI lib"
- adds lib_client and lib_server targets that define distinct namespaces
- lib_client is a dynamic library which is shared with AI libs, lib_server is static
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
ff635edc0b
wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
...
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
3388583089
use component-based install to copy only what's needed for every app
2022-09-24 15:55:20 +03:00
Andrey Filipenkov
fae295da88
allow building without codesigning
2022-09-24 15:55:20 +03:00
Andrey Filipenkov
9dc5f3ed8b
improve RPATH handling, apply RPATH when installing dylibs
2022-09-24 15:55:20 +03:00
Andrey Filipenkov
bb9d19deee
fix whitespace
2022-09-24 15:55:19 +03:00
Andrey Filipenkov
2354023731
move extern "C" to header
2022-09-24 15:55:18 +03:00
Andrey Filipenkov
2fc4d48215
load game data from shared dir
...
kambala-decapitator/vcmi#15
2022-09-24 15:55:18 +03:00
Andrey Filipenkov
e20a6c3670
server: add buttons to start server and to move data to shared directory
...
kambala-decapitator/vcmi#9 kambala-decapitator/vcmi#15
2022-09-24 15:55:18 +03:00
Andrey Filipenkov
4647bd8981
add App Group entitlement
...
kambala-decapitator/vcmi#9
2022-09-24 15:55:18 +03:00
Andrey Filipenkov
7def214740
more Xcode-compatible Info.plist
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
13dd451ff5
add simple app icons
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
dde9a5d5d2
todo updates
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
6e41e3154c
fix running on device from Xcode
...
proper codesigning
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
cfa22c33ad
use rpath properly
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
b6c4126bed
install files after building server/client
...
package required files inside app bundle
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
92a7936202
add Info.plist to sources
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
09f5ea52f2
remove background audio hack
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
e72e5cea6f
attempt to run server in a separate app
...
partially reverts 3258f8bb40487e3731bf452dbda1add6294ff4b2
2022-09-24 15:55:17 +03:00
Andrey Filipenkov
26a1cc5b73
todos
2022-09-24 15:55:16 +03:00
Andrey Filipenkov
2e18299897
make server a static lib, run it in a separate thread
...
issues to solve:
- dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. 13CPackForLobby, 20LobbyClientConnected, 20LobbyClientConnected.
- error setting socket option: set_option: No buffer space available
2022-09-24 15:55:16 +03:00
Andrey Filipenkov
c4233ad706
exclude some code similar to android
2022-09-24 15:55:16 +03:00
Tomasz Zieliński
a5077245a8
Merge remote-tracking branch 'origin/develop' into terrain-rewrite
...
# Conflicts:
# lib/Terrain.cpp
# lib/Terrain.h
2022-09-23 20:01:13 +02:00
nordsoft
8f6f9707a6
Read error message from translate.json
2022-09-23 15:20:11 +04:00
nordsoft
e74890c4b1
Add system message about mods incompatibility
2022-09-23 15:02:45 +04:00
Andrii Danylchenko
328fe4a556
Merge pull request #952 from kambala-decapitator/fix-vampire-drain-effect
...
server-side fixes to battle events
2022-09-22 18:37:29 +03:00
Andrii Danylchenko
b4d3445559
Merge pull request #971 from kambala-decapitator/fix-warnings
...
Fix most project warnings
2022-09-22 16:05:32 +03:00
Andrey Filipenkov
1d57c40740
wrap && conditions in parentheses when near ||
2022-09-22 11:54:09 +03:00
Andrey Filipenkov
7e6ed0583c
disable all scripting code when configuring without scripting modules
2022-09-21 19:31:42 +03:00
Tomasz Zieliński
494b0f0226
First version that compiles
2022-09-21 11:34:23 +02:00
Andrey Filipenkov
87a88da3a9
add Fire Shield damage to the battle log
2022-09-21 10:42:42 +03:00
Andrey Filipenkov
b95841dabb
fix creating "creatures perished" battle log entry
2022-09-21 10:38:42 +03:00
Andrey Filipenkov
1313da191b
trigger Drain Life effects after the attack
...
- animation and sound are played after the attack
- amount of drained life appears after damage dealt in the battle log
2022-09-20 18:00:00 +03:00
DjWarmonger
7ba271edf1
Rotation rebase2 ( #912 )
...
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too
2022-09-18 17:39:10 +03:00
Andrey Filipenkov
99af5bbe4c
add dedicated method to get logs path
2022-09-18 09:24:36 +03:00
Tomasz Zieliński
40585a66c0
Style, commend - requested
2022-09-11 11:31:28 +03:00
Tomasz Zieliński
6fb7301e8e
Fixed issue with taking creatures from a Bank, Pandora or joiners
2022-09-11 11:31:27 +03:00
Andrii Danylchenko
4b4cc3cf4b
battlefields in VLC and custom bonuses for terrain patches
2022-09-11 11:31:27 +03:00
Nordsoft91
c4035134e5
New battlegrounds ( #758 )
2022-09-11 11:31:26 +03:00
Nordsoft91
aaa07e4d2e
New terrain support - part 1 ( #755 )
...
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Soar Qin
188607b05f
Replace cotire with CMake builtin precompiled headers support (Requires CMake version >= 3.16)
2022-06-17 17:20:08 +03:00
Konstantin
8fc14369a4
CMake presets. ( #744 )
...
* CI: use single build action
* CMake: use imported targets
* CI: do not build boost for linux
* CMake: add FORCE_BUNDLED_MINIZIP option
* linux: use external minizip and fuzzylite
* CMake: add presets
* .gitignore: ignore cmake build dirs
* github: use cmake presets
2022-05-26 08:55:20 +03:00
Konstantin
c6b198ce14
Warning fix (I moved C++17 and CI to another branch) ( #739 )
...
* clang warning fixes
* use CMake 3.10 due to MXE CI does not have 3.13 yet
Co-authored-by: Konstantin <rilian@niisi.ras.ru>
2022-05-19 15:14:50 +03:00
Andrii Danylchenko
e220918230
full crash dump
2022-05-14 13:23:09 +03:00
Andrii Danylchenko
0d15089dd4
Do not remove hero if left only with commander
2022-05-01 09:30:30 +03:00
Arseniy Lartsev
bfd57ab5b5
Fixed scholar skill icon in the scholar dialog
...
The icon was for one level higher than the actuall skill level,
especially problematic for expert where right-clicking the icon
woould cause a crash
2022-03-13 16:47:52 +02:00
Andrii Danylchenko
550f544592
Add logging of network failure during connect
2022-03-05 15:53:07 +02:00
Dmitry Orlov
8cae3398ba
Feature: Army Management Shortcuts should work as in HD+ Mod
2021-11-28 20:00:43 +02:00
Dmitry Orlov
7cfd1fe0ca
Fix: Captured town should not be duplicated on the UI
2021-10-31 17:33:26 +02:00
Dmitry Orlov
e4c2f0c822
Fix: Skyship Grail should work immediately after capturing without battle
2021-10-31 09:01:49 +02:00
Dmitry Orlov
30b879ae5d
Fixed: duplicated bonusing building. Improved: opposite bonus propagation
2021-09-12 14:30:54 +03:00
Dmitry Orlov
2a39c401b8
Feature: Opposite Side Limiter. Added: Old saves support.
2021-09-04 14:15:38 +03:00
Dmitry Orlov
25d9ea1ddf
Feature: Opposite Side Limiter
2021-09-04 14:15:38 +03:00
Andrii Danylchenko
9c8d776398
Merge branch 'develop' into handlersAbstraction
...
# Conflicts:
# CI/linux/before_install.sh
# CI/mac/before_install.sh
# CI/mxe/before_install.sh
# lib/CModHandler.cpp
# lib/mapObjects/CObjectClassesHandler.cpp
# lib/mapObjects/CObjectClassesHandler.h
# lib/mapObjects/CommonConstructors.cpp
# server/CGameHandler.cpp
# test/CMakeLists.txt
# test/spells/effects/TeleportTest.cpp
2021-07-16 00:32:13 +03:00
Andrey Filipenkov
7f3b06eb86
fix server crash on unexpected client disconnect
2021-03-20 17:12:56 +03:00
AlexVinS
483a4689ce
Fixes for code review issues
2021-02-20 04:57:50 +03:00
AlexVinS
ecaa9f5d0b
Entities redesign and a few ERM features
...
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
Dmitry Orlov
3add3156e2
Fix: 'Restart Scenario' button should work properly
2021-01-20 21:29:50 +03:00
Dmitry Orlov
854a2e6c39
Feature: Mods system improvement, Part III. Bunusing buildings customization.
2021-01-14 01:02:13 +03:00
Andrii Danylchenko
3614330b3d
moat bypass when no targets to attack
2020-12-02 19:40:24 +02:00
Andrii Danylchenko
4e359cd2a3
fix automatic towers when out of ammo
2020-12-02 08:38:31 +02:00
Dmitry Orlov
39de2f6435
Fix: Morale bonus should be shown correctly
2020-11-11 22:43:40 +03:00
Dmitry Orlov
b25baf66be
Fix level up crashes: 1) Crash on double level up. 2) Crash on custom class level up.
2020-10-19 22:39:57 +03:00
Dmitry Orlov
934c4e511d
Special buildings support : Patch 1
2020-10-15 15:03:01 +03:00
Dmitry Orlov
bf07cd0ad9
Mod system improvement Part I : Old saves support & MSVS build fix
2020-10-07 15:12:32 +03:00
Dmitry Orlov
f4816b0824
Mod system improvement Part I : Special buildings should work in the modders towns
2020-10-07 12:35:11 +03:00
Alexander Shishkin
124b2a7613
Merge pull request #655 from jambolo/bug/fix-0003143
...
Fixed lots of warnings.
2020-10-06 11:44:54 +03:00
xtouqh
0095db4a30
FreeBSD: need libexecinfo for backtrace()
2020-10-05 17:57:31 +03:00
John Bolton
a05ae78e67
Fixed lots of warnings.
...
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.
4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
John Bolton
6d8f1e4530
Fixed incorrect usage of const std::shared_ptr. Resolves 0003142.
...
Replaced const TBonusListPtr with TConstBonusListPtr where necessary
Replaced const std::shared_ptr<T> with std::shared_ptr<const T> where necessary.
Removed superfluous use of const.
Replaced const std::shared_ptr<T> with const std::shared_ptr<T> & in function parameters and ranged for-loops.
2020-09-30 22:56:28 -07:00
Dmitry Orlov
ae3b8e4916
Travis errors & warnings fix
2020-09-28 16:39:55 +03:00
Dmitry Orlov
38fd05f655
Minor fix: apply Monday bonuses to heroes who have slept overnight
2020-09-28 01:32:33 +03:00
Victor Luchits
febbeaeeed
Close the global log targets on exit, flushing log files to disk
2020-05-05 15:25:07 +03:00
Toney Sui
dca5d86e7a
Fix bug: LandMine is not exploding to enemies. ( #630 )
...
* The reason is,
the mine has attribute hidden=true;
when enemy unit moves, the code in BattleInfo.cpp MoveUnit() (line 817) will update the revealed to true;
then in the CGameHandler.cpp handleDamageFromObstacle() (line 4846) is checking , and the condition battleIsObstacleVisibleForSide() will return true, so the effect will not be triggerred.
Resolution:
1. Remove the "revealed=true" in moveUnit(), and in handleDamageFromObstacle, remove the "const" restrict for obstacle, and then update revealed to true;
2. After the takeDamage function, add a pack "BattleObstaclesChanged" to update the obstacle to be "revealed=true".
2020-02-12 20:12:12 +03:00
krkos
ac81d0f7b4
Fix build with Boost versioni >= 1.70 ( #615 )
2020-01-21 11:55:28 +03:00
Dydzio
54550b50de
Update VS files to 2019, partially fix test project
2019-06-09 17:28:55 +02:00
Dydzio
2f15ca9406
Do not build pseudo-buildings explicitly with events
2019-06-04 22:29:07 +02:00
Dydzio
e1b72ead6e
Update CGameHandler.cpp
...
Fix hero recruit serverside check
2019-06-01 20:29:49 +03:00
AlexVinS
1f2ee843aa
[C::B] Switched to boost shared linkage
2019-05-30 20:55:40 +03:00
Dydzio
f49bd3f18b
Do not display warning if player already lost
2019-05-28 22:34:55 +02:00
Ewilhan
ec4797d856
Fix Neutral Creatures Weekly Growth
...
Made it so neutral creatures could not be picked as "Flavour of the Week".
It is checking neutral creatures hometown to do so.
Fixes #3046 .
2019-05-06 14:12:14 +01:00
Dydzio
97869fc36f
Fixed single map victory crash
2019-03-29 22:01:51 +01:00
Michał Kalinowski
ec536e613c
CMake more transitive
...
-Moving AIs cmake to target focusing code
-Beign explicit when link libraries
2019-03-28 16:56:51 +03:00
Dydzio
c310a05ee0
Allow learning secondary skills in ally towns
2019-03-25 02:21:32 +03:00
Dydzio
e1857df4bb
Fix defense battle action logic ( #563 )
...
* Fix defense battle action logic
2019-03-25 02:16:47 +03:00
Alexander Shishkin
549d8c97df
Merge pull request #557 from dydzio0614/CrystalDragonAbility
...
Fix crystal dragon ability to match H3
2019-03-21 17:02:20 +03:00
Dydzio
53f4ba6464
Fix crystal dragon ability to match H3
2019-03-17 19:48:47 +01:00
Dydzio
36cb9f11c4
Hardcoded feature: no random week/month effects
2019-03-17 18:27:05 +01:00
AlexVinS
9311966706
[C::B] Switch to MinGW 7.3
2019-02-19 14:59:10 +03:00
Michał Kalinowski
a0d1808b62
CMake transitive compile dependency
...
Moving to more target focusing code that provides better transitive scope
2019-01-19 17:38:54 +03:00
Alexander Shishkin
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
AlexVinS
da20aa2388
Use the same cost value in Pathfinder and fuzzy evaluations.
2019-01-17 10:54:41 +03:00
Dydzio
216d50788b
Fix AI build, update default Windows SDK version for projects
2018-12-31 15:18:42 +01:00
Andrii Danylchenko
035d279ae8
Refactor CGHeroInstance, make spells private
2018-12-23 15:49:26 +03:00
Andrii Danylchenko
83531f4355
Rename typo in NetPacksServer.cpp
2018-11-17 21:58:54 +02:00
Andrii Danylchenko
9a36572446
Build boat in allied shipyards is allowed now
2018-11-17 21:58:54 +02:00
Dydzio
c3088e293a
Workaround linker bug, set higher optimization by default
2018-11-17 11:34:39 +01:00
Andrii Danylchenko
6ac987794c
AI: first rule extracted for pathfinder
2018-09-23 15:26:53 +03:00
KasyanDiGris
fa5a14e2d8
Stabilize vcmi ( #488 )
...
* Shared statusbar
* Fixed server fails on client disconnected
2018-08-26 19:09:56 +03:00
Konstantin Vukolov
96215233bc
macOS: fix packet deserialization ( #479 )
2018-08-14 01:03:45 +03:00
Alexander Shishkin
84be667363
Merge pull request #463 from dydzio0614/skel_transformer_fix
...
Fix bone/ghost dragon handling in skeleton transformer
2018-07-19 00:03:32 +03:00
Dydzio
301b70ddd8
Fix bone/ghost dragon handling in skeleton transformer
2018-07-18 20:21:19 +02:00
Dydzio
d5d2c65c4b
Fix counterattack wrong mechanics
2018-07-18 15:52:33 +02:00
Dydzio
260981d586
Update project files to match vcmi code changes
2018-07-06 18:52:51 +02:00
Andrii Danylchenko
dcbcff41dc
apply review comments for CAndroidVMHelper
2018-05-26 14:50:49 +03:00
Andrii Danylchenko
ee033e9c9c
fix android build
2018-05-25 22:57:29 +03:00
Karlis Senko
224ea28433
Fix various memory errors related to server and connections.
...
* keep connection when restarting scenario
* wrong double free in Connection
* multiple use after free when stopping server
* double free of StartInfo
2018-05-01 00:04:20 +03:00
Karlis Senko
40e6292ed2
Fix memory leaks in launcher.
2018-05-01 00:01:20 +03:00
ArseniyShestakov
6f6f399911
Merge pull request #451 from josch/develop
...
Remove compilation warnings
2018-04-27 17:29:15 +07:00
Karlis Senko
965b33d16a
Server: add GAMEPLAY_STARTING state ( #450 )
...
Fixes issue 2962.
2018-04-23 00:26:40 +07:00
Johannes 'josch' Schauer
a0be483525
server/CVCMIServer.cpp: remove variable that was only set but never used
2018-04-19 15:18:08 +02:00
AlexVinS
a8e1c51c36
[c::b] projects update
2018-04-05 21:12:21 +03:00
Arseniy Shestakov
f5d8e5b0cc
Move Boost Asio compatibility code to Global.h. Fix by @dydzio06143
2018-04-05 19:35:08 +07:00
Arseniy Shestakov
74e5c5bf05
CGameHandler: rename CPackForClient argument and add network logging
2018-04-04 14:24:32 +07:00
Arseniy Shestakov
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
AlexVinS
03cfd2cb78
Do not use StackLocation in netpacks
2018-03-17 13:24:12 +08:00
AlexVinS
8cec07afbd
Replaced CGHeroInstance and CGObjectInstance with ObjectInstanceID in NetPacks
2018-03-17 13:24:12 +08:00
Henning Koehler
7f76648a7c
Extend Bonus.addInfo to integer vector ( #427 )
...
* changed Bonus::additionalInfo to integer vector
* fixed deserialization for old savegames
* removed newline from JsonNode::toJson()
* updated bonus schema; SPELL_AFTER_ATTACK and SPELL_BEFORE_ATTACK use new addInfo format
* removed unnecessary init in Bonus constructor
2018-03-12 08:20:18 +03:00
Raphnalor
83c6ffbda0
Reflect changes in boost::asio released in Boost 1.66. ( #428 )
...
The service template parameters are disabled by default for now.
Use BOOST_ASIO_ENABLE_OLD_SERVICES macro to enable the old interface.
2018-03-11 21:02:20 +08:00
ArseniyShestakov
079cd470c2
Merge pull request #425 from vcmi/CatapultRework
...
Catapult rework
2018-03-06 01:16:53 +08:00
Dydzio
07cf59592b
Updated catapult spell effect to match new code
2018-03-05 12:55:44 +01:00
AlexVinS
f126a34a5e
Fixed https://bugs.vcmi.eu/view.php?id=2904
2018-03-04 11:15:24 +03:00
Dydzio
fb9ee9ddf7
Visual fix - destroy shooters together with tower
2018-03-02 15:36:44 +01:00
Dydzio
e68a2e7ef5
Fix arrow tower destruction mechanics
2018-03-02 15:23:07 +01:00
Dydzio
b55d506e22
Grant advanced catapult proficiency with CATAPULT_EXTRA_SHOTS
2018-03-02 13:46:14 +01:00
Alexander Shishkin
8b002ad774
Issue2888 ( #421 )
...
Fixed issue 2888
* Merged AFTER_ATTACK & BEFORE_ATTACK cast modes.
* Introduced new caster class for creature ability usage
* Added few tests
2018-03-02 13:22:51 +03:00
Nikolay Shalakin
3795985de9
Eliminate warnings / errors. Pull request #388
2018-02-11 15:17:14 +03:00
Arseniy Shestakov
8bbe747e8e
Cleanup undef for min / max. NOMINMAX is already in Global.h
2018-02-11 05:42:49 +03:00
Ivan Romanov
eea50a044c
Hide "this statement may fall through" warnings
2018-02-10 22:27:00 +05:00
AlexVinS
35b01eb379
Fixed https://bugs.vcmi.eu/view.php?id=2466
2018-02-10 08:37:15 +03:00
AlexVinS
c94daf6faa
Fixed https://bugs.vcmi.eu/view.php?id=2864
2018-02-10 07:31:02 +03:00
AlexVinS
b194f8f13b
Fixed https://bugs.vcmi.eu/view.php?id=2865
2018-02-10 00:02:56 +03:00
AlexVinS
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
Arseniy Shestakov
7c77249d37
Refactoring: get rid of macro in server-side request validation code
2018-01-28 08:03:48 +03:00
Dydzio
38d836d1a5
Update project files to Visual Studio 2017
2018-01-13 16:33:49 +01:00
Arseniy Shestakov
da117e9255
Code style: remove void from constructors without arguments
2018-01-13 11:51:47 +03: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
da6d01b0c7
Ability rename + bugfix + changelog extend
2017-11-13 01:59:41 +01:00
AlexVinS
8b5cbf6ba7
fix
2017-11-01 07:42:58 +03: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
Piotr Wójcik
7171fa7ad4
Formatting
2017-10-28 11:04:55 +02: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
58b427345f
Constify
2017-10-18 21:39:04 +02:00
Piotr Wójcik
f9ed952869
Properly calculate experience on altar
2017-10-14 22:10:59 +02:00
Piotr Wójcik
f145b4be91
Correctly sacrifice many stacks or many atrifacts, fixes #2607
2017-10-14 21:30:56 +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
Dydzio
d2e9848443
Fix RANGED_RETALIATION bug
2017-09-04 23:35:48 +02:00
Dydzio
4cab76900f
Add SYNERGY_TARGET and [wip]-SHOOTS_ALL_ADJACENT
2017-09-04 23:32:24 +02:00
Henning Koehler
31ca4db8bd
fixed manual control for arrow towers
2017-09-05 00:30:43 +12:00
Henning Koehler
654ca96e9d
fixed code format and other minor issues
2017-08-30 19:19:54 +12:00
Henning Koehler
69a538a600
added bonus type MANUAL_CONTROL
2017-08-28 20:09:27 +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
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
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
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
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
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
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
Arseniy Shestakov
21074e13c3
macOS: always change working directory for launcher and server
...
This make relative paths work properly when launched from DMG or from different directory.
2017-08-09 01:33:12 +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
ArseniyShestakov
9d9c026c85
Code style: serialize everything on own lines for easier debugging ( #357 )
2017-07-31 16:35:42 +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
2da3d8a563
Code style: remove senseless comments
2017-07-18 00:04:00 +03:00
ArseniyShestakov
b52cfe5283
Code style: use parentheses for creating heap-based objects ( #344 )
2017-07-16 12:58:05 +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
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
Arseniy Shestakov
f1e5797834
Code style: move or add licensing information on top of every file
2017-07-14 01:26:03 +03:00
Arseniy Shestakov
dbcd79c48a
Code cleanup: remove double and unneded semicolons
2017-07-12 22:01:10 +03:00
AlexVinS
e677373241
tweak
2017-07-10 08:53:29 +03:00
AlexVinS
1fe01b7254
Moved defensive stance log message building to server side.
2017-07-10 04:05:36 +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
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
FeniksFire
ce09da783a
Fix taking double damage from the same moat.
...
When stack move to the double moat in the fortress, he will be damaged
twice. I fixed it like in original h3, now stack will be damaged once a
time.
2017-07-08 21:44:26 +02: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
FeniksFire
45a63e003c
Fix: getting additional damage from destination obstacles
...
When the stack was selected to pass through 2 field in moat, first hex
stopped him but then he got also additional damage from destination
obstacle.
2017-07-08 17:40:27 +02: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
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
ArseniyShestakov
5dfb7a5771
Merge pull request #317 from vcmi/attackerOwned
...
Refactored CStack::attackerOwned to CStack::side
2017-07-03 16:19:54 +03:00
AlexVinS
e4c14c4cc2
avoid assertions in stack position checks
2017-07-03 12:59:33 +03: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
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
ArseniyShestakov
bd27636cd9
Merge pull request #316 from FeniksFire/improvingTheBattle
...
Refactoring.
2017-06-28 19:55:03 +03:00
FeniksFire
4113bdab01
Moving some files from lib to the battle subdirectory.
2017-06-26 15:26:08 +02:00
Arseniy Shestakov
eeff7ee315
Few minor code improvements
...
* All command line options now case insensetive.
* SDL_VIDEO_X11_DGAMOUS unused in SDL2 so it's removed.
* Added current year into the --help output for client and server.
* Moved DO_NOT_START_SERVER into session settings.
2017-06-26 04:56:28 +03:00
AlexVinS
bb0f388f23
Cheat 'vcminahar' now give FREE_SHIP_BOARDING bonus
...
https://bugs.vcmi.eu/view.php?id=2092
2017-06-14 11:41:36 +03:00
AlexVinS
754d63f7a5
hack-fixed ENCHANTED trigger for first 2 rounds
2017-06-13 21:50:59 +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
AlexVinS
0190c9804e
formatting
2017-06-06 19:45:34 +03: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
a2284c3209
Automated testing: graceful shutdown for when game is ended
...
Before when CloseServer / LeaveGame applied there was no thread sync on server.
Now server use std::atomic bool for synchronization and graceful shutdown.
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
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
1d1519db5c
ENCHANTER_CASTING trigger tweak
2017-06-05 21:41:27 +03:00
AlexVinS
c82afe7156
switch CMapService API to ResourceID
2017-06-04 22:42:48 +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
c7e7a4d7be
Make usage of boost::interprocess optional
...
If shared memory allocation failed on client server will be started without shared memory option.
Only downside of this is that server wouldn't be able to fallback to random port if default is busy.
2017-06-02 02:44:41 +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
Arseniy Shestakov
9b867808a7
Multiplayer: threat disconnected player just like if he lost
...
Now even if player disconnected on it's own turn game will continue.
2017-05-31 08:04:31 +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
FeniksFire
039e3842fc
Aesthetic changes in BattleHex ( #303 )
2017-05-29 10:33:34 +03:00
AlexVinS
25d06c8d70
Fixed CID 1375686
2017-05-28 15:00:55 +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
AlexVinS
3c893a6bec
Few spell-related tweaks
2017-03-18 14:08:02 +03:00
AlexVinS
5da109ad30
tweaks
2017-03-18 13:25:12 +03:00
FeniksFire
3de891b4b4
Moving/dividing classes from BattleState to separate files.
2017-03-17 16:48:44 +01:00
Michał Janiszewski
f5ebc763b4
Add override
keyword where applicable
2017-02-17 14:39:16 +01:00
Dydzio
86fe44d9ac
Counterattack correction. Fixes bug #2501
...
Creatures should not be able to counterattack multiple times during one opponent attack under any circumstances.
2017-02-10 00:36:15 +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
dydzio
cffa616bf1
Refactor SOUL_STEAL bonus handler
2017-02-01 22:58:31 +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
dydzio
b5bfb763fd
Allow different subtypes of SOUL_STEAL work concurrently
2017-01-29 14:45:36 +01:00
dydzio
330c0961b7
Add missing code fix
2017-01-29 12:52:18 +01:00
dydzio
2f1f725ae6
Code improvements, minor fixes
2017-01-29 11:50:37 +01:00
dydzio
f447e44427
Add missing skill description, handler refactoring
2017-01-26 21:24:01 +01:00
dydzio
3e285c2004
Add santa gremlin missing creature ability, fix shooter init bug
2017-01-26 20:53:28 +01: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
80d5f7b4a4
Updated project files to MVS 2015 (in fact, it's trivial).
2016-12-12 19:14:45 +01:00
AlexVinS
204ee37ae4
boost/program_options has only 2 uses, and unlikely will be used more -> removed form Global.h.
2016-11-28 21:38:17 +03:00
AlexVinS
eeb21d2446
fixed regression
2016-11-28 05:19:44 +03:00
AlexVinS
2a62ca9522
Fixed CID 1197353
2016-11-28 02:50:43 +03:00
AlexVinS
60b1a9ac52
Fixed CID 1197370, CID 1197369, CID 1197371, CID 1197372, CID 1197374, CID 1288881, CID 1197376
2016-11-27 23:18:21 +03:00
AlexVinS
609c6f81bd
Fixed a few CWE-457
2016-11-27 22:37:41 +03:00
AlexVinS
abe4beebc6
Fixed CID 1197516
2016-11-27 19:13:40 +03:00
AlexVinS
4b2bbd0d76
Fixed CID 1288864
2016-11-26 22:06:12 +03:00
AlexVinS
7befacfb1e
Simplify CGameHandler::makeBattleAction
2016-11-26 20:50:05 +03:00
AlexVinS
86e33a4c45
[Refactoring] Unified SetResources NetPack API.
2016-11-26 15:14:43 +03:00
AlexVinS
0e57825679
Fixed CID 1197463
2016-11-25 21:17:24 +03:00
AlexVinS
e7a0bd690a
Fixed CID 1197453
2016-11-25 17:39:06 +03:00
AlexVinS
dc39fb2d14
Removed useless CPack::type field.
...
* it was an ancient network protocol artifact
2016-11-18 17:45:59 +03: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
Ivan Savenko
256f43f467
Fixes zero-initialized fileVersion member in deserializer
2016-10-29 19:52:19 +03:00
Vadim Markovtsev
24793e115c
Fix formatting
2016-10-29 13:45:08 +02:00
Vadim Markovtsev
dccc25268c
Fix the initial creature spells at battle start
...
Before: built-in spells appear on first move of the creature
After: all built-in spells appear before the first move but after tactics
Example: Air Shield for experienced skeletons
2016-10-28 23:37:45 +02: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
Arseniy Shestakov
15b4774076
Logging: always print version of client and server in the begining
2016-10-27 17:14:20 +03:00
Arseniy Shestakov
cb3d6a24e7
Cmake: cleanup for commit hash in build version
...
Since it's available in lib we don't need to include it everywhere.
2016-10-27 17:01:29 +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
6fe5f2a7f6
Fix segfault / assertion failure during battle
...
The cause of the assertion failure at BattleStackAttacked::applyGs "at"
was shooting and casting some spell in handleAttackBeforeCasting() and
eventually killing the whole stack. Fix: filter dead stacks in the end of
handleAttackBeforeCasting().
2016-10-12 19:11:12 +02:00
Vadim Markovtsev
76ac9991ed
Format code
2016-10-12 17:22:35 +02: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
AlexVinS
723734fd04
Fixed commander always dies.
2016-10-02 17:15:25 +03:00
Arseniy Shestakov
7b7958c548
Cheat codes: add option to apply cheats on different players
...
All suitable codes can now be used with "ai", "all" color or with object ID:
vcminahar all - will apply cheat to all heroes of all players
vcminahar ai - will apply cheat to all heroes of AI players
vcminahar blue - will apply it to all heroes of blue player
vcminahar 553 - will apply cheat to hero with instance id of 553 if it's exist
Cheats without options work as before.
2016-10-02 16:21:46 +03:00
AlexVinS
cd5c0b3297
Style tweaks.
2016-10-02 15:22:55 +03:00
AlexVinS
23b7a803b6
cleanup
2016-10-01 20:07:36 +03:00
AlexVinS
a1ff409080
Tweak
...
* handle BIND_EFFECT by bonus type
2016-10-01 08:04:39 +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
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
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
8f18dec5e3
Cleanup
2016-09-29 12:13:06 +03:00
AlexVinS
7874dffa7d
fixed http://bugs.vcmi.eu/view.php?id=2282
2016-09-24 10:06:24 +03:00
AlexVinS
62d272f3e5
Cleanup
2016-09-22 21:35:37 +03:00
AlexVinS
ea2e336f54
Merge branch 'develop' into SpellsRefactoring8
2016-09-22 16:40:32 +03:00
Arseniy Shestakov
58f90b736b
New cheat vcmiungoliant: hide all tiles that out of sight radius
2016-09-20 10:51:57 +03:00
Arseniy Shestakov
75cffa7d0b
CGameHandler::arrangeStacks: honour removableUnits of CGGarrison
...
Now server properly check allowed actions for CGGarrison. Fix issue 2303
Server now allow all stack arrangement as long as troops stay inside garrison.
It's possible to put more troops inside using swap/merge/split, but not take anything out if it.
2016-09-19 03:20:44 +03:00
AlexVinS
ef34d21941
Passive cast can be blocked by spell level limit.
2016-09-18 17:21:56 +03:00
AlexVinS
dcb0e8a0c1
Tweak
2016-09-18 13:39:02 +03:00
Arseniy Shestakov
1d45d214e5
CGameHandler refactoring: when possible only use const data
...
We only change gamestate via netpacks so there is absolutely no reason to use non-const pointers and functions in GH.
2016-09-18 11:53:51 +03:00
AlexVinS
d993710f8e
Merge branch 'develop' into SpellsRefactoring8
2016-09-17 20:29:44 +03:00
Arseniy Shestakov
7ae4e70134
CGameHandler: fix player id logging
2016-09-17 00:05:10 +03:00
Arseniy Shestakov
ea65fb15c2
CVCMIServer: do not crash if port not specified
2016-09-16 20:01:07 +03:00
AlexVinS
505e53c17d
Merge remote-tracking branch 'remotes/origin/develop' into SpellsRefactoring8
...
# Conflicts:
# client/battle/CBattleInterface.cpp
# lib/spells/BattleSpellMechanics.cpp
2016-09-12 10:13:40 +03:00
AlexVinS
33d1895d21
Merge branch 'develop' into SpellsRefactoring8
2016-09-11 18:34:18 +03:00
Arseniy Shestakov
fe6c0cf89b
Use RandomGeneratorUtil::randomShuffle for reproducible gameplay
2016-09-11 00:10:52 +03:00
Arseniy Shestakov
c8faca8f39
Refactoring: only use RNGs explicitly to avoid bug prone code in future
...
Now server-side code should always use CRandomGenerator::getDefault which is serialized in GH.
CGameState::getRandomGenerator should be only used from GS code and CPackForClient-based applyGs.
2016-09-11 00:10:46 +03:00
AlexVinS
f8767a6380
cleanup
2016-09-10 09:37:18 +03:00
Arseniy Shestakov
70abae9b51
CGameState::battleGetBattlefieldType: use RNG by ref
...
For now I not sure about proper place for battleGetBattlefieldType so I left it in GS
2016-09-09 23:16:43 +03:00
Arseniy Shestakov
ea63497b19
Move CGameState::setupBattle code to CGameHandler::setupBattle
...
No reason to keep this code in GS.
2016-09-09 23:16:43 +03:00
Arseniy Shestakov
53502e84e3
Add PrepareHeroLevelUp netpack to keep secondary skills RNG in sync
2016-09-09 23:16:43 +03:00
Arseniy Shestakov
ca819b3cda
CGHeroInstance::nextPrimarySkill: don't use GS RNG directly
...
Code used from both GS and CGameHandler.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
c8bcb14d34
CCallbackBase: add CRandomGenerator to all callbacks
...
This is easiest way to make server RNG available to CBattleInfoCallback.
Now server, client and gamestate have own RNG instance.
Only server and gamestate RNGs are serialized.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
85f49bc968
CGHeroInstance::initArmy: don't use GS RNG. Get RNG through a ref
...
This function used by both server-side and gamestate so it's must use appropriate random source.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
2ba3b20928
Multiple changes to RNG usage to both client and server
...
Server should never use RNG from CGameState directly.
Instead server get's own RNG that's state is secret for client.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
6747555339
CGameHandler: use ObjProperty enum instead of magic numbers
2016-09-09 17:42:16 +03:00
Arseniy Shestakov
d06d07a39b
Add ChangeFormation netpack to avoid MP desyncs
...
Previous code was working fine for single client, but would cause desync in multiplayer. Fix issue 2460.
2016-09-08 19:29:15 +03:00
AlexVinS
1ce4675df6
Tweaks
2016-09-06 13:33:11 +03:00
AlexVinS
686cd00c68
Cleanup.
2016-09-06 12:26:01 +03:00
AlexVinS
18fc94d709
WIP on SpellCastContext
2016-09-06 06:40:23 +03:00
AlexVinS
d4a35c6839
Simplify getAffectedStacks arguments. casterColor not needed anymore.
2016-08-30 12:14:08 +03:00
AlexVinS
85f94676a5
Server: convert logging
2016-08-30 01:13:07 +03:00
Alexander Shishkin
5e5ce0bb09
Merge pull request #203 from vcmi/logFormat
...
boost::format support for CLogger
2016-08-29 17:32:44 +04:00
Arseniy Shestakov
abad3cfb17
PlayerState::daysWithoutCastle: change in netpacks only. Fix issue 2462
...
Moving code from CGameHandler to NetPacksLib without changes.
2016-08-23 08:02:04 +03:00
AlexVinS
439aeecc8b
[c::b] re-enabled PCH, tested with GCC 5.3. (Older versions may not work)
2016-08-18 13:40:35 +03:00
Arseniy Shestakov
948cca02cc
Fixes to some crashes on exit and to have cleaner valgrind output
2016-08-18 06:52:10 +03:00
Arseniy Shestakov
39fe9472b6
CGameHandler::moveArtifact: check lock status by slot instead of id
...
This one fix issue 2455. We still need to do something with ArtifactID::ART_LOCK or ids for artifact from mods since they might conflict with each other.
2016-08-18 06:35:29 +03:00
AlexVinS
e7f2858d33
Use make_unique for TurnInfo in CGameHandler.
...
* Fixes use after free @CGameHandler.cpp:2093
2016-08-17 08:53:36 +03:00
Arseniy Shestakov
b0045fa357
Fix TurnInfo memory leaks
2016-08-16 15:47:21 +03:00
AlexVinS
36c44c2ce7
projects update
2016-08-13 16:57:11 +03:00
AlexVinS
72f79a3ad7
Draft boost::format based log proxy.
2016-08-13 16:57:09 +03:00
Arseniy Shestakov
2e70d29479
CGameHandler::applyBattleEffects: improve Fire Shield support
...
Now damage is limited to total health of defending stack and clone have no file shield damage. In same time damage calculation is likely remain incorrect.
2016-03-14 15:28:17 +03:00
Arseniy Shestakov
605962019b
CGameHandler::giveSpells: improve Conflux grail building support
...
Aurora Borealis give hero spells of all levels even if only first level of mages guild is built. Widsom requirement is still remain in place of course.
2016-03-13 13:26:00 +03:00
Arseniy Shestakov
bee0c6d705
CGameHandler::buildStructure: give spells after gs apply. Fix issue 2425
...
Hero will also immidiately get new spells when Library built in Tower or Grail in Conflux.
2016-03-13 11:31:09 +03:00
Arseniy Shestakov
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
AlexVinS
e3e27b9bfe
Move ghost creation to inner battle loop
2016-03-01 11:07:45 +03:00
AlexVinS
4bf9036c7b
Ensure that ghost stacks are created only by BattleStacksRemoved packet.
...
This will allow client to receive notification.
2016-03-01 05:24:35 +03:00
AlexVinS
2c48c95c8d
Fix casualties calculation for commander
2016-03-01 04:06:32 +03:00
AlexVinS
f890037008
Fixes
2016-02-29 04:42:15 +03:00
AlexVinS
5df8d1cbd0
Update low level battle stacks accessor for ghost selection support.
2016-02-28 05:10:20 +03:00
AlexVinS
9036d39241
Do not remove battle stacks, make them ghosts instead.
...
* exclude ghost stacks from (hopefully all) get* results for now
2016-02-28 01:08:56 +03:00
AlexVinS
5d5ad99436
Rename DEAD_CLONE -> GHOST, as this will be possible for any stack
2016-02-28 00:13:34 +03:00
Arseniy Shestakov
f8c6751707
CGameHandler::endBattle: change town ownership when hero lost siege
2016-02-22 03:35:38 +03:00
ArseniyShestakov
c550484613
Merge pull request #181 from vcmi/feature/drawbridgeMechanics
...
Feature/drawbridge mechanics
2016-02-14 16:32:24 +03:00
Arseniy Shestakov
c5cfc8467f
Battles: change naming from drawbridge to gate for everything
...
This way code is shorter and cleaner while in future we may support towns with gate only.
2016-02-13 17:40:31 +03:00
Arseniy Shestakov
11dc428b1e
Battles: move hexes enum to GameConstants and fix wall position
...
Before we had hex 62 marked as destructible wall while actually it's must be 78.
2016-02-09 17:38:59 +03:00
Arseniy Shestakov
01b4d0ae01
Battles: better handling for walking double-wide creatures
...
Request opening of gate even if only second half of double-wide stack going to stop on it.
2016-02-09 15:41:37 +03:00
Arseniy Shestakov
a07761b608
Battles: readable identifiers enum for drawbridge and gate hexes
...
Dont like to locate them in BattleHex, but it's best place I can see so far.
2016-02-09 12:25:13 +03:00
Arseniy Shestakov
731de439eb
Battles: drawbridge support for double-hex flying creatures
2016-02-09 11:59:20 +03:00
Arseniy Shestakov
28aff78f2c
Battles: implement drawbridge support for flying creatures
2016-02-09 11:30:09 +03:00
Arseniy Shestakov
fbb34b8d04
Battles: always update drawbridge state after battle state changed
...
Now gate tower destruction will immidiately affect drawbridge state.
2016-02-09 10:59:33 +03:00
Arseniy Shestakov
47433919ab
Battles: handle drawbridge lowering from stack start position
2016-02-09 10:45:59 +03:00
Arseniy Shestakov
015a57f81c
Battles: more advanced drawbridge mechanics on server-side
...
Everything work as intended except starting point not included in path.
So we send BattleDrawbridgeStateChanged package when already standing on bridge hex.
2016-02-08 12:16:47 +03:00
ArseniyShestakov
890ae43f55
Merge pull request #180 from Zyx-2000/FileInfo
...
Refactored CFileInfo & ResourceID
2016-02-08 04:55:39 +03:00
ArseniyShestakov
7f68124b97
Merge pull request #136 from vcmi/issue/1372-2
...
issue/1372
2016-01-31 20:28:54 +03:00
Vadim Markovtsev
3926920103
Rename radious -> radius
...
There is no such English word, "radious"
Some files get new lines in the end - BSD sed bug + best practices
2016-01-31 18:01:58 +03:00
Vadim Markovtsev
918fbd8530
Refactor hero's mana regain
2016-01-30 13:51:07 +03:00
Vadim Markovtsev
22fc4fd3e9
Fix 2406 reset potentially available heroes
2016-01-30 10:02:33 +03:00
AlexVinS
16e0d18880
Added special slots for war machines and arrow towers
2016-01-30 00:53:53 +03:00
Arseniy Shestakov
57328bdc83
Battles: implement basic drawbridge mechanics
...
Movement to blocking hex 94 not yet properly handled as stack movement code need to be rewritten first.
Also gate destruction not immidiately affect drawbridge state.
2016-01-29 22:43:35 +03:00
AlexVinS
ba017c443d
Start from diff of pull request #124 from vcmi/issue/1372
2016-01-29 21:05:17 +03:00
Zyx-2000
3a1a8e3d47
further refactoring-related changes
2016-01-29 15:16:14 +01:00
Zyx-2000
c3e8c8bc1c
Merge branch 'develop' into FileInfo
2016-01-27 19:21:43 +01:00
AlexVinS
d7c0c3759a
Merge branch 'Zyx-develop' into develop
...
Conflicts:
lib/filesystem/AdapterLoaders.h
2016-01-27 18:53:41 +03:00
Vadim Markovtsev
36eaa399e7
Add hardcodedFeature to switch winner's retreating with no troops
2016-01-27 16:42:17 +03:00
AlexVinS
bffdc2813d
revert some project changes
2016-01-27 15:21:29 +03:00
ArseniyShestakov
4483c45905
Merge pull request #167 from vmarkovtsev/issue/1569
...
Fix 1569 winning hero with no troops shall retreat
2016-01-27 11:48:22 +03:00
Vadim Markovtsev
7772b6de74
Fix 981 reset hero on hiring after retreat/surrender
2016-01-26 22:48:31 +03:00
Zyx-2000
70e3c81b9f
Replaced CFileInfo with more correct and efficient alternative
2016-01-26 14:51:38 +01:00
Vadim Markovtsev
6849ff846c
Fix memory corruption with a draw; race in setBattleResult()
2016-01-25 15:55:32 +03:00
Vadim Markovtsev
afa95312ba
Fix 2139 captured spell scroll descriptions
2016-01-25 08:49:26 +03:00
Vadim Markovtsev
7185890723
Fix double free in battleAfterLevelUp() in case of a draw
2016-01-24 01:31:39 +03:00
ArseniyShestakov
b19e082f37
Merge pull request #166 from vmarkovtsev/issue/1723
...
Fix 1723 quest crash on combined arts
2016-01-23 23:23:07 +03:00
Vadim Markovtsev
2a6a8cd433
Fix segfault when non-hero forces win
2016-01-23 19:42:56 +03:00
Vadim Markovtsev
9ffd0155e6
Fix 1810 suggest artifact assembly
2016-01-23 16:24:43 +03:00
Vadim Markovtsev
99992599db
Partially fix 1416 tavern hero rotation
2016-01-22 22:37:46 +03:00
Vadim Markovtsev
9dfef2186d
Fix 1569 winning hero with no troops shall retreat
2016-01-22 22:29:53 +03:00
Vadim Markovtsev
11bce2908d
Fix 1723 quest crash on combined arts
2016-01-22 12:56:25 +03:00
Arseniy Shestakov
d25372a397
Added vcmiglaurung cheat that add 5000 crystal dragons into each slot
2016-01-21 10:49:09 +03:00
Zyx-2000
a50a702073
switched to -std=gnu++11
2016-01-18 17:49:07 +01:00
Vadim Markovtsev
4a05402c2f
Revert 5cd4e852d4
"Use portable cast in CTeleportDialogQuery also"
...
Actually, this leads to crash on MacOSX, I specially left that intact.
2016-01-18 10:45:09 +03:00
Zyx-2000
203b2dccc3
hopefully fixed things
2016-01-09 21:23:55 +01:00
Arseniy Shestakov
9fd1cff090
Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
...
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.
This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
Arseniy Shestakov
29a7934a99
Refactoring: avoid using namespace when it's not absolutely needed
2015-12-29 02:14:08 +03:00
Arseniy Shestakov
6985e96f0d
CGameHandler::newTurn: use next day TurnInfo to set correct hero MP
...
This hotfix actually fix issue 2083, but in future we need to rework new turn code anyway. See issue 2356.
2015-12-25 11:09:06 +03:00
Arseniy Shestakov
6f5c52a229
Refactoring: use cleaner CCreatureSet::stacksCount everywhere
2015-12-24 21:30:57 +03:00
Ivan Savenko
a051a08a46
Merge remote-tracking branch 'origin/issue/2306' into develop
2015-12-18 22:21:11 +02:00
ArseniyShestakov
bf9ac7318a
CPathfinder: change cost calculation sequence for embark / disembark
...
With old embark cost calculation pathfinder may end up thinking that hero can embark/disembark while have less movement points than base movement cost is. Now hero would be only able to embark / disembark if we have enough movement points to step on that tile. This rule is also valid for situation when hero have Admiral's Hat as in H3 even if hero don't have embark penalty he still use move points for embark and disembark.
Problem was found as it's was causing infitite loop in AI. Server of course rejected attempt to embark with less than 100 movement points while pathfinder tell AI that it's can still embark with 93 movement points.
2015-12-15 20:08:52 +03:00
AlexVinS
5cd4e852d4
Use portable cast in CTeleportDialogQuery also
2015-12-13 15:59:48 +03:00
AlexVinS
9a0161e4e2
Fix and unify CBattleQuery::blocksPack
2015-12-13 15:57:33 +03:00
ArseniyShestakov
5aadc1ed6f
CasualtiesAfterBattle: dont remove catapult artifact. Fix 2346 issue
2015-12-10 13:31:03 +03:00
ArseniyShestakov
d900e9bec2
CGameHandler: fix hero removal code on player loss. Fix issue 2347
2015-12-10 12:43:55 +03:00
ArseniyShestakov
03e9dd3bab
Add hero gold cost to GameConstants
2015-12-07 00:13:58 +03:00
AlexVinS
0fab319c73
Merge remote-tracking branch 'remotes/origin/develop' into issue/2306
...
s reverts commit fa8a282696
.
Conflicts:
AI/VCAI/VCAI.cpp
Conflicts:
AI/VCAI/VCAI.cpp
client/windows/CAdvmapInterface.cpp
lib/CPathfinder.cpp
lib/CPathfinder.h
2015-12-05 12:56:12 +03:00
ArseniyShestakov
0a5e9c0fbe
Merge pull request #144 from vcmi/fix/teleportMultiExitPoints
...
Support for exit selection between multiple teleport exit points
2015-12-05 03:12:17 +03:00
Ivan Savenko
faa7cbff18
Fixed gcc/clang warnings
2015-12-04 01:17:43 +02:00
ArseniyShestakov
2f9ca778b2
VCAI: add channel probing support for teleporters with multiple exits
2015-12-03 17:20:03 +03:00
Ivan Savenko
7189a12df2
removed few more includes from headers
2015-12-02 22:10:46 +02:00
Ivan Savenko
7b5a7f43ad
Removed includes of CGameState from headers
2015-12-02 21:39:53 +02:00
Ivan Savenko
c3ce4b25df
Removed all #include's of CMap.h from headers.
...
To all - please, avoid #include's in headers as much as possible
This kills incremental build compile times
2015-12-02 21:05:10 +02:00
ArseniyShestakov
f55bfe41d6
Digging: implement digging status on right click. Fix issue 401
...
This is also fix possibility to dig on some non-blockable objects like event.
2015-11-29 12:34:23 +03:00
ArseniyShestakov
a1fe2ebc44
Pathfinding: restore gamestate usage to avoid overhead
...
Also when possible pass TerrainTile pointers to getMovementCost instead of using getTile.
2015-11-21 14:31:30 +03:00
ArseniyShestakov
abc4ea272f
TurnInfo: store all bonuses and use TileInfo for everything
...
Currently this going to break ONE_WEEK bonuses because those don't work with CWillLastDays selector.
2015-11-12 14:30:29 +03:00
ArseniyShestakov
2ef9d7c3ec
Rename getCost back to getMovementCost
...
Initially wanter to name main class differently and back then getCost make sense.
Then renamed class to CPathfinderHelper, but forgot to rename function back.
2015-11-10 02:30:05 +03:00
ArseniyShestakov
b2e1ee5363
CGameState: move two pathfinding-related functions to CPathfinderHelper
...
Both getMovementCost and getNeighbours have nothing to do with gamestate.
2015-11-10 02:15:27 +03:00
ArseniyShestakov
d3c8ca7c1c
Pathfinding: implement duration checking for fly and water walking
...
Now pathfinder take into account different bonuses for different tuns. So if you only have FLYING_MOVEMENT bonus from Fly spell for one turn then pathfinder will only let you use air layer within one turn only.
That work for cost calculations too. Let's say you have two bonuses:
- FLYING_MOVEMENT with 20% penalty for next 2 turns
- FLYING_MOVEMENT with 40% penalty for 5 turns
Now pathfinder using correct penalty for each turn so movements in air layer going to be more expensive on 3-5 turns.
2015-11-09 19:57:26 +03:00
ArseniyShestakov
5106738160
Merge branch 'develop' into feature/pathfinderLayers
2015-11-09 19:20:13 +03:00
ArseniyShestakov
74198a537b
CGameHandler::setOwner: fix InfoWindow text on last town loss
2015-11-09 00:54:59 +03:00
AlexVinS
e645b46aed
Revert "Merge pull request #124 from vcmi/issue/1372"
...
This reverts commit da01af319b
, reversing
changes made to 8b6b4e2e0b
.
2015-11-07 11:35:02 +03:00
ArseniyShestakov
bd12989ad6
Artifacts: use ArtifactID instead of ints
2015-11-06 21:54:51 +03:00
ArseniyShestakov
62dc070c0a
moveHero: add transit validation and avoid embarking on transit
...
Hero shouldn't embark into boat when attempt to transit over air layer.
2015-11-05 10:50:47 +03:00
ArseniyShestakov
ac12a0735e
Plumbing on client and server to make flying actually work
2015-11-05 10:02:13 +03:00
AlexVinS
6a9dc78dcd
[WiP]Added some checks for RISE_DEMONS action.
2015-11-03 02:18:36 +03:00
AlexVinS
fbebbf39f3
Fix zero size stack summoned in case of basic resurrection.
2015-11-03 02:18:35 +03:00
AlexVinS
f6b9015324
Use constant for summoned creature slot
2015-11-03 02:18:34 +03:00
AlexVinS
c94bea51e3
Update army in case of summoned creatures
2015-11-03 02:18:33 +03:00
AlexVinS
b024237e8a
Remove stack instancies of removed stacks
2015-11-03 02:18:32 +03:00
AlexVinS
d46364c4c3
Merge branch 'develop' into issue/2306
...
Need to reapply changes to pathfiner
Conflicts:
AI/VCAI/VCAI.cpp
lib/CGameState.cpp
lib/CGameStateFwd.h
2015-11-01 01:49:57 +03:00
Vadim Markovtsev
5c623868bf
Fix invalid dynamic_cast replacement
2015-10-31 23:01:22 +03:00
Vadim Markovtsev
fa8a282696
Fix pthread_mutex_lock abort() in requestActionASAP impl
2015-10-31 18:04:06 +03:00
DjWarmonger
17071c6ec8
Merge pull request #125 from ArseniyShestakov/newMovementSystem
...
Okay, time to merge this.
2015-10-31 13:56:22 +01:00
Vadim Markovtsev
68cc860133
Fix dynamic_cast on MacOSX in CQuery.cpp
2015-10-31 15:05:52 +03:00
ArseniyShestakov
a0a55974ea
Fix issue 2320. Town events for buildings should now work
2015-10-28 08:46:43 +03:00
DjWarmonger
c47c08aa01
Replaced iterators with auto & loop.
2015-10-25 07:07:01 +01:00
DjWarmonger
eb0af0096e
Fixed #2072 .
2015-10-24 18:16:57 +02:00
DjWarmonger
61692ba168
Possibly fixed #1583 and other issues concerning players capturing towns.
2015-10-24 18:03:00 +02:00
DjWarmonger
3c4f7ec126
Fixed #2311
2015-10-24 17:15:21 +02:00
DjWarmonger
641aa13526
Some fixes for previous commit.
2015-10-24 17:02:00 +02:00
DjWarmonger
716c324695
Don't give a turn to player who is about to lose (days without town).
2015-10-24 16:21:30 +02:00
DjWarmonger
abe88ea890
- Refactoring legacy code
...
- Some checks for #2311
2015-10-24 15:09:46 +02:00
ArseniyShestakov
fc6f62e633
getMovementCost: get rid of useless flying parameter
2015-10-19 07:27:00 +03:00
ArseniyShestakov
0d83f6fedd
Fix issue 1877. Allow to buy heroes in ally towns
...
Also removed TODO because check already implemented in CGameHandler::hireHero
2015-10-15 04:00:21 +03:00
Alexander Shishkin
fca4deaad2
Merge pull request #122 from vmarkovtsev/feature/warnings
...
Fix warnings produced by recent Clang build
2015-10-14 07:28:47 +03:00
Vadim Markovtsev
e4b1ef1405
Add "override" to virtual overriden methods
2015-10-13 21:05:36 +03:00
AlexVinS
b94432b4ba
Fixed http://bugs.vcmi.eu/view.php?id=2297
...
* allow banned spells by Tomes (XXX_SPELLS bonus), Spelbinders Hat (SPELLS_OF_LEVEL bonus)
* allow banned spells by cheat-code (now also SPELLS_OF_LEVEL bonus)
2015-10-13 13:16:46 +03:00
AlexVinS
f99bf099ca
Made player interface tolerant to active stack removal.
2015-10-06 03:46:35 +03:00
AlexVinS
d042b08682
Fix the SACRIFICE fix regression
...
(crach if stack die on counter attack)
2015-10-06 02:04:25 +03:00
AlexVinS
d1ec538d72
Fix server crash releated to active stack remove.
2015-10-05 21:09:00 +03:00
AlexVinS
57e5b768e8
Allow multiple destinations in BattleSpellCastParameters
2015-09-30 00:31:50 +03:00
AlexVinS
70d9be8447
Use ISpellCaster in battle callback
2015-09-29 17:26:52 +03:00
AlexVinS
36e154d9b9
Use ISpellCaster in getAffectedStacks
2015-09-29 17:26:50 +03:00
AlexVinS
a4d4851d80
Fix typo: casted->cast
2015-09-29 17:26:48 +03:00
AlexVinS
660203b436
Tweak BattleSpellCastParameters
2015-09-29 17:26:41 +03:00
AlexVinS
2b434111bf
More hero|creature casting unification
2015-09-29 17:26:40 +03:00
AlexVinS
e454649886
Use BattleSpellCastParameters for spell parameters override
2015-09-29 17:26:39 +03:00
AlexVinS
10318a3da3
Intoduce PASSIVE_CASTING mode for opening battle spells
...
* now at least one "caster" object is present
2015-09-29 17:26:39 +03:00
AlexVinS
6010bbe7ba
More correct usage of battleGetFightingHero
...
* this should fix "FIXME: battleGetFightingHero wrong argument!"
2015-09-29 17:26:38 +03:00
AlexVinS
873979a300
The only usage of secHero cast parameter is mana channeling - better to get it OTF
2015-09-29 17:26:33 +03:00
AlexVinS
46f99db8d7
Hide some spell mechnaics details
2015-09-29 17:26:32 +03:00