1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
Commit Graph

658 Commits

Author SHA1 Message Date
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
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
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
Dydzio
4f4660e82d Hardcoded feature to allow new heroes always have 3 stacks like in HotA 2023-02-02 22:28:14 +01:00