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

58 Commits

Author SHA1 Message Date
Ivan Savenko
fd3217c875 Fix few more missing BattleID's 2023-09-11 13:20:16 +03:00
Ivan Savenko
86a7f5f5cd Removed getStr(bool), replaced with similar toString() 2023-09-04 22:21: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
b6eb2dc060 vcmi: rename IFactionMember and ICreature 2023-05-02 00:54:53 +03:00
Konstantin
f4f0fd5945 vcmi: magicResistance is IFactionMember property
It is no reason to keep it inside IBonusBearer
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
Ivan Savenko
fb739e7186 Merge beta -> develop 2023-04-26 22:48:08 +03:00
Ivan Savenko
4dc16b9ff7 Adventure map spells are no longer visible on units in battle 2023-04-20 13:16:45 +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
Konstantin
bc1aad3b26 vcmi: remove deprecated CStack::getCreature()
Function battle::Unit::unitType() does the same.
2023-04-13 11:24:19 +03:00
Ivan Savenko
63b197b78a Converted attributes to use c++17 functionality 2023-04-12 01:03:14 +03:00
Konstantin
0f5f4c69ec vcmi: specialize native terrain entity
Specialize native terrain entity for all object that have
native terrain. Allow creatures to take global bonuses into
account when checking for native terrain.
2023-04-10 19:28:16 +03:00
Konstantin
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
Konstantin
8c10f48fbd CStack: make unicorns ability multiplicative 2023-03-20 23:29:33 +03:00
Konstantin
4c4498b22a vcmi: modernize rest of lib 2023-03-16 17:55:20 +03:00
Ivan Savenko
388ed88b5d All artifact strings now pass through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
d2b837b116 All creature-related texts go through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
e1799379dd Terrain/Road/River handler are now in compileable state 2023-01-10 00:01:35 +02:00
Ivan Savenko
1468f6aded Converted terrainTypeHandler into proper handler class 2023-01-10 00:01:35 +02:00
Ivan Savenko
5d80457eda Merge with vcmi/develop branch 2022-12-30 00:52:23 +02:00
Ivan Savenko
a6622b5896 Fixed clone damage 2022-12-18 17:38:14 +02:00
Ivan Savenko
fb6b3c31e8 Renamed UNUSED -> MAYBE_UNUSED macro to match c++17 attribute name 2022-12-07 18:06:47 +02:00
nordsoft
0f35082024 Fix crash with objects belonging players without state 2022-11-06 03:26:13 +04:00
DjWarmonger
58a3abb643
Merge pull request #963 from vcmi/terrain-rewrite
Terrain rewrite
2022-09-29 18:24:05 +02: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
Tomasz Zieliński
20c102e648 Remove T prefix from new typedefs 2022-09-29 11:44:46 +02:00
Tomasz Zieliński
f386f42166 Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts:
#	lib/Terrain.cpp
#	lib/Terrain.h
#	lib/battle/CBattleInfoEssentials.cpp
#	lib/rmg/ObstaclePlacer.cpp
#	lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
Tomasz Zieliński
4ea57ea7fc A variety of suggested style tweaks 2022-09-25 09:33:56 +02:00
Andrey Filipenkov
659be89a01 remove setting values that are never read 2022-09-24 16:52:38 +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
Tomasz Zieliński
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02:00
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +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
Dmitry Orlov
8f331dce31 Feature: Lodestar Grail should work. 2020-12-10 04:05:37 +03:00
Dmitry Orlov
39de2f6435 Fix: Morale bonus should be shown correctly 2020-11-11 22:43:40 +03: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
Victor Luchits
f68b449e5e More formatting 2020-05-17 11:21:49 +03:00
Victor Luchits
be10694b73 Some changes to make the battle AI smarter
- the AI will now consider attacking multiple units
- the preferred strategy now is to minimize collateral damage rather than to maximize damage to enemy units alone
- attacks that block enemy shooters will be prioritized over other attacks in cases when shooters have weaker melee attacks
2020-05-05 17:53:03 +03:00
Michał Kalinowski
ac6b477aa2 Simplify statements
-Simplify return statements across the code
2019-03-31 09:43:14 +03:00
Dydzio
9e5abeec35 Fix for arrow cart at bank fights 2019-03-22 00:02:32 +01:00
godric3
d9d01f0b68 Exposed more of existing limiters for modders (#449)
* Exposed alignment, faction and terrain limiters
* Limiters toString() use now boost:format
2018-04-17 19:59:30 +07:00
Arseniy Shestakov
15c8b192b4 CStack::prepareAttacked: fix for REBIRTH bonus after merge 2018-02-08 14:37:52 +03:00
AlexVinS
0b70baa95e Spells configuration version 2 (effect-based)
* Indirect spell effects loading
* Json serializer improvements
* spell->canBeCastAt do not allow useless cast for any spell
* Added proxy caster class for spell-created obstacles
* Handle damage from spell-created obstacles inside mechanics
* Experimental GameState integration/regression tests
* Ignore mod settings and load only "vcmi" mod when running tests
* fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests)
* Huge improvements of BattleAI regarding spell casts
* AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells.
* Possible fix for https://bugs.vcmi.eu/view.php?id=1811
* CStack factored out to several classes
* [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional
* [Battle] Allowed BattleAction have multiple destinations
* [Spells] Converted limit|immunity to target condition
* [Spells] Use partial configuration reload for backward compatibility handling
* [Tests] Started tests for CUnitState
* Partial fixes of fire shield effect
* [Battle] Do HP calculations in 64 bits
* [BattleAI] Use threading for spell cast evaluation
* [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state)
* Implemented https://bugs.vcmi.eu/view.php?id=2811
* plug rare freeze when hypnotized unit shots vertically
* Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense
* [BattleAI] Try to not waste a cast if battle is actually won already
* Extended JsonSerializeFormat API
* fixed https://bugs.vcmi.eu/view.php?id=2847
* Any unit effect can be now chained (not only damage like Chain Lightning)
** only damage effect for now actually uses "chainFactor"
* Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
2018-02-08 11:37:21 +03:00
AlexVinS
ef73f416dc fixed resurrection corner case 2017-07-17 02:50:38 +03:00
ArseniyShestakov
a4c0ad94b1 Code style: remove default value hints in definitions (#342)
Some are outdated and this is something IDE are useful for.
2017-07-15 14:08:20 +03:00
AlexVinS
df13851176 fixed wrong battle result 2017-07-14 23:43:03 +03:00
AlexVinS
2d0613b40b Added some CHealth tests. 2017-07-09 22:15:06 +03:00
AlexVinS
ea3502ed60 Removed CStack::totalHealth() 2017-07-09 20:23:51 +03:00