1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00
Commit Graph

150 Commits

Author SHA1 Message Date
4da97682be vcmi: remove code duplication for native terrain 2023-04-10 19:28:17 +03:00
7326980bd4 vcmi: rename WithXXX to IXXXProvider 2023-04-10 19:28:16 +03:00
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
01f5571342 CGHeroInstance: remove old struct
Saves where struct is used is incompatible anyway
2023-04-10 19:28:16 +03:00
0093a44889 Added abstract method to caster interface 2023-04-10 01:31:41 +04:00
8968f0ef0e vcmi: change EAlignment to enum class 2023-04-05 01:22:04 +03:00
f0f9eecf97 Backpack limit part5. End of battle. Other stuff 2023-03-21 12:14:33 +02:00
0adffc824f vcmi: allow to configure army movement counter
It is not hardcoded now. MOVEMENT.TXT is still not read,
but ARMY_MOVEMENT updater parameters can be specified in json.
There is a 4 parameters:
1. Base - base value (firstly lowest speed is multiplied by it)
2. Divider - base value is integrally divided by it
3. Multiplier - result value will be multiplied by it
4. Max - maximum allowed movement from army.

Vanilla values is in defaultMods.json

Fixes: https://bugs.vcmi.eu/view.php?id=3209
2023-03-16 16:46:42 +03:00
95503d0623 vcmi: unify movement
1. Now there is only one bonus: MOVEMENT, with 2 subtypes: 0 is sea, 1 is land
   For movement value on land depends on creature speed we use a new
   ARMY_MOVEMENT updater with global bonus. If we does not like such
   dependency, we can just remove this updater from json.
2. All specialities and secondary skills for movement moved to new
   system AFAIK
2023-03-16 16:46:41 +03:00
a0987313ba vcmi: convert intelligence
Intelligence is converted to both global effect and skill bonus

Bonus name HERO_MANA_PER_TEN_KNOWLEDGE is a little weird, but works
like old SECONDARY_SKILL_PREMY bonus
2023-03-16 16:46:41 +03:00
7ef5163d9d Merge pull request #1581 from IvanSavenko/map_render_rewrite
Adventure Map - rendering rewrite
2023-03-05 19:51:07 +02:00
ca13e7dedf Implemented terrain palette animatiions. Removed old code 2023-03-05 17:48:02 +02:00
8b3309b47d Fixed custom hero names text ID's 2023-03-05 17:39:27 +02:00
f65c6ad275 fix regressions from modernization 2023-02-15 14:27:12 +02:00
5f181e25af vcmi: modernize lib/mapObjects 2023-02-14 14:39:56 +03:00
fa6f7513e8 All heroes-related strings are passed through translator 2023-01-20 15:18:36 +02:00
25bceda4ea Added convertToVisitablePos/convertFromVisitablePos to CGHeroInstance
This method replaces old convertPosition, but with more clear names and
without hardcoded magic constants.
2022-12-09 14:42:47 +02:00
d85ee019ec Removed CGHeroInstance::convertPosition method 2022-12-07 22:51:32 +02:00
49cbd5adc9 CGHeroInstance::convertPosition is no longer static method 2022-12-07 22:34:08 +02:00
908e6892f3 Removed CGHeroInstance::getPosition pseudo-override
Now access to hero visible position is always done via visitablePos
2022-12-07 22:10:08 +02:00
2855606a88 Enabled & fixed -Woverloaded-virtual warning from gcc/cland
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
729357824b Added common method for secondary skill availability checks 2022-11-14 19:08:49 +02:00
0f35082024 Fix crash with objects belonging players without state 2022-11-06 03:26:13 +04:00
20c102e648 Remove T prefix from new typedefs 2022-09-29 11:44:46 +02:00
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
4ea57ea7fc A variety of suggested style tweaks 2022-09-25 09:33:56 +02:00
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
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02:00
e4ac0d4370 Editor prerequisites [part 2] (#889) 2022-09-17 14:04:01 +03:00
665bd4346e Fix getting battlefield crash 2022-09-11 11:31:27 +03:00
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
25d9ea1ddf Feature: Opposite Side Limiter 2021-09-04 14:15:38 +03:00
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
8f331dce31 Feature: Lodestar Grail should work. 2020-12-10 04:05:37 +03:00
da20aa2388 Use the same cost value in Pathfinder and fuzzy evaluations. 2019-01-17 10:54:41 +03:00
035d279ae8 Refactor CGHeroInstance, make spells private 2018-12-23 15:49:26 +03:00
ac66fc7f42 Full rework of pre-game interface and networking
New features for players:
* Loading for multiplayer. Any save could be used for multiplayer.
* Restart for multiplayer. All clients will restart together.
* Loading from single save.
* Hotseat mixed with network game. Multiple players per client.
* Now connection to server could be cancelled.
* Return to menu on disconnections instead of crashes.
* Restoring of last selected map, save or campaign on next run.

TLDR on important changes in engine code:
* UI: work with server separated from UI
* UI: all explitic blitting replaced with IntObject's
* UI: all new code use smart pointers instead of DISPOSE
* Gameplay always start through lobby controlled by server.
* Threads receiving netpacks now shared for lobby and gameplay.
* Campaigns: heroes for crossover now serialized as JsonNode.
2018-04-04 14:24:26 +07:00
6263c4c3eb renamed CGHeroInstance::updateSkill to updateSkillBonus 2018-03-05 22:13:23 +08:00
f126a34a5e Fixed https://bugs.vcmi.eu/view.php?id=2904 2018-03-04 11:15:24 +03:00
8b002ad774 Issue2888 (#421)
Fixed issue 2888
* Merged AFTER_ATTACK & BEFORE_ATTACK cast modes.
* Introduced new caster class for creature ability usage
* Added few tests
2018-03-02 13:22:51 +03:00
9850e7254e updated serialization version to 781 2018-02-18 23:32:52 +13:00
ad5a9f7205 made HeroSpecial public again 2018-02-18 20:08:34 +13:00
6037c19b9a removed specialtyDeprecated from CGHeroInstance; improved savegame compatibility 2018-02-18 19:47:38 +13:00
81c44dac41 minor fixes 2018-02-18 19:47:38 +13:00
5d3f6c3b91 removed CHeroInstance::specialty 2018-02-18 17:33:23 +13:00
ef7900d0a2 added support for older saves (fails) 2018-02-18 17:33:23 +13:00
3e0022be27 added support for new specialty json format; old format is converted to bonuses with updaters 2018-02-18 17:33:23 +13:00
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
5091b117e2 fixed serialization for older savegames 2017-08-28 13:56:00 +12:00
19e619f61e wisdom is now bonus-based 2017-08-26 20:49:29 +12:00