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

291 Commits

Author SHA1 Message Date
Ivan Savenko
f073c676f9 Merge 1.1 release into develop 2022-12-23 14:17:18 +02:00
Ivan Savenko
23cb47b457 Fixed several scenarios with incorrect scope for requesting identifiers 2022-12-21 23:02:19 +04:00
Ivan Savenko
ac839ad26a Changes to rest of the code according to review:
- renamed status bar method clearMatching -> clearIfMatching
- renamed class ColorShifterAddMul -> ColorShifterMultiplyAndAdd
- fixed missing return from function
- fixed potential access to deleted object
2022-12-11 23:43:43 +02:00
Ivan Savenko
d8742dac3f Show correct error message on attempting to cast Remove Obstacle on
fields with no removable obstacles
2022-12-02 00:27:48 +02:00
Ivan Savenko
495e0b3657 Merge remote-tracking branch 'vcmi/develop' into battleint_refactor 2022-12-01 23:58:01 +02:00
Ivan Savenko
5094fab4d9 Refactoring of spell animations, multiple fixes for spell visuals 2022-12-01 22:06:42 +02:00
Ivan Savenko
861a6849f9 Added possibility to define per-town tower icon for battle queue in siege 2022-11-29 14:47:51 +02:00
nordsoft
750f160276 Fix advmap spell mechanics 2022-10-20 22:34:27 +04:00
Andrii Danylchenko
878aabd4d6
Merge pull request #981 from kambala-decapitator/fix-analyzer-warnings
Fix Clang Analyzer warnings
2022-09-29 19:23:24 +03:00
Andrey Filipenkov
802147c5b7 add some asserts that shouldn't fire 2022-09-26 14:06: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
Andrey Filipenkov
7e6ed0583c disable all scripting code when configuring without scripting modules 2022-09-21 19:31:42 +03:00
DjWarmonger
7ba271edf1
Rotation rebase2 (#912)
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too
2022-09-18 17:39:10 +03:00
DjWarmonger
3d2dc2335b Switch ObjectTemplate to shared_ptr<const> (#870) 2022-09-11 16:13:53 +03:00
Andrii Danylchenko
4b4cc3cf4b battlefields in VLC and custom bonuses for terrain patches 2022-09-11 11:31:27 +03:00
Nordsoft91
c4035134e5 New battlegrounds (#758) 2022-09-11 11:31:26 +03:00
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
nordsoft
92dc902748 Fix for #3228 and #3042 2022-08-24 14:58:56 +03:00
Konstantin
c6b198ce14
Warning fix (I moved C++17 and CI to another branch) (#739)
* clang warning fixes
* use CMake 3.10 due to MXE CI does not have 3.13 yet

Co-authored-by: Konstantin <rilian@niisi.ras.ru>
2022-05-19 15:14:50 +03:00
AlexVinS
483a4689ce Fixes for code review issues 2021-02-20 04:57:50 +03:00
Alexander Shishkin
784f6b973b
Apply suggestions from code review
Co-authored-by: Andrii Danylchenko <danilchenko.andrij@gmail.com>
2021-02-20 02:31:00 +03:00
AlexVinS
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
MikeLodz
fe9412f845 hero specialty fixes continuation: changes requested during code review 2021-02-13 16:02:42 +01:00
MikeLodz
38efbb345e Fixes mantis tickets 2899 and 2984 (bugged hero spell specialties)
- stoneskin/haste/prayer/weakness: didnt work because there were 2 bonus objects in buffer and they were filtered out as a possible duplicate (BattleInfo::addOrUpdateUnitBonus). it was fixed by making them a single bonus.
- disrupting-ray and weakness: had opposite effect, because of missing negation
- added a new specialty types: SPECIAL_ADD_VALUE_ENCHANT and SPECIAL_FIXED_VALUE_ENCHANT. this is to make possible specialties like Aenin (fixed specialty value added to spell value) and Melody (fixed value for spell regardless of anything). These specialties can be used in mods with any heroes.
- slayer spell effect calculations was fixed to include hero Coronius-style specialty.
- finally fixed description for Labetha Conflux hero, this is a OH3 bug described here https://heroes.thelazy.net/index.php/Labetha
Changes were tested and work as intended.
commit was made in cooperation with modder Misiokles
2021-02-08 23:58:12 +01:00
Dmitry Orlov
39de2f6435 Fix: Morale bonus should be shown correctly 2020-11-11 22:43:40 +03:00
Dmitry Orlov
195fb8ff41 Mod system improvement Part I : Fix content losing after deserialization 2020-10-10 00:31:23 +03:00
John Bolton
c61bae4060 Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation. 2020-10-05 16:28:28 -07:00
John Bolton
a05ae78e67 Fixed lots of warnings.
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.

4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
John Bolton
6d8f1e4530 Fixed incorrect usage of const std::shared_ptr. Resolves 0003142.
Replaced const TBonusListPtr with TConstBonusListPtr where necessary
Replaced const std::shared_ptr<T> with std::shared_ptr<const T> where necessary.
Removed superfluous use of const.
Replaced const std::shared_ptr<T> with const std::shared_ptr<T> & in function parameters and ranged for-loops.
2020-09-30 22:56:28 -07:00
toneyisnow
0f3dabab9a Initialize the change:
1. Make color shifter for CAnimation, and use that in the clone effect.
2. Update the original position of the cloned object.
2020-01-25 01:21:26 -08:00
AlexVinS
e7bced112c Fixed https://bugs.vcmi.eu/view.php?id=3059 2019-06-09 22:46:29 +03:00
Michał Kalinowski
97a8380d07 Simplification fixes
Return statement fixes
2019-03-31 09:43:14 +03:00
Michał Kalinowski
ac6b477aa2 Simplify statements
-Simplify return statements across the code
2019-03-31 09:43:14 +03:00
Dydzio
df11e851ef Acid breath should have absolute dispel immunity 2019-03-25 02:19:07 +03:00
AlexVinS
1855af9ed3 Fixed error handling in TownPortalMechanics::applyAdventureEffects 2019-02-23 20:51:03 +03:00
Mikko
ae7821462d
Update ISpellMechanics.cpp 2019-01-24 15:09:01 +00:00
Alexander Shishkin
b00e935e4d
Warnings fixes (#538)
Warnings fixes
* Suppress `missing-braces` for Clang
* Fixed many C4275 warnings
* Fixed almost all Clang/GCC warnings
* Silence most frequent MSVC warning.
* Fixed some pessimizing-move warnings
* Fixed some unused capture warnings
2019-01-19 13:52:02 +03:00
AlexVinS
4b5910c2f4 VCAI performance improvements
* Node graph initialization optimized.
* Fixed "Unathorized obstacle access".
* Pathfinding tracing disabled with ifdef.
* Misc bonus calculation optimizations.
* Removed timestamp from log lines. Date formatting eats too much CPU.
* Paths for all heroes in Client are now cached
2019-01-17 10:50:56 +03:00
Michał Janiszewski
0ff2e1180d Throw std::runtime_exception instead of a pointer to new one
cf. https://isocpp.org/wiki/faq/exceptions#what-to-throw
2018-10-31 07:27:54 +01:00
Michał Janiszewski
7be9aa4868 Prevent shadowing of function arguments by local vars 2018-10-29 16:56:14 +01:00
ArseniyShestakov
1a6f456ac0
Merge pull request #402 from vcmi/feature/multiplayer
Refactoring of all pre-gameplay UI and networking code.
This will break some things, but I'll be able to fix them without constant rebasing.
2018-04-05 23:29:27 +07:00
Arseniy Shestakov
74e5c5bf05 CGameHandler: rename CPackForClient argument and add network logging 2018-04-04 14:24:32 +07:00
AlexVinS
1fb25c46d3 cleanup 2018-04-03 21:46:12 +03:00
Henning Koehler
6ddcb079a4 Enabled new secondary skills to be created (#438)
* Universities, Scholars and Witch Huts may offer new skills
* Moved encode/decodeSkill to CSkillHandler
* Refactored CSkill interface and CSkill::LevelInfo image storage
* Legacy game constants renamed to ORIGINAL_XXX_QUANTITY
2018-03-31 12:56:40 +07:00
AlexVinS
8cec07afbd Replaced CGHeroInstance and CGObjectInstance with ObjectInstanceID in NetPacks 2018-03-17 13:24:12 +08:00
Henning Koehler
7f76648a7c Extend Bonus.addInfo to integer vector (#427)
* changed Bonus::additionalInfo to integer vector

* fixed deserialization for old savegames

* removed newline from JsonNode::toJson()

* updated bonus schema; SPELL_AFTER_ATTACK and SPELL_BEFORE_ATTACK use new addInfo format

* removed unnecessary init in Bonus constructor
2018-03-12 08:20:18 +03:00
AlexVinS
7d27d144a5 Possible fix for https://bugs.vcmi.eu/view.php?id=2913 2018-03-10 19:35:20 +03:00
ArseniyShestakov
079cd470c2
Merge pull request #425 from vcmi/CatapultRework
Catapult rework
2018-03-06 01:16:53 +08:00
Dydzio
07cf59592b Updated catapult spell effect to match new code 2018-03-05 12:55:44 +01:00
AlexVinS
f126a34a5e Fixed https://bugs.vcmi.eu/view.php?id=2904 2018-03-04 11:15:24 +03:00