1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-04 09:42:40 +02:00
Commit Graph

368 Commits

Author SHA1 Message Date
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
Alexander Wilms
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00: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
85de3143ff Fixed Genie spellcasting logic to account for spell immunities 2023-12-24 01:13:19 +02:00
Ivan Savenko
3b6d3dee69 Slayer spell should only affect creatures with KING bonus 2023-12-10 19:17:09 +02:00
Ivan Savenko
07e7d6cc14 Do not allow fleeing from cities without fort 2023-11-21 20:32:07 +02:00
Ivan Savenko
b58301849b Pass functor via reference to avoid costly copies 2023-11-18 19:43:11 +02:00
Ivan Savenko
f5a64a0ac5 Call cheap to compute conditions before costly conditions 2023-11-18 19:42:45 +02:00
Ivan Savenko
3ac80e1f09 Avoid costly std vector construction 2023-11-18 19:42:02 +02:00
Ivan Savenko
abad4b01ce Remove explicit convesion to int in operators 2023-11-15 15:55:19 +02:00
Ivan Savenko
09e42cd9df Remove magic number 2023-11-07 22:47:11 +02:00
Ivan Savenko
86a3806bec MetaString refactor to eliminate integer usage for identifiers
- entity names are now stored and serialized as text ID's
- added helper methods for convenience to get entities names to
metastring
2023-11-07 22:47:10 +02:00
Ivan Savenko
885dce0c27 Replace static_cast's of Identifiers with getNum call 2023-11-03 16:03:29 +02:00
Ivan Savenko
8f25f1fd4b Serialize identifiers without implicit conversion to int 2023-11-03 16:03:29 +02:00
Ivan Savenko
2b9c362d5b Explicitly convert identifier to underlying enumeration 2023-11-03 16:03:29 +02:00
Ivan Savenko
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
Ivan Savenko
3880ea58b9 Merge branch 'josch/dos2unix' into develop 2023-10-22 18:39:03 +03: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
Johannes Schauer Marin Rodrigues
a1a5bc28c2
convert line endings from CRLF (Windows) to LF (Linux/Unix)
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.

This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.

Files that are Windows specific like *.vcxproj and *.props files were
not converted.

Closes: #3073
2023-10-19 16:23:21 +02:00
Alexandre Detiste
15e45f966c typos found by lintian 2023-10-17 22:06:08 +02:00
nordsoft
16b147d588 Fix negative spell cost 2023-09-22 01:12:10 +02:00
Ivan Savenko
c4e2417326 Fix crash on obstacle creation (e.g. moat) 2023-09-08 16:35:43 +03:00
Ivan Savenko
f39fbe5151
Merge pull request #2757 from IvanSavenko/filesystem_refactor
Filesystem refactor - part 1
2023-09-07 10:51:02 +03:00
Ivan Savenko
ef94e7a78a Fix build 2023-09-06 16:03:47 +03:00
Ivan Savenko
747e28947a Fix build 2023-09-06 16:03:47 +03:00
Ivan Savenko
41210c1dbf Client-side support for multiple battles 2023-09-06 16:03:47 +03:00
Ivan Savenko
3a88180494 Separated game and battle callback (server & client only) 2023-09-06 16:03:39 +03:00
Ivan Savenko
fc4dfda00f Added support for concurrent battles to gamestate and server 2023-09-06 16:03:02 +03:00
Ivan Savenko
86a7f5f5cd Removed getStr(bool), replaced with similar toString() 2023-09-04 22:21:02 +03:00
Ivan Savenko
8dfdfffd87 Use ResourcePath for audio files 2023-09-04 18:22:34 +03:00
Ivan Savenko
6f0108e462 Use ResourcePath for referencing texts and json's 2023-09-04 18:22:34 +03:00
Ivan Savenko
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
Ivan Savenko
695a51d8c8 Merge remote-tracking branch 'vcmi/beta' into develop 2023-08-28 21:19:53 +03:00
Ivan Savenko
ce20d913e0 Fix checking PlayerColor's for validness 2023-08-27 01:35:38 +03:00
Ivan Savenko
e54287ea5d Converted remaining identifier to new system 2023-08-25 13:38:02 +03:00
Ivan Savenko
0240ee886d Converted (almost) all namespace enum's to enum classes 2023-08-25 13:38:02 +03:00
Ivan Savenko
62cd8b12d4 Converted several namespace enums to enum class 2023-08-25 13:38:02 +03:00
Ivan Savenko
4ab2e617d5 Fix infinite loop on Fear trigger 2023-08-23 19:34:33 +03:00
Ivan Savenko
81242d3500 Fixed ending of battles due to retreat/surrender 2023-08-23 18:46:56 +03:00
Dydzio
764608f100 Merge remote-tracking branch 'dydzio/configurable-autobattle-spells' into configurable-autobattle-spells 2023-08-21 20:10:04 +02:00
Dydzio
e81cd4e0e6 Delete empty file 2023-08-21 20:09:50 +02:00
Ivan Savenko
013417fb7e Code cleanup 2023-08-21 17:55:49 +03:00
Ivan Savenko
6297140bf5 Start of stabilization - battles now start correctly 2023-08-21 17:55:49 +03:00
Dydzio
78f56df44f
Comment out unused OH3 options so they do not clutter code suggestions
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2023-08-20 19:11:36 +02:00
Dydzio
6bfbe80cc9 Allow toggling quick combat spells usage 2023-08-19 17:23:55 +02:00
Ivan Savenko
d0b3319f6a Merge remote-tracking branch 'vcmi/beta' into develop 2023-08-18 15:08:23 +03:00
Andrii Danylchenko
a7859dae39 Battle AI: archangels cast again 2023-08-13 09:08:30 +03:00
Ivan Savenko
537f9fa048 Merged master into develop 2023-08-03 23:38:32 +03:00
Ivan Savenko
62fddca21e Split massive CModHandler class/file into multiple parts:
- IdentifierStorage is now a separate handler in VLC
- Renamed ModHandler::Incompatibility exception to ModIncompatibility
- Extracted ModScope namespace from ModHandler
- Extracted ModUtilities namespace from ModHandler
- Split CModHandler.cpp on per-class basis
- Replaced some direct members with unique_ptr to reduce header includes
2023-07-30 22:17:47 +03:00
Ivan Savenko
aed8c411fc Minor rework & cleanup of combat replays 2023-07-27 19:25:55 +03:00
DjWarmonger
b4c9b81a33 Update SideInBattle.cpp 2023-07-25 15:02:28 +03:00
Andrii Danylchenko
ec8898a0e7 #1965 - treat dwelling defenders as neutrals 2023-07-25 10:13:41 +03:00
SoundSSGood
9b5f6ec7cf CArtifact getters setters 2023-07-05 15:48:08 +03:00
Ivan Savenko
85262cf4f5 Moved CGameState files into a separate directory 2023-06-26 17:15:59 +03:00
krs
27c488e62f Small changes after review. 2023-06-23 20:05:15 +03:00
krs
756dd398c2 Added constant for BATTLE_SHOOTING_RANGE_DISTANCE 2023-06-23 19:13:39 +03:00
krs
e938152c1d Fix for showing penalty limit in red for unlimited ranged archers 2023-06-23 19:13:39 +03:00
krs
33bbbefdeb First working prototype that mimics rangedFullDamageLimit code
Next step is to create more generic functions that can be shared between the 2.
2023-06-23 19:13:39 +03:00
Ivan Savenko
56d69e790b Renamed MetaString methods to more logical names 2023-06-20 19:37:27 +03:00
Ivan Savenko
2636a0dcc3 Moved MetaString to a new file 2023-06-20 19:37:27 +03:00
krs
56b8fb39f3 Removed neighbouringTilesWithDirection and using
allNeighbouringTiles
2023-06-11 18:40:47 +03:00
krs
b8ad5b41f3 UnitState has getRangedFullDamageDistance() 2023-06-11 18:40:47 +03:00
krs
c0591573bf Working Version 2023-06-11 18:40:47 +03:00
Konstantin
05eccbc2bb vcmi: split bonus to enumerator and HeroBonus.h 2023-05-03 18:01:06 +03:00
Konstantin
fbc05c70ac vcmi: camelCase methods of new classes
Also use EGameSettings for clamping morale and luck
2023-05-02 12:09:13 +03:00
Konstantin
a6de9097be vcmi: rename HeroBonus.h to Bonus.h 2023-05-02 11:20:58 +03:00
Konstantin
4866c2fe5c vcmi: split IBonusBearer 2023-05-02 00:54:53 +03:00
Konstantin
b6eb2dc060 vcmi: rename IFactionMember and ICreature 2023-05-02 00:54:53 +03:00
Konstantin
1d34c73c2d vcmi: split CBonusSystemNode, BonusParams and prop
More splitting of HeroBonus.h
2023-05-02 00:54:53 +03:00
Konstantin
713e3004df vcmi: rename updater and limiter files 2023-05-02 00:53:51 +03:00
Konstantin
34c1d4f3e9 vcmi: move CBonusProxy and friends to new file
To decouple HeroBonus.h more
2023-05-02 00:53:51 +03:00
Konstantin
e37f798a68 vcmi: split bonus updaters 2023-05-02 00:53:50 +03:00
Konstantin
416faf521e vcmi: move limiters outside of HeroBonus.cpp
This will help for recompilation.
2023-05-02 00:53:50 +03:00
Konstantin
6fa1b2b19f vcmi: move bonuses to its own folder 2023-05-02 00:53:50 +03:00
Konstantin P
4b2a09dae7 FactionMember: move code around 2023-05-02 00:53:50 +03:00
Konstantin
af25ad0866 vcmi: split creatures and faction members 2023-05-02 00:53:50 +03:00
Konstantin
4f7035d3ff vcmi: add IFactionMember abstract class 2023-05-02 00:53:50 +03:00
Konstantin P
b472c89276 vcmi: make some CStack properties private
There is a getters for this properties already available
2023-04-27 20:58:49 +03:00
krs
1bb5077231 Renamed getMovementRange to ObtainMovementRange as per request 2023-04-26 21:56:20 +04:00
krs
e348193f7e Tactics movement is limited to movement range 2023-04-26 21:56:20 +04:00
Konstantin
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
Ivan Savenko
e3ed728193
Merge pull request #1932 from rilian-la-te/proper-teleport
VCMI: teleport redesign
2023-04-16 22:52:01 +03:00
Ivan Savenko
3738171b21 Refactoring of H3M loader to make HotA format support easier
- extracted low-level reader from MapFormatH3M class
- added separate structure to define version-specific values
- cleared up some H3M format edge cases
- replaced witch hut skill vector with set
- converted several fields to enum type
2023-04-15 17:20:38 +03:00
Konstantin P
f11fa8f0c8 Teleport: can trigger obstacles now 2023-04-13 11:24:19 +03:00
Konstantin P
384ee99834 vcmi: configurable teleport v2
1. Redesign wall and teleport penalty using shortest path
This will avoid OH3 exploits with teleport inside walls

2. Teleport is now configurable
2023-04-13 11:24:19 +03:00
Konstantin
bc1aad3b26 vcmi: remove deprecated CStack::getCreature()
Function battle::Unit::unitType() does the same.
2023-04-13 11:24:19 +03:00
Konstantin
03eb997137 CBattleInfoEssentials: add battleIsGatePassable()
This is a helper to check if gate is passable now or not.
2023-04-13 11:24:19 +03:00
Ivan Savenko
506c3d29bc Replaced vstd clamp with std version 2023-04-12 01:03:14 +03:00
Nordsoft91
3951bbb395
Merge pull request #1108 from Nordsoft91/battle-dialog
[HDMod features] Quick combat
2023-04-11 21:18:04 +04:00
Ivan Savenko
dfa2e2a349 Merge beta into develop 2023-04-11 19:37:35 +03:00
nordsoft
8e77b833d9 Merge remote-tracking branch 'upstream/develop' into battle-dialog 2023-04-11 15:54:08 +04:00
Ivan Savenko
7d92ef5f86
Merge pull request #1909 from vcmi/avoid-freeze-on-siege-selfblocking
BattleAI: avoid selfblocking on siege
2023-04-11 11:11:05 +03:00