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

861 Commits

Author SHA1 Message Date
nordsoft
30967b2813 Remove excess pointer from market interface 2023-05-01 00:14:53 +04:00
nordsoft
1b4d117790 deeper decoupling 2023-04-30 17:13:07 +04:00
Konstantin
86f5d6de69 vcmi: modernize headers 2023-04-30 13:35:54 +03:00
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
Ivan Savenko
d985ac90d3 Merge master -> develop 2023-04-28 22:57:25 +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
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
Konstantin P
54e4db3819 vcmi: fix abandoned mine resource loading
It was overshadowed by local variable
2023-04-27 20:59:55 +03:00
Ivan Savenko
fb739e7186 Merge beta -> develop 2023-04-26 22:48:08 +03:00
Nordsoft91
f39f208e05
Merge pull request #1915 from Nordsoft91/vcmi-campaign
VCMI campaigns format
2023-04-23 19:09:59 +04:00
Nordsoft91
a553a4aa66
Merge pull request #2030 from Nordsoft91/boats 2023-04-22 03:27:00 +04:00
nordsoft
de159df481 Rename boats 2023-04-20 21:20:51 +04:00
nordsoft
9ecf16ca23 Fix minor bugs 2023-04-20 03:20:00 +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
d94ce22e70 vcmi: fix terrain penalties
Fixes #2028
2023-04-19 12:41:54 +03: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
nordsoft
d1dacd45e2 Animations from config 2023-04-19 00:14:15 +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
Konstantin
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
Ivan Savenko
87647cd02a Do not propose banned skills in witch huts 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
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
44b83b2e11 Merge master -> develop 2023-04-14 16:51:35 +03:00
Ivan Savenko
35ac4d88ac Fix Seer Hut right-click text 2023-04-13 19:06:44 +03:00
Ivan Savenko
506c3d29bc Replaced vstd clamp with std version 2023-04-12 01:03:14 +03:00
Ivan Savenko
dfa2e2a349 Merge beta into develop 2023-04-11 19:37:35 +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
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
fedf7d377c vcmi: remove TFaction
This is a huge change and will break save compatibility
2023-04-10 19:28:16 +03:00
Konstantin
7326980bd4 vcmi: rename WithXXX to IXXXProvider 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
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
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
nordsoft
b9cabef179 Fixes issues related to spell mechanics 2023-04-10 17:08:24 +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
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
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
a6ce99573c Added fallback identifiers for reading older vcmi maps 2023-04-09 12:27:33 +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
Konstantin
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
Konstantin
8968f0ef0e vcmi: change EAlignment to enum class 2023-04-05 01:22:04 +03:00
Konstantin
22dd97ad18 vcmi: use entilites when possible part 1 2023-04-04 23:02:54 +03:00
Ivan Savenko
307065a633 Merge beta into develop 2023-04-04 16:06:20 +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
nordsoft
1e5362cb07 Fix crash with cutting random town 2023-04-02 14:06:16 +04:00
Tomasz Zieliński
308b42549b Merge remote-tracking branch 'origin/beta' into object_distribution 2023-03-31 15:44:14 +02: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
Ivan Savenko
508d68f77c Rewardables will use per-object name, if available 2023-03-30 22:29:58 +03:00
Konstantin
5716925b47 NetPacks: change GiveBonus enum to enum class. 2023-03-30 12:41:17 +03:00
Tomasz Zieliński
b184e80b72 Use the most suitable template for object 2023-03-28 17:53:08 +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
b875da108b
Merge pull request #1717 from SoundSSGood/backpack-limit-size
Introducing backpack size limit functionality
2023-03-27 17:17:49 +03:00
Tomasz Zieliński
18a87d1ec0 Distribute limited objects evenly in zones with matching terrain 2023-03-27 09:09:58 +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
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
Ivan Savenko
31147ac83b refactoring: TDmgRange pair -> DamageRange struct 2023-03-23 17:49:33 +02:00
SoundSSGood
19096f39f0 Backpack limit. Amount of fixes. 2023-03-21 22:11:42 +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
Andrey Filipenkov
a0cd69e944 Slight refactoring of CGHeroInstance::movementPointsAfterEmbark() 2023-03-20 11:35:20 +03:00
Andrey Filipenkov
bfb0dc26d5 fix movement cost on roads 2023-03-20 11:35:19 +03:00
Tomasz Zieliński
eabcbfc25a Fix all stacks being capped at 10 units 2023-03-17 22:32:05 +01:00
Konstantin
6de042657c fix Ignissa bug the old way 2023-03-17 20:09:18 +03:00
Konstantin
bbbbfe00f0 Modernize resourceSet 2023-03-17 02:26:54 +03: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
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
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
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
c64d05c419 vcmi: skill-agnostic diplomacy
This is simple and will work.
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
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
d9496dd9f7 vcmi: remove vector speciality format
It is deprecated and will not be used anymore.
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
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
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
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
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
Ivan Savenko
7ef5163d9d
Merge pull request #1581 from IvanSavenko/map_render_rewrite
Adventure Map - rendering rewrite
2023-03-05 19:51:07 +02:00
Ivan Savenko
5905dd6111 Grail digging check is now in library 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
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
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
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
Dydzio
e48a4185ed Use config values from new settings 2023-02-15 23:36:09 +01: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
Konstantin
5f181e25af vcmi: modernize lib/mapObjects 2023-02-14 14:39:56 +03: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
7095e9d8f9 Allow heroes to start with empty armies if configured properly 2023-02-05 00:36:51 +01:00