1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00
Commit Graph

37 Commits

Author SHA1 Message Date
Ivan Savenko
8225eb454e Added GameSettings to gamestate, potentially allowing to define game
settings per map (or in random map template)
2024-09-05 15:16:27 +00:00
Ivan Savenko
81e6207df0 Add helper functions for integer division rounding
Added set of functions that perform integer division with different
rounding modes:
- divideAndCeil - rounds up to next integer
- divideAndRound - rounds to nearest integer
- divideAndFloor - rounds to previous integer (equivalent to default
division)

Intended for use in library, where usage of floating point might lead to
desync in multiplayer games.

Replaced some cases that I knew of, including recent handicap PR
2024-08-03 13:52:14 +00:00
Tomasz Zieliński
bfa93be765 Limit predicted damage / loses to actual stack health 2024-07-09 06:39:41 +02:00
kdmcser
c2d76ab95d
accept log text suggestion
Co-authored-by: Alexander Wilms <Alexander-Wilms@users.noreply.github.com>
2024-04-18 08:40:25 +08:00
kdmcser
b61011e8b4
accept get creature name suggestion
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-04-18 00:48:51 +08:00
kdmcser
1c6dfb5cc5 Fix creature min damage greater than max will cause game crash. #3780 2024-04-17 23:24:13 +08:00
M
9ee526d202 Fixes from code review 2024-01-11 21:10:22 +01:00
M
7bf273e01c Extract revenge calculation to separate method 2024-01-10 22:56:26 +01:00
M
815fa26fb3 Change nix rounding, revert assert comment 2024-01-10 22:18:53 +01:00
M
67f18729fa REVENGE bonus that matches HotA haspid ability 2024-01-09 19:10:43 +01:00
Dydzio
dbba1164ef Fix floating point rounding for 5 attack points and unupgraded nix 2024-01-08 20:50:37 +01:00
Dydzio
675f9b11fa Add ENEMY_ATTACK_REDUCTION bonus - fixes HotA Nix 2024-01-08 19:37:04 +01:00
Ivan Savenko
3b6d3dee69 Slayer spell should only affect creatures with KING bonus 2023-12-10 19:17:09 +02:00
Ivan Savenko
ac925bb786 Renamed new types for consistency with code style 2023-10-22 16:55:19 +03:00
Ivan Savenko
80e6485965 MetaIdentifier now uses std::variant internally 2023-10-22 16:55:19 +03:00
Ivan Savenko
b394158dc9 Bonus Source ID now uses metaidentifier 2023-10-22 16:55:18 +03:00
Ivan Savenko
77facf9387 Implement missing functions, fixes linking errors 2023-10-22 16:54:56 +03:00
Ivan Savenko
0a10fc30b8 (lib) Bonus subtype is now stored as metaidentifier that can store any
other identifier inside it
2023-10-22 16:54:43 +03:00
Ivan Savenko
62cd8b12d4 Converted several namespace enums to enum class 2023-08-25 13:38:02 +03:00
Konstantin
05eccbc2bb vcmi: split bonus to enumerator and HeroBonus.h 2023-05-03 18:01:06 +03:00
Konstantin
a6de9097be vcmi: rename HeroBonus.h to Bonus.h 2023-05-02 11:20:58 +03:00
Konstantin
6fa1b2b19f vcmi: move bonuses to its own folder 2023-05-02 00:53:50 +03:00
Konstantin
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
Ivan Savenko
970981cfc9 Show information on potential kills in attack tooltip 2023-03-24 17:18:47 +02:00
Ivan Savenko
31147ac83b refactoring: TDmgRange pair -> DamageRange struct 2023-03-23 17:49:33 +02:00
Ivan Savenko
a0e9e01b48 Renamed & reorganized all game mechanics settings names 2023-03-16 18:11:35 +02:00
Ivan Savenko
383387ef29 Integrated defaultMods into mod system 2023-03-16 17:55:09 +02: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
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
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
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
93c2bbf9ab vcmi: modernize lib/battle 2023-02-16 23:37:19 +03:00
Ivan Savenko
30d7bdc884 Moved tower damage computation to town instance 2023-01-20 15:18:10 +02:00
Ivan Savenko
b7c27e7d47 ios compilation fix 2023-01-20 15:18:10 +02:00
Ivan Savenko
789f4d6bc8 Formatting 2023-01-20 15:18:10 +02:00
Ivan Savenko
1418ce4678 Refactoring & fixes of damage calculation 2023-01-20 15:18:10 +02:00