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

320 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
57ee9a9bf3 Merge vcmi/beta into vcmi/develop 2023-01-29 18:21:55 +02:00
Andrey Filipenkov
90cb0cdc9b fix displaying growth bonus from Statue of Legion 2023-01-24 18:35:30 +03:00
Ivan Savenko
4a09dc0757 Fixed Adela's Bless specialty 2023-01-20 15:18:10 +02:00
Ivan Savenko
c400416058
Merge pull request #1409 from IvanSavenko/translate_terrain
Refactoring of terrain handlers
2023-01-18 00:12:31 +02:00
Dydzio
72eb794397 Fix space to tab, update description 2023-01-18 02:05:30 +04:00
Dydzio
cf1674d0ca Introduce new bonus for limiting range 2023-01-18 02:05:30 +04:00
Ivan Savenko
4f3ea0d1d9 Renamed Terrain.h/cpp -> TerrainHandler.h/cpp 2023-01-10 00:01:35 +02:00
Ivan Savenko
0c78e47dce Fixed serialization due to changed lsit of bonuses 2022-12-30 11:55:40 +02:00
Ivan Savenko
9248e06ae0 Demon summon is now a spell. DEMON_SUMMONING bonus has been removed 2022-12-22 23:11:55 +02:00
nordsoft
0f35082024 Fix crash with objects belonging players without state 2022-11-06 03:26:13 +04:00
Tomasz Zieliński
20c102e648 Remove T prefix from new typedefs 2022-09-29 11:44:46 +02:00
Tomasz Zieliński
f386f42166 Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts:
#	lib/Terrain.cpp
#	lib/Terrain.h
#	lib/battle/CBattleInfoEssentials.cpp
#	lib/rmg/ObstaclePlacer.cpp
#	lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
Tomasz Zieliński
4ea57ea7fc A variety of suggested style tweaks 2022-09-25 09:33:56 +02:00
Andrey Filipenkov
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Tomasz Zieliński
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02:00
Tomasz Zieliński
d0f857c3c4 - Generate caching string with sprintf
- Reserve BonusList space to avoid costly vector reallocation
- Tweaks in int3 and UNDEAD bonus
2022-09-14 11:00:40 +02:00
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Konstantin
c6b198ce14
Warning fix (I moved C++17 and CI to another branch) (#739)
* clang warning fixes
* use CMake 3.10 due to MXE CI does not have 3.13 yet

Co-authored-by: Konstantin <rilian@niisi.ras.ru>
2022-05-19 15:14:50 +03:00
Andrii Danylchenko
fa9a420f99 Fix a few crashes 2022-04-17 09:10:53 +03:00
Dmitry Orlov
30b879ae5d Fixed: duplicated bonusing building. Improved: opposite bonus propagation 2021-09-12 14:30:54 +03:00
Dmitry Orlov
2a39c401b8 Feature: Opposite Side Limiter. Added: Old saves support. 2021-09-04 14:15:38 +03:00
Dmitry Orlov
25d9ea1ddf Feature: Opposite Side Limiter 2021-09-04 14:15:38 +03:00
Dmitry Orlov
f861d3a509 Fix: Visiting hero should receive town bonuses during town siege 2021-09-04 14:15:37 +03:00