1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-10 09:50:17 +02:00
Commit Graph

5540 Commits

Author SHA1 Message Date
nordsoft
ac8f390cf8 Dividing rewarbadle objects into separate files 2023-04-30 04:39:31 +04:00
nordsoft
67bfacfcf7 Create of rewardable interface 2023-04-30 03:15:59 +04:00
nordsoft
c39a9cac63 Minor changes 2023-04-30 01:43:02 +04:00
nordsoft
e47bb3f1f9 Separate configuration and object 2023-04-30 00:59:02 +04:00
Tomasz Zieliński
d325051213 Some working version, needs corrections still. 2023-04-29 11:46:03 +02:00
Ivan Savenko
d985ac90d3 Merge master -> develop 2023-04-28 22:57:25 +03:00
Ivan Savenko
346b8a4619
Merge pull request #2079 from rilian-la-te/cstack-some-private
vcmi: make some CStack properties private
2023-04-28 22:18:20 +03:00
Ivan Savenko
3dde827a9d
Merge pull request #2070 from rilian-la-te/make-tests-compile-pass-h3
vcmi: fix test compiling and passing
2023-04-28 22:18:00 +03:00
Ivan Savenko
93362eb692
Merge pull request #2083 from IvanSavenko/artifact_fix
Fix list of treasures getting overwritten
2023-04-28 15:41:38 +03:00
nordsoft
f6d91cab35 Fix portrait serialization
# Conflicts:
#	lib/mapObjects/CGHeroInstance.cpp
2023-04-28 05:34:59 +04:00
nordsoft
421bbab1cc Split CGTownInstance file 2023-04-28 05:30:49 +04:00
Ivan Savenko
881c434833 Fix list of treasures getting overwriteen leading to weird bugs
... such as having Grail in crypts or getting relics as starting
artifact
2023-04-27 23:40:56 +03:00
Konstantin P
54e4db3819 vcmi: fix abandoned mine resource loading
It was overshadowed by local variable
2023-04-27 20:59:55 +03:00
Konstantin P
e5f78a8997 vcmi: fix tests with latest develop 2023-04-27 20:59:55 +03:00
Konstantin
c400e83874 vcmi: fixup cast in Heal effect 2023-04-27 20:59:55 +03:00
Konstantin
bcf8ca1268 vcmi: fix map format for teams number 2023-04-27 20:59:55 +03:00
Konstantin P
b472c89276 vcmi: make some CStack properties private
There is a getters for this properties already available
2023-04-27 20:58:49 +03:00
Ivan Savenko
fb739e7186 Merge beta -> develop 2023-04-26 22:48:08 +03:00
krs
1bb5077231 Renamed getMovementRange to ObtainMovementRange as per request 2023-04-26 21:56:20 +04:00
krs
e348193f7e Tactics movement is limited to movement range 2023-04-26 21:56:20 +04:00
nordsoft
c899956e71 Fix boat visibility 2023-04-26 02:58:11 +04:00
Tomasz Zieliński
3c9599657b Use new artifact interface 2023-04-25 16:20:36 +02:00
Tomasz Zieliński
208adf1dd6 Don't use boost::format 2023-04-25 16:14:09 +02:00
Ivan Savenko
48abf46824
Merge pull request #2005 from IvanSavenko/advmap_refactor
Refactoring of adventure map interface
2023-04-24 17:19:22 +03:00
Nordsoft91
f39f208e05
Merge pull request #1915 from Nordsoft91/vcmi-campaign
VCMI campaigns format
2023-04-23 19:09:59 +04:00
SoundSSGood
1f4897e841 CArtifactSet::getSlotByInstance 2023-04-23 14:48:04 +03:00
Tomasz Zieliński
a9a3c456f1 Add new files 2023-04-23 10:12:53 +02:00
Tomasz Zieliński
bc4d6bb7ee Remove unused code. 2023-04-23 10:08:30 +02:00
Tomasz Zieliński
80b5c53815 Place quest artifacts after all the treasures are already created. 2023-04-23 10:08:16 +02:00
DjWarmonger
1fde8b588b
Merge pull request #2025 from vcmi/zone_placement2
No interest or objections - merging.
2023-04-22 14:45:53 +02:00
Nordsoft91
a553a4aa66
Merge pull request #2030 from Nordsoft91/boats 2023-04-22 03:27:00 +04:00
Ivan Savenko
20de44d4a5 Reodered methods in file to group similar code 2023-04-20 22:04:24 +03:00
Ivan Savenko
7db67a3101 int3 now has proper hasher function 2023-04-20 22:04:24 +03:00
Ivan Savenko
f1902ab247 Initial refactoring to encapsulate adventure map 2023-04-20 22:03:28 +03:00
nordsoft
de159df481 Rename boats 2023-04-20 21:20:51 +04:00
nordsoft
de22132cdf Fix loading 2023-04-20 19:46:27 +04:00
nordsoft
db33558abc Load custom campaigns from gzip 2023-04-20 19:22:27 +04:00
nordsoft
be6667acf5 Most questionable workaround 2023-04-20 19:21:37 +04:00
Tomasz Zieliński
88c436691d Simplify logs 2023-04-20 16:26:06 +02:00
Tomasz Zieliński
09b493681b More iterations, higher gravity constant for better results. 2023-04-20 16:13:30 +02:00
Tomasz Zieliński
55d7d7b9b5 Fix coefficients to make dead code actually be used sometimes. 2023-04-20 12:44:32 +02:00
Tomasz Zieliński
00d7901e59 Add another placement technique - swap two misplaced zones. Don't move same zones in consecutive iterations. 2023-04-20 12:24:57 +02:00
Ivan Savenko
4dc16b9ff7 Adventure map spells are no longer visible on units in battle 2023-04-20 13:16:45 +03:00
nordsoft
9ecf16ca23 Fix minor bugs 2023-04-20 03:20:00 +04:00
Konstantin P
4e18a3d579 CSerializer: fix debug assertion
Fix compilation in debug mode
2023-04-20 01:27:15 +04:00
Ivan Savenko
5a5aced67e Fixed empty Black Market on game start 2023-04-19 23:11:17 +03:00
Ivan Savenko
4bb4d7e7a5
Merge pull request #1989 from SoundSSGood/refactoring-arts-p1
Artifact related code refactoring part1 (initial)
2023-04-19 15:31:11 +03:00
Ivan Savenko
505a78a638
Merge pull request #2035 from rilian-la-te/native-fix-beta
vcmi: fix terrain penalties
2023-04-19 13:39:54 +03:00
Konstantin P
7c4badc890 CSerializer: fix debug assertion
Fix compilation in debug mode
2023-04-19 13:00:51 +03:00
Konstantin P
d94ce22e70 vcmi: fix terrain penalties
Fixes #2028
2023-04-19 12:41:54 +03:00
Tomasz Zieliński
c34b1cd713 Fix warning-as-errors. 2023-04-19 08:45:23 +02:00
nordsoft
5cf9fbbe02 Fix compiling 2023-04-19 03:11:13 +04:00
nordsoft
f464ca3560 Merge remote-tracking branch 'upstream/develop' into vcmi-campaign
# Conflicts:
#	lib/mapping/CCampaignHandler.cpp
2023-04-19 02:45:49 +04:00
nordsoft
0a28262c15 Merge remote-tracking branch 'upstream/develop' into boats
# Conflicts:
#	AI/VCAI/Pathfinding/AINodeStorage.cpp
2023-04-19 02:22:19 +04:00
nordsoft
008db447e7 Minor changes 2023-04-19 02:11:24 +04:00
nordsoft
22da7a931d Boat as bonus system node 2023-04-19 01:11:51 +04:00
Tomasz Zieliński
d841655c1d Scale fuzzy edges with map size. 2023-04-18 22:34:26 +02:00
Konstantin
4a79e2ccd9 CSerializer: fix any_cast 2023-04-18 23:29:47 +03:00
nordsoft
d1dacd45e2 Animations from config 2023-04-19 00:14:15 +04:00
Tomasz Zieliński
15592c3aff Change metric to create more interesting zone shapes. 2023-04-18 22:01:51 +02:00
nordsoft
59a1a19d4a Summon boat for real boats only 2023-04-18 22:21:26 +04:00
Tomasz Zieliński
39154737a5 Use std::optional instead of boost::optional. 2023-04-18 19:34:54 +02:00
Tomasz Zieliński
6551585f96 Start with low stifness to let zones pass through each other - typical temperature fall.
(cherry picked from commit 435b9f7881)
2023-04-18 19:21:33 +02:00
Tomasz Zieliński
8d5cd6d072 Randomize starting positions a bit so zones don't fall exactly on the grid.
(cherry picked from commit 33eb28b570)
2023-04-18 19:21:28 +02:00
Tomasz Zieliński
fc91152da7 Fixed zones getting actually randomized after construction. Tweaks to algorithm, now it's considerably better.
(cherry picked from commit c13019059f)
2023-04-18 19:21:19 +02:00
Tomasz Zieliński
2d7a819939 Parameters which work well for Jebus - accessible desert and Blue placed away from Red
(cherry picked from commit 42c6127c79)
2023-04-18 19:21:13 +02:00
Tomasz Zieliński
494f4eaa3f Simple solution that works - by ChatGPT :)
(cherry picked from commit 7c6e4bc2fe)
2023-04-18 19:21:06 +02:00
Tomasz Zieliński
a1f094776f Use fixed starting positions for now.
(cherry picked from commit 43c51805f5)
2023-04-18 19:20:57 +02:00
Tomasz Zieliński
7d2745fda6 Simplified target function comparison.
(cherry picked from commit 809f6344ff)
2023-04-18 19:20:50 +02:00
Tomasz Zieliński
48c11f661b Fix zone attraction
(cherry picked from commit 164ecaea60)
2023-04-18 19:20:40 +02:00
Tomasz Zieliński
3f83eaafc4 Fix distance check
(cherry picked from commit 319f289dc4)
2023-04-18 19:20:32 +02:00
Tomasz Zieliński
64adc9983d - Fixes for corectness
- Space apart starting zones of players

(cherry picked from commit 80be12ac68)
2023-04-18 19:20:23 +02:00
Tomasz Zieliński
09d50a5e9f First draft that kinda works.
(cherry picked from commit 7dd5a9c15d)
2023-04-18 19:20:12 +02:00
nordsoft
3ff99a1a15 Mechanic for air and land transport 2023-04-18 18:33:28 +04:00
nordsoft
ddcdfb643a Try to enable air/land movement 2023-04-18 17:36:42 +04:00
nordsoft
d83566bc74 Add constructor for boat 2023-04-18 17:27:39 +04:00
nordsoft
ed798b06da Prepare transport enum 2023-04-18 13:04:49 +04:00
nordsoft
ecf8b9934b Further refactoring 2023-04-17 23:19:56 +04:00
Konstantin
a1e8d95028 vcmi: rework CArtHandler 2023-04-17 12:32:47 +03:00
nordsoft
b41481c73b Fix(?) mingw 2023-04-17 05:22:32 +04:00
nordsoft
80220fda5b Merge remote-tracking branch 'upstream/develop' into vcmi-campaign
# Conflicts:
#	lib/mapping/CMap.h
2023-04-17 04:54:57 +04:00
nordsoft
91b4782a2f Refactor more fields from campaign header 2023-04-17 04:47:54 +04:00
nordsoft
70f4cc5e0f Refactor campaign regions 2023-04-17 04:26:35 +04:00
Konstantin
54eb550eb9 vcmi: remove unused functions now 2023-04-17 00:43:13 +03:00
Konstantin
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
Konstantin
0d35606a44 vcmi: use std::variant 2023-04-17 00:43:13 +03:00
Konstantin
8dcb041917 vcmi: use std::any 2023-04-17 00:43:13 +03:00
Konstantin
25783066e8 vcmi: use std::any_cast 2023-04-17 00:43:13 +03:00
Ivan Savenko
e3ed728193
Merge pull request #1932 from rilian-la-te/proper-teleport
VCMI: teleport redesign
2023-04-16 22:52:01 +03:00
nordsoft
0c87d0a26c Add a comment 2023-04-16 21:49:43 +04:00
nordsoft
954a2abb71 Verifying mods before starting map 2023-04-16 15:38:13 +04:00
nordsoft
67e1b48d47 Remove unused interface 2023-04-16 14:00:01 +04:00
Ivan Savenko
65e4ce9ffe Update to c++17 2023-04-15 17:20:38 +03:00
Ivan Savenko
5589e973a8 Fixed parsing of hota 'arena' map format hacks 2023-04-15 17:20:38 +03:00
Ivan Savenko
22558551bf Fix parsing of invalid data from h3m 2023-04-15 17:20:38 +03:00
Ivan Savenko
2c2c2c8fe0 Slight tweaking of logging of h3m edge cases 2023-04-15 17:20:38 +03:00
Ivan Savenko
f84665b5ec Fixed loading of maps with objects owned by non-existing players 2023-04-15 17:20:38 +03:00
Ivan Savenko
f997241da1 Throw exception on loading not supported hota duel/arena maps 2023-04-15 17:20:38 +03:00
Ivan Savenko
87647cd02a Do not propose banned skills in witch huts 2023-04-15 17:20:38 +03:00
Ivan Savenko
d6a3c0e666 Cleaned up handling of hota map format versioning 2023-04-15 17:20:38 +03:00
Ivan Savenko
5b658462a1 Renamed army formation enum value 2023-04-15 17:20:38 +03:00
Ivan Savenko
b1e7774bbd Fixed parsing of hota format '0' 2023-04-15 17:20:38 +03:00
Ivan Savenko
1b6ece1367 Formatting and renames of H3M readers, no functionality changes 2023-04-15 17:20:38 +03:00
Ivan Savenko
de855085f0 Added information on banks, seer hut and monster properties 2023-04-15 17:20:38 +03:00
Ivan Savenko
ea8aeef8c0 Implemeted parsing of HotA Seer Huts 2023-04-15 17:20:38 +03:00
Ivan Savenko
88096de7e4 Fixed parsing of HotA H3M format, including Seer Huts 2023-04-15 17:20:38 +03:00
Ivan Savenko
46239215af Implemented parsing of HotA map objects (except for Seer Hut) 2023-04-15 17:20:38 +03:00
Ivan Savenko
3790661fa6 Refactored loadObject() monstrocity into set of smaller methods. 2023-04-15 17:20:38 +03:00
Ivan Savenko
c0e9eb6eb1 HotA maps up to objects block can be parsed 2023-04-15 17:20:38 +03:00
Ivan Savenko
838d45b32c Implemented parsing of HotA h3m header 2023-04-15 17:20:38 +03:00
Ivan Savenko
f93335d678 Cleanup and formatting of H3M loader code 2023-04-15 17:20:38 +03:00
Ivan Savenko
3738171b21 Refactoring of H3M loader to make HotA format support easier
- extracted low-level reader from MapFormatH3M class
- added separate structure to define version-specific values
- cleared up some H3M format edge cases
- replaced witch hut skill vector with set
- converted several fields to enum type
2023-04-15 17:20:38 +03:00
SoundSSGood
9a838598a6 arts refactoring part1 2023-04-15 00:10:39 +03:00
Ivan Savenko
b354f99cc3
Merge pull request #1936 from IvanSavenko/cpp_17_upgrade
Upgrade c++ standard to c++17
2023-04-14 19:21:17 +03:00
Ivan Savenko
128764b1c9
Merge pull request #1968 from rilian-la-te/fix-caster-tactics
Fix caster tactics
2023-04-14 18:59:03 +03:00
Ivan Savenko
44b83b2e11 Merge master -> develop 2023-04-14 16:51:35 +03:00
Ivan Savenko
5dd1d5bf3f
Merge pull request #1973 from IvanSavenko/beta_fixes
Fixes for 1.2 release
2023-04-14 11:41:22 +03:00
Ivan Savenko
e97c2bd838
Merge pull request #1970 from IvanSavenko/add_rmg_templates
Moved RMG templates from vcmi-extras to vcmi mod
2023-04-14 11:40:27 +03:00
Ivan Savenko
9d31830c74 Fix check for Demon Summon targets 2023-04-13 21:17:35 +03:00
Ivan Savenko
1fab2e2e34 Do not allow rising of corpses below alive stack 2023-04-13 19:08:08 +03:00
Ivan Savenko
35ac4d88ac Fix Seer Hut right-click text 2023-04-13 19:06:44 +03:00
Ivan Savenko
9d901efb0c Change default difficulty to "Normal" 2023-04-13 19:06:17 +03:00
Ivan Savenko
2dc48496ef Fix generation of roads and rivers near map edge 2023-04-13 16:26:03 +03:00
Konstantin P
f11fa8f0c8 Teleport: can trigger obstacles now 2023-04-13 11:24:19 +03:00
Konstantin P
384ee99834 vcmi: configurable teleport v2
1. Redesign wall and teleport penalty using shortest path
This will avoid OH3 exploits with teleport inside walls

2. Teleport is now configurable
2023-04-13 11:24:19 +03:00
Konstantin
bc1aad3b26 vcmi: remove deprecated CStack::getCreature()
Function battle::Unit::unitType() does the same.
2023-04-13 11:24:19 +03:00
Konstantin
03eb997137 CBattleInfoEssentials: add battleIsGatePassable()
This is a helper to check if gate is passable now or not.
2023-04-13 11:24:19 +03:00
nordsoft
5419de3468 Fix getCasterUnitId 2023-04-13 02:18:12 +04:00
Konstantin
cb83a9371d vcmi: 1.2 compatibility to FACTION_LIMITER 2023-04-12 23:14:38 +03:00
Tomasz Zieliński
74d028d951 Use product instead of distance sum for Subterranean Gate placement. 2023-04-12 09:31:09 +02:00
Tomasz Zieliński
e6eafca2d0 Place Mines after Monoliths. 2023-04-12 07:48:44 +02:00
nordsoft
d244702abc Read and write mods into map 2023-04-12 02:59:55 +04:00
nordsoft
617a4385a2 Add mods fields into map header 2023-04-12 02:14:22 +04:00
Ivan Savenko
644f0f4b32 Removed ARRAY_COUNT in favor of std::size 2023-04-12 01:04:26 +03:00
Ivan Savenko
506c3d29bc Replaced vstd clamp with std version 2023-04-12 01:03:14 +03:00
Ivan Savenko
63b197b78a Converted attributes to use c++17 functionality 2023-04-12 01:03:14 +03:00
nordsoft
30281d5991 Merge remote-tracking branch 'upstream/develop' into vcmi-campaign 2023-04-11 21:44:31 +04:00
Ivan Savenko
662db90cc1
Merge pull request #1941 from rilian-la-te/reduce-boost-little
vcmi: reduce boost a little bit
2023-04-11 20:24:16 +03:00
Nordsoft91
3951bbb395
Merge pull request #1108 from Nordsoft91/battle-dialog
[HDMod features] Quick combat
2023-04-11 21:18:04 +04:00
Konstantin
9db2e2068e vcmi: fixup crash 2023-04-11 21:17:31 +04:00
Ivan Savenko
dfa2e2a349 Merge beta into develop 2023-04-11 19:37:35 +03:00
Konstantin
ea3bdda047 vcmi: reduce boost a little bit 2023-04-11 17:11:14 +03:00
nordsoft
8e77b833d9 Merge remote-tracking branch 'upstream/develop' into battle-dialog 2023-04-11 15:54:08 +04:00
DjWarmonger
d9a2621231
Merge pull request #1939 from vcmi/fix_top_of_map_objects
Merging after positive review.
2023-04-11 10:40:18 +02:00
Ivan Savenko
7d92ef5f86
Merge pull request #1909 from vcmi/avoid-freeze-on-siege-selfblocking
BattleAI: avoid selfblocking on siege
2023-04-11 11:11:05 +03:00
Ivan Savenko
7fcd750d0f
Merge pull request #1904 from vcmi/fix_pandora_amounts
Fix pandora amounts
2023-04-11 11:10:05 +03:00
Ivan Savenko
ff66592fad
Merge pull request #1882 from rilian-la-te/native-terrain-refactor
Native terrain refactor
2023-04-11 02:14:37 +03:00
nordsoft
bfc75ccd39 Merge remote-tracking branch 'upstream/develop' into battle-dialog 2023-04-11 02:22:42 +04:00
Nordsoft91
ebd17c9e4a
Merge pull request #1928 from Nordsoft91/cast-reward
Spell cast reward
2023-04-10 22:49:36 +04:00
DjWarmonger
4bd3cc1679
Update lib/mapObjects/ObjectTemplate.h
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2023-04-10 20:45:41 +02:00
Tomasz Zieliński
3c87b3934d Do not place object visible tiles over the top of the map. 2023-04-10 19:26:53 +02:00
nordsoft
9371f013e9 Rename outer caster 2023-04-10 20:56:50 +04:00
Konstantin
4da97682be vcmi: remove code duplication for native terrain 2023-04-10 19:28:17 +03:00
Konstantin
7b9e281f7d vcmi: bump serialization version 2023-04-10 19:28:16 +03:00
Konstantin
fedf7d377c vcmi: remove TFaction
This is a huge change and will break save compatibility
2023-04-10 19:28:16 +03:00
Konstantin
452cebfdfd CPropagatorNodeType: replace default constructor
Parameter constructor did the same
2023-04-10 19:28:16 +03:00
Konstantin
09cbec7c75 HeroBonus: remove StackOwnerLimiter
It seems not to be used anywhere
2023-04-10 19:28:16 +03:00
Konstantin
dd196f2aa8 vcmi: slightly rework limiters
1. Add vector to aggregates
2. Rework CreatureFactionLimiter to FactionLimiter
2023-04-10 19:28:16 +03:00
Konstantin
7326980bd4 vcmi: rename WithXXX to IXXXProvider 2023-04-10 19:28:16 +03:00
Konstantin
bb1a5d9521 vcmi: remove configurable limiters from map
This limiters should be always initialized with parameters.
Add CREATURES_ONLY limiter to limit bonuses only to creatures
(no heroes).
2023-04-10 19:28:16 +03:00
Konstantin
f8eba58003 vcmi: remove ALL_CREATURES propagator
Now unneded, because it handled by GLOBAL_EFFECT with
CREATURE_LEVEL_LIMITER (when range set to UINT_MIN and UINT_MAX).
2023-04-10 19:28:16 +03:00
Konstantin
9f8dcfc736 CCreatureHandler: load old stack exp as global effects
It is more robust and more logical.
2023-04-10 19:28:16 +03:00
Konstantin
0f5f4c69ec vcmi: specialize native terrain entity
Specialize native terrain entity for all object that have
native terrain. Allow creatures to take global bonuses into
account when checking for native terrain.
2023-04-10 19:28:16 +03:00
Konstantin
6d9859932b vcmi: add native terrain entity
Add interface which should be used on any object with native terrain

So far, it is faction, hero, creature and battle stack
2023-04-10 19:28:16 +03:00
Konstantin
1760d2295c HeroBonus: add CreatureLevelLimiter 2023-04-10 19:28:16 +03:00
Konstantin
01f5571342 CGHeroInstance: remove old struct
Saves where struct is used is incompatible anyway
2023-04-10 19:28:16 +03:00
Ivan Savenko
2d332f5ce8
Merge pull request #1916 from rilian-la-te/constexpr-id
vcmi: constexpr IDs
2023-04-10 18:28:45 +03:00
Ivan Savenko
42b2be4bbb
Merge pull request #1908 from SoundSSGood/art-client-server-fixes
Artifact related fixes
2023-04-10 18:26:49 +03:00
nordsoft
b9cabef179 Fixes issues related to spell mechanics 2023-04-10 17:08:24 +04:00
Konstantin
4f3c826196 vcmi: manaLimit should be spellcaster property 2023-04-10 15:35:21 +03:00
nordsoft
f550457d23 Added stdinc 2023-04-10 12:17:43 +04:00
nordsoft
1a63f44dab Minor change 2023-04-10 05:53:20 +04:00
nordsoft
464ad63749 Implement behavior 2023-04-10 05:46:45 +04:00
nordsoft
c0b90432cb Change callback interface 2023-04-10 05:40:03 +04:00
nordsoft
56b0e900d8 Add outer caster class 2023-04-10 05:39:25 +04:00
nordsoft
7041950ae1 Don't show empty window 2023-04-10 05:06:05 +04:00
nordsoft
e440343921 Bypass initial version of spell callback 2023-04-10 04:34:24 +04:00
nordsoft
fc310c6e79 Town portal fix 2023-04-10 01:46:37 +04:00
nordsoft
601e7e854f Dimensions door fix 2023-04-10 01:37:46 +04:00
nordsoft
0093a44889 Added abstract method to caster interface 2023-04-10 01:31:41 +04:00
nordsoft
72b2a09f0b Boat summon spell rewritten 2023-04-10 01:06:02 +04:00
nordsoft
69ad62ef58 Fixes from code review 2023-04-09 23:00:20 +04:00
nordsoft
a8f31fabd1 Fix bug 2023-04-09 23:00:20 +04:00
nordsoft
67c0d29478 Fix header 2023-04-09 23:00:20 +04:00
nordsoft
e7c6f596ee Little code improvement 2023-04-09 23:00:20 +04:00
nordsoft
ab7d316c3f Rename fields 2023-04-09 23:00:20 +04:00
nordsoft
b40a3a1b14 Banned arts and skills cannot be randomly rewarded 2023-04-09 23:00:20 +04:00
nordsoft
26c3277895 New format for skills selection 2023-04-09 23:00:20 +04:00
nordsoft
b7ccc4d649 Revert "Random selection for secondary skills"
This reverts commit 6e538dab30.
2023-04-09 23:00:20 +04:00
nordsoft
6c5f3f21a5 Extend loadKey function 2023-04-09 23:00:20 +04:00
nordsoft
fe21acb0d0 Revert "Random selection for resources"
This reverts commit 0e4ff3e2bf.
2023-04-09 23:00:20 +04:00
nordsoft
dce5a924b0 Random selection for secondary skills 2023-04-09 23:00:20 +04:00
nordsoft
53e16c7e22 Random selection for primary skills 2023-04-09 23:00:20 +04:00
nordsoft
bb915b0e7e Random selection for resources 2023-04-09 23:00:20 +04:00
Ivan Savenko
bfd77d871c
Merge pull request #1918 from IvanSavenko/fix_map_loading
Fix vcmi map loading
2023-04-09 20:08:23 +03:00
Ivan Savenko
6e90c0fd09
Merge pull request #1913 from IvanSavenko/fix_shooting_yourself_in_the_foot
Fix initialization of spell effects registry
2023-04-09 20:07:29 +03:00
Konstantin
235fddaf4b vcmi: constexpr IDs 2023-04-09 19:54:41 +03:00
Andrii Danylchenko
737c34b8c6 BattleAI: avoid selfblocking on siege 2023-04-09 16:22:37 +03:00
nordsoft
3166fd05f4 Handle array exceed limit potential crash 2023-04-09 14:43:51 +04:00
nordsoft
23e411cacd Adding logging and error handling 2023-04-09 13:29:07 +04:00
Ivan Savenko
a6ce99573c Added fallback identifiers for reading older vcmi maps 2023-04-09 12:27:33 +03:00
nordsoft
7c13246851 Keep creatures and arts 2023-04-09 05:02:34 +04:00
nordsoft
08809f1cdc String building id 2023-04-09 04:53:06 +04:00
nordsoft
6ed8f748b3 Use string ids for most of bonuses 2023-04-09 04:26:04 +04:00
nordsoft
307fb071a2 VCMI campaign format support prototype 2023-04-09 03:24:40 +04:00
Ivan Savenko
ae5d273df9
Merge pull request #1905 from IvanSavenko/fix_rewardables
Fixed UI of objects that provide one reward that can be refused
2023-04-08 22:15:22 +03:00
Adriankhl
1d6192ca62 Shut down the thread for tactic phase properly 2023-04-08 22:52:46 +04:00
Ivan Savenko
a97ebc2bf1
Merge pull request #1874 from krs0/feature/separate_movement_highlight_for_hoverd_units_in_battle
Separate movement highlight for hovered units in battle
2023-04-08 21:47:49 +03:00
Ivan Savenko
f211207f83
Merge pull request #1893 from trofi/fix-build-without-pch
Add missing include headers when building with -DENABLE_PCH=OFF
2023-04-08 21:45:47 +03:00
Ivan Savenko
84af64ce6b Removed magical initialization of registry via static variables 2023-04-08 21:29:04 +03:00
krs
dab07bdef9 Now unit range is shown in Tactics phase as well
A new parameter: isActiveStack was needed in battleGetAvailableHexes, so that we show the propper Tactics range.
2023-04-08 20:39:59 +03:00
SoundSSGood
e58be8e7f7 vcmiartifacts fixed 2023-04-08 12:28:53 +03:00
SoundSSGood
ea7dd14d8b client is able to erase artifact 2023-04-08 00:41:55 +03:00
Ivan Savenko
50da080130 Fixed UI of objects that provide one reward that can be refused 2023-04-08 00:13:38 +03:00
Tomasz Zieliński
cf1f9c456b Removed unrelated comment 2023-04-07 21:40:47 +02:00
Tomasz Zieliński
37f1bf9d78 Merge remote-tracking branch 'origin/beta' into fix_pandora_amounts 2023-04-07 21:26:36 +02:00
Tomasz Zieliński
f1c52f501d Fix Pandora Box creature amounts to match OH3 exactly. 2023-04-07 21:23:34 +02:00
Ivan Savenko
1590c710dd
Merge pull request #1886 from rilian-la-te/fix-rmg-levels
vcmi: fix rmg header levels
2023-04-07 12:43:34 +03:00
Ivan Savenko
e306e8f9ce
Merge pull request #1879 from kambala-decapitator/single-process-development-mode
fix "development mode" condition when building in single process mode
2023-04-07 12:42:03 +03:00
Ivan Savenko
d8faacc9f2
Merge pull request #1875 from IvanSavenko/ttf_fonts_fallback
TTF fonts fallback
2023-04-07 12:41:00 +03:00
Sergei Trofimovich
2885536bf5 Add missing include headers when building with -DENABLE_PCH=OFF
Example build failure is missing `VCMI_LIB_NAMESPACE_BEGIN` declaration:

    [  0%] Building CXX object lib/CMakeFiles/vcmi.dir/spells/ObstacleCasterProxy.cpp.o
    In file included from lib/spells/ProxyCaster.h:13,
                     from lib/spells/ObstacleCasterProxy.h:11,
                     from lib/spells/ObstacleCasterProxy.cpp:11:
    lib/../include/vcmi/spells/Caster.h:13:1: error: 'VCMI_LIB_NAMESPACE_BEGIN' does not name a type
       13 | VCMI_LIB_NAMESPACE_BEGIN
          | ^~~~~~~~~~~~~~~~~~~~~~~~
2023-04-07 10:25:11 +01:00
nordsoft
e85593dbb3 Save & restore mana 2023-04-06 21:19:46 +04:00
nordsoft
ece8a2a41f Merge branch 'battle-dialog' into battle-dialog2
# Conflicts:
#	AI/BattleAI/BattleAI.h
#	AI/StupidAI/StupidAI.h
#	client/CPlayerInterface.cpp
#	client/CPlayerInterface.h
#	client/Client.cpp
#	client/NetPacksClient.cpp
#	client/battle/CBattleInterface.cpp
#	client/battle/CBattleInterface.h
#	client/battle/CBattleInterfaceClasses.cpp
#	client/battle/CBattleInterfaceClasses.h
#	config/schemas/settings.json
#	lib/CGameInterface.h
#	lib/IGameEventsReceiver.h
#	lib/NetPacks.h
#	lib/NetPacksLib.cpp
#	lib/battle/BattleInfo.cpp
#	server/CGameHandler.cpp
#	server/CQuery.h
2023-04-06 19:53:52 +04:00
nordsoft
ce3028bd73 Intermediate commit 2023-04-06 19:34:07 +04:00
Konstantin
a04d8b34f3 vcmi: fix rmg header levels
It was printed as char, not as int.
2023-04-06 12:48:53 +03:00
Konstantin
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
Andrey Filipenkov
1da06e04cc fix "development mode" condition when building in single process mode 2023-04-05 20:22:29 +03:00
Konstantin
ee489f18d2 vcmi: PlayerState is now an Entity
This will reduce code duplication a little bit.
2023-04-05 01:22:04 +03:00
Konstantin
8968f0ef0e vcmi: change EAlignment to enum class 2023-04-05 01:22:04 +03:00
Konstantin
0c7dbea990 HeroBonus: remove unused function 2023-04-04 23:02:55 +03:00
Konstantin
b7d6270272 vcmi: add getNativeTerrain method to factions 2023-04-04 23:02:55 +03:00
Konstantin
e0715a76c8 vcmi: reduce CStack usage a little bit 2023-04-04 23:02:54 +03:00
Konstantin
22dd97ad18 vcmi: use entilites when possible part 1 2023-04-04 23:02:54 +03:00
Ivan Savenko
c5225aab70 Fix serialization 2023-04-04 22:22:58 +03:00
Ivan Savenko
fc750d0917 Fix identifiers resolving for stack experience bonuses 2023-04-04 17:12:40 +03:00
Ivan Savenko
307065a633 Merge beta into develop 2023-04-04 16:06:20 +03:00
Ivan Savenko
6b2b8bb5c0
Merge pull request #1863 from IvanSavenko/fix_mod_identifiers
Fix mod identifiers
2023-04-04 11:22:30 +03:00
DjWarmonger
53df84459f
Merge pull request #1781 from vcmi/object_distribution
Improved object distribution
2023-04-04 06:52:10 +02:00
Tomasz Zieliński
1e18887c9c Merge remote-tracking branch 'origin/beta' into object_distribution 2023-04-04 05:52:57 +02:00
Ivan Savenko
255bb145b9 Added fallback for 1.2 compatibility 2023-04-03 16:26:43 +03:00
Ivan Savenko
766fb066c6 Fix debug build 2023-04-03 15:15:51 +03:00
Ivan Savenko
c5acb8bb7d Fixed empty scope on resolving map overrides 2023-04-03 15:15:29 +03:00
Ivan Savenko
191959ae05 Fixed moat identifiers requests - will now always request spells 2023-04-03 15:15:12 +03:00
Ivan Savenko
2d0344f905 VCMI will now correctly resolve identifiers in unexpected form 2023-04-03 15:14:34 +03:00
Ivan Savenko
6683c866ee Disabled check for unused lines in translations due to false positives 2023-04-03 01:12:48 +03:00
Ivan Savenko
10e852fcb9 Fix scope of identifiers resolving for commanders abilities 2023-04-03 01:12:04 +03:00
Konstantin
f41b2475fe vcmi: fix stack smash 2023-04-02 23:27:15 +03:00
Ivan Savenko
c661419897
Merge pull request #1700 from rilian-la-te/resource-array
Modernize resourceSet.
2023-04-02 20:12:45 +03:00
Ivan Savenko
6dac15c5b2
Merge pull request #1706 from rilian-la-te/moats-landmines
Proper moats: mechanincs
2023-04-02 20:12:33 +03:00
Ivan Savenko
c5ca17a324
Merge pull request #1853 from Nordsoft91/fix-scope-guard
Fix ScopeGuard move behavior
2023-04-02 20:10:26 +03:00
Ivan Savenko
1cb0c6b270
Merge pull request #1848 from Nordsoft91/editor-fix
Fix map editor crash with cutting random town
2023-04-02 20:09:24 +03:00
Ivan Savenko
a3074e2741
Merge pull request #1835 from rilian-la-te/fix-native-type
CCreatureHandler: fix native terrain for any
2023-04-02 20:08:18 +03:00
nordsoft
91ef7cbb4f Fix ScopeGuard move behavior 2023-04-02 15:46:56 +04:00
nordsoft
d63e32841d Fix divide by zero crash 2023-04-02 15:28:41 +04:00
nordsoft
1e5362cb07 Fix crash with cutting random town 2023-04-02 14:06:16 +04:00
Konstantin
cabe228ebc CCreatureHandler: fix native terrain for any 2023-04-02 02:32:40 +03:00
Konstantin
ff3e761f3b CTownHandler: remove hardcoded Cove grail
We have now exactly same definition in Json
2023-04-02 00:27:29 +03:00
Ivan Savenko
4d6b88f10d
Merge pull request #1821 from rilian-la-te/remove-cove-hardcode
CTownHandler: remove hardcoded Cove grail
2023-04-02 00:20:49 +03:00
Ivan Savenko
042e46580b Fix uninitialized variable 2023-04-01 23:59:31 +03:00
Tomasz Zieliński
aca227b5e4 Manually adjust the position of town - noticeable on S maps. 2023-04-01 17:07:43 +02:00
Konstantin
3df5964847 CTownHandler: remove hardcoded Cove grail
We have now exactly same definition in Json
2023-04-01 03:14:35 +03:00
Ivan Savenko
a64f35c933
Merge pull request #1765 from vcmi/fix_horde_buildings_load
Fix loading horde buildings predefined in editor
2023-03-31 17:59:26 +03:00
Tomasz Zieliński
308b42549b Merge remote-tracking branch 'origin/beta' into object_distribution 2023-03-31 15:44:14 +02:00
Konstantin
6d17b9342d ResourceSet: resolve .at troubles 2023-03-31 14:12:38 +03:00
Konstantin
c1fd7309ad ResourceSet: composition 2023-03-31 14:00:49 +03:00
Ivan Savenko
ea1d177c9b Fixed false error messages on game startup 2023-03-31 01:28:56 +03:00
Konstantin
d8a237ba46 vcmi: add getTrigger method to obstacles
Fixes advanced remove obstacle spell
2023-03-31 01:01:26 +03:00
Konstantin
25956e3f37 vcmi: bump serializer version 2023-03-31 01:01:25 +03:00
Konstantin
ecae600563 effects: Moat now includes battlefield bonus
This is an implementation which works exactly like in H3
2023-03-31 01:01:25 +03:00
Konstantin
f704a17e1a vcmi: add a last hex setting
I consider this behaviour as H3 bug, but this is H3.
So, added a setting to disable this behaviour.
2023-03-31 01:01:25 +03:00
Konstantin
179cee3e88 vcmi: add obstacle animation helper functions 2023-03-31 01:01:25 +03:00
Konstantin
eff41f66ed vcmi: now obstacles can have disappearing anim
It is a reverse version of appearingAnimation.
2023-03-31 01:01:25 +03:00
Konstantin
c4d5a7a2d6 vcmi:towns now can choose if moat render is needed
Using invalid points. Also removed unused variable.
2023-03-31 01:01:25 +03:00
Konstantin
3bbff0588d CSpell: !isMagical() -> no sorcery and no generic spell dmg reduction
Other bonus are still applied.
2023-03-31 01:01:25 +03:00
Konstantin
a639bd2606 spells: rework isMagical()
Now it is a flag of a spell, and not a target condition.
This fixes resistance to bind effect
2023-03-31 01:01:25 +03:00
Konstantin
aab5b47038 vcmi: setup moats using MoatAbility
Setup moats using moat ability, need playtest for now.
-3 to defence not added for now.
2023-03-31 01:01:25 +03:00
Konstantin
1100bc7a5b obstacle: remove trigger animation and sound
It was not working anyway. Now it is handled by trigger ability.
Trigger ability hit animation + trigger ability cast sound.
2023-03-31 01:01:25 +03:00
Ivan Savenko
508d68f77c Rewardables will use per-object name, if available 2023-03-30 22:29:58 +03:00
Ivan Savenko
e652b3eef0 Removed old code - VCMI now supports json-based animations everywhere 2023-03-30 19:59:19 +03:00
Konstantin
cd1730b1fb vcmi: remove obstacle caster logic
It is possible now to cast something via obstacle
Immune creatures should not trigger an obstacle trigger now
and should not reveal it.
2023-03-30 14:41:40 +03:00
Konstantin
db428faeeb vcmi: allow obstacles to store another spells
It will be used as trigger spell, if set
If not set, it will be ignored
2023-03-30 14:41:40 +03:00
Konstantin
57c35f39ca WIP: Moat placer 2023-03-30 14:41:40 +03:00
Konstantin
d90d00eeac vcmi: rework ProxyCaster
Now ProxyCaster can be used without hero and can even cast something
with default values.
2023-03-30 14:41:40 +03:00
Konstantin
847437bbfa BattleInfo: update bonus tree when unit is moved
This is a semi-dirty hack to force uncaching a bonuses with
UnitOnHexLimiter
2023-03-30 12:51:59 +03:00
Konstantin
4c08e6a0f9 vcmi: add UnitOnHex limiter
Bonus will be accepted, if unit stands in listed hexes
2023-03-30 12:51:59 +03:00
Konstantin
ffe24627e7 HeroBonus: change limiters to enum class
Also remove unused functions.
2023-03-30 12:42:24 +03:00
Konstantin
777818b388 HeroBonus: use 64 bit for tree counter (to be more robust) 2023-03-30 12:41:17 +03:00
Konstantin
0e69aac96f HeroBonus: removed unused functions 2023-03-30 12:41:17 +03:00
Konstantin
89fd742c1a NetPacks: add BATTLE type to GiveBonus
Will work as battlefield effect of current battle.
2023-03-30 12:41:17 +03:00
Konstantin
5716925b47 NetPacks: change GiveBonus enum to enum class. 2023-03-30 12:41:17 +03:00
Tomasz Zieliński
46a24043e8 Add back Mines. 2023-03-29 17:06:17 +02:00
Tomasz Zieliński
401f2342c0 Place Mines after Towns and Monoliths. 2023-03-29 16:54:22 +02:00
Tomasz Zieliński
5ed3c2d518 Place towns and monoliths first - preferably at the zone border. 2023-03-29 16:25:13 +02:00
Tomasz Zieliński
045942fd68 Fixed warning-as-error 2023-03-28 18:25:56 +02:00
Tomasz Zieliński
b184e80b72 Use the most suitable template for object 2023-03-28 17:53:08 +02:00
Tomasz Zieliński
49c029ea6c Minor refactor 2023-03-28 17:13:24 +02:00
Ivan Savenko
8d0d5341db Refactoring of hero specialty loading code:
- removed no longer used code
- follow creature upgrade chains (e.g. third upgrades)
2023-03-28 17:09:54 +03:00
Ivan Savenko
39ff7efb78 Fix crash on starting Launcher without H3 data 2023-03-27 22:33:36 +03:00
Ivan Savenko
b2f5042942
Merge pull request #1783 from vcmi/beta
Merge beta -> develop
2023-03-27 21:21:25 +03:00
Ivan Savenko
a4fe11d413
Merge pull request #1766 from vcmi/fix_editor_shortcut
Fix editor shortcut
2023-03-27 21:20:14 +03:00
Ivan Savenko
11088100a0
Merge pull request #1782 from korli/haiku
Haiku patch
2023-03-27 18:42:22 +03:00
Tomasz Zieliński
b3a457c71a Skip objects with value too low to be placed in the zone. 2023-03-27 17:29:46 +02:00
Ivan Savenko
b875da108b
Merge pull request #1717 from SoundSSGood/backpack-limit-size
Introducing backpack size limit functionality
2023-03-27 17:17:49 +03:00
Ivan Savenko
e3b5db0ade
Merge pull request #1778 from rilian-la-te/fix-obstacle-removal-mechanincs
Fix landmines staying on battlefield after trigger
2023-03-27 17:17:14 +03:00
Konstantin
9a229d6e48 vcmi: really correct obstacle trigger
Now obstacle trigger really matches H3
2023-03-27 16:11:17 +03:00
Konstantin
8c1d6c8e13 CBattleInfoCallback: use obstacle only once
We should not affect creature by obstacle twice.
2023-03-27 15:45:41 +03:00
Konstantin
88a7b3141d vcmi: really correct BFS
AFAIK, all is working as H3.
2023-03-27 15:45:41 +03:00
Jerome Duval
518f8d69e5 Haiku patch 2023-03-27 10:10:09 +02:00
Tomasz Zieliński
511a42f9b9 Oops missed that part. 2023-03-27 09:35:52 +02:00
Tomasz Zieliński
18a87d1ec0 Distribute limited objects evenly in zones with matching terrain 2023-03-27 09:09:58 +02:00
Tomasz Zieliński
a88e1dc1f6 Add only one template per object 2023-03-27 08:44:49 +02:00
Konstantin
5b50191af7 NetPacksLib: remove obstacle ACTIVATE* actions
Actually these actions was not working anyway.
2023-03-26 22:59:34 +03:00
Konstantin
26db14b7b4 vcmi: expert dispel now works mechanically correct 2023-03-26 21:25:26 +03:00
Konstantin
edc9812559 obstacle: correct logic as in OH3
Obstacle spells should not be cast if they are affected by native
terrain and enemy have at least one stack with native terrain
2023-03-26 21:22:38 +03:00
Konstantin
705afbb898 UnitEffect: it should not always assume smart
It is normal than non-smart spell will be cast on our units.
2023-03-26 21:19:49 +03:00
Konstantin
44a625aa6b vcmi: check spell obstacles by type 2023-03-26 21:17:39 +03:00
Andrii Danylchenko
a0de223901
Merge pull request #1772 from vcmi/fix_invalid_native_terrain
Fix the case of invalid native town type
2023-03-26 13:19:01 +03:00
Ivan Savenko
9287d1b837
Merge pull request #1776 from vcmi/beta
Merge beta -> develop
2023-03-26 01:48:23 +02:00
Ivan Savenko
7477e4a8cc Handle mods with "keepDisabled" propertly on client 2023-03-25 23:54:51 +02:00
Ivan Savenko
4eed0b2c9e Added workaround for Dungeon towers 2023-03-25 23:54:51 +02:00
Ivan Savenko
8fbeff2a02 Fix movement over lowered drawbridge in Fortress 2023-03-25 23:54:51 +02:00
Ivan Savenko
5288e3761e
Merge pull request #1764 from IvanSavenko/selectable_spellcaster
Implemented support for multi-spell casters
2023-03-25 20:08:47 +02:00
Ivan Savenko
6f631a0aa7
Merge pull request #1759 from IvanSavenko/kills_in_tooltip
Show potential kill amount in attack tooltip
2023-03-25 20:03:27 +02:00
Tomasz Zieliński
00a77e3c5f Probably found the root cause of terrain problems. 2023-03-25 18:52:18 +01:00
DjWarmonger
2c4cde060a
Merge pull request #1694 from vcmi/extra_rmg_monoliths
This could be controversial solution, but since there were no objections, I'll give it a shot.
2023-03-25 18:38:06 +01:00
DjWarmonger
114e7d196b
Merge pull request #1698 from vcmi/object_placement_tweaks
No objections, works fine for me as well.
2023-03-25 18:13:15 +01:00
Tomasz Zieliński
68a2bb78a5 Fix the case of invalid native town type :? 2023-03-25 18:08:46 +01:00
Tomasz Zieliński
9d7d4b6a5f Fixed editor shortcut on Windows 2023-03-25 11:40:44 +01:00
Tomasz Zieliński
392061e97e Fix loading towns which in OH3 editor have defined horde buildings level 1 - 5 (inluding random town). 2023-03-25 11:17:49 +01:00
Ivan Savenko
9a19feaf4a Fix spellcasters with massive spells 2023-03-25 01:23:49 +02:00
Ivan Savenko
dc099b2a35 Implemented support for multi-spell casters 2023-03-25 00:48:14 +02:00
Ivan Savenko
970981cfc9 Show information on potential kills in attack tooltip 2023-03-24 17:18:47 +02:00
Ivan Savenko
31147ac83b refactoring: TDmgRange pair -> DamageRange struct 2023-03-23 17:49:33 +02:00
Konstantin
e40b9c849d vcmi: no open-code NO_APPROPRIATE_TARGET 2023-03-22 12:04:28 +03:00
SoundSSGood
19096f39f0 Backpack limit. Amount of fixes. 2023-03-21 22:11:42 +02:00
Konstantin
0ffc440b53 vcmi: fix target condition regression 2023-03-21 19:19:34 +03:00
Ivan Savenko
44dc89bdcf
Merge pull request #1736 from rilian-la-te/fix-target-conditions
vcmi: fix target condition regression
2023-03-21 17:35:20 +02:00
Konstantin
60b510617c vcmi: fix target condition regression 2023-03-21 17:56:15 +03:00
Ivan Savenko
575fb29a22
Merge pull request #1534 from kambala-decapitator/pathfinder-fly
fix movement cost with Fly
2023-03-21 14:32:56 +02:00
SoundSSGood
f0f9eecf97 Backpack limit part5. End of battle. Other stuff 2023-03-21 12:14:33 +02:00
SoundSSGood
9f8aa25297 Backpack limit part4 (Using cheats, buying) 2023-03-21 12:14:33 +02:00
SoundSSGood
ca5c9910a4 Backpack limit part3 finishQuest 2023-03-21 12:14:33 +02:00
SoundSSGood
e23766280f Backpack limit part2 (Pick up, Dig up, Object rewards) 2023-03-21 12:14:33 +02:00
SoundSSGood
96e8a1f21c Backpack limit part1 (move, disassemble) 2023-03-21 12:14:33 +02:00
SoundSSGood
37edffd788 GameConstants upd 2023-03-21 12:14:33 +02:00
SoundSSGood
72122fb433 CArtifact, CArtifactInstance, CCombinedArtifactInstance reorganization 2023-03-21 12:14:33 +02:00
Ivan Savenko
6ee4fd24f7
Merge pull request #1731 from rilian-la-te/fix-unicorns
CStack: make unicorns ability multiplicative
2023-03-20 23:34:05 +02:00
Konstantin
8c10f48fbd CStack: make unicorns ability multiplicative 2023-03-20 23:29:33 +03:00
Ivan Savenko
9289646dab
Merge pull request #1722 from rilian-la-te/fix-first-aid
vcmi: fix first aid regression
2023-03-20 21:49:53 +02:00
Andrey Filipenkov
147633bd9d compute movement cost using PathNodeInfo layer info when possible 2023-03-20 11:35:20 +03:00
Andrey Filipenkov
a0cd69e944 Slight refactoring of CGHeroInstance::movementPointsAfterEmbark() 2023-03-20 11:35:20 +03:00
Andrey Filipenkov
3602645a30 improve iterating over EPathfindingLayer 2023-03-20 11:35:19 +03:00
Andrey Filipenkov
c0c19557af fix method documentation 2023-03-20 11:35:19 +03:00
Andrey Filipenkov
8f843d0bff fix typos 2023-03-20 11:35:19 +03:00
Andrey Filipenkov
68f5c1de79 improve variable names in CPathfinderHelper::getNeighbours() 2023-03-20 11:35:19 +03:00
Andrey Filipenkov
bfb0dc26d5 fix movement cost on roads 2023-03-20 11:35:19 +03:00
Andrey Filipenkov
0c7b5ac793 fix movement cost on Favorable Winds 2023-03-20 11:35:19 +03:00
Andrey Filipenkov
3fbdc3b198 improve code that checks last possible tile 2023-03-20 11:35:18 +03:00
Andrii Danylchenko
23fa7c4a9b
Merge pull request #1720 from vcmi/fix_small_lakes_clean
Don't place shipyard or boats at very small lakes
2023-03-19 19:52:22 +02:00
Andrii Danylchenko
aede3da74e
Merge pull request #1721 from vcmi/fix_rmg_infinite_loop
Fix rmg infinite loop
2023-03-19 19:46:28 +02:00
Konstantin
895572df02 vcmi: fix first aid regression 2023-03-19 19:20:08 +03:00
DjWarmonger
15047a4469
Merge pull request #1718 from vcmi/fix_shipyard_border
Fix shipyard border calculation for RMG
2023-03-19 16:05:24 +01:00
Tomasz Zieliński
9e206dbbc7 Forgot this one 2023-03-19 09:51:37 +01:00
Tomasz Zieliński
f52c465322 Allow zones to inherit properties recursively, in any order. 2023-03-19 09:27:05 +01:00
Andrey Filipenkov
21463f1c0e fix movement cost with Fly 2023-03-19 11:26:55 +03:00
Andrey Filipenkov
43e89523a9
Merge pull request #1716 from rilian-la-te/tw-fix
TotalValue: fix typo
2023-03-19 11:25:48 +03:00
Tomasz Zieliński
dd3803b111 Don't place shipyard or boats at very small lakes
(cherry picked from commit 1d2913bea0)
2023-03-18 22:05:25 +01:00
Tomasz Zieliński
e1ced317a1 Few tweaks for boat placement to keep distance between it and other objects, especially guards. 2023-03-18 21:59:23 +01:00
Tomasz Zieliński
1dc96d6844 Fix shipyard border calculation for RMG 2023-03-18 20:12:36 +01:00
Konstantin
54b1b49f5a totalValue: fix overflow
Fixes #1715
2023-03-18 22:08:21 +03:00
Tomasz Zieliński
23a5a32756 Add fallback for empty terrain types. Still it's a workaround and does not solve the root cause. 2023-03-18 17:00:50 +01:00
Konstantin
b07f4fb383 TotalValue: fix typo 2023-03-18 15:45:32 +03:00
Tomasz Zieliński
eabcbfc25a Fix all stacks being capped at 10 units 2023-03-17 22:32:05 +01:00
Tomasz Zieliński
f57c275603 Merge remote-tracking branch 'origin/develop' into object_placement_tweaks 2023-03-17 21:47:16 +01:00
Ivan Savenko
f24ca6fbcf
Merge pull request #1699 from rilian-la-te/fix-ignissa
Rewardable: always initialize numbers
2023-03-17 22:15:28 +02:00
Ivan Savenko
95d56d3f2a
Merge pull request #1705 from rilian-la-te/convert-scouting
HeroBonus: add scouting to converter
2023-03-17 22:14:54 +02:00
Konstantin
6de042657c fix Ignissa bug the old way 2023-03-17 20:09:18 +03:00
Konstantin
b4fe7908a4 HeroBonus: add scouting to converter 2023-03-17 18:50:57 +03:00
Konstantin
bbbbfe00f0 Modernize resourceSet 2023-03-17 02:26:54 +03:00
Ivan Savenko
8a6c51a9e6 Fix uninitialized pointer dereference 2023-03-16 20:48:37 +02:00
Tomasz Zieliński
f2dc9cb48e - Place Subterranean Gates as far from other objects as possible
- Added minimum distance between zone guards
2023-03-16 18:42:28 +01:00
Ivan Savenko
fbb9810c49 Fix regression - uninitialized pointer 2023-03-16 19:25:26 +02:00
Ivan Savenko
aea2a1e22e Fixed loading of settings from mods 2023-03-16 18:11:36 +02:00
Ivan Savenko
a0e9e01b48 Renamed & reorganized all game mechanics settings names 2023-03-16 18:11:35 +02:00
Ivan Savenko
383387ef29 Integrated defaultMods into mod system 2023-03-16 17:55:09 +02:00
Tomasz Zieliński
62490683ce Place objects away from zone guard in both zones, not only the where it is placed. 2023-03-16 16:20:11 +01:00
Konstantin
4c4498b22a vcmi: modernize rest of lib 2023-03-16 17:55:20 +03:00
Konstantin
7f805768f0 battle: fixup siege crash 2023-03-16 16:47:06 +03:00
Konstantin
4eb248b5e2 vcmi: bump serialization version
Saves from this branch are incompatible with generic ones
2023-03-16 16:47:05 +03:00
Konstantin
580268bfd4 vcmi: fix logistics specialist movement regression
There was incorrect calculations introduced earlier.
2023-03-16 16:46:42 +03:00
Konstantin
0adffc824f vcmi: allow to configure army movement counter
It is not hardcoded now. MOVEMENT.TXT is still not read,
but ARMY_MOVEMENT updater parameters can be specified in json.
There is a 4 parameters:
1. Base - base value (firstly lowest speed is multiplied by it)
2. Divider - base value is integrally divided by it
3. Multiplier - result value will be multiplied by it
4. Max - maximum allowed movement from army.

Vanilla values is in defaultMods.json

Fixes: https://bugs.vcmi.eu/view.php?id=3209
2023-03-16 16:46:42 +03:00
Konstantin
b91d7418dd vcmi: remove ONLY_ENEMY_ARMY range
It should be used directly instead of alias, propagation updater
also can be useful for any other updaters can be added.
2023-03-16 16:46:42 +03:00
Konstantin
ff5f828031 vcmi: remove SELF_LUCK bonus
This bonus also now handled by LUCK bonus with INDEPENDENT_MAX of 1
2023-03-16 16:46:42 +03:00
Konstantin
c7e197e1ff vcmi: remove SELF_MORALE bonus
It is easily handled by MORALE bonus with INDEPENDENT_MAX

Harmless due to converter.
2023-03-16 16:46:42 +03:00
Konstantin
ebbc8cf208 vcmi: remove BLOCK_LUCK bonus
To block a luck, just set both INDEPENDENT_MAX and INDEPENDENT_MIN
to 0 of LUCK bonus
2023-03-16 16:46:42 +03:00
Konstantin
c07e74250b vcmi: remove BLOCKS_MORALE bonus
To block morale, just set INDEPENDENT_MAX and INDEPENDENT_MIN
to 0, there is no need for separate bonus.
2023-03-16 16:46:42 +03:00
Konstantin
1e7875cb36 vcmi: selector-based target conditions
For now, allows us to define target conditions by selector and even
by minimal and maximal value of bonuses. Convert Bonus condition
to Selector condition.
Allow structures inside TargetCondition struct.
2023-03-16 16:46:42 +03:00
Konstantin
0540e1531d vcmi: allows parsing selectors from JSON
Supports anyOf, allOf, noneOf,
and all selectors from Selector namespace.
Can be useful to define selectors in JSON when required
2023-03-16 16:46:42 +03:00
Konstantin
f13a934c47 vcmi: allow converting bonusParams to selector 2023-03-16 16:46:42 +03:00
Konstantin
eaceb65b5c vcmi: fix CSkillHandler crash 2023-03-16 16:46:42 +03:00
Konstantin
930955f268 vcmi: deprecated bonus converter
It converts almost all sorts of deprecated bonuses from mods
when loading json. It can print to console correct new variant
or bonus.

Also removed a bunch of deprecated bonuses from list.
It will break saves!!!
2023-03-16 16:46:41 +03:00
Konstantin
95503d0623 vcmi: unify movement
1. Now there is only one bonus: MOVEMENT, with 2 subtypes: 0 is sea, 1 is land
   For movement value on land depends on creature speed we use a new
   ARMY_MOVEMENT updater with global bonus. If we does not like such
   dependency, we can just remove this updater from json.
2. All specialities and secondary skills for movement moved to new
   system AFAIK
2023-03-16 16:46:41 +03:00
Konstantin
20a9332a3f vcmi: translate wisdom
Make wisdom as separate bonus. It will be enough for now. But
next is should be done as IsLearnable for each spell.
2023-03-16 16:46:41 +03:00
Konstantin
ddcff9dc36 vcmi: convert magic schools to MAGIC_SCHOOL_SKILL
It is already used by battlefields.
2023-03-16 16:46:41 +03:00
Konstantin
64ad7558c6 vcmi: skill-agnostic artillery
Now it should work for any creature and with any damage percentage.
2023-03-16 16:46:41 +03:00
Konstantin
9205ef2c91 vcmi: skill-agnostic ballistics
Made ballistics by using spell action and more code is shared now.
2023-03-16 16:46:41 +03:00
Konstantin
84f53485e2 vcmi: skill-agnostic first aid
Now first aid is passive battle spell, and skill just bumps
specific spell power for this spell. Everything about healing
is handled into Heal spell effect.
2023-03-16 16:46:41 +03:00
Konstantin
a0987313ba vcmi: convert intelligence
Intelligence is converted to both global effect and skill bonus

Bonus name HERO_MANA_PER_TEN_KNOWLEDGE is a little weird, but works
like old SECONDARY_SKILL_PREMY bonus
2023-03-16 16:46:41 +03:00
Konstantin
a86e12cd42 vcmi: convert necromancy
Now it is 3 bonuses to cover necromancy.
1. IMPROVED_NECROMANCY = possible creatures raized (affected by cloak)
2. UNDEAD_RAISE_CHANCE = raise chance (affected by artifacts)
3. UNDEAD_RAISE_POWER = helper to select creature from first
2023-03-16 16:46:41 +03:00
Konstantin
84eece1d8b vcmi: convert mysticism to MANA_REGENERATION
With PERCENT_TO_TARGET_TYPE it was easy.
2023-03-16 16:46:41 +03:00
Konstantin
f641ed2015 vcmi: convert learning to global effect
Now hero experience is a global effect, and secondary
skill gives exactly same bonus. Can be modified by
PERCENT_TO_TARGET_TYPE.
2023-03-16 16:46:41 +03:00
Konstantin
a85f3b63ec vcmi: reuse SPELL_DAMAGE for sorcery
Now there is no need for specific spell bonus, and
we need to simply reuse SPELL_DAMAGE, and by using
PERCENT_TO_TARGET_TYPE speciality will work.
2023-03-16 16:46:41 +03:00
Konstantin
6b987275eb vcmi: use global bonuses for sight radius and mana
We do not need to hardcode constants for there. We can just
use default bonuses.
2023-03-16 16:46:41 +03:00
Konstantin
5d4bcb3c78 vcmi: fix scouting bonus spelling error
With fallback for old mods.
2023-03-16 16:46:41 +03:00
Konstantin
f264c541fb vcmi: skill-agnostic tactics
Tactics is split to 2 bonuses, and it is now possible to
block tactics without having tactics itself. But tactics
for two sides is not implemented, because it is huge rework
and not high priority for me now, I want to do basic
secondary skill rework first.
2023-03-16 16:46:41 +03:00
Konstantin
300a8a15ba vcmi: remove estates bonus
Now it is handled by GENERATE_RESOURCE::GOLD.
2023-03-16 16:46:41 +03:00
Konstantin
c64d05c419 vcmi: skill-agnostic diplomacy
This is simple and will work.
2023-03-16 16:46:41 +03:00
Konstantin
34a26580a7 vcmi: skill-agnostic resistance
Uses exiting bonus and new PERCENT_TO_TARGET_TYPE value type
2023-03-16 16:46:41 +03:00
Konstantin
6e4372176a vcmi: skill-agnostic pathfinding
For now, works exactly as in VCMI and H3.
I think we should add some BONUS_TERRAIN_DISCOUNT_PERCENT bonus
to discount by percent, like written in pathfinding description
2023-03-16 16:46:41 +03:00
Konstantin
9ffd18c914 vcmi: skill-agnostic armorer
This is a skill-agnostic armorer, which can be used same as
armorer before.
2023-03-16 16:46:41 +03:00
Konstantin
43f09dd2e4 vcmi: convert scholar to new bonus
Convert scholar to new skill-agnostic bonus. Now works only for any
school (not from specific). In all schools form identical to
past's SECONDARY_SKILL_PREMY::SCHOLAR
2023-03-16 16:46:41 +03:00
Konstantin
0ed89e77d4 vcmi: replace archery and offence to new bonus
Add PERCENTAGE_DAMAGE_BOOST bonus, which will work exactly as old
archery or offence. Subtype is actually boolean which select
ranged (1) and melee (0)
2023-03-16 16:46:41 +03:00
Konstantin
4a89418ada vcmi: replace SecondarySkillPremy:EAGLE_EYE
Replace this bonus to new ArcaneIntuition bonus, which
will work independently from the rest of skill bonuses.
Proof of concept for other skills.
2023-03-16 16:46:41 +03:00
Konstantin
a0a78d0596 vcmi: remove MAXED_SPELL
Replace it by SPELL bonus with val = 3
2023-03-16 16:46:41 +03:00
Konstantin
496c1def12 vcmi: remove FULL_HP_REGENERATION bonus
Just set HP_REGENERATION to high number
(in OH3 doubled stack health is sufficient)
2023-03-16 16:46:41 +03:00
Konstantin
62e579f672 vcmi: replace KINGx bonuses to one KING bonus
val = level of slayer which require to affect.
Can break saves.
2023-03-16 16:46:41 +03:00
Konstantin
1e73c2e1e6 vcmi: configurable charge
There is no reason not to make charge configurable.
Just do it.
2023-03-16 16:46:41 +03:00
Konstantin
f26fac5562 vcmi: move obligatory marker to CSkillHandler
It is working, now it is possible to
define other obligatory skills than wisdom or magic schools,
but only 2 types of obligatory skills exists - like wisdom and
like magic school
2023-03-16 16:46:41 +03:00
Konstantin
4acf3778ef vcmi: allow adding global bonuses
I will use it to implement some H3 base features like
mana regen and base movement.
2023-03-16 16:46:41 +03:00
Konstantin
9280d70819 vcmi: remove deprecated "specalties" node
Use new bonus system format
2023-03-16 16:46:41 +03:00
Konstantin
d9496dd9f7 vcmi: remove vector speciality format
It is deprecated and will not be used anymore.
2023-03-16 16:46:41 +03:00
Konstantin
96c40eb36e vcmi: remove SPECIAL_BLESS_DAMAGE bonus
It is handled by HAS_ANOTHER_BONUS_LIMITER with SPELL_EFFECT limiter
with desired spell id (bless). Yes, bonus will come from HERO_SPECIAL,
but will work only for blessed with spell id creatures.
2023-03-16 16:46:41 +03:00
Konstantin
a943d2cb12 vcmi: add sourceType to HasAnotherBonusLimiter
Now we can filter bonuses by sourceType, hence,
checking, for example, specific secondary skills.

Also fix archery artifacts working without Archery skill.
2023-03-16 16:46:41 +03:00
Konstantin
7e9a15c20b vcmi: add PERCENT_TO_TARGET_SOURCE value type
It will break saves!!!

Added a new value type to bonuses which allows to add percentage
only to one foreign bonus source, for example, to add percentage to all
bonuses from secondary skills from hero special.
2023-03-16 16:46:41 +03:00
Konstantin
98218adea5 vcmi: add PERCENT_TO_SOURCE value type
This will adds percent only to bonuses with same source.
In theory it should allow us to create specials which affects only
secondary skills, or only artifacts (let's say, swordmaster special
- any attack bonus from artifact is doubled).
2023-03-16 16:46:41 +03:00
Konstantin
ee90400d66 vcmi: add a Not bonus selector.
It will allow us to form complex selector logics with full boolean
operator.
2023-03-16 16:46:41 +03:00
Konstantin
b99a2ad669 vcmi: adjust parseBonus and Bonus::toJson
This was an error, when scheme and parser asks different values for
source type. Corrected this.
2023-03-16 16:46:41 +03:00
Ivan Savenko
129b5313c5
Merge pull request #1663 from Adriankhl/fix_load_sleeping_heroes
Fix client data deserialization, such as sleepingHeroes
2023-03-16 15:05:18 +02:00
Ivan Savenko
865f9f7d2b
Merge pull request #1511 from IvanSavenko/launcher_welcome_page
Add welcome/setup page to Laucher
2023-03-16 15:04:49 +02:00
Ivan Savenko
962f7ac4de
Merge pull request #1682 from IvanSavenko/h3m_text_export
H3M/H3C text export
2023-03-16 14:50:57 +02:00
Ivan Savenko
2a2af34788
Merge pull request #1650 from SoundSSGood/arts-swap-regression-fix
Arts swap regression fixed
2023-03-16 14:47:31 +02:00
Tomasz Zieliński
5b267f9cbd - Duplicate Monolith templates to ensure at least 100 are available to RMG
- Do not use Monoliths which can't be placed at any land
2023-03-16 06:58:25 +01:00
Ivan Savenko
f5f303202a Update localization 2023-03-14 22:04:08 +02:00
Ivan Savenko
d2152d387f Fix processing of VCMI_Tests map 2023-03-14 21:48:39 +02:00
Ivan Savenko
06e5d37fbd Fixed incorrect error messages from translations 2023-03-14 19:55:08 +02:00
Ivan Savenko
f42a894723 Implemented h3c translations 2023-03-14 19:46:15 +02:00
Ivan Savenko
a4ef9fd0b8 Added h3m strings generation to 'convert txt' command 2023-03-14 17:54:37 +02:00
Ivan Savenko
369e925af8 Loading of translation mods is now skipped on language mismatch 2023-03-14 16:02:16 +02:00
Ivan Savenko
66df19352f Do not show languages without translations in UI 2023-03-14 16:02:16 +02:00
Ivan Savenko
c3d78ba761 Partially implemented Setup Window 2023-03-14 16:02:16 +02:00
Ivan Savenko
6fe319329b Fix language selection 2023-03-14 16:02:16 +02:00
Ivan Savenko
70bdb3aeaf Moved language handling code to Languages.h/cpp 2023-03-14 16:02:16 +02:00
Adriankhl
626721cbba Fix serialization of ObjectClass 2023-03-12 21:41:46 +01:00
Konstantin
45dcd95f20 miscObjects: fix whirpool display
It should display negative numbers, not positive
2023-03-11 21:41:58 +03:00
Konstantin
fafe352f93 vcmi: bump max serialization version
And also - now we can choose between 3 states for rewardables
actually.
2023-03-11 21:41:57 +03:00
Konstantin
bc228a938a vcmi: use enum class for EComponentType
There is really no reason not to use it
2023-03-11 21:41:57 +03:00
Konstantin
716dd9a43b vcmi: remove a bunch of duplicated showInfoDialog
These methods duplicated in almost every map object
Just replace it by one such method
2023-03-11 21:41:57 +03:00
Konstantin
8edba4fb06 vcmi: use MODAL by default
Convert only some objects to AUTO, need futher testing
than no non-adventure objects will not use AUTO or INFO
2023-03-11 21:41:57 +03:00
Konstantin
c759400767 vcmi: allow showing simple rewardables in infobox 2023-03-11 21:41:57 +03:00
Konstantin
4617ce10e5 vcmi: allow showing more than one components in infobar
Up to 8, AFAIK. So, we can show multi-reward in infobox now.
One issue remain - cannot dynamically choose components size
based on text size.
2023-03-11 21:41:57 +03:00
Konstantin
d503c875a4 vcmi: fix mana points displayed 2023-03-11 21:41:57 +03:00
Ivan Savenko
0ea73cae7f
Merge pull request #1662 from rilian-la-te/reduce-lexical-cast
vcmi: reduce boost::lexical_cast usage
2023-03-10 12:53:21 +02:00
Ivan Savenko
c4de8a5cd0
Merge pull request #1580 from rilian-la-te/modernize-log-fs-events
Modernize next part
2023-03-09 15:53:43 +02:00
Ivan Savenko
a503c9d413
Merge pull request #1638 from rilian-la-te/fix-road-river
vcmi: fix road and river loading
2023-03-09 15:53:10 +02:00
Konstantin
5366f9190e vcmi: reduce boost::lexical_cast usage 2023-03-09 16:36:46 +03:00
SoundSSGood
e24eb6cc12 regression fixed 2023-03-08 17:20:38 +02:00
Ivan Savenko
58cfea02f1 Added option to skip validation of mods 2023-03-07 00:06:58 +02:00
Ivan Savenko
db9a296d02 Fix debug renderer 2023-03-07 00:06:58 +02:00
Ivan Savenko
499496f9d0 Restored Simplified Chinese support 2023-03-07 00:06:58 +02:00
Ivan Savenko
3d71f8b46d Fix loading of h3m translations 2023-03-07 00:06:58 +02:00
Ivan Savenko
0c847c85cc Fix serialization of rewardable objects 2023-03-07 00:06:58 +02:00
Ivan Savenko
0b3c10d990 Fix crash on hovering Market of Time (unfinished H3 object) 2023-03-07 00:06:58 +02:00
Konstantin
042885c0b8 vcmi: modernize lib/events 2023-03-06 20:24:38 +03:00
Konstantin
462599a5c6 vcmi: modernize lib/filesystem 2023-03-06 20:24:38 +03:00
Konstantin
c142bf1072 vcmi: modernize lib/logging 2023-03-06 20:13:25 +03:00
Ivan Savenko
c8afef3408
Merge pull request #1636 from rilian-la-te/remove-unused
vcmi: remove old war machine code
2023-03-06 00:10:55 +02:00
Ivan Savenko
df50a17d2a Fix loading of non-ASCII text files 2023-03-05 21:50:38 +02:00
Konstantin
c84a9f32f6 vcmi: fix road and river loading
It actually catched by MapFormat.Terrain test crash.
So, this is a fix (functions does not trowing exceptons, it returns NULL
if something is wrong).
2023-03-05 22:41:38 +03:00
Ivan Savenko
7ef5163d9d
Merge pull request #1581 from IvanSavenko/map_render_rewrite
Adventure Map - rendering rewrite
2023-03-05 19:51:07 +02:00
Konstantin
a364e39b50 vcmi: remove old war machine code 2023-03-05 19:12:47 +03:00
Ivan Savenko
387a7b421a Refactoring of new code, multiple functionality changes:
- Implemented separate Map View contexts for different map modes
- Puzzle map now works
- Enemy movement now works as in H3
- Removed no longer used code
- Implemented missing embark/disembark sounds
- Fixed view focusing on embarking/disembarking
- Fixed focusing on movement near edge of terra incognita
- Fixed sea movement sound
2023-03-05 18:02:58 +02:00
Ivan Savenko
45e2875342 Completely removed old TerrainRect class 2023-03-05 17:57:36 +02:00
Ivan Savenko
5905dd6111 Grail digging check is now in library 2023-03-05 17:48:02 +02:00
Ivan Savenko
11e4d84749 Implemented View Earth / View Air spells 2023-03-05 17:48:02 +02:00
Ivan Savenko
ca13e7dedf Implemented terrain palette animatiions. Removed old code 2023-03-05 17:48:02 +02:00
Ivan Savenko
4501036a04 Basic version of hero movement on map. Removed old code. 2023-03-05 17:48:02 +02:00
Ivan Savenko
beb7ce5beb Refactoring of MapView 2023-03-05 17:48:02 +02:00
Ivan Savenko
bb6e1f7ee1 Initial WIP of adventure map rendering rewrite 2023-03-05 17:47:12 +02:00
Ivan Savenko
27cf4d1cd5 Removed non-translatable string 2023-03-05 17:39:27 +02:00
Ivan Savenko
260f6d626c Implemented translations for H3M maps 2023-03-05 17:39:27 +02:00
Ivan Savenko
5b767d8b0d Keep new skills from mods active in h3m maps 2023-03-05 17:39:27 +02:00
Ivan Savenko
f653d22f99 Fixed encoding of strings in h3m maps 2023-03-05 17:39:27 +02:00
Ivan Savenko
9b428e8231 Fonts will now correctly detect encoding of fonts from mods 2023-03-05 17:39:27 +02:00
Ivan Savenko
4260726e4b Provide encoding information to maps & campaigns loaders 2023-03-05 17:39:27 +02:00
Ivan Savenko
bd70b6fabd Unicode conversion functions now require source encoding 2023-03-05 17:39:27 +02:00
Ivan Savenko
8b3309b47d Fixed custom hero names text ID's 2023-03-05 17:39:27 +02:00
Ivan Savenko
190368e419 Fix string ID's road/river/terrains 2023-03-05 17:39:27 +02:00
Ivan Savenko
acdb8d6e06 renamed Unicode -> TextOperations, to use for all text processing 2023-03-05 17:39:23 +02:00
Ivan Savenko
65c020ef34 Moved Unicode namespace out of GeneralTextHandler file 2023-03-05 17:30:38 +02:00
Ivan Savenko
6643408cdd Fixed localization validation 2023-03-05 17:30:38 +02:00
Ivan Savenko
320a44ca3c Moved common language data into a new file 2023-03-05 17:30:38 +02:00
Ivan Savenko
eeafc48663 Added validation for mod translations 2023-03-05 17:30:38 +02:00
Ivan Savenko
f57a77c2fe VCMI will now check whether translations are complete 2023-03-05 17:30:38 +02:00
Ivan Savenko
623cae7d47 All translatable strings now have language identifier 2023-03-05 17:30:38 +02:00
Ivan Savenko
84fa19dadf
Merge pull request #1547 from dydzio0614/game-start-unrandomization
Hardcoded features for HotA-like starting conditions
2023-03-05 17:29:49 +02:00
Ivan Savenko
476e60c753
Merge pull request #1615 from SoundSSGood/CArtifactsOfHero-refactoring
Optimization and cleanup CArtifactHolder
2023-03-05 17:28:36 +02:00
Ivan Savenko
07898f5cca
Merge pull request #1609 from krs0/feature/Battle_order_slight_refactorings
Battle order slight refactoring
2023-03-05 17:27:38 +02:00
Andrii Danylchenko
59d612fc2d
Merge pull request #1616 from kambala-decapitator/conan-android
move Android code to the main repo
2023-03-05 08:13:41 +02:00
SoundSSGood
a1dbbe2d86 redraw optimization 2023-03-03 10:17:31 +02:00
Andrey Filipenkov
0294a8b063 enable StupidAI and EmptyAI for static AI 2023-03-02 12:09:49 +03:00
Andrey Filipenkov
fd56f86a84 introduce VCMI_MOBILE macro 2023-03-02 12:09:49 +03:00
Andrey Filipenkov
313d479d42 fix using JNI from server in single process build 2023-03-02 12:09:48 +03:00
Andrey Filipenkov
c4e7e91850 fix single process build for Android 2023-03-02 12:09:48 +03:00
Andrey Filipenkov
71d51beab2 change static AI approach to use static libvcmi
- now links to static AI lib targets
- solves uncaught boost exception on closing server
2023-03-02 12:09:48 +03:00
Andrey Filipenkov
4c19d8794d add option to compile AI code into libvcmi directly
- used on Android by default
- AI sources and libs are propagated to upper level with set(... PARENT_SCOPE)
2023-03-02 12:09:48 +03:00
Andrey Filipenkov
2ced633ad8 refactor VCMIDirs for Android
removes inheritance from VCMIDirsXDG to get rid of defining M_*_DIR variables
2023-03-02 12:09:47 +03:00
Andrey Filipenkov
5b1f3bf0db use JNIEnv object from SDL instead of forwarding from Java for Client 2023-03-02 12:09:47 +03:00
Andrey Filipenkov
970bd6ed34 adjust project for Android (except AI) 2023-03-02 12:09:47 +03:00
krs
26bca26bd8 Enum is now in its own namespace, comments for enum values removed
Using Namespace Fix for linux compilation.


NO_OF_PHASES renamed to NUMBER_OF_PHASES, removed duplicate phase documentation
2023-03-01 21:21:20 +02:00
krs
7421fabf2c BattlePhases enum moved to Unit.h 2023-03-01 21:21:20 +02:00
krs
0373febe6f Refactoring 1st phase - Renaming's mainly
S'more small battle order refactoring.
2023-03-01 21:21:20 +02:00
Ivan Savenko
d55ac50e3c
Merge pull request #1622 from krs0/feature/CArchiveLoaderparam_extractArchives_ismaskedbytypo#1619
CArchiveLoader param "extractArchives" is masked by typo #1619
2023-03-01 21:15:35 +02:00
Konstantin
cb26bedd17 fix #1621 2023-03-01 19:22:06 +03:00
krs
a950fb379e All CArchiveLoader constructor parameters now have different names from members 2023-02-28 23:21:44 +02:00
Ivan Savenko
8d3bfbe0bc
Merge pull request #1582 from rilian-la-te/modernize-lib-battle
vcmi: modernize lib/battle
2023-02-28 12:12:39 +02:00
Andrii Danylchenko
37baec1d24 Fix crash on replaced hero placeholder mouseover 2023-02-27 09:10:26 +02:00
Ivan Savenko
8c52cbcd00
Merge pull request #1429 from dydzio0614/creature-numeric-quantities
Implement numeric creature descriptions with config toggle on/off
2023-02-26 22:57:01 +02:00
Andrey Filipenkov
176dfca578 fix indentation 2023-02-24 13:42:26 +03:00
Andrey Filipenkov
e6d87d5f35 wrap FileStream's helper functions into anonymous namespace 2023-02-24 13:42:26 +03:00
Andrey Filipenkov
85d1909ac5 remove copy-pasted functions from ioapi.c 2023-02-24 13:42:26 +03:00
Andrey Filipenkov
b0c109d5f7 use target from variable 2023-02-22 14:00:52 +03:00
Andrey Filipenkov
59948a41a6 use std::call_once instead of bool flag 2023-02-22 14:00:50 +03:00
Andrii Danylchenko
e13a230848 merge conflict regression fix 2023-02-18 17:19:33 +02:00
Andrii Danylchenko
47b253e837 #1579 - check z coord as well 2023-02-17 18:34:57 +02:00
Konstantin
93c2bbf9ab vcmi: modernize lib/battle 2023-02-16 23:37:19 +03:00
Dydzio
e48a4185ed Use config values from new settings 2023-02-15 23:36:09 +01:00
Andrii Danylchenko
6314fc0506 Fix destructor order 2023-02-15 20:37:18 +02:00
Andrii Danylchenko
c6feafc367 Hack to fix campaigns 2023-02-15 20:37:18 +02:00
Ivan Savenko
f65c6ad275 fix regressions from modernization 2023-02-15 14:27:12 +02:00
Ivan Savenko
5d98471d12
Merge pull request #1567 from rilian-la-te/modernize-maps
Modernize maps
2023-02-14 23:42:03 +02:00
Konstantin
5f181e25af vcmi: modernize lib/mapObjects 2023-02-14 14:39:56 +03:00
Konstantin
b16f66477c vcmi: modernize lib/mapping 2023-02-14 14:22:13 +03:00
Ivan Savenko
64ddd75cdc
Merge pull request #1571 from IvanSavenko/advmap_elements_refactoring
Advmap elements refactoring
2023-02-14 12:53:23 +02:00
Ivan Savenko
fbbfa29030
Merge pull request #1561 from rilian-la-te/modernize-serializer-spells
VCMI: modernize lib/serializer and modernize lib/spells
2023-02-14 12:12:39 +02:00
Ivan Savenko
72fe1fcfa9 Fix minimap updating on hero loss 2023-02-14 11:32:19 +02:00
Konstantin
7bfb37df4d vcmi: modernize lib/rmg 2023-02-14 02:50:39 +03:00
Andrii Danylchenko
9f55666931 rework netpacks to avoid double typeinfo 2023-02-13 20:26:39 +02:00
SoundSSGood
0f93b0991c Regression fixed 2023-02-13 15:16:42 +02:00
SoundSSGood
8504102c53
Merge branch 'vcmi:develop' into contitutient-swap 2023-02-13 09:51:42 +02:00
Andrii Danylchenko
e6b21ed298
Merge pull request #1574 from SoundSSGood/contitutient-move
combined art move
2023-02-13 08:30:35 +02:00
Andrii Danylchenko
c41a0a37e7
Merge pull request #1562 from rilian-la-te/modernize-netpacks
vcmi: modernize lib/NetPacks.h and lib/NetPacksBase.h
2023-02-12 23:10:21 +02:00
SoundSSGood
2976739c97 some refactoring 2023-02-12 21:27:37 +02:00
Konstantin
bdd976cc1e vcmi: modernize spell effects v2 2023-02-12 21:23:00 +03:00
Konstantin
97fc424e98 vcmi: modernize lib/spells (except adventure one, needs major rework) 2023-02-12 21:23:00 +03:00
Konstantin
8661496f6c vcmi: modernize lib/serializer 2023-02-12 21:23:00 +03:00
SoundSSGood
34a0dbc0b6 misc slots. fixed combined arts moving 2023-02-12 20:13:26 +02:00
Konstantin
0627e1ecaa vcmi: remove unused variables from lib/rmg 2023-02-12 19:11:24 +03:00
Konstantin
3cf303f1c7 vcmi/client: make ColorRGBA constexpr
1. Replace overflowing int3 to ColorRGBA, which is more semantically
   correct
2. Make ColorRGBA constexpr, to make sure than hardcoded colors can
   be initialized in compile time
2023-02-12 19:11:24 +03:00
Konstantin
038db5c71b vcmi: make int3 as constexpr class
This allows us to calculate distances and check const vector validity
at compile time
2023-02-12 19:00:43 +03:00
Konstantin
b30d23d278 vcmi: make ConstTransitivePtr always init self. 2023-02-12 17:59:06 +03:00
SoundSSGood
7314df56ac contitutient arts swap 2023-02-11 13:21:45 +02:00
DjWarmonger
94bc418e34
Update CRewardableConstructor.cpp
Fixed swapped identifiers in Limiter.
2023-02-11 08:28:29 +01:00
Dydzio
8604bde69e
Apply suggestions from code review
Commit code review changes

Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2023-02-09 19:20:41 +01:00
Dydzio
7af737e9d4 Improve filling vector hardcoded feature data 2023-02-09 18:35:06 +01:00
Konstantin
286c1e522e vcmi: modernize netpacks 2023-02-09 20:22:48 +03:00
Konstantin
e82cc56ddb vcmi: modernize lib/spells/effects 2023-02-08 15:38:26 +03:00
Konstantin
cb3723b54c vstd: pass separators and input by reference
It removes many cases of redundnant string copying
2023-02-05 18:07:56 +03:00
Dydzio
981c23cafa Bump serialization - not sure if necessary 2023-02-05 01:01:11 +01:00
Dydzio
7095e9d8f9 Allow heroes to start with empty armies if configured properly 2023-02-05 00:36:51 +01:00
Dydzio
3f79a9806c Allow flexible configuration - starter dwellings and max stacks count 2023-02-04 23:40:02 +01:00
Konstantin
7b8aebe4e3 vcmi: deprecate MAXED_SPELL
It is almost identical to SPECIAL_FIXED_VALUE_ENCHANT.

Replace its usage in JSON and inside deprecated converter
to SPECIAL_FIXED_VALUE_ENCHANT. Remove buggy string inside
getEffectLevel.
2023-02-04 16:23:03 +03:00
Ivan Savenko
58cfddccaa
Merge pull request #1546 from rilian-la-te/dead-code-removal
Remove SDL usage from VCMI library
2023-02-03 11:28:29 +02:00
Dydzio
28eed7047c Hardcoded feature to allow default towns always have 2nd dwelling 2023-02-02 22:50:08 +01:00
Dydzio
4f4660e82d Hardcoded feature to allow new heroes always have 3 stacks like in HotA 2023-02-02 22:28:14 +01:00
Konstantin
cffdabf48e lib: replace SDL usage to Boost one
It is safer and header-only, and can be removed after C++23 is accepted.
There is no need for SDL in non-GUI.
2023-02-02 23:58:22 +03:00
Konstantin
70786f4963 lib: remove unused header
This an unused header with empty class. Just remove it.
2023-02-02 23:50:50 +03:00
Ivan Savenko
9678296875 Hero interaction is now battle action 2023-02-02 13:43:19 +02:00
Ivan Savenko
b1c67fbf47 Better formatting for enum 2023-02-02 13:25:55 +02:00
Ivan Savenko
f1ea88ae9a
Merge pull request #1505 from dydzio0614/cheats-improvements
Cheats improvements
2023-02-02 12:21:19 +02:00
Ivan Savenko
f4bbcd0ed4
Merge pull request #1539 from dydzio0614/fixScriptingCompilation
Fix scripting compilation
2023-02-02 12:21:11 +02:00
Ivan Savenko
34772ef830 Fixed includes 2023-02-01 21:45:06 +02:00
Dydzio
19925c2c25 VcmiLua builds properly now 2023-02-01 20:25:09 +01:00
Ivan Savenko
0ba74fea73
Merge pull request #1515 from IvanSavenko/time_based_animations
Time based animations
2023-02-01 12:25:54 +02:00
Ivan Savenko
885fad87f9
Merge pull request #1527 from IvanSavenko/sdl_abstraction_iteration
SDL abstraction layer iteration
2023-02-01 12:25:41 +02:00
Ivan Savenko
c3a2dee45a Code cleanup 2023-01-31 15:00:46 +02:00
Ivan Savenko
c5508d33fc
Merge pull request #1514 from IvanSavenko/rewardable_fixes
Minor fixes to rewardable objects
2023-01-31 12:47:24 +02:00
Ivan Savenko
57df0a6995 Fix crash on hovering prison 2023-01-30 19:00:51 +02:00
Ivan Savenko
42df5626d9 Added Color class to replace SDL_Color 2023-01-30 00:12:43 +02:00
Andrey Filipenkov
07dc2e1c48
Merge pull request #1496 from kambala-decapitator/resurrect-message
show resurrect message in the battle log
2023-01-29 22:18:32 +03:00
Ivan Savenko
57ee9a9bf3 Merge vcmi/beta into vcmi/develop 2023-01-29 18:21:55 +02:00
Ivan Savenko
a853045509 Removed unused value from creature config 2023-01-28 13:56:51 +02:00
Ivan Savenko
d34efaeb81 All battle effects now use time-based timings 2023-01-28 13:19:35 +02:00
Ivan Savenko
a2cd17197e Fix Campfire Gold reward amount. Now always one of 400/500/600 2023-01-28 13:12:03 +02:00
Ivan Savenko
d82822d37a Fix reset of rewardable objects with reset period of 1 day 2023-01-28 13:12:03 +02:00
Ivan Savenko
4d1c338503
Merge pull request #1498 from rilian-la-te/conan-v2
Conan as MXE replacement
2023-01-27 23:14:37 +02:00
Ivan Savenko
e87adf334d Fix loading of vcmi json maps 2023-01-26 23:32:56 +02:00
Ivan Savenko
8b2d336562 Fix initialization of visitDir in templates 2023-01-26 23:32:56 +02:00
Ivan Savenko
a3846f1b31 Fix incorrect identifiers format 2023-01-26 23:32:56 +02:00
Ivan Savenko
eebc6fd625 Map object use format mod:object (or mod:object.subobject) 2023-01-26 23:32:56 +02:00
Ivan Savenko
7b82387a49 Dwellings & Banks will register custom names for their objects 2023-01-26 23:32:56 +02:00