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

4586 Commits

Author SHA1 Message Date
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
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