1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-08 23:36:33 +02:00

71 Commits

Author SHA1 Message Date
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
Ivan Savenko
55fd7bd7aa Thieves guild information level is now a bonus type 2024-08-28 13:50:07 +00:00
Laserlicht
746bba0ade docs 2024-08-24 00:34:33 +02:00
Laserlicht
8f407311fd
fix headings of md files 2024-07-16 20:29:20 +02:00
Ivan Savenko
6b8f94e6e7 Merge remote-tracking branch 'vcmi/master' into develop 2024-07-11 17:43:44 +00:00
Ivan Savenko
81aa831237 Clarified bonus types documentation to better match actual logic 2024-07-08 20:55:41 +00:00
Alexander Wilms
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
Ivan Savenko
cfcecbf630 Fix documentation to match actual behavior 2024-06-19 19:59:06 +00:00
Ivan Savenko
fc28943741 Adjusted docs layout to fix table of content 2024-06-04 20:22:43 +00:00
Laserlicht
277a0e63d8
update docs 2024-05-06 00:46:21 +02:00
Dydzio
b351946afd Add some utility bonuses for player resources boosting 2024-04-15 21:18:45 +02:00
Kris-Ja
05bbb45824 change MANA_PER_KNOWLEGDE to percentage 2024-03-23 20:28:49 +01:00
Ivan Savenko
a32ef673f7
Merge pull request #3482 from IvanSavenko/extend_hota_bonuses
Extend hota bonuses
2024-01-15 13:47:13 +02:00
Ivan Savenko
9acd436a09 Review suggestion 2024-01-15 13:18:27 +02:00
Ivan Savenko
5565b55bb0 Fixed handling of SPELL_AFTER_ATTACK without addInfo field 2024-01-14 17:13:33 +02:00
Ivan Savenko
fc6a9924ee FIRST_STRIKE now supports ranged / melee subtypes, BLOCKS_RETALIATION
will properly block FIRST_STRIKE
2024-01-13 16:54:06 +02:00
Ivan Savenko
bb670cfb82 Merged accurate shot bonus into death stare bonus 2024-01-13 15:55:07 +02:00
Ivan Savenko
f6e0f46040
Merge pull request #3467 from dydzio0614/hota-fixes
Fix HotA creature abilities (add bonuses allowing implementing them)
2024-01-12 21:55:18 +02:00
M
56165818b4 Fix wrong english word 2024-01-09 20:06:11 +01:00
M
67f18729fa REVENGE bonus that matches HotA haspid ability 2024-01-09 19:10:43 +01:00
Dydzio
675f9b11fa Add ENEMY_ATTACK_REDUCTION bonus - fixes HotA Nix 2024-01-08 19:37:04 +01:00
Dydzio
3c95f92c59 Update documentation 2024-01-07 21:22:10 +01:00
Ivan Savenko
51b7de4b98 Fix double off-by-one bug with CREATURE_GROWTH bonus 2024-01-05 16:57:44 +02:00
Dydzio
7283a4861e Initial version of ACCURATE_SHOT implementation 2024-01-04 22:27:51 +01:00
Dydzio
fbd988df42 Bit better documentation wording 2024-01-01 21:19:25 +01:00
Dydzio
7cf7543747 Configurable ferocity bonus 2024-01-01 21:16:38 +01:00
Dydzio
fe39faf36c Add UNTIL_OWN_ATTACK bonus duration and use for berserk 2023-12-19 19:52:40 +01:00
Tomasz Zieliński
805c922c80 More detailed info with examples 2023-11-12 09:07:52 +01:00
Tomasz Zieliński
f105a34be5 defence -> defense
json syntax
2023-11-12 05:57:39 +01:00