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

392 Commits

Author SHA1 Message Date
Andrii Danylchenko
9f55666931 rework netpacks to avoid double typeinfo 2023-02-13 20:26:39 +02:00
Konstantin
286c1e522e vcmi: modernize netpacks 2023-02-09 20:22:48 +03:00
Ivan Savenko
44bdd2cbf3 Implemented selectable messages for visited & empty state 2023-01-24 23:31:07 +02:00
Ivan Savenko
ca521fb129 Removed incomplete functionality from rewardable object 2023-01-24 16:29:05 +02:00
Ivan Savenko
ecbcafefbc It is now possible to configure what exactly will be reset in object 2023-01-24 13:54:03 +02:00
Ivan Savenko
500cf7f15d EWallPart & EWallState are now enum class 2023-01-13 00:35:58 +02:00
Ivan Savenko
1fece0ce18
Merge pull request #1229 from IvanSavenko/battle_improvements
Battle: Fixing bugs & Implementation of missing features
2023-01-09 22:07:13 +02:00
SoundSSGood
d5cef0c069 end of battle art assembling fix 2023-01-05 17:37:14 +02:00
Ivan Savenko
e9e549148d Implemented teleportation animation effect 2022-12-18 18:26:43 +02:00
Ivan Savenko
deffba01b9 All battle effects are now fully client sided 2022-12-17 17:35:15 +02:00
Ivan Savenko
60a00b450e Multiple fixes & improvements to animation ordering 2022-12-13 21:31:49 +02:00
Ivan Savenko
c79634b6a7 Moved all animation ordering logic to callers
Previously, CBattleAnimation & inheritors were controlling animation
ordering - e.g. which animations should play after which.
Now, this is controlled by caller, e.g. BattleInterface & its
controllers.
H3 animations are fairly linear and can be split in stages which are
already somewhat implemented via waitForAnims
2022-12-13 21:31:49 +02:00
SoundSSGood
6e5932c016 Apply suggested changes next part 2022-11-10 21:02:06 +02:00
SoundSSGood
3a3b559a0b attempt to fix the build 2022-11-07 14:20:28 +02:00
SoundSSGood
203c54e956 BulkMoveArtifacts structure optimization 2022-11-07 14:13:36 +02:00
SoundSSGood
95ab343116 Net Packs BulkMoveArtifacts structure and BulkMoveArtifacts::applyCl 2022-11-06 23:54:50 +02:00
SoundSSGood
363e461c3e ArtifactUtils and CArtifactFittingSet class 2022-11-06 23:29:22 +02:00
Nordsoft91
64a801004c
Apply suggestions from code review
Co-authored-by: Andrey Filipenkov <decapitator@ukr.net>
2022-10-08 19:41:38 +04:00
nordsoft
3ff38b84a2 Support hotseat over multiplier 2022-10-05 01:54:31 +04:00
nordsoft
f4b7cf8196 Transfer player ownership to AI 2022-10-03 20:47:00 +04: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
Dmitry Orlov
8cae3398ba Feature: Army Management Shortcuts should work as in HD+ Mod 2021-11-28 20:00:43 +02: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
Arseniy Shestakov
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
AlexVinS
03cfd2cb78 Do not use StackLocation in netpacks 2018-03-17 13:24:12 +08:00
AlexVinS
8cec07afbd Replaced CGHeroInstance and CGObjectInstance with ObjectInstanceID in NetPacks 2018-03-17 13:24:12 +08: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
Arseniy Shestakov
7c77249d37 Refactoring: get rid of macro in server-side request validation code 2018-01-28 08:03:48 +03:00
Alexander Shishkin
fd4ecbd40b
Merge pull request #385 from Chocimier/altar
Fixed "Altar of Sacrifice only sacrifices creatures one kind at a time"
* https://bugs.vcmi.eu/view.php?id=2607
2017-10-28 14:04:34 +03:00
Piotr Wójcik
f145b4be91 Correctly sacrifice many stacks or many atrifacts, fixes #2607 2017-10-14 21:30:56 +02:00
ArseniyShestakov
4149662845 Merge pull request #376 from vcmi/newAnimations
New animations
2017-10-11 16:18:06 +03:00
Arseniy Shestakov
ae13123129 CPlayerInterface: don't stop hero movement on embark / disembark
When hero have free boarding bonus there no reason to stop movement.
2017-09-16 10:42:27 +03:00
AlexVinS
270e1b75ce Support for creature 2-hex attack, alternate death and cast animation types
* margin option .json animation
* Use ranged attack animation for spell cast if there is no cast animation, display cast animation only on active casting.
2017-09-12 19:51:54 +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
ArseniyShestakov
9d9c026c85 Code style: serialize everything on own lines for easier debugging (#357) 2017-07-31 16:35:42 +03:00
ArseniyShestakov
ea0ceb1805 Merge pull request #323 from vcmi/CStackTweaks
CStack tweaks
2017-07-15 00:42:08 +03:00
Arseniy Shestakov
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
AlexVinS
1fe01b7254 Moved defensive stance log message building to server side. 2017-07-10 04:05:36 +03:00
AlexVinS
4f14f22d3a Unified CStack ammo, casts and counterattacks
* it is possible now to add casts and shoots OTF (f.e. with spell bonus)

Centralized stack 'ammo' loading from bonus system.
* introduced small proxy class for local bonus cache
(no need to use global cache if particular selector used on node only in one place)
* handle killing resurrected creatures
* use IBonusBearer::MaxHealth() where possible
* Fixed https://bugs.vcmi.eu/view.php?id=2486
* Possible fix for 0 HP after resurrection.
* Hack-fixed https://bugs.vcmi.eu/view.php?id=2584
* Unified CStack health API
* Use CHealth for CStack count and health points
* increased SERIALIZATION_VERSION
2017-07-08 20:29:59 +03:00
AlexVinS
3d1a84875e Queries refactoring
* Moved SUMMON_BOAT special case to mechanics
* Partially moved Town portal logic to mechanics class
* Added generic query reply to CCallback
* Redesigned Queries so that base API do not depends on CGameHandler
* Got rid of CGameHandler::castSpellRequest
* Removed CGameHandler::castSpell
* Added new Query type for town portal dialog (not used yet)
2017-07-03 21:43:04 +03:00
AlexVinS
4f8c7bd4bb CStack refactoring
* removed all occurrences of attackerOwned
* Use BattleSide enum
* more tweaks
2017-07-01 19:17:08 +03:00
FeniksFire
4113bdab01 Moving some files from lib to the battle subdirectory. 2017-06-26 15:26:08 +02:00
AlexVinS
0f5202689e Cumulative spell effects
* Added experimental support for cumulative effects for ENCHANTED bonus
* Updated and fixed SPECIAL_PECULIAR_ENCHANT processing
* Initial implementation of cumulative spell effects.
* Scheme for new spell feature - cumulative bonus.
2017-06-13 21:50:50 +03:00
Arseniy Shestakov
bc6f65af04 PlayerCheated: new netpack to apply losing / winning cheat code 2017-06-02 03:34:50 +03:00
Arseniy Shestakov
4b0f702e7e Add LeaveGame netpack and avoid replying on it and CloseServer 2017-06-02 02:51:44 +03:00
Piotr Wójcik
e3992de50e Give hero move points at day of visiting stable, fixes #2598 2017-05-11 20:52:10 +02:00
dydzio
2f1f725ae6 Code improvements, minor fixes 2017-01-29 11:50:37 +01:00
dydzio
c310138fc3 Add WoG ghost ability support 2017-01-20 15:48:45 +01:00
AlexVinS
7793a57b0a Fixed remaining CWE-457 in NetPacks.h 2016-11-26 20:50:07 +03:00
AlexVinS
86e33a4c45 [Refactoring] Unified SetResources NetPack API. 2016-11-26 15:14:43 +03:00