1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
Konstantin
4c4498b22a vcmi: modernize rest of lib 2023-03-16 17:55:20 +03:00
Konstantin
34a26580a7 vcmi: skill-agnostic resistance
Uses exiting bonus and new PERCENT_TO_TARGET_TYPE value type
2023-03-16 16:46:41 +03:00
Konstantin
496c1def12 vcmi: remove FULL_HP_REGENERATION bonus
Just set HP_REGENERATION to high number
(in OH3 doubled stack health is sufficient)
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
5366f9190e vcmi: reduce boost::lexical_cast usage 2023-03-09 16:36:46 +03:00
Ivan Savenko
623cae7d47 All translatable strings now have language identifier 2023-03-05 17:30:38 +02:00
Ivan Savenko
35775b90f8 Moved bonus names to translation 2023-01-25 12:36:02 +02:00
Ivan Savenko
d2b837b116 All creature-related texts go through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
5da407e822 All spell texts are now passed through translator 2023-01-20 15:18:36 +02:00
lainon
7fdad4e0f6 Code refactor following C++ standard and condition fixes 2022-11-15 03:20:55 +03:00
Andrey Filipenkov
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
AlexVinS
15138c23de Finished conversion to new logging API
* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
2017-08-11 23:06:27 +03:00
AlexVinS
18b8e1c7ad Tweaked CBonusTypeHandler 2017-08-09 12:18:49 +03:00
Vadim Markovtsev
2c1dddde33 Fix memory problems with BonusList
Bonus * -> std::shared_ptr<Bonus>

This cures the following problems:

1) Memory corruption at exit. Some Bonus-es were deleted twice (mods?).
2) Memory leaks. Some Bonuses were not deleted.
3) Reduce the number of "Orphaned child" messages.

Valgrind reports 0 leaked memory now and no invalid reads/writes.
2016-09-29 15:08:00 +02:00
Arseniy Shestakov
10dbbead2d Fix indentation of logging code and around it
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
AlexVinS
685deddac1 Start spell-relatet files reorganisation
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
AlexVinS
08d4f7991e Extract adventure spell mechanics 2015-02-26 08:39:39 +03:00
DjWarmonger
b518fd6ea6 Added graphics for GENERAL_DAMAGE_REDUCTION bonus. Files are now in vcmi mod. 2014-10-28 19:04:34 +01:00
alexvins
f837afdc47 CBonusTypeHandler small refactoring 2014-01-19 13:29:13 +00:00
Ivan Savenko
b87897096c Filesystem handling is now more flexible
- removed CResourceLoader class in favor of one that implements resource loader interface
- removed global pool of files, in favour of more dynamic approach
- renamed some files to match current situation
All these changes are needed mostly for future mod manager + .zip support
2013-07-28 14:49:50 +00:00
Ivan Savenko
f82122d9be second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
Michał W. Urbańczyk
6a88604937 * fixed crash related to cammander's SPELL_AFTER_ATTACK spell id not initialized properly (text id was resolved on copy of bonus)
* fixed duels, added no-GUI mode for automatic AI testing
* minor things
2013-06-17 15:45:55 +00:00
Ivan Savenko
c6cc6e6301 Large changeset, first part of editing H3 objects via mods feature. Changes:
- loading of all objects (including H3 objects) will be directed by mod handlers
- common base for all handlers accessible from mod system (IHanderBase)
- json format changes: use struct with string ID's instead of vector

- fixed some gcc/clang errors and warnings
- fixed several cases of memory leaks and invalid memory access (mostly related to usage of bonus system and/or identifiers resolution)

Note that right now loading is much slower than before due to excessive json validation (or not fast enough validator)
2013-04-21 12:49:26 +00:00
beegee1
c7c2686379 - Integrated the logging API into the client and the lib - Remove some more comments and switched to /// style - Fixed recursive locks - Added Global.h to CMakeLists(now visible in qt-creator) - Removed usage of shared_mutex - Added unique_ptr to CLogger targets 2013-04-09 14:31:36 +00:00
beegee1
ee51c5beb5 - Renamed /lib subfolders to lowercase 2013-04-07 10:48:07 +00:00
Ivan Savenko
c4c592b773 - bugfixing: #1243, #1227, #1241, #1236, #1233 2013-03-14 20:44:00 +00:00
alexvins
ff1c224a97 Few more cleanup 2013-03-14 17:56:52 +00:00
alexvins
f686edc1b8 Cleanup
* simplify JSON values getting
* ensure initialization of Bonus fields
2013-03-14 17:21:16 +00:00
alexvins
b5612624fb fix clone immunity handling for 8+ level creatures, part of issue #1234. 2013-03-10 16:16:43 +00:00
alexvins
2eb8263e51 Basic Configuration for bonus types
* introduced new handler BonusTypeHandler
* config\bonusnames.json converted to common format and splitted info main and localizable parts
* hanlders initialization refactored
2013-03-06 18:49:56 +00:00