Ivan Savenko
35ee8c1397
Only apply normal mana regen for retreated heroes in taverns (h3 logic)
2023-11-12 19:30:33 +02:00
Ivan Savenko
bbd3312705
Fix randomization of heroes in campaigns
2023-11-12 19:18:17 +02:00
Andrii Danylchenko
142d0083d5
#3173 - fix trap crash on random hero
2023-11-12 16:14:06 +02:00
Ivan Savenko
5c810df36f
Reorganized types registration code
2023-11-11 00:39:08 +02:00
Ivan Savenko
4a7fa9bf8c
Simplified CTypeList class
2023-11-08 22:05:36 +02:00
Ivan Savenko
ed66fc2fb3
Minor optimization of map startup time
2023-11-08 21:27:05 +02:00
Ivan Savenko
0691dfef3b
Moved stateful artifact randomization logic to gamestate from handler
2023-11-08 21:27:05 +02:00
Ivan Savenko
2cc8b5baeb
Fix map startup
2023-11-08 21:27:05 +02:00
Ivan Savenko
5487f07d3b
added toEntity overload that accepts generic Services class
2023-11-04 17:04:53 +02:00
Ivan Savenko
04aeea9b68
use toEnum instead of getNum for switch'es
2023-11-03 19:20:25 +02:00
Ivan Savenko
184f5a72cc
Use toEntity/toXXX methods in Identifier instead VLC objects access
2023-11-03 16:03:29 +02:00
Ivan Savenko
8d5fa41a19
Minor fixes
2023-11-03 16:03:29 +02:00
Ivan Savenko
885dce0c27
Replace static_cast's of Identifiers with getNum call
2023-11-03 16:03:29 +02:00
Ivan Savenko
2b9c362d5b
Explicitly convert identifier to underlying enumeration
2023-11-03 16:03:29 +02:00
Ivan Savenko
b42f073f0c
Stabilization
2023-11-01 18:26:57 +02:00
Ivan Savenko
8346d71c98
Remove more subID access
2023-11-01 14:44:05 +02:00
Ivan Savenko
5cdbf408c7
Slightly simplified heroes initialization
2023-11-01 14:43:20 +02:00
Ivan Savenko
461c481ef3
Fix game startup
2023-11-01 14:43:20 +02:00
Ivan Savenko
cc30bdda04
Remove few more subID usages
2023-11-01 14:43:20 +02:00
Ivan Savenko
7a09646009
Cleaned up dwelling randomization
2023-11-01 14:43:20 +02:00
Ivan Savenko
dcb8f4fc7b
Moved object type randomization to object class
2023-11-01 14:43:20 +02:00
Ivan Savenko
03e1169781
Reduced number of accesses to CGObjectInstance::subID
2023-11-01 14:43:20 +02:00
Ivan Savenko
7107b3202f
Merge pull request #3069 from SoundSSGood/artifact-location-id
...
ArtifactLocation now use ID for artHolder identification
2023-11-01 14:41:36 +02:00
Andrii Danylchenko
caffc8f3cd
Merge pull request #3122 from vcmi/fix-2993
...
#2993 - destruct battle info first when destructing CGameState
2023-10-31 21:43:55 +02:00
Andrii Danylchenko
25b64dd08b
Update lib/gameState/CGameState.cpp
...
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2023-10-31 21:43:06 +02:00
SoundSSGood
ab2f6abb87
ArtifactLocation now use ID for artHolder identification part2
2023-10-29 17:46:13 +02:00
Andrii Danylchenko
4d6d64837f
#2993 - destruct battle info first when destruction CGameState
2023-10-29 09:41:22 +02:00
Alexander Wilms
f01ec55d21
Use the "nullptr" literal.
...
"nullptr" should be used to denote the null pointer
2023-10-27 18:18:59 +00:00
nordsoft
b6b75beb29
Fixes for map editor
...
1) fix owner serialization for hero placeholder
2) fix roads/rivers layout
3) fix lasso
2023-10-24 23:58:26 +02:00
Ivan Savenko
3880ea58b9
Merge branch 'josch/dos2unix' into develop
2023-10-22 18:39:03 +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
0a10fc30b8
(lib) Bonus subtype is now stored as metaidentifier that can store any
...
other identifier inside it
2023-10-22 16:54:43 +03:00
Ivan Savenko
454ba44ac5
Merge pull request #2988 from IvanSavenko/configurable_extensions
...
Extension of configurable object functionality
2023-10-22 16:24:47 +03:00
Laserlicht
0eba0ee686
show random maps
2023-10-21 02:12:34 +02:00
Johannes Schauer Marin Rodrigues
a1a5bc28c2
convert line endings from CRLF (Windows) to LF (Linux/Unix)
...
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.
This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.
Files that are Windows specific like *.vcxproj and *.props files were
not converted.
Closes : #3073
2023-10-19 16:23:21 +02: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
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
nordsoft
0c94a4d891
Town name switched to id
2023-09-27 23:57:05 +02:00
nordsoft
5b24fe289b
Assembling difficulty json instead of overriding
2023-09-22 14:46:43 +02:00
nordsoft
099109b7d2
Minor fixes
2023-09-22 00:52:19 +02:00
nordsoft
cb3bbc6680
Restructured difficulty config
2023-09-20 16:12:26 +02:00
nordsoft
0de912e67b
Add basic system to add more advantages for ai player
2023-09-20 03:50:35 +02:00
Ivan Savenko
f8541d0ae4
Merge branch 'vcmi/master' into 'vcmi/develop'
2023-09-15 13:59:02 +03:00
Ivan Savenko
9ae7f53d66
Merge pull request #2791 from Nordsoft91/fix-2790
...
Fix for random dwellings
2023-09-12 12:38:55 +03:00
nordsoft
cc3864a0fa
Fix for random dwellings
2023-09-09 21:17:21 +02:00
nordsoft
f6e3c6a487
Fix
2023-09-09 14:27:51 +02:00
Ivan Savenko
ef0eb8e930
Merge pull request #2772 from wb180/tavernPoolHeroesFix
...
Remove(reduce durations) of bonuses for tavern heroes
2023-09-07 10:54:44 +03:00
Ivan Savenko
f39fbe5151
Merge pull request #2757 from IvanSavenko/filesystem_refactor
...
Filesystem refactor - part 1
2023-09-07 10:51:02 +03:00
Ivan Savenko
fc4dfda00f
Added support for concurrent battles to gamestate and server
2023-09-06 16:03:02 +03:00
Evgeniy Meshcheryakov
47f5dd14fa
Remove(reduce durations) of bonuses for tavern heroes
2023-09-06 09:12:23 +03:00
Ivan Savenko
86a7f5f5cd
Removed getStr(bool), replaced with similar toString()
2023-09-04 22:21:02 +03:00
Ivan Savenko
a30e7ba321
Remove bitmasks of PlayerColor's. Add encode/decode methods
2023-09-04 18:56:16 +03:00
Ivan Savenko
6f0108e462
Use ResourcePath for referencing texts and json's
2023-09-04 18:22:34 +03:00
Ivan Savenko
823ffa7a07
Always use ResourcePath for referencing images and animations
2023-09-04 18:22:34 +03: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
e54287ea5d
Converted remaining identifier to new system
2023-08-25 13:38:02 +03:00
Ivan Savenko
0240ee886d
Converted (almost) all namespace enum's to enum classes
2023-08-25 13:38:02 +03:00
Ivan Savenko
62cd8b12d4
Converted several namespace enums to enum class
2023-08-25 13:38:02 +03:00
Ivan Savenko
17d3d663ee
Converted creature ID and spell ID to new form
2023-08-25 13:38:02 +03:00
Ivan Savenko
ec8d31bbfc
First step at unifying game identifiers code
2023-08-25 13:38:01 +03:00
Ivan Savenko
b0eec85aca
Merge pull request #2632 from rilian-la-te/resist-rework-pt1
...
Spell resistance rework: part 1
2023-08-25 01:13:57 +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
Konstantin
344593e891
vcmi: made some CSpell properties private
...
There are getters for it.
2023-08-23 17:53:08 +03:00
nordsoft
dfaf778d16
Redesign loading solution
2023-08-22 20:10:20 +04:00
nordsoft
45f13c7964
Progress update on client side
2023-08-21 19:21:27 +04:00
nordsoft
584dd20943
Progress on server side for rmg
2023-08-21 19:21:22 +04:00
Ivan Savenko
537f9fa048
Merged master into develop
2023-08-03 23:38:32 +03:00
DjWarmonger
ca0eacc283
Merge pull request #2458 from vcmi/fix_water_tavern
...
Fix crash at water tavern
2023-08-02 20:03:02 +02:00
Tomasz Zieliński
f6247164ad
Fix crash, fix invisible boat blocking the tile
2023-08-01 18:51:33 +02:00
Ivan Savenko
8a81b3013f
Fixed transferring of artifacts from backpack in campaigns
2023-07-31 22:06:54 +03:00
Ivan Savenko
62fddca21e
Split massive CModHandler class/file into multiple parts:
...
- IdentifierStorage is now a separate handler in VLC
- Renamed ModHandler::Incompatibility exception to ModIncompatibility
- Extracted ModScope namespace from ModHandler
- Extracted ModUtilities namespace from ModHandler
- Split CModHandler.cpp on per-class basis
- Replaced some direct members with unique_ptr to reduce header includes
2023-07-30 22:17:47 +03:00
Ivan Savenko
6153c1b203
Merge pull request #2422 from IvanSavenko/hero_pool_fix
...
Fix errors about "hero has no army" for defeated heroes
2023-07-28 13:43:50 +03:00
Ivan Savenko
72210afc92
Do not attempt to reset movement for inactive heroes in pool
2023-07-27 15:51:38 +03:00
Tomasz Zieliński
2747174810
Fix incorrect sand shore id
2023-07-26 17:12:09 +02:00
Ivan Savenko
e733b55c90
Removed buggy and poorly designed fromString method
...
Use VLC->modh directly with proper parameters instead
2023-07-25 22:36:45 +03:00
Ivan Savenko
705cdb846d
Merge pull request #2403 from IvanSavenko/error_detection_fix
...
Attempt to fix & improve error reporting
2023-07-25 18:15:28 +03:00
Andrii Danylchenko
fe9090ddfa
#2044 - changed order of destructors to avoid crash
2023-07-25 10:09:28 +03:00
Ivan Savenko
21e794268b
Attempt to fix & improve error detection:
...
- use std::fstream instead of boost::iostreams for properly working flush
- removed some catch-all blocks
- reduce catch scope of some try/catch blocks to clearly indicate intent
2023-07-24 18:48:56 +03:00
Ivan Savenko
463efea7bb
Fix hero retreating handling & code cleanup
2023-07-15 19:55:30 +03:00
Ivan Savenko
cb16636fce
Implemented preserving hero on retreat on 7th day after end of turn
2023-07-15 19:55:30 +03:00
Ivan Savenko
9a38d8ea97
Implemented tavern slot selection using rules similar to H3
2023-07-15 19:55:30 +03:00
Ivan Savenko
ec7e046617
Fix hero pool persistency between saves
2023-07-15 19:55:30 +03:00
Ivan Savenko
a2d2ecc96f
Roll first for hero class, and then - for actual hero for tavern
2023-07-15 19:55:30 +03:00
Ivan Savenko
f8187ce1d8
Fix regressions
2023-07-15 19:55:30 +03:00
Ivan Savenko
19ace6a849
Moved hero pool logic to the separate files
2023-07-15 19:55:29 +03:00
Ivan Savenko
8efa7911b7
Implemented "Allied Adventure Map AI" option
2023-07-03 14:34:53 +03:00
Ivan Savenko
0fdbf54937
Use HeroTypeID instead of int
2023-06-27 19:32:27 +03:00
Ivan Savenko
3d66455cd1
Fix build
2023-06-26 19:44:38 +03:00
Ivan Savenko
098e68b8dd
Fix granting of building upgrade as bonus
...
Such as granting Mages Guild Level 4 when town does not have Mages Guild
Level 1
2023-06-26 17:15:59 +03:00
Ivan Savenko
48ac84110b
Replaced hero crossover logic with one that actually matches H3
2023-06-26 17:15:59 +03:00
Ivan Savenko
e2bd98e21e
CampaignRegions class encapsulation
2023-06-26 17:15:59 +03:00
Ivan Savenko
f6b2f58da9
Use inheritance instead of composition for campaign header
2023-06-26 17:15:59 +03:00
Ivan Savenko
a08fe09517
Added encapsulation for CampaignState class
2023-06-26 17:15:59 +03:00
Ivan Savenko
8420a90aa4
Reorganization of campaigns code
2023-06-26 17:15:59 +03:00
Ivan Savenko
d1e5a347ff
Refactoring of campaign handler: rename types and use strong typing
2023-06-26 17:15:59 +03:00
Ivan Savenko
453d441562
Remove heroes placeholders even in single scenarios
2023-06-26 17:15:59 +03:00