1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00
Commit Graph

99 Commits

Author SHA1 Message Date
Ivan Savenko
23fb9e8829 Update docs & schemas 2025-11-02 13:07:35 +02:00
Ivan Savenko
2191e51d48 Implemeted HATES_TRAIT bonus, similar to HATE, but targets any unit with
specific bonus
2025-11-02 11:09:42 +02:00
kdmcser
594ae27cb5 support setting spell master level in OPENING_BATTLE_SPELLS 2025-08-11 02:13:36 +08:00
Ivan Savenko
5caf43a63c Merge pull request #5900 from IvanSavenko/bonus_limiters
Bonus limiters refactoring
2025-07-09 11:12:11 +03:00
Ivan Savenko
4af7949571 Bonus limiters refactoring
- Split massive `parseLimiter` method in smaller chunks
- Added alternative format for limiters with named parameters instead of
unclear `parameters` entry that often leads to bugs in mods. Old format
is still available.
- Added detailed validation for limiter format
- Converted vcmi json's to use new format
- Removed parameter-less `CREATURE_FACTION` and `SAME_FACTION` limiter.
They are unused in mods and have unclear use-case that can be replaced
by other limiters
- Expanded documentation on limiter types

All mods that were supported before should still be supported
2025-07-08 13:01:08 +03:00
Laserlicht
ca8cfaf0ad Merge branch 'develop' into max_range_spell 2025-07-08 11:36:23 +02:00
Ivan Savenko
e2aac34e5b Added COMBAT_MANA_BONUS to Skyship, updated docs 2025-07-06 17:19:41 +03:00
Laserlicht
13a2b8781e Merge branch 'vcmi:develop' into max_range_spell 2025-07-03 23:25:06 +02:00
SoundSSGood
6752ab3a75 HAS_CHARGES_LIMITER 2025-06-30 18:39:57 +02:00
Ivan Savenko
d1f9c497a3 Fix handling of bonuses with negative values 2025-06-27 12:09:28 +03:00
Ivan Savenko
135768e763 Added TIMES_ARMY_SIZE updater 2025-06-26 15:10:55 +03:00
Ivan Savenko
dec4826b54 Update docs, remove old propagator names 2025-06-26 15:10:39 +03:00
Laserlicht
9bfe3a8195 max range for spellcaster 2025-06-25 15:50:31 +02:00
Ivan Savenko
2d24c28996 Fix potential edge cases in TIMES_STACK_SIZE updater 2025-06-24 11:31:38 +03:00
Ivan Savenko
da0841dc9c Fix parsing of HAS_ANOTHER_BONUS_LIMITER parameters 2025-06-17 16:58:23 +03:00
Ivan Savenko
f9b4a36a5f Add missing docs for new bonus 2025-06-15 23:54:29 +03:00
Ivan Savenko
2b43d415a9 Fix docs, update spell immunity usage of addinfo, fix sonar 2025-06-15 14:37:18 +03:00
Ivan Savenko
f5c037137b Fix translations, fix Sonar 2025-06-15 14:37:17 +03:00
Ivan Savenko
54de24c687 Document new updaters, review old docs 2025-06-15 14:36:29 +03:00
Ivan Savenko
022b0f731c Fix configs, update docs, resolve discovered regressions 2025-06-15 14:36:29 +03:00
Ivan Savenko
d2178f8831 Simplify Necromancy code, update docs 2025-06-15 14:36:29 +03:00
Ivan Savenko
e0de65d56c Reworked & fixed DARKNESS bonuses and lookout tower / skyship logic 2025-06-15 14:36:29 +03:00
Ivan Savenko
a305ed28bb Support for loading custom bonuses, slightly less hardcoded Skeleton
Transformer
2025-06-15 14:36:29 +03:00
Ivan Savenko
527885de21 Added VULNERABLE_FROM_BACK bonus 2025-06-15 14:36:29 +03:00
Ivan Savenko
42c995bbd7 Add more internal links, fix formatting 2025-06-08 14:51:52 +03:00
Ivan Savenko
b0926c67b6 Apply suggestions 2025-06-07 19:40:54 +03:00
Ivan Savenko
5bc27d3d90 Initial version of bonus system usage guide 2025-06-06 18:52:10 +03:00
Ivan Savenko
8f0bca05de Review & update spell format documentation. Remove unused ai value 2025-06-05 22:30:16 +03:00
Ivan Savenko
ce5ee6e1df Merge pull request #5769 from IvanSavenko/mysticism
Percentage-based mana regeneration
2025-06-04 21:11:45 +03:00
Ivan Savenko
07dcdc1f85 Percentage-based mana regeneration
Hota-like mysticism.

Bonus FULL_MANA_REGENERATION (Wizard well) has been replaced with
MANA_PERCENTAGE_REGENERATION bonus. Wizard well now has new bonus with
100% value.
2025-06-03 19:38:54 +03:00
Ivan Savenko
139f41c9b2 Implement STACK_EXPERIENCE_GAIN_PERCENT bonus
Suggested on Discord

- implements STACK_EXPERIENCE_GAIN_PERCENT that modifies stack
experience received by units after combat
- removed "EXPERIENCE" primary skill. Changes to experience are now
applied through separate netpack
2025-06-02 21:21:20 +03:00
Ivan Savenko
6fe3666abb Fix validation of addInfo of bonuses
- Added missing docs on addInfo of some bonuses
- Unified naming in docs to match json keys
- Removed addInfo from bonuses that don't actually support it
- Added loading of addInfo to bonuses that support it
2025-05-22 19:00:18 +03:00
Ivan Savenko
3f83ad1b40 Merge pull request #5726 from IvanSavenko/breath
Configurable multi-hex attacks
2025-05-21 17:10:59 +03:00
Ivan Savenko
e90d8c318d Configurable multi-hex attacks
- Added bonus type MULTIHEX_UNIT_ATTACK - configurable version of Dragon
Breath.
- Added bonus type MULTIHEX_ENEMY_ATTACK - configurable version of
Cerberi multi-headed attack that only hits enemies
- Added bonus type MULTIHEX_ANIMATION - optional bonus that does not
affects gameplay, but allows to define in which cases game should use
alternative attack animation.
- All existing multi-hex attack bonuses other than ATTACKS_ALL_ADJACENT
are presumable deprecated, but will be supported for now.
- It is now possible to precisely configure which hexes are targeted by
MULTIHEX_XXX bonuses. See docs for details.
- Unified logic of all multi-hex attacks, all existing bonuses are now
implemented as specific case of MULTIHEX_XXX bonus
- Added tests to cover Cerberi attack logic, and fixed incorrect edge
case of Dragon Breath
2025-05-20 15:08:59 +03:00
Ivan Savenko
2cd61af276 rename field to match actual key in json 2025-05-20 14:56:22 +03:00
SoundSSGood
f614a8a7f5 Discharging conditions 2025-05-16 23:26:42 +02:00
SoundSSGood
a750adf705 Bonus type ARTIFACT_CHARGE 2025-05-16 23:20:09 +02:00
Ivan Savenko
990f766254 Update & expand docs on bonus limiters & updaters 2025-05-10 19:16:51 +03:00
Ivan Savenko
896a7ec88e Better support for Adela specialty (+new modding functionality for it)
Fixes Adela specialty that was apparently broken back in #1518 and
replaced with logic that was clearly not tested - it was neither
functional, nor it was following H3 behavior.

- `HAS_ANOTHER_BONUS_LIMITER` now accepts `null` in place of bonus type,
for cases when limiting is needed by bonus source or bonus subtype. This
allows Adela Bless specialty to always work, irregardless of which
bonuses are provided by Bless.
- Implemented `DIVIDE_STACK_LEVEL` updater that functions same as
`TIMES_STACK_LEVEL`, but it divides bonus value, instead of multiplying
it (to make Adela specialty weaker for high-tier units, as in H3)
- Implemented `TIMES_HERO_LEVEL_DIVIDE_STACK_LEVEL` updater that
combines two existing updaters, to implement `val * heroLevel /
unitLevel` formula needed for Adela specialty
- Removed deprecated `ARMY_MOVEMENT` updater. Its functionality has
already been removed in 1.6.X releases, and it was remaining only as a
placeholder
- Updated modding documentation to account for these changes & to remove
some TODO's

Fixed regression from #777 that could led to either duplicated bonuses
or to multiple application of updaters. It introduced double-recursion -
node parents were gathered recursively, and then bonuses were also
collected recursively within each parent. This created situation where
updater could be applied different number of times. For example, hero
bonus that is propagated to unit in combat could be selected directly,
or via hero->combat unit chain, or via hero->garrison unit->combat unit
chains, leading to different calls to updaters if updater handles
garrison unit node type
2025-04-13 16:24:51 +03:00
Ivan Savenko
ec970c7b22 Support for configuring minimal cost for moving between tiles
- Added `movementCostBase` parameter to game config that defines minimal
amount of movement points that will be spent when moving from one tile
on another while offroad (and cost of Fly / Town Portal spells)
- Added `BASE_TILE_MOVEMENT_COST` bonus type that allows modifying
`movementCostBase` on per-hero basis

Example usage for hota-like pathfinding skill
```json
"tileCostReduction" : {
	"type" : "BASE_TILE_MOVEMENT_COST",
	"val" : -15
}
```
2025-02-03 22:52:33 +00:00
Ivan Savenko
53d4afdae5 Enable rule to enforce specifying language for code blocks 2024-12-05 21:32:55 +00:00
Ivan Savenko
879aaba980 Use json instead of json5 for syntax highlight in docs
Looks like website only recognizes javascript & json, and is not aware
of jsonc or json5.

Will result in small regression on Github web view - comments will show
up as red (since comments are not part of json format), but syntax
highlight would work both on website and on Github.

Alternative is using javascript for syntax highlight, however syntax
highlighter for json looks better on both website and Github (since it
uses separate highlighting for json keys, separate from strings in
values)
2024-12-04 16:50:01 +00:00
Ivan Savenko
7b682f9010 Always use json5 for syntax highlighting. 2024-12-01 12:18:06 +00:00
Ivan Savenko
36fe8462c5 Address code review, fix few more issues with formatting 2024-12-01 11:15:13 +00:00
Ivan Savenko
74a4a10f48 Added markdownlint to Github CI
- Markdown will now be validated as part of Github CI
- Applied auto-fix to most common issues (mostly whitespace related)
- Fixed manually some of more complex cases

Some valid markdownlint rules are currently disabled, to avoid failing
CI, can be enabled in future
2024-11-30 20:20:15 +00:00
Ivan Savenko
0969871835 Merge branch 'develop' into mechanical_bonus 2024-10-31 15:14:51 +02:00
Laserlicht
53b7c5da6f added MECHANICAL bonus 2024-10-24 21:30:51 +02:00
Laserlicht
0991f02282 Bonus: prism breath 2024-10-20 22:02:56 +02:00
Laserlicht
5e3630adae adjust texts 2024-09-19 20:57:43 +02:00
Laserlicht
b36c05df1d INVINCIBLE bonus 2024-09-19 03:14:45 +02:00