1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00
Commit Graph

13 Commits

Author SHA1 Message Date
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
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
7b682f9010 Always use json5 for syntax highlighting. 2024-12-01 12:18:06 +00:00
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
8f407311fd fix headings of md files 2024-07-16 20:29:20 +02:00
277a0e63d8 update docs 2024-05-06 00:46:21 +02:00
43246477d4 Update bonuses docs 2023-09-26 15:55:27 +03:00
feb272e102 Updated map object and bonuses documentations 2023-09-13 21:55:36 +03:00
3c23b1bbfa Integrated recent changes from wiki's 2023-09-07 13:09:41 +03:00
704772d6ce Added navigation to player and modders docs 2023-09-07 11:04:01 +03:00
3dcd4c7a6f Modders docs update iteration 2023-09-07 11:04:01 +03:00
06f9513b32 Updated modders docs 2023-09-07 11:04:01 +03:00
d78106b52b Files renamed for consistency, updated some pages 2023-09-07 11:02:39 +03:00