4a9978c642
Disabled massive spells fore creatures as they are not fully supported yet.
...
* (WoG) commanders now cast spells properly.
2016-09-10 21:07:36 +03:00
40003460ca
Check if building's dependencies are allowed
2016-09-10 19:38:49 +02:00
62abde6c46
Prepare battle log for spell-cast on server side.
2016-09-10 18:23:55 +03:00
f8767a6380
cleanup
2016-09-10 09:37:18 +03:00
70abae9b51
CGameState::battleGetBattlefieldType: use RNG by ref
...
For now I not sure about proper place for battleGetBattlefieldType so I left it in GS
2016-09-09 23:16:43 +03:00
ea63497b19
Move CGameState::setupBattle code to CGameHandler::setupBattle
...
No reason to keep this code in GS.
2016-09-09 23:16:43 +03:00
53502e84e3
Add PrepareHeroLevelUp netpack to keep secondary skills RNG in sync
2016-09-09 23:16:43 +03:00
ca819b3cda
CGHeroInstance::nextPrimarySkill: don't use GS RNG directly
...
Code used from both GS and CGameHandler.
2016-09-09 23:16:42 +03:00
c8bcb14d34
CCallbackBase: add CRandomGenerator to all callbacks
...
This is easiest way to make server RNG available to CBattleInfoCallback.
Now server, client and gamestate have own RNG instance.
Only server and gamestate RNGs are serialized.
2016-09-09 23:16:42 +03:00
85f49bc968
CGHeroInstance::initArmy: don't use GS RNG. Get RNG through a ref
...
This function used by both server-side and gamestate so it's must use appropriate random source.
2016-09-09 23:16:42 +03:00
2ba3b20928
Multiple changes to RNG usage to both client and server
...
Server should never use RNG from CGameState directly.
Instead server get's own RNG that's state is secret for client.
2016-09-09 23:16:42 +03:00
960d93ff5f
CGameState: don't use RNG directly for easier desync debugging
...
Only access random generator via CGameState::getRandomGenerator
2016-09-09 23:16:42 +03:00
9296382bc6
More fixes for clang warning...
2016-09-08 19:58:01 +03:00
02f70464fb
Fix mismatched-tags Clang warnings
...
They're not important at all, but sicne there only few of them left just fix them.
2016-09-08 19:42:59 +03:00
d06d07a39b
Add ChangeFormation netpack to avoid MP desyncs
...
Previous code was working fine for single client, but would cause desync in multiplayer. Fix issue 2460.
2016-09-08 19:29:15 +03:00
a109580b91
Use const for ObjectTemplate
2016-09-08 18:06:28 +03:00
114dac7e81
Added ObjectTemplate copy constructor and assignment operator
2016-09-08 17:02:59 +03:00
42e7128acc
Fixed possible use-after-free crash with artifacts registration in RMG.
2016-09-08 14:48:48 +03:00
6dc47a2de0
Fixed use-after-free crash with quests registration in RMG.
...
* code taken from PR #200
2016-09-08 14:48:46 +03:00
f39e619304
More tweaks
2016-09-06 13:51:53 +03:00
1ce4675df6
Tweaks
2016-09-06 13:33:11 +03:00
838717dfc1
Magic mirror unified again with normal cast.
2016-09-06 13:05:33 +03:00
686cd00c68
Cleanup.
2016-09-06 12:26:01 +03:00
cc4362211c
Extracted MagicMirror handling
2016-09-06 11:03:36 +03:00
f3d9e718bf
Handle AcidBreathDamage immunity in standard way.
2016-09-06 10:52:54 +03:00
0241c6e843
Improved spell range calculation.
...
* should now support smart custom range AOE spells
2016-09-06 08:56:31 +03:00
1e32c71e47
Make sure that there is no unwanted stack affect by spells.
2016-09-06 08:20:17 +03:00
39c2c6cde7
Ensure no immunity to AcidBreathDamage
2016-09-06 07:16:32 +03:00
f1d0bede11
Moved all affected stacks calculations to mechanics
2016-09-06 07:05:55 +03:00
18fc94d709
WIP on SpellCastContext
2016-09-06 06:40:23 +03:00
9ee954edcc
WIP on SpellCastContext
2016-09-06 05:11:32 +03:00
1d840a33a5
Started SpellCastContext rework
2016-09-06 04:11:30 +03:00
82ac035340
OO design for obstacle spells.
2016-09-05 13:34:48 +03:00
f3b7fe947c
Reworked spell target existence check.
...
* related to 2269
2016-09-05 11:36:25 +03:00
22f729a3fe
CPlayerState serialize fix.
2016-09-04 13:43:09 +03:00
948a339463
Merge branch 'develop' into SpellsRefactoring8
2016-09-04 11:27:15 +03:00
f4f170bf92
Merge pull request #202 from vcmi/noncopyableBonusSystemNode2
...
Didn't manage to find any crashes in newly created games. Merging.
Keep in mind that even if most of old saves will load properly some of them still corrupted beyond repair and after some turns they might eventually crash.
2016-09-04 11:06:05 +03:00
5fc1fd4daf
Merge pull request #206 from Chocimier/fixes
...
genBuildingRequirements is tricky one, but in tests it's seems everything is okay
2016-09-04 09:02:34 +03:00
a23144b361
Extracted adventure spell mechanics to distinct class hierarchy.
2016-09-04 08:19:28 +03:00
eb128a0207
More style tweaks
2016-09-04 05:15:37 +03:00
c0cf5d6956
Style tweaks
2016-09-04 04:59:30 +03:00
437eadf1ed
do not leak scenarioOpts in CMapInfo
2016-08-31 06:18:01 +03:00
044e2b9e51
Properly calculate building requirements
...
In OH3 you can't build Capitol when Tavern is not builded.
In VCMI up to now you could.
2016-08-30 22:15:24 +02:00
326be61ecb
Show atrifact's name in message of Warrior's tomb
2016-08-30 20:50:03 +02:00
52797082aa
Do not show whether Shrine is visited by hero, if was not visited by player yet
2016-08-30 20:48:03 +02:00
1e7e7a7006
Fixed http://bugs.vcmi.eu/view.php?id=2419
2016-08-30 12:20:17 +03:00
5d329b40a4
Factored spell action selection for location target.
2016-08-30 12:20:15 +03:00
d1579ea620
Simplify spell action selection for creature target.
2016-08-30 12:20:13 +03:00
b09f150e7b
Factored out battleCanCastThisSpellHere
2016-08-30 12:20:11 +03:00
0d5eaa1183
Proper fix for http://bugs.vcmi.eu/view.php?id=2422
2016-08-30 12:20:09 +03:00