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

197 Commits

Author SHA1 Message Date
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
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
Henning Koehler
3764ec8be1 more code format issues 2017-08-30 19:47:06 +12:00
Henning Koehler
fbab52eb18 added basic handler for loading secondary skill bonuses 2017-08-26 09:33:08 +12: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
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
Arseniy Shestakov
18161d3688 Client: implement spectator mode via command-line options
If running with --spectate/-s CPlayerInterface will appear even without human players.
Following command-line options also available:
 --spectate-ignore-hero
 --spectate-hero-speed=N
 --spectate-battle-speed=N
 --spectate-skip-battle
 --spectate-skip-battle-result
Boolean options can also be changed in runtime via client console:
 set spectate-ignore-hero on / off
Spectator mode also:
 - Work with --onlyAI option when starting game or loading saves.
 - Allow to use any cheat codes.
 - Give recon on towns and heroes.
2017-06-06 07:30:16 +03:00
AlexVinS
a85b4cf2a5 * WIP on event condition format
* Hero portrait serialization
* Fix town spells serialization

* Added support for float exponential part in Json
* Added support for int64 in Json
* Added basic Hero definitions serialization
* Added rumors serialization
* Advanced player info serialization.
* Added Disposed heroes serialization, (!) not covered with tests yet
* Added Local event serialization
* Added Pandoras box serialization
* Added Seer hut reward serialization
* Added CQuest serialization
* Added API for map object instance names serialization.
* Added random dwelling options serialization
* Advanced town options serialization
* Advanced hero options serialization
* More map format tests
* A lot of fixes, cleanup and refactoring
2017-05-27 00:23:19 +03:00
AlexVinS
86e33a4c45 [Refactoring] Unified SetResources NetPack API. 2016-11-26 15:14:43 +03:00
AlexVinS
1ccb0d98be Disabled git version of C::B projects 2016-10-27 16:27:10 +03:00
Vadim Markovtsev
da1c9cf249 Fix rebuilding everything on HEAD change 2016-10-23 16:56:53 +02:00
Vadim Markovtsev
d0beb27197 Add git commit hash into the version string 2016-10-23 15:45:47 +02:00
AlexVinS
cd5c0b3297 Style tweaks. 2016-10-02 15:22:55 +03:00
Arseniy Shestakov
84137dcaa5 Add DLL_LINKAGE to getStr and fix player id logging in VCAI 2016-09-16 05:45:00 +03:00
Arseniy Shestakov
fdca75b4b0 PlayerColor: add getStr and getStrCap functions with optional L10n 2016-09-15 18:22:54 +03:00
Arseniy Shestakov
39fe9472b6 CGameHandler::moveArtifact: check lock status by slot instead of id
This one fix issue 2455. We still need to do something with ArtifactID::ART_LOCK or ids for artifact from mods since they might conflict with each other.
2016-08-18 06:35:29 +03:00
DjWarmonger
fe4d871fe7 Version bump. 2016-03-01 19:42:40 +01:00
AlexVinS
4bf9036c7b Ensure that ghost stacks are created only by BattleStacksRemoved packet.
This will allow client to receive notification.
2016-03-01 05:24:35 +03:00
AlexVinS
5d5ad99436 Rename DEAD_CLONE -> GHOST, as this will be possible for any stack 2016-02-28 00:13:34 +03:00
ArseniyShestakov
c550484613 Merge pull request #181 from vcmi/feature/drawbridgeMechanics
Feature/drawbridge mechanics
2016-02-14 16:32:24 +03:00
Arseniy Shestakov
c5cfc8467f Battles: change naming from drawbridge to gate for everything
This way code is shorter and cleaner while in future we may support towns with gate only.
2016-02-13 17:40:31 +03:00
Arseniy Shestakov
11dc428b1e Battles: move hexes enum to GameConstants and fix wall position
Before we had hex 62 marked as destructible wall while actually it's must be 78.
2016-02-09 17:38:59 +03:00
Vadim Markovtsev
eb10433535 Implement psychic elementals vs mind immune units 2016-02-02 14:30:37 +03:00
AlexVinS
16e0d18880 Added special slots for war machines and arrow towers 2016-01-30 00:53:53 +03:00
Arseniy Shestakov
1e008b9756 SiegeInfo: add foundation for drawbridge mechanics support
EDrawbridgeState enum represent current state of drawbridge.
BattleDrawbridgeStateChanged netpack to pass bridge state changes to client.
2016-01-29 22:35:11 +03:00
AlexVinS
ba017c443d Start from diff of pull request #124 from vcmi/issue/1372 2016-01-29 21:05:17 +03:00
DjWarmonger
cdd50b1603 Version bump. 2016-01-01 20:06:38 +01:00
ArseniyShestakov
03e9dd3bab Add hero gold cost to GameConstants 2015-12-07 00:13:58 +03:00
ArseniyShestakov
05a34fb417 Use "Favorable" instead of "Favourable" everywhere for consistency
Original game of course used american english version so we stick to it.
2015-12-06 02:23:41 +03:00
Ivan Savenko
c3ce4b25df Removed all #include's of CMap.h from headers.
To all - please, avoid #include's in headers as much as possible
This kills incremental build compile times
2015-12-02 21:05:10 +02:00
ArseniyShestakov
f55bfe41d6 Digging: implement digging status on right click. Fix issue 401
This is also fix possibility to dig on some non-blockable objects like event.
2015-11-29 12:34:23 +03:00
ArseniyShestakov
a851062891 Merge pull request #133 from vcmi/feature/pathfinderLayers
Pathfinder layers and related changes: fly and water walking implemented
2015-11-24 13:09:06 +03:00
ArseniyShestakov
e1a360408d GameConstants: move operators into header and always inline them 2015-11-22 07:24:12 +03:00
ArseniyShestakov
d19cb5ce89 EPathfindingLayer: fix obvious layer over-allocation in CPathsInfo 2015-11-19 04:01:56 +03:00
ArseniyShestakov
adeefe903a CGPathNode: apply suggested optimizations
Also make EPathfindingLayers ui8 too
2015-11-19 03:08:57 +03:00
DjWarmonger
5fadb239f2 Merge pull request #134 from edeksumo/Fix-Defence-Ani
Let's try this.
2015-11-11 09:43:51 +01:00
ArseniyShestakov
5106738160 Merge branch 'develop' into feature/pathfinderLayers 2015-11-09 19:20:13 +03:00
edeksumo
ba1062ed3c Formating2
Change ani to anim
2015-11-07 23:30:01 +01:00
ArseniyShestakov
7eebcb9d60 Artifacts: replace few more ints by ArtifactID 2015-11-07 11:46:58 +03:00
AlexVinS
e645b46aed Revert "Merge pull request #124 from vcmi/issue/1372"
This reverts commit da01af319b, reversing
changes made to 8b6b4e2e0b.
2015-11-07 11:35:02 +03:00
ArseniyShestakov
9fe442537b Pass on EPathfindingLayer and small fixes for code around it 2015-11-05 12:46:44 +03:00
edeksumo
dd525da153 Formatting 2015-11-04 23:37:53 +01:00
edeksumo
75a76c0bf0 FixDefenceAni 2015-11-04 00:19:40 +01:00
AlexVinS
f6b9015324 Use constant for summoned creature slot 2015-11-03 02:18:34 +03:00
DjWarmonger
349f16a359 Version bump. 2015-11-02 17:28:54 +01:00
ArseniyShestakov
4b64bec711 EPathfindingLayer: copy other code from ETerrainType for debugging 2015-11-02 13:25:01 +03:00
ArseniyShestakov
118039a368 Pathfinding: add copy-pasted EPathfindingLayer 2015-11-02 11:05:26 +03:00
ArseniyShestakov
226650582d Move base movement cost to GameConstants 2015-10-16 03:03:40 +03:00
AlexVinS
2677d4a677 Fixed action cancel on active stack remove 2015-10-08 08:15:29 +03:00