Laserlicht
9b2908d464
Apply suggestions from code review
...
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-01-22 20:19:49 +01:00
Laserlicht
0a4b5dbe10
code review
2024-01-21 18:12:46 +01:00
Ivan Savenko
fc4ae3bd8c
Merge remote-tracking branch 'vcmi/develop' into lobby
2024-01-20 23:01:49 +02:00
Ivan Savenko
0c07384293
Refactoring of serialization versioning handling
...
- Removed 'version' field from serialize() method
- Handler classes - Binary(De)Serializer now have 'version' field
- Serialization versioning now uses named enum
Save compatibility with 1.4.X saves should be intact
2024-01-20 20:34:51 +02:00
Laserlicht
883ea23495
moved to gameconfig
2024-01-20 17:54:15 +01:00
Laserlicht
4813179abb
Invite hero setting
2024-01-20 01:24:34 +01:00
Laserlicht
346beea49c
invite hero backend
2024-01-20 01:09:55 +01:00
Ivan Savenko
0a1153e1c6
Switch client-server communication to new API
2024-01-19 23:49:59 +02:00
Ivan Savenko
d04241b10a
Code cleanup
2024-01-19 23:02:00 +02:00
Ivan Savenko
d5c4478816
Remove most of non-const access to VLC entities
2024-01-19 13:54:49 +02:00
Ivan Savenko
bd5682ecc3
Merge remote-tracking branch 'vcmi/master' into develop
2024-01-19 13:49:54 +02:00
Alexander Wilms
cca08e29da
Remove duplicate semicolons
2024-01-16 19:02:39 +00:00
Ivan Savenko
c21913f661
Fixed initialization of move points and mana for dismissed heroes
2024-01-15 23:16:48 +02:00
Ivan Savenko
b4a1a755a4
Merge pull request #3498 from IvanSavenko/simturns_pathfinder
...
[1.4.3] Fixes for simultaneous turns
2024-01-15 12:00:54 +02:00
Ivan Savenko
45a3d04d25
Fix simturns termination check
2024-01-13 23:23:36 +02:00
Ivan Savenko
8303ce5d13
Added option to ignore guards in pathfinder
...
Used for simturns contact detection, by default disabled for player
pathfinding
2024-01-13 19:44:37 +02:00
Laserlicht
4e69853ca8
vcmiobelisk bugfix
2024-01-13 16:05:12 +01:00
Ivan Savenko
edb2ecd751
Fix possible overflow errors on leveling up beyond int64_t limit
...
- added separate giveExperience method instead of weird changePrimSkill
- experience is now always used in form of int64_t
- max supported level reduced from 201 to 197 to fit into int64_t
- fixed undefined behavior in experience calculation
2024-01-04 23:57:36 +02:00
Laserlicht
cb9c4bbaf0
unlimited replay option
2023-12-28 20:48:19 +01:00
Laserlicht
fc4827c89c
option for allowing cheats
2023-12-27 14:39:35 +01:00
Ivan Savenko
a001f4e407
Fix crash on reveal puzzle cheat
2023-12-24 19:29:33 +02:00
Ivan Savenko
cd526a5e15
Send notifications when simultaneous turns end
2023-12-23 18:11:25 +02:00
Ivan Savenko
acc09ee51a
Merge pull request #3266 from Laserlicht/puzzle_cheat
...
implement missing OH3/HDmod cheats
2023-12-17 22:16:22 +02:00
Ivan Savenko
a3adfcf7a7
Do not attempt to start a new turn on game end
2023-12-13 16:53:02 +02:00
Laserlicht
22a6eff28f
add alias
2023-12-09 15:07:27 +01:00
Laserlicht
a24e78a210
real unlimited movement (like in OH3)
2023-12-09 13:42:09 +01:00
Laserlicht
584bb32f53
add nwctheone
2023-12-09 00:44:53 +01:00
Laserlicht
d58c99b47d
flag all team members as cheaters
2023-12-08 20:13:32 +01:00
Laserlicht
1cfbe66460
fix crash if no hero is selected
2023-12-08 19:37:34 +01:00
Laserlicht
4bad88f141
implement luck and morale cheats from OH3
2023-12-08 19:20:53 +01:00
Laserlicht
13673335a0
puzzle map cheat
2023-12-08 17:30:23 +01:00
Ivan Savenko
80b82cc026
Remove invalid assert - may trigger on human player defeat
2023-12-03 15:58:23 +02:00
Ivan Savenko
e9ac8c67c1
Reworked and fixed selection of secondary skills:
...
- Fixed off-by-one error when checking for obligatory skills
- If both wisdom and magic school must be offered in the same slot, magic
school will be correctly offered on next levelup
- Obligatory skill can now be proposed for upgrade
- Obligatory skills are now offered using hero class weight instead of
simple random
- If hero has multiple skills not available to his class game will
select random skill instead of first one
- Moved storage of random seed to server instead of mutable member
2023-11-20 18:46:24 +02:00
Ivan Savenko
18c0217679
Relaxed ordering requirements - player can start turn even if players
...
before him are waiting to act. E.g. green can start turn even if blue
and red are in contact and blue is yet to start his turn
2023-11-09 00:08:13 +02:00
Ivan Savenko
6b81012f31
Use variant identifier in netpacks where applicable
2023-11-08 14:00:23 +02:00
Ivan Savenko
8346d71c98
Remove more subID access
2023-11-01 14:44:05 +02:00
Ivan Savenko
b88a8da4e8
Split off some netpack structures into separate files
2023-10-23 13:59:15 +03:00
Ivan Savenko
ac925bb786
Renamed new types for consistency with code style
2023-10-22 16:55:19 +03:00
Ivan Savenko
80e6485965
MetaIdentifier now uses std::variant internally
2023-10-22 16:55:19 +03:00
Ivan Savenko
b394158dc9
Bonus Source ID now uses metaidentifier
2023-10-22 16:55:18 +03:00
Ivan Savenko
77facf9387
Implement missing functions, fixes linking errors
2023-10-22 16:54:56 +03:00
Ivan Savenko
910ad50417
Fix client & server compilation
2023-10-22 16:54:48 +03:00
Ivan Savenko
dd841bdaa7
Use enum instead of mix of bool's and int's for tile reveal
2023-10-16 00:12:38 +03:00
Ivan Savenko
98fd939ed6
Cartographer/Observatory is now configurable object
2023-10-16 00:12:38 +03:00
nordsoft
d7d435dcb7
Add game pause
2023-10-08 16:03:57 +02:00
Ivan Savenko
037efdf5fc
Improvements to type safety of Identifier class
...
- Constructor of Identifier from integer is now explicit
- Lobby hero/town selection now uses Identifiers instead of int's
- Removed serialization workaround for hero portraits
- Added dummy objects for custom heroes portraits for ID resolver to use
- HeroInstance now stores portrait ID only in case of custom portrait
- Fixed loading of campaign heroes portraits on RoE maps
2023-10-04 18:05:23 +03:00
Ivan Savenko
71a1ed816a
Merge pull request #2892 from Laserlicht/highscore_menu
...
Highscore Menu & end video
2023-09-27 15:48:47 +03:00
Ivan Savenko
0a0c01d639
Replaced 'isVisitActiveFor' methods with single 'getVisitingHero'
2023-09-26 15:55:07 +03:00
Ivan Savenko
5b21a5ffbc
Simturn duration is now part of StartInfo
2023-09-26 13:42:20 +03:00
Ivan Savenko
a9dbd08dec
Compute player contacts only once on turn start
2023-09-26 13:42:20 +03:00
Ivan Savenko
623fb2a63e
Do not allow visiting objects blocked by visit of another player
2023-09-26 13:42:20 +03:00
Ivan Savenko
b807c3855b
Add proper visitation checks for netpacks
2023-09-26 13:42:20 +03:00
Ivan Savenko
541f7590c5
Add simple detection of player-player contact
2023-09-26 13:42:20 +03:00
Ivan Savenko
64c43c91dc
Added hardcoded min/max simturns duration
2023-09-26 13:42:20 +03:00
Ivan Savenko
b2f30f78fa
Allow one AI and human to act simultaneously
2023-09-26 13:42:20 +03:00
Laserlicht
02c82cb35b
order
2023-09-26 12:01:16 +02:00
Laserlicht
c3373ea34c
code review
2023-09-25 18:06:40 +02:00
Laserlicht
c49d38b855
cheats + grail in town
2023-09-23 21:37:40 +02:00
Ivan Savenko
8c0d78f1d9
Added initiator-player to packs that add/remove/move objects
2023-09-19 19:24:34 +03:00
Ivan Savenko
219f81d28b
Added explicit "PlayerEndsTurn" netpack
...
- PlayerEndsTurn pack is now sent when player ends turn
- YourTurn pack has been renamed to PlayerStartsTurn for consistency
- PlayerStartsTurn will no longer replace list of acting players
- PlayerEndsGame and PlayerEndsTurn will remove player from acting list
2023-09-18 20:55:01 +03:00
Ivan Savenko
86a7f5f5cd
Removed getStr(bool), replaced with similar toString()
2023-09-04 22:21:02 +03:00
nordsoft
98f7ed9dfd
Implement player start turn query
2023-08-28 18:56:36 +04:00
Nordsoft91
1586c6c6a0
Merge pull request #2668 from IvanSavenko/remove_current_player
...
Remove "currentPlayer" from gamestate
2023-08-28 17:10:28 +04:00
Ivan Savenko
ce20d913e0
Fix checking PlayerColor's for validness
2023-08-27 01:35:38 +03:00
Ivan Savenko
edd029c79c
Replace "currentPlayer" from gamestate with "activePlayers"
...
- Allows multiple active players at once, e.g. simturns
- Cleared up validation of netpacks by server, e.g. always check for
pack sender
2023-08-25 18:56:15 +03:00
Ivan Savenko
940bdcee3e
Fixes according to review
2023-08-24 23:34:33 +03:00
Ivan Savenko
f9410145d6
Fix handling of "7 days without town" loss condition
2023-08-24 23:34:33 +03:00
Ivan Savenko
ee8adbe85f
Update tavern on end of 7th turn of player in question
...
Allows removal of "retreat after 7th day" workaround and as result -
more straightforward code
2023-08-24 23:34:33 +03:00
Ivan Savenko
a19cdb57ba
Fix handling of turn order in case of player defeat
2023-08-24 23:34:33 +03:00
Ivan Savenko
d83aa828f6
Fix turn ending
2023-08-24 23:34:33 +03:00
Ivan Savenko
c4bc6840ea
Moved management of turn order into a new class
2023-08-24 23:34:33 +03:00
Ivan Savenko
67eaef3520
Fixed few more discovered regressions
2023-08-21 17:55:49 +03:00
Ivan Savenko
323772fc2e
Split CQuery file into multiple files
2023-08-21 17:55:07 +03:00
Ivan Savenko
629ca3f13e
Created directory structure for server files
2023-08-21 17:55:07 +03:00