ArseniyShestakov
2543e068ac
Merge pull request #209 from vcmi/fix/saveDesyncs
...
Think I tested it enough to merge it
2016-09-11 21:36:42 +03:00
AlexVinS
33d1895d21
Merge branch 'develop' into SpellsRefactoring8
2016-09-11 18:34:18 +03:00
AlexVinS
49e2bde3c0
Mostly complete fix for http://bugs.vcmi.eu/view.php?id=2429
2016-09-11 16:02:45 +03:00
AlexVinS
3fa62beb6d
Do not allow to cast Cure if there is nothing to cure.
2016-09-11 13:48:14 +03:00
Arseniy Shestakov
fe6c0cf89b
Use RandomGeneratorUtil::randomShuffle for reproducible gameplay
2016-09-11 00:10:52 +03:00
Arseniy Shestakov
c8faca8f39
Refactoring: only use RNGs explicitly to avoid bug prone code in future
...
Now server-side code should always use CRandomGenerator::getDefault which is serialized in GH.
CGameState::getRandomGenerator should be only used from GS code and CPackForClient-based applyGs.
2016-09-11 00:10:46 +03:00
AlexVinS
5e0a9d7966
hackfix for commander spells
2016-09-10 22:41:50 +03:00
AlexVinS
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
Piotr Wójcik
40003460ca
Check if building's dependencies are allowed
2016-09-10 19:38:49 +02:00
AlexVinS
62abde6c46
Prepare battle log for spell-cast on server side.
2016-09-10 18:23:55 +03:00
AlexVinS
f8767a6380
cleanup
2016-09-10 09:37:18 +03:00
Arseniy Shestakov
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
Arseniy Shestakov
ea63497b19
Move CGameState::setupBattle code to CGameHandler::setupBattle
...
No reason to keep this code in GS.
2016-09-09 23:16:43 +03:00
Arseniy Shestakov
53502e84e3
Add PrepareHeroLevelUp netpack to keep secondary skills RNG in sync
2016-09-09 23:16:43 +03:00
Arseniy Shestakov
ca819b3cda
CGHeroInstance::nextPrimarySkill: don't use GS RNG directly
...
Code used from both GS and CGameHandler.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
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
Arseniy Shestakov
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
Arseniy Shestakov
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
Arseniy Shestakov
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
Arseniy Shestakov
9296382bc6
More fixes for clang warning...
2016-09-08 19:58:01 +03:00
Arseniy Shestakov
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
Arseniy Shestakov
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
AlexVinS
a109580b91
Use const for ObjectTemplate
2016-09-08 18:06:28 +03:00
AlexVinS
114dac7e81
Added ObjectTemplate copy constructor and assignment operator
2016-09-08 17:02:59 +03:00
AlexVinS
42e7128acc
Fixed possible use-after-free crash with artifacts registration in RMG.
2016-09-08 14:48:48 +03:00
AlexVinS
6dc47a2de0
Fixed use-after-free crash with quests registration in RMG.
...
* code taken from PR #200
2016-09-08 14:48:46 +03:00
AlexVinS
f39e619304
More tweaks
2016-09-06 13:51:53 +03:00
AlexVinS
1ce4675df6
Tweaks
2016-09-06 13:33:11 +03:00
AlexVinS
838717dfc1
Magic mirror unified again with normal cast.
2016-09-06 13:05:33 +03:00
AlexVinS
686cd00c68
Cleanup.
2016-09-06 12:26:01 +03:00
AlexVinS
cc4362211c
Extracted MagicMirror handling
2016-09-06 11:03:36 +03:00
AlexVinS
f3d9e718bf
Handle AcidBreathDamage immunity in standard way.
2016-09-06 10:52:54 +03:00
AlexVinS
0241c6e843
Improved spell range calculation.
...
* should now support smart custom range AOE spells
2016-09-06 08:56:31 +03:00
AlexVinS
1e32c71e47
Make sure that there is no unwanted stack affect by spells.
2016-09-06 08:20:17 +03:00
AlexVinS
39c2c6cde7
Ensure no immunity to AcidBreathDamage
2016-09-06 07:16:32 +03:00
AlexVinS
f1d0bede11
Moved all affected stacks calculations to mechanics
2016-09-06 07:05:55 +03:00
AlexVinS
18fc94d709
WIP on SpellCastContext
2016-09-06 06:40:23 +03:00
AlexVinS
9ee954edcc
WIP on SpellCastContext
2016-09-06 05:11:32 +03:00
AlexVinS
1d840a33a5
Started SpellCastContext rework
2016-09-06 04:11:30 +03:00
AlexVinS
82ac035340
OO design for obstacle spells.
2016-09-05 13:34:48 +03:00
AlexVinS
f3b7fe947c
Reworked spell target existence check.
...
* related to 2269
2016-09-05 11:36:25 +03:00
AlexVinS
22f729a3fe
CPlayerState serialize fix.
2016-09-04 13:43:09 +03:00
AlexVinS
948a339463
Merge branch 'develop' into SpellsRefactoring8
2016-09-04 11:27:15 +03:00
ArseniyShestakov
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
ArseniyShestakov
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
AlexVinS
a23144b361
Extracted adventure spell mechanics to distinct class hierarchy.
2016-09-04 08:19:28 +03:00
AlexVinS
eb128a0207
More style tweaks
2016-09-04 05:15:37 +03:00
AlexVinS
c0cf5d6956
Style tweaks
2016-09-04 04:59:30 +03:00
AlexVinS
437eadf1ed
do not leak scenarioOpts in CMapInfo
2016-08-31 06:18:01 +03:00
Piotr Wójcik
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
Piotr Wójcik
326be61ecb
Show atrifact's name in message of Warrior's tomb
2016-08-30 20:50:03 +02:00
Piotr Wójcik
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
AlexVinS
1e7e7a7006
Fixed http://bugs.vcmi.eu/view.php?id=2419
2016-08-30 12:20:17 +03:00
AlexVinS
5d329b40a4
Factored spell action selection for location target.
2016-08-30 12:20:15 +03:00
AlexVinS
d1579ea620
Simplify spell action selection for creature target.
2016-08-30 12:20:13 +03:00
AlexVinS
b09f150e7b
Factored out battleCanCastThisSpellHere
2016-08-30 12:20:11 +03:00
AlexVinS
0d5eaa1183
Proper fix for http://bugs.vcmi.eu/view.php?id=2422
2016-08-30 12:20:09 +03:00
AlexVinS
b634482bb0
Fix http://bugs.vcmi.eu/view.php?id=2422
2016-08-30 12:20:07 +03:00
AlexVinS
22d885af22
Fixed http://bugs.vcmi.eu/view.php?id=2302
2016-08-30 12:20:05 +03:00
AlexVinS
be67faad90
Drafts
2016-08-30 12:20:03 +03:00
AlexVinS
f053754653
Advance REMOVE_OBSTACLE mechanics
2016-08-30 12:20:01 +03:00
AlexVinS
40e6e0c143
Move REMOVE_OBSTACLE-related code from callback to where it should be.
2016-08-30 12:19:59 +03:00
AlexVinS
750c114648
Drafts
2016-08-30 12:19:57 +03:00
AlexVinS
3b2a45c8dc
Get rid of battleGetPossibleTargets.
2016-08-30 12:19:52 +03:00
AlexVinS
d4a35c6839
Simplify getAffectedStacks arguments. casterColor not needed anymore.
2016-08-30 12:14:08 +03:00
AlexVinS
f6715ad787
Use ISpellCaster in CSpell::canBeCast.
...
* -2 todo notes
2016-08-30 12:12:46 +03:00
AlexVinS
cf1d5d0bc9
tweaks
2016-08-30 11:45:05 +03:00
AlexVinS
a50a32405d
Use weak_ptr for TypeDescriptor cross-links. Fixed total TypeDescriptor memory leak.
2016-08-30 09:48:12 +03:00
AlexVinS
c6d257f328
Fixed CQuest leak
2016-08-30 09:48:10 +03:00
DjWarmonger
6791350975
Compile fix (operator = is ambiguous).
2016-08-30 07:50:38 +02:00
AlexVinS
ef05a56e49
cleanup
2016-08-30 05:13:45 +03:00
Arseniy Shestakov
668cd83ee5
More work on static variable desyncs
2016-08-29 23:07:52 +03:00
Alexander Shishkin
5e5ce0bb09
Merge pull request #203 from vcmi/logFormat
...
boost::format support for CLogger
2016-08-29 17:32:44 +04:00
Arseniy Shestakov
452e28d183
Remove some useless includes found by cppclean
...
This of course was tested and shouldn't break anything
2016-08-26 04:42:16 +03:00
Arseniy Shestakov
94bb5b9901
CGKeys::wasMyColorVisited: fix to not change playerKeyMap on client
2016-08-25 16:47:52 +03:00
Arseniy Shestakov
a90b657b86
Add reset to some static variables on client
2016-08-25 15:52:20 +03:00
Arseniy Shestakov
5a387cdaf1
Town: update appearance in applyGs to avoid desyncs. Fix issue 2464
...
Netpacks NewStructures and RazeStructures
2016-08-24 05:15:04 +03:00
Arseniy Shestakov
abad3cfb17
PlayerState::daysWithoutCastle: change in netpacks only. Fix issue 2462
...
Moving code from CGameHandler to NetPacksLib without changes.
2016-08-23 08:02:04 +03:00
Arseniy Shestakov
355f0a74ab
CGSeerHut: add initialization to constructor
2016-08-23 01:19:03 +03:00
Arseniy Shestakov
52e660f087
CQuest: add proper constructor to avoid uninitialized fields
2016-08-22 20:41:37 +03:00
AlexVinS
111f080639
Fixed memory leak in CCreatureHandler
2016-08-22 13:27:25 +03:00
AlexVinS
63500042e8
Fixed memory leak in CCompressedStream
2016-08-22 12:56:05 +03:00
Arseniy Shestakov
206c5699cf
CGHeroInstance::SecondarySkillsInfo: always set rand seed
...
Seed will always be set again on hero initialization, but for save sync it's must be same before that. Related to issue 2459
2016-08-19 23:31:54 +03:00
Arseniy Shestakov
ec22da4412
CMap: fix objects memory leak on exit
2016-08-19 16:56:26 +03:00
Arseniy Shestakov
bf6ad4e783
More fixes for uninitialized fields part 2
2016-08-19 14:58:04 +03:00
Arseniy Shestakov
ab06cfd586
More fixes for uninitialized fields
2016-08-18 18:53:28 +03:00
AlexVinS
69395d4c78
Fix bonus tree on node move
2016-08-18 15:04:07 +03:00
AlexVinS
d42947f109
Added move constructor for BonusList
2016-08-18 15:04:05 +03:00
AlexVinS
55e27a6334
Important fix
2016-08-18 15:04:03 +03:00
AlexVinS
681b3c7078
reduced code duplication
2016-08-18 15:04:01 +03:00
AlexVinS
629922f43e
Added move constructors for minimum required Bonus system`s classes
2016-08-18 15:03:59 +03:00
DjWarmonger
d188b86a50
As suggested by AVS, I made CBonusYSstemNode noncopyable. However, it is copied somewhere in the code, but I can't find it with MVS:
...
http://stackoverflow.com/questions/3757219/how-to-locate-boostnoncopyable-errors
2016-08-18 15:03:57 +03:00
AlexVinS
b3e7e2e04a
[WiP] Fix one case of bonus node copying.
2016-08-18 15:03:55 +03:00
AlexVinS
89ce1a4509
Fixed uninitialized field
2016-08-18 15:03:20 +03:00
AlexVinS
439aeecc8b
[c::b] re-enabled PCH, tested with GCC 5.3. (Older versions may not work)
2016-08-18 13:40:35 +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
AlexVinS
e26384062f
Fixed memory leak in CObjectClassesHandler
2016-08-17 09:24:01 +03:00
Arseniy Shestakov
b0045fa357
Fix TurnInfo memory leaks
2016-08-16 15:47:21 +03:00
Arseniy Shestakov
b4a35f9c62
CPathfinderHelper: fix memory leak
2016-08-16 14:59:16 +03:00
DjWarmonger
dea39b8497
Complete solution for Subterranean Gate placement.
2016-08-15 21:37:38 +02:00
DjWarmonger
7600f8cf08
Quick fix - stop spawning Subterranean Gates at the edge of the map.
2016-08-14 08:36:15 +02:00
DjWarmonger
f995756973
First part of Subterranean Gates rework. Fixes # http://bugs.vcmi.eu/view.php?id=2450
2016-08-13 19:48:44 +02:00
AlexVinS
74a82c4c9d
Moved boost:format log proxy to CLoggerBase
2016-08-13 16:57:18 +03:00
AlexVinS
599f4cfb55
extracted base logger class to vstd
2016-08-13 16:57:16 +03:00
AlexVinS
efee250e49
Few more usages of logFormat
2016-08-13 16:57:14 +03:00
AlexVinS
d6178d0bb5
Implemented boost::format based log proxy.
2016-08-13 16:57:13 +03:00
AlexVinS
36c44c2ce7
projects update
2016-08-13 16:57:11 +03:00
AlexVinS
72f79a3ad7
Draft boost::format based log proxy.
2016-08-13 16:57:09 +03:00
DjWarmonger
8186fcae99
Removed some legacy code, work in progress.
2016-08-13 12:42:45 +02:00
DjWarmonger
2a9ddadedd
Fixes. Everything works now.
2016-08-12 21:40:22 +02:00
DjWarmonger
9b58450cb0
Part 3 - first working draft, cut generation time by half.
2016-08-12 19:16:21 +02:00
DjWarmonger
d1255f0d67
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2016-08-12 17:52:17 +02:00
AlexVinS
1c292205df
More logging cleanup
2016-08-12 12:14:10 +03:00
DjWarmonger
452027cd8d
Handle ObjectInfo via pointer to avoid expensive copy.
2016-08-11 10:49:19 +02:00
DjWarmonger
19ea46a6d2
Part 2.
2016-08-11 09:20:50 +02:00
DjWarmonger
2410f0af61
- WeightedRule optimization - part 1
...
- comments, style
2016-08-11 07:49:08 +02:00
DjWarmonger
2bffd4e5c1
Moar optimization!
2016-08-09 13:40:46 +02:00
DjWarmonger
7f0b852449
Huge optimization based on profiling - cut generation time by almost half (Jebus XL+U).
2016-08-09 10:12:13 +02:00
DjWarmonger
08dccb4cc3
Use binary search for roulette wheel. TODO: implement in other places.
2016-08-08 22:16:31 +02:00
DjWarmonger
7db2fc6d25
Fixes. Works correctly only for player factions configured in RMG options.
2016-08-06 12:16:13 +02:00
DjWarmonger
f980de7107
Place starting zones on surface/underground depending on player faction - first draft.
2016-08-06 10:04:03 +02:00
AlexVinS
57e588cba1
attempt to fix travis build
2016-07-28 13:15:19 +03:00
DjWarmonger
5a1383fea8
Correct implementation for previous fix.
2016-07-25 18:37:42 +02:00
DjWarmonger
d9556332e1
Hopefully fixed zone guards misplaced due to paths connecting at acute angles.
2016-07-24 18:15:23 +02:00
DjWarmonger
40f28778c2
Minor optimization, saves few seconds.
2016-07-14 14:24:11 +02:00
DjWarmonger
7d7b51d0db
Generated zones can now have different sizes depending on template.
2016-07-13 10:35:31 +02:00
DjWarmonger
1d8fb01f46
More even distribution of surface / underground zones + refactoring.
2016-07-13 07:54:52 +02:00
DjWarmonger
ac68dca328
Fixed zone placer so it now correctly evaluates found solution.
2016-07-12 21:23:45 +02:00
DjWarmonger
aecf834cc1
Fixed placing of close objects #2447 . Some additional refactoring.
2016-07-12 11:42:03 +02:00
DjWarmonger
e1e520f0a2
Removed "growing" zones which don't fit the rest of algorithm. Zones are now better connected on complex maps.
2016-07-11 15:44:24 +02:00
DjWarmonger
c3cbe89e2a
Last improvement: attract zones and push them bakc in separate steps.
2016-07-10 18:16:32 +02:00
DjWarmonger
87ef3701aa
Probably better fitness function.
2016-07-10 16:37:54 +02:00
DjWarmonger
8ceceb897e
Fixed zones falling into negative cordinates. Should fix "assert(size)" crashes.
2016-07-10 14:32:45 +02:00
DjWarmonger
fb3adf762a
Improved zone placer - zones on different levels are allowed to overlap completely.
2016-07-10 13:32:33 +02:00
DjWarmonger
f139b70279
Changed Subterranean Gate placement algorithm - now they are meant to be equidistant from both zone centers.
2016-07-10 12:29:48 +02:00
DjWarmonger
a66893af28
Fixed bug with Subterranean Gates:
...
Failed to connect (-1,-1,-1) with center of teh zone.
2016-07-10 10:11:29 +02:00
DjWarmonger
cfacd1adc3
Random template format change:
...
Tempaltes now can have optional "name" parameter for different names than identifier.
2016-06-06 11:30:51 +02:00
DjWarmonger
201ed26795
Fixed #1213
2016-06-06 09:30:45 +02:00
DjWarmonger
4101cabc22
Hidden unnecessary log.
2016-06-05 10:25:52 +02:00
DjWarmonger
053b342721
Minor optimization for object selection.
2016-06-05 10:18:10 +02:00
Arseniy Shestakov
2e70d29479
CGameHandler::applyBattleEffects: improve Fire Shield support
...
Now damage is limited to total health of defending stack and clone have no file shield damage. In same time damage calculation is likely remain incorrect.
2016-03-14 15:28:17 +03:00
Arseniy Shestakov
10dbbead2d
Fix indentation of logging code and around it
...
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
DjWarmonger
fe4d871fe7
Version bump.
2016-03-01 19:42:40 +01:00
ArseniyShestakov
7886e8986e
Merge pull request #197 from vcmi/issue/2304_2418
...
Issues/2304/2418/2293
2016-03-01 15:20:59 +03:00
AlexVinS
3873e5047e
Attempt to fix 2293
2016-03-01 13:24:46 +03:00
DjWarmonger
8f1fba9551
Merge pull request #146 from vcmi/feature/VCMIMapFormat1
...
Ok let's try it.
2016-03-01 07:49:54 +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
277211e569
Fix summoning block by clones.
2016-03-01 04:16:51 +03:00
DjWarmonger
772bc9e6c1
Updated MSVS project files.
2016-02-29 16:32:29 +01:00
AlexVinS
f890037008
Fixes
2016-02-29 04:42:15 +03:00
AlexVinS
97504364e4
Rtmoved unused method BattleInfo::getStackT
2016-02-28 19:00:37 +03:00
AlexVinS
5df8d1cbd0
Update low level battle stacks accessor for ghost selection support.
2016-02-28 05:10:20 +03:00
AlexVinS
47b619a543
Centralize GHOST state handling
2016-02-28 01:35:23 +03:00
AlexVinS
9036d39241
Do not remove battle stacks, make them ghosts instead.
...
* exclude ghost stacks from (hopefully all) get* results for now
2016-02-28 01:08:56 +03:00
AlexVinS
5d5ad99436
Rename DEAD_CLONE -> GHOST, as this will be possible for any stack
2016-02-28 00:13:34 +03:00
AlexVinS
d2a5e64542
Remove clone of killed or removed creature. Treat summoned creature as clone when killed.
2016-02-27 18:39:37 +03:00
Arseniy Shestakov
30189a386f
CPathfinder: fix and improve sail-land transition checks
2016-02-26 21:43:43 +03:00
AlexVinS
5408b6c1ff
Formatting
2016-02-26 18:19:41 +03:00
AlexVinS
66d8408130
Fix creature set loading
2016-02-26 02:35:30 +03:00
AlexVinS
8e3e574900
Fix map object appearance serialization
2016-02-26 02:03:14 +03:00
AlexVinS
0de1a37d65
Fix missing template zIndex saving
2016-02-26 01:01:07 +03:00
AlexVinS
4a37ed99ea
Fix duplicated block-visit regression
2016-02-26 00:42:49 +03:00
AlexVinS
2021decb91
Serialize town spells
2016-02-25 22:59:17 +03:00
AlexVinS
8b6cf82a01
Fix
2016-02-24 02:59:34 +03:00
AlexVinS
d2f04332d0
Load object appearance and pos before addNewObject call, it is required for block-visit calculation.
...
Added a test for tile block-visit.
2016-02-24 00:44:17 +03:00
AlexVinS
c3775486db
Serizlize main town info
2016-02-23 23:23:39 +03:00
AlexVinS
17e557be17
Advance Logical identifier condition
2016-02-23 16:36:21 +03:00
DjWarmonger
fba1e86091
An experiment - instead of hard limit function use modulo wrap-around for zone placement. Should be more logical and give zones more space.
2016-02-23 12:11:25 +01:00
AlexVinS
8ed6aa762b
fix
2016-02-23 01:14:06 +03:00
AlexVinS
4bcfb8c27d
Draft of new Event conditions
2016-02-22 23:43:57 +03:00
AlexVinS
dc5ad7d7b3
Make string instance names persistent
2016-02-22 19:26:42 +03:00
AlexVinS
ac281f3fec
Tweaks
2016-02-22 04:53:14 +03:00
Arseniy Shestakov
9428f865d3
CGTownInstance: erase all stacks when town is captured by enemy
2016-02-22 03:33:15 +03:00
AlexVinS
64cb0267a3
Do not save "visitableFrom" if object do not have active tiles.
2016-02-22 03:22:10 +03:00
AlexVinS
51bee1000b
Implemented CGWitchHut::serializeJsonOptions
2016-02-22 03:16:33 +03:00
AlexVinS
939e0128fd
Do not save default json values
2016-02-22 02:50:06 +03:00
Arseniy Shestakov
d15106bf63
CGTownInstance: implement armies merging on siege. Fix issue 169
...
Merging algorithm is replicate one from original game.
2016-02-22 02:46:31 +03:00
AlexVinS
dd1aabbe23
Use JsonSerializeFormat for map objects
2016-02-22 02:37:19 +03:00
AlexVinS
a4b6d34ebe
Advance map header serialization
2016-02-21 22:13:20 +03:00
AlexVinS
4ebafa17b4
Remove unused placeholdedHeroes field
2016-02-21 22:12:58 +03:00
AlexVinS
53b5587c2e
Advance map header serialization
2016-02-21 21:21:22 +03:00
AlexVinS
7eb8dbe0e9
Fix serializer backward compatibility in CPointerLoader
2016-02-18 18:45:42 +03:00
AlexVinS
b6103167f7
Fix serializer backward compatibility in CPointerLoader
2016-02-18 18:08:05 +03:00
AlexVinS
36121696ca
Clenaup
2016-02-18 17:48:04 +03:00
Arseniy Shestakov
07961766ca
CGPandoraBox: don't use giveCreatures object removal feature
...
For pandora box there's own removal function and for CGEvent based on it we sometimes don't want to remove object at all.
2016-02-17 11:28:54 +03:00
AlexVinS
5a8ee32f89
Tweaks
2016-02-15 18:16:45 +03:00
AlexVinS
150fcc9422
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
2016-02-15 13:39:00 +03:00
AlexVinS
4d9058e412
Whitespace cleanup. (No code changes.)
2016-02-15 13:34:37 +03:00
AlexVinS
ec760632a6
Advance Json serializer
...
* added bool, numeric and string support
* added some enum support
* PoC implementation of logical id condition
* Refactoring
2016-02-15 12:21:39 +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
2cfdfca7e5
Battles: fix more cases where invalid wall hex position present
2016-02-14 14:38:24 +03:00
AlexVinS
67b03b9658
Fixed remaining tempOwner testsю
2016-02-14 12:25:49 +03:00
AlexVinS
fb322b41bc
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
2016-02-14 12:14:57 +03:00
AlexVinS
800f32c4cb
Fix few cases of tempOwner initialization.
2016-02-14 12:13:30 +03:00
AlexVinS
709dd833d5
Added hacks for hero identification.
2016-02-14 11:25:01 +03:00
AlexVinS
e0af4a665a
Added hacks fot spell scroll support.
2016-02-13 19:43:05 +03:00
AlexVinS
7106c5d1af
Fix loading of spell identifier
2016-02-13 19:41:28 +03:00
Arseniy Shestakov
d4524c2fbd
CGDwelling: dont set owner for Refugee Camp. Fix issue 2029
2016-02-13 19:26:47 +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
AlexVinS
a59f0c23ce
Dedug tweaks
2016-02-13 17:16:00 +03:00
AlexVinS
5a92e0de2b
Small redesign
2016-02-13 16:28:07 +03:00
AlexVinS
22b93106c8
Experimental drafts of Json serializer
2016-02-13 15:04:32 +03:00
AlexVinS
a307d3ca40
tweaks
2016-02-10 13:24:03 +03:00
AlexVinS
fb17914ae5
Debug tweaks
2016-02-10 08:59:24 +03:00
AlexVinS
3c78f960cd
Complete json map format integration
2016-02-10 07:28:00 +03:00
Arseniy Shestakov
422d5cabdf
CBattleInterface: first pass on client drawbridge visualization
2016-02-10 07:10:32 +03:00
AlexVinS
0c21efb202
Start integration of map format into engine
2016-02-09 20:20:03 +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
DjWarmonger
4de0f0f973
Compile fixes for MSVS.
2016-02-09 11:08:20 +01:00
Arseniy Shestakov
a07761b608
Battles: readable identifiers enum for drawbridge and gate hexes
...
Dont like to locate them in BattleHex, but it's best place I can see so far.
2016-02-09 12:25:13 +03:00
AlexVinS
6db94ab74c
Explicit army serialization - too much CArmedInstance descendants
2016-02-09 10:11:59 +03:00
AlexVinS
53dc49e92a
CGShipyard, CGShrine serialization
2016-02-09 09:17:20 +03:00
AlexVinS
401ba48257
CGScholar serialization
2016-02-09 09:02:34 +03:00
AlexVinS
a00dbd3dd1
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
...
Conflicts:
lib/CMakeLists.txt
lib/VCMI_lib.cbp
lib/filesystem/CFileInputStream.cpp
lib/filesystem/CZipLoader.cpp
lib/rmg/CRmgTemplateZone.cpp
vcmi.workspace
2016-02-08 10:17:25 +03:00
ArseniyShestakov
890ae43f55
Merge pull request #180 from Zyx-2000/FileInfo
...
Refactored CFileInfo & ResourceID
2016-02-08 04:55:39 +03:00
Arseniy Shestakov
a13aec4fd7
Aplly some fix for merge and explicitly specify type for std::max
2016-02-08 04:09:02 +03:00
DjWarmonger
441c94d56c
Remove log for Seer Huts.
2016-02-06 15:11:56 +01:00
DjWarmonger
6f5706352d
Possible fix for #2371
2016-02-06 12:36:56 +01:00
AlexVinS
081a20d047
Fix a crash.
2016-02-05 09:40:20 +03:00
AlexVinS
a3f0d1a94e
More post-merge fixes
2016-02-05 09:28:36 +03:00
DjWarmonger
b98a83f743
Added string identifiers for terrain types.
2016-02-04 17:57:51 +01:00
AlexVinS
483276b128
Merge fixes
2016-02-04 12:28:12 +03:00
AlexVinS
6e205a58b4
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
...
Conflicts:
lib/VCMI_lib.cbp
lib/filesystem/CZipLoader.cpp
lib/filesystem/CZipLoader.h
lib/mapObjects/CGTownInstance.cpp
2016-02-04 10:27:51 +03:00
AlexVinS
97f19b5176
CGResource serialization
2016-02-04 09:22:14 +03:00
AlexVinS
d8d574ed84
CGSignBottle serialization
2016-02-04 08:50:46 +03:00
AlexVinS
a6c719ee11
CGCreature serialization. Added rewardResources.
2016-02-04 08:44:46 +03:00
DjWarmonger
e7b639898e
Final compilation fix suggested by AVS.
2016-02-03 14:26:25 +01:00
AlexVinS
1bc41b3ba3
Merge commit '3c844002626f48007a888d4dd8b0b45ec867fc9a' into feature/VCMIMapFormat1
...
Conflicts:
lib/mapObjects/CGHeroInstance.cpp
2016-02-03 05:04:44 +03:00
AlexVinS
b176734418
CGCreature serialization
2016-02-03 04:18:03 +03:00
DjWarmonger
0c82419fb0
Final compile fix, unfortunatelly game fails to launch now due to missing fill_fopen64_filefunc in minizip.dll :(
2016-02-02 19:16:12 +01:00
DjWarmonger
51183228f2
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2016-02-02 18:48:42 +01:00
DjWarmonger
7cf2d79584
Final compile fix.
2016-02-02 18:48:20 +01:00
Alexander Shishkin
20fd7cf916
Merge pull request #190 from vmarkovtsev/feature/fix_uf_warning
...
Fix unused function warning in release mode
2016-02-02 15:23:37 +03:00
DjWarmonger
97117491ae
Merge pull request #191 from vmarkovtsev/feature/psychic_elementals
...
I think we could implement general bonus that reduces damage depending on arbitrary immunity (or other bonus), but it's beyond the scope of this PR.
2016-02-02 13:02:13 +01:00
DjWarmonger
afd5b8807d
Compile fix #2
2016-02-02 12:46:58 +01:00
Vadim Markovtsev
eb10433535
Implement psychic elementals vs mind immune units
2016-02-02 14:30:37 +03:00
DjWarmonger
6865f70ab8
Compile fix #1
2016-02-02 12:19:33 +01:00
DjWarmonger
c78d2469c5
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2016-02-02 12:03:16 +01:00
Vadim Markovtsev
bdd87be10d
Try to fix http://bugs.vcmi.eu/view.php?id=2362
2016-02-02 11:46:33 +03:00
Vadim Markovtsev
8d7629bdab
Fix unused function warning in release mode
2016-02-02 11:12:28 +03:00
Vadim Markovtsev
88bc21952b
Make stables message appear if hero has cavaliers but visited stables before
2016-02-01 09:41:15 +03:00
Vadim Markovtsev
c30a6f2ff3
Fix 1989 cavaliers -> champions in stables
2016-01-31 21:09:11 +03:00
ArseniyShestakov
7f68124b97
Merge pull request #136 from vcmi/issue/1372-2
...
issue/1372
2016-01-31 20:28:54 +03:00
Vadim Markovtsev
3926920103
Rename radious -> radius
...
There is no such English word, "radious"
Some files get new lines in the end - BSD sed bug + best practices
2016-01-31 18:01:58 +03:00
Vadim Markovtsev
e18b21b78e
Fix 2264 learning stone & Learning skill
2016-01-31 10:12:01 +03:00
Vadim Markovtsev
eb4331baf6
Fix 1916 water wheel reward
2016-01-30 19:11:22 +03:00
Vadim Markovtsev
918fbd8530
Refactor hero's mana regain
2016-01-30 13:51:07 +03:00
Vadim Markovtsev
22fc4fd3e9
Fix 2406 reset potentially available heroes
2016-01-30 10:02:33 +03:00
AlexVinS
16e0d18880
Added special slots for war machines and arrow towers
2016-01-30 00:53:53 +03:00
Arseniy Shestakov
57328bdc83
Battles: implement basic drawbridge mechanics
...
Movement to blocking hex 94 not yet properly handled as stack movement code need to be rewritten first.
Also gate destruction not immidiately affect drawbridge state.
2016-01-29 22:43:35 +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
ca4e13b2dc
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2016-01-29 18:21:56 +01:00
DjWarmonger
9ce6f874f0
Local fixes.
2016-01-29 18:21:19 +01:00
ArseniyShestakov
a534fe1cfe
Merge pull request #152 from vcmi/feature/moatHexesConfig
...
Configurable moat hexes positions
2016-01-29 20:07:22 +03:00
Arseniy Shestakov
75f278b913
moatHexes: use initializer list and update comment
2016-01-29 19:25:25 +03:00
Zyx-2000
7fbd5479e2
alignment & makefile fix
2016-01-29 16:08:44 +01:00
Zyx-2000
2b88de8e24
added new files
2016-01-29 15:39:44 +01:00
Zyx-2000
29faa9ce06
...and project updated
2016-01-29 15:33:07 +01:00
Zyx-2000
523bc22a30
removed old files
2016-01-29 15:32:37 +01:00
Zyx-2000
8aefdb0b7b
small project file fix
2016-01-29 15:30:22 +01:00
Zyx-2000
3a1a8e3d47
further refactoring-related changes
2016-01-29 15:16:14 +01:00
ArseniyShestakov
94fa25d56d
Merge pull request #179 from vmarkovtsev/issue/2405
...
Fix 2405 quest timeout mechanics
2016-01-29 12:19:31 +03:00
Vadim Markovtsev
30d64e3e3c
Fix 2405 quest timeout mechanics
2016-01-29 09:28:37 +03:00
AlexVinS
0011507e42
wipe constexpr on @DjWarmonger request
2016-01-29 00:34:54 +03:00
Arseniy Shestakov
8c39ecf538
moatHexes: add saves and mods compatability
2016-01-28 01:35:01 +03:00
Arseniy Shestakov
48aedaef47
Merge branch 'develop' into feature/moatHexesConfig
2016-01-28 01:15:08 +03:00
Arseniy Shestakov
b7fbbfdebe
CQuest: add missing completedOption initialization for CGQuestGuard
2016-01-27 23:24:17 +03:00
DjWarmonger
fdfe7b6b06
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2016-01-27 21:08:18 +01:00
DjWarmonger
327e95407e
- Compile fixes part 1
...
- Project settings for MSVS
2016-01-27 21:08:08 +01:00
Zyx-2000
c3e8c8bc1c
Merge branch 'develop' into FileInfo
2016-01-27 19:21:43 +01:00
ArseniyShestakov
4e8486da7b
Merge pull request #160 from vmarkovtsev/issue/2388
...
Fix 2388 obelisks puzzle revealing
2016-01-27 20:49:03 +03:00
Vadim Markovtsev
0ac833cca4
Fix 2377 "Seer Empty Text"
2016-01-27 19:52:45 +03:00
AlexVinS
048e22dbe6
Fix build.
2016-01-27 19:32:59 +03:00
AlexVinS
d7c0c3759a
Merge branch 'Zyx-develop' into develop
...
Conflicts:
lib/filesystem/AdapterLoaders.h
2016-01-27 18:53:41 +03:00
ArseniyShestakov
3c84400262
Merge pull request #175 from vmarkovtsev/feature/switch_retreat_no_troops
...
Feature/switch retreat no troops
2016-01-27 18:49:29 +03:00
Alexander Shishkin
1472ed970d
Merge pull request #176 from vmarkovtsev/issue/2160
...
Fix 2160 dismissing a VIP hero.
2016-01-27 18:28:57 +03:00
Vadim Markovtsev
9f3313524e
Fix 2160 dismissing a VIP hero
2016-01-27 17:10:19 +03:00
Vadim Markovtsev
36eaa399e7
Add hardcodedFeature to switch winner's retreating with no troops
2016-01-27 16:42:17 +03:00
AlexVinS
bffdc2813d
revert some project changes
2016-01-27 15:21:29 +03:00
DjWarmonger
94ecc3f520
Compilation fix. MVS 2013 doesn't support constexpr and it's not needed either.
2016-01-27 10:13:33 +01:00
DjWarmonger
fc62cabb68
Merge pull request #174 from vmarkovtsev/issue/981
...
Fix CGHeroInstance::isInitialized implementation
2016-01-27 09:43:53 +01:00
Vadim Markovtsev
f6679bba50
Fix CGHeroInstance::isInitialized implementation
2016-01-27 09:44:23 +03:00
Zyx-2000
92dd194c97
logger now supports unicode file paths
2016-01-26 22:42:15 +01:00
DjWarmonger
f626c0f9ed
Merge pull request #173 from vmarkovtsev/issue/981
...
Fix 981 reset hero on hiring after retreat/surrender
2016-01-26 21:24:22 +01:00
Vadim Markovtsev
7772b6de74
Fix 981 reset hero on hiring after retreat/surrender
2016-01-26 22:48:31 +03:00
Zyx-2000
70e3c81b9f
Replaced CFileInfo with more correct and efficient alternative
2016-01-26 14:51:38 +01:00
Vadim Markovtsev
40cb48d65e
Replace std::remove_if with vstd::erase_if
2016-01-26 10:19:58 +03:00
ArseniyShestakov
6a7b1a1737
Merge pull request #161 from vmarkovtsev/issue/2076
...
Fix 2076 Grail removal
2016-01-26 09:01:43 +03:00
Arseniy Shestakov
97a8874ed7
CGCreature: fix crash on draw
...
Also according to H3 behaviour if there artifact monster guarded it's will be lost on draw.
2016-01-26 08:41:09 +03:00
Vadim Markovtsev
22eb71de03
Remove this-> occurrences in new code
2016-01-25 14:14:32 +03:00
Vadim Markovtsev
a74fbff34f
Fix 2076 Grail removal
2016-01-25 12:38:11 +03:00
Vadim Markovtsev
afa95312ba
Fix 2139 captured spell scroll descriptions
2016-01-25 08:49:26 +03:00
AlexVinS
0ec07b38ac
fix build
2016-01-24 16:58:24 +03:00
AlexVinS
89d986fc6a
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
...
Conflicts:
lib/CArtHandler.h
lib/mapObjects/MiscObjects.cpp
2016-01-24 15:39:41 +03:00
AlexVinS
408f346541
Drafts for hero serialization
2016-01-24 15:35:08 +03:00
AlexVinS
3eb9de0c0b
Grail options serialization
2016-01-24 02:26:32 +03:00
ArseniyShestakov
b19e082f37
Merge pull request #166 from vmarkovtsev/issue/1723
...
Fix 1723 quest crash on combined arts
2016-01-23 23:23:07 +03:00
AlexVinS
f9d0b20234
CGMine, CGArtifact, CGGarrison serialization
2016-01-23 19:53:02 +03:00
AlexVinS
b0c4ea5947
Fix.
2016-01-23 17:43:20 +03:00
Vadim Markovtsev
a266154b26
Fix 2014 cursor must disappear during movement and Magi's Eye
2016-01-23 00:35:41 +03:00
Vadim Markovtsev
11bce2908d
Fix 1723 quest crash on combined arts
2016-01-22 12:56:25 +03:00
Vadim Markovtsev
e8db456beb
Reset obelisks upon game end
...
Otherwise, the static variables are preserved and lead to wrong values in next new game.
2016-01-20 13:02:52 +03:00
Vadim Markovtsev
1a2cd36df8
Initialize obelisks count to 0
...
Otherwise every time player starts with a random number.
2016-01-20 12:43:07 +03:00
Vadim Markovtsev
bb3a31f3ff
Mark obelisk visited for all players in the team
2016-01-20 11:14:03 +03:00
Vadim Markovtsev
10f888a483
Fix obelisks puzzle revealing
...
Teams and players were messed up in lib; hardcoded constants were refactored.
2016-01-20 10:44:13 +03:00
Zyx-2000
c385c8757b
TAB instead of spaces
2016-01-19 20:53:29 +01:00
Zyx-2000
2a55d5f85e
added copyright info
2016-01-19 14:26:18 +01:00
Zyx-2000
64365fa294
additional polishing
2016-01-19 11:56:03 +01:00
Zyx-2000
170e4283ae
Small improvements to FileStream
2016-01-18 21:30:06 +01:00
Vadim Markovtsev
92e011429f
Fix crash on unknown map objects
...
If getHandlerFor() fails to find the handler, it returns a nullptr
shared pointer, which is later dereferenced unconditionally.
How to reproduce:
Download map "Happy time Dragons!!!" from http://heroesportal.net/maps.php?type=H3AB-XL&sort=r
=>
Failed to find object of type 5:144
SIGSEGV
2016-01-18 21:16:55 +03:00
Zyx-2000
a50a702073
switched to -std=gnu++11
2016-01-18 17:49:07 +01:00
Arseniy Shestakov
575a68d78b
CRewardableObject: fix onVisited message duplication for Idol of Fortune
2016-01-17 15:16:35 +03:00
Zyx-2000
cf61837ced
replaced std::string with boost::filesystem::path in several places
2016-01-16 16:36:16 +01:00
Arseniy Shestakov
18b2f866c9
CGPickable: add missing break for flotsam. Fix issue 1956
2016-01-16 09:45:30 +03:00
Arseniy Shestakov
725cce368f
CGameState::initStartingBonus: fix amounts for wood and ore bonus
...
In original game when wood and ore bonus is choosen you always get same amount of both resources.
2016-01-15 20:36:16 +03:00
AlexVinS
a638d0cd51
Creature set serialization
2016-01-15 20:24:17 +03:00
Arseniy Shestakov
b84d7bd288
CGCreature: add reward granting. Fix issue 2372
2016-01-15 04:29:46 +03:00
DjWarmonger
ac730a591c
Fixed large treasure piles sometimes being uncovered.
2016-01-13 20:03:25 +01:00
DjWarmonger
8c5f93dd8f
Little refactoring for object placement.
2016-01-13 19:17:12 +01:00
Zyx-2000
933b7c1f5e
some modernization of CFileInputStream implementation code
2016-01-12 23:40:24 +01:00
Zyx-2000
f9b255c896
Cleaner code & MSVC compatibility
2016-01-12 22:40:05 +01:00
Zyx-2000
1f4bc0f2e4
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2016-01-11 22:38:47 +01:00
Zyx-2000
99cf8069d7
FileStream files
2016-01-09 21:24:20 +01:00
Zyx-2000
203b2dccc3
hopefully fixed things
2016-01-09 21:23:55 +01:00
DjWarmonger
676f078b2e
RMG will now multiply Monolith defs to ensure there are at least 100 pairs avaiable for connections.
2016-01-09 09:03:40 +01:00
DjWarmonger
dd1fc47c93
Workaround for Seer Hut offset. They seem to work fine now.
2016-01-08 21:51:55 +01:00
DjWarmonger
d840fb40eb
Fixed crashes with RMG Seer Huts. Now they are functional.
2016-01-08 21:14:57 +01:00
Arseniy Shestakov
383f754ed1
Starting gold bonuses must be always multiples of 100
2016-01-07 20:51:37 +03:00
Arseniy Shestakov
c93f8fea48
moatHexes: implement reading moat hexes from configuration files
...
This also fix Fortess moat that previously used wrong hexes
2016-01-06 12:53:40 +03:00
DjWarmonger
cdd50b1603
Version bump.
2016-01-01 20:06:38 +01:00
AlexVinS
37d0dad70a
Merge branch 'develop' into feature/VCMIMapFormat1
...
Conflicts:
lib/CArtHandler.cpp
2016-01-01 20:28:52 +03:00
Arseniy Shestakov
9fd1cff090
Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
...
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.
This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
Arseniy Shestakov
29a7934a99
Refactoring: avoid using namespace when it's not absolutely needed
2015-12-29 02:14:08 +03:00
Arseniy Shestakov
66e6f15e67
NewTurn::applyGs: update bonuses in beginning. Fix issue 2083
...
Before bonuses was removed after hero get movement points and mana so affected hero one day more than intended.
2015-12-25 01:48:53 +03:00
Arseniy Shestakov
6f5c52a229
Refactoring: use cleaner CCreatureSet::stacksCount everywhere
2015-12-24 21:30:57 +03:00
Arseniy Shestakov
62bab27e7e
CGArtifact: show yes/no dialog for guarded artifacts. Fix issue 2095
...
Also fix hover text for CGMine
2015-12-24 21:05:02 +03:00
Arseniy Shestakov
75ca020890
CCeatureSet: add getArmyDescription for hover and InfoWindow texts
2015-12-24 21:03:51 +03:00
DjWarmonger
be50d699fb
Compile fixes for MSVS
2015-12-23 15:23:56 +01:00
ArseniyShestakov
48be566050
Dimension Door: fix movement points cost for expert level
2015-12-21 18:46:52 +03:00
Ivan Savenko
a051a08a46
Merge remote-tracking branch 'origin/issue/2306' into develop
2015-12-18 22:21:11 +02:00
ArseniyShestakov
b6176649ec
CGMonolith: avoid crash when all exits are blocked by friendly heroes
2015-12-18 01:08:19 +03:00
ArseniyShestakov
9490a5d66d
CPathfinder: deny transit to land blockvis objs from water layer
...
When hero is in water walking layer he can only exit to accessible or visitable land tiles, but not objects that have blocking visit and leave hero standing on water.
This is different than default flying behaviour because hero in air layer can only transit into accessible land layer without any blocking or visitable objects on them.
2015-12-16 20:14:36 +03:00
ArseniyShestakov
bf9ac7318a
CPathfinder: change cost calculation sequence for embark / disembark
...
With old embark cost calculation pathfinder may end up thinking that hero can embark/disembark while have less movement points than base movement cost is. Now hero would be only able to embark / disembark if we have enough movement points to step on that tile. This rule is also valid for situation when hero have Admiral's Hat as in H3 even if hero don't have embark penalty he still use move points for embark and disembark.
Problem was found as it's was causing infitite loop in AI. Server of course rejected attempt to embark with less than 100 movement points while pathfinder tell AI that it's can still embark with 93 movement points.
2015-12-15 20:08:52 +03:00
ArseniyShestakov
2724a67a27
CPathfinder: add border gate support and use passableFor
2015-12-14 14:33:50 +03:00
ArseniyShestakov
9f565b81e9
CBankInfo: fix huge memory leak that appear in long run
2015-12-14 11:29:24 +03:00
ArseniyShestakov
59199ccdbd
Bonus system: add treeHasChanged call where bonus objects changed
2015-12-11 16:13:18 +03:00
ArseniyShestakov
1730a31471
HeroBonus: get rid of code that used getBonusList
2015-12-11 16:01:51 +03:00
ArseniyShestakov
8fb5dacba2
CBonusSystemNode: get rid of non-const getBonusList
2015-12-11 15:02:36 +03:00
ArseniyShestakov
ab92123da3
CPathfinder: improve support for visits and battles in teleports
...
Related movement code for client and AI is plumbed as well. Though at moment code still not finished because it's not teleport hero to the exit tile if he won battle.
2015-12-11 09:42:30 +03:00
ArseniyShestakov
a430769b44
CPathfinder: fix possible crash when using invisible teleport exit
...
This one is similar with FoW bug when hero was covered by FoW while one tile around wasn't.
2015-12-11 04:10:30 +03:00
ArseniyShestakov
c3e5231146
CPathfinder: avoid pathing through hero standing on Subterranean Gate
...
Subterranean Gates unlike Monolith allow to visit hero standing on other exit. So of course pathfinder allowed that, but it's also allowed future movement through that hero which caused infinite loop for AI.
2015-12-10 16:51:19 +03:00
ArseniyShestakov
2be6818e33
FoWChange::applyGs: correct copy-paste error. Fix issue 2345
2015-12-09 10:02:33 +03:00
ArseniyShestakov
1c0d4e3f6f
Fix filenames in file headers
2015-12-08 09:53:14 +03:00
ArseniyShestakov
07807fb044
Client: slience visibility error on shipyard in non-coastal town
2015-12-08 07:33:13 +03:00
ArseniyShestakov
03e9dd3bab
Add hero gold cost to GameConstants
2015-12-07 00:13:58 +03:00
ArseniyShestakov
e872b400b7
Comments save format backward compatability code as Ivan suggested
...
Also we should always handle RumorState::TYPE_NONE in getTavernRumor properly anyway.
2015-12-06 02:51:54 +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
AlexVinS
f33bcee84c
post-merge fixes
2015-12-05 13:56:38 +03:00
AlexVinS
947edc0693
Merge branch 'develop' into feature/VCMIMapFormat1
2015-12-05 13:04:04 +03:00
AlexVinS
0fab319c73
Merge remote-tracking branch 'remotes/origin/develop' into issue/2306
...
s reverts commit fa8a282696
.
Conflicts:
AI/VCAI/VCAI.cpp
Conflicts:
AI/VCAI/VCAI.cpp
client/windows/CAdvmapInterface.cpp
lib/CPathfinder.cpp
lib/CPathfinder.h
2015-12-05 12:56:12 +03:00
AlexVinS
3bf9696b13
Tweaks
2015-12-05 12:38:37 +03:00
AlexVinS
3f79d001c1
Fix subObject identification
2015-12-05 12:38:36 +03:00
AlexVinS
b56b7017ba
Added stubs for some Map objects serialization
2015-12-05 12:38:35 +03:00
AlexVinS
6977fc3a14
Move test filesystem creation to global fixture
2015-12-05 12:37:37 +03:00
AlexVinS
e7359c9a36
Serialize tempOwner
2015-12-05 12:37:35 +03:00
AlexVinS
8a979d016f
ObjectTemplate serialization
...
(+) generated map displayed correctly in editor
2015-12-05 12:36:44 +03:00
AlexVinS
2d777ea676
Small (temp) fix. Prevent nulls from serialization.
2015-12-05 12:36:43 +03:00
AlexVinS
2d5a366e6c
Implemented (basic) object construction and placement
...
* contain refactoring of RMG and class handling (will be more)
2015-12-05 12:36:42 +03:00
AlexVinS
9cc3dae5fe
Started working on objects serialization
2015-12-05 12:36:42 +03:00
AlexVinS
a5b72ce593
Cleanup
2015-12-05 12:36:41 +03:00
AlexVinS
8493d0cded
Initial implementation of new team settings format
2015-12-05 12:36:40 +03:00
AlexVinS
6f203fb7e2
Save string identifiers for all game objects
2015-12-05 12:36:39 +03:00
AlexVinS
93c214d7a0
fix CMakeLists
2015-12-05 12:36:38 +03:00
AlexVinS
60825fbbd3
Start implementing PlayerInfo serialisation
2015-12-05 12:36:37 +03:00
AlexVinS
2f67e015e1
Fix build
2015-12-05 12:36:36 +03:00
AlexVinS
7c8d29b871
Start implementing player info serialization
2015-12-05 12:36:36 +03:00
AlexVinS
f5b348a1d1
Formatting
2015-12-05 12:36:35 +03:00
AlexVinS
3af255d1b9
Implemented terrain serialisation
...
* with test
2015-12-05 12:36:34 +03:00
AlexVinS
6552acdff6
Check coastal tile OTF
2015-12-05 12:36:29 +03:00
AlexVinS
8bc242d002
Cleanup
2015-12-05 12:06:52 +03:00
AlexVinS
27bf2524a3
Advance triggered events serialization
...
(-) missing indentifier serialization (unimplemented in engine)
(-) missing tests
2015-12-05 12:06:51 +03:00
AlexVinS
11af00bcdf
Start working on Triggered Events
2015-12-05 12:06:50 +03:00
AlexVinS
b683c29b6e
Added modification time to zip.
...
* it is required to consider archive valid (by some tools)
2015-12-05 12:06:49 +03:00
AlexVinS
f6e2cd16ed
Fix header.mapLevels saving
2015-12-05 12:06:48 +03:00
AlexVinS
0cc7213a27
WiP on zip serialization
...
(-) still not works correctly
2015-12-05 12:06:47 +03:00
AlexVinS
fc2cbc841a
Another fix for JsonWriter::writeString
...
* RMG description check passed
2015-12-05 12:06:46 +03:00
AlexVinS
ff18944088
Fix writing escaped string json fields
2015-12-05 12:06:45 +03:00
AlexVinS
f2164abf1b
Wip on zip serialize fixes
2015-12-05 12:06:45 +03:00
AlexVinS
27a29bd035
Start implementing actulal json serialization
2015-12-05 12:06:44 +03:00
AlexVinS
1a8faeb0b9
Start implementing map saver
2015-12-05 12:06:42 +03:00
AlexVinS
0040b459c3
Add support of CIOApi to CZipStream and CZipLoader (unused, untested)
2015-12-05 12:06:41 +03:00
AlexVinS
b3ac146ba9
Define bridge interface to minizip IOAPI
2015-12-05 12:06:40 +03:00
AlexVinS
3d265f94dc
Update projects
2015-12-05 12:06:39 +03:00
AlexVinS
0cc47f00c5
Advance map format simple test
2015-12-05 12:06:35 +03:00
AlexVinS
7d16585f89
Use COutputStream in CMapSaverJson
2015-12-05 12:06:34 +03:00
AlexVinS
c965f9d02d
Added draft of IO memeory buffer
2015-12-05 12:06:33 +03:00
AlexVinS
221ec55f51
Define basic design of output streams
2015-12-05 12:06:32 +03:00
AlexVinS
adc271d7b3
Draft on classes hierarchy.
...
* patcher and loader uses diferent input (JsonNode and binary stream of zipped map archive), dicided to split them
2015-12-05 12:06:32 +03:00
ArseniyShestakov
360ebcce7e
Merge pull request #145 from vcmi/feature/tavernRumors
...
Tavern rumors and Thieves Guild fixes
2015-12-05 03:13:25 +03:00
ArseniyShestakov
0a5e9c0fbe
Merge pull request #144 from vcmi/fix/teleportMultiExitPoints
...
Support for exit selection between multiple teleport exit points
2015-12-05 03:12:17 +03:00
ArseniyShestakov
9e7e5b81e4
Merge pull request #143 from vcmi/feature/patrolSupport
...
Patrol support for AI heroes
2015-12-05 03:11:07 +03:00
Ivan Savenko
89bf3592e3
Likely fixed duplicated random heroes
2015-12-05 01:40:23 +02:00
Ivan Savenko
8a3feb1e48
Added assert to hopefully catch invalid GiveBonus package at some point
2015-12-05 01:39:14 +02:00
ArseniyShestakov
82ce58eceb
CPathfinder::initializePatrol: don't pass valid PlayerColor
...
It's break getTilesInRange with mode 0 and we don't really need to check visibility anyway.
2015-12-05 01:45:10 +03:00
ArseniyShestakov
01c5bc25e5
Move TTeleportExitsList to CObjectHandler.h
...
Not a perfect solution, but this is the best location for now.
2015-12-05 01:14:03 +03:00
ArseniyShestakov
c83f15e413
Merge branch 'develop' into feature/tavernRumors
...
Conflicts:
lib/CGameState.h
2015-12-05 01:01:26 +03:00
ArseniyShestakov
d856fde73f
Rumors: use enum instead of magic numbers and avoid potential crash
2015-12-04 22:58:14 +03:00
ArseniyShestakov
bdc369ffba
Patrol: use manhattan distance for getting tiles in radius
2015-12-04 21:08:09 +03:00
ArseniyShestakov
2a63ba148a
Thieves Guild: fix tavern map object, lvl 0 when no taverns owned
...
We also now check not number of towns, but only towns that has tavern built. Also according to original mechanics all taverns always display information based on your number of taverns and not number of taverns of object owner.
2015-12-04 18:38:57 +03:00
ArseniyShestakov
3b3c49420f
Thieves Guild: correct number of taverns to access information
2015-12-04 17:52:30 +03:00
ArseniyShestakov
eced16945e
getVisibleTeleportObjects: use getObj as not verbose
...
We checking visibility in this function so there no need to send information about that into errorStream.
2015-12-04 05:43:55 +03:00
Ivan Savenko
faa7cbff18
Fixed gcc/clang warnings
2015-12-04 01:17:43 +02:00
Ivan Savenko
f02e553b70
Fixed another uninitialized field possiblity causing issues with StupidAI
2015-12-04 00:11:44 +02:00
Ivan Savenko
90dfe3e782
reduced visibility for members of Mine and Dwellings
2015-12-02 22:34:13 +02:00
Ivan Savenko
7189a12df2
removed few more includes from headers
2015-12-02 22:10:46 +02:00
Ivan Savenko
7b5a7f43ad
Removed includes of CGameState from headers
2015-12-02 21:39:53 +02: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
Ivan Savenko
bef7048460
minimized visibility of members of teleportation-related classes
2015-12-02 21:01:43 +02:00
Ivan Savenko
f9d9a38e53
Fixed gcc warnings
2015-12-02 20:59:38 +02:00
ArseniyShestakov
b5100bee94
Teleport: rework code to support exit point selection for whirlpools
2015-12-02 17:56:26 +03:00
ArseniyShestakov
a62ee65d72
Rumors: implement income checking via statsHLP::getIncome
...
This also fix income ranking in Thieves' Guild
2015-12-01 06:28:08 +03:00
ArseniyShestakov
ffcc5ccdd2
Rumors: implement support for grail terrain rumor
2015-12-01 04:57:52 +03:00
ArseniyShestakov
15273ac0f7
Rumors: avoid repeating of same rumor twice in a row
...
Multiple rumors of same type can go in a row, but not identical rumors.
2015-12-01 02:14:11 +03:00
ArseniyShestakov
98582d628c
Rumors: move code into CGameState and add backward compatability
2015-12-01 00:44:58 +03:00
ArseniyShestakov
879eaa47f8
Rumors: client-side proof of concept implementation
...
Actually information about this week rumor should be stored in gamestate and updated weekly
2015-11-30 20:52:15 +03:00
ArseniyShestakov
6704ea0cff
Rumors: rename getTavernGossip to getTavernRumor for consistency
...
Original game used "Rumors" and not "Gossips" and we already using rumor in CMap.
2015-11-30 17:51:28 +03: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
ce5b7c73be
CGEvent: avoid permanent event removal after visit. Fix issue 2339
2015-11-28 23:03:26 +03:00
ArseniyShestakov
6bb205b15b
CPathfinder: patrol support using getTilesInRange
...
For now we use getTilesInRange which isn't really correct for patrol, but good enough for first version.
2015-11-28 20:34:50 +03:00
ArseniyShestakov
56c6785bd0
Add backward compatability for patrol and bump save format version
2015-11-28 17:58:59 +03:00
ArseniyShestakov
f6de3f94ca
Teleports: use TTeleportExitsList typedef for exits list
...
There is several ideas that teleportation code have to be shared between object/spells and this way we can avoid changing showTeleportDialog declaration every time.
2015-11-28 02:41:30 +03:00
ArseniyShestakov
d6a142ca3d
CMapLoaderH3M: support for patrol initialPos in readHero
2015-11-27 11:34:03 +03:00
ArseniyShestakov
5d2e47faba
CGHeroInstance::Patrol: add initialPos
2015-11-27 11:04:01 +03:00
ArseniyShestakov
c45cd1f4c2
CGHeroInstance::getOutOffsets: temporary fix for boat summoning
...
Appropriate fix would require to get rid of convertPosition everywhere. Check issue 515 for more details.
2015-11-26 10:55:02 +03:00
ArseniyShestakov
64c6d3c950
CGCreature::takenAction: add neverFlee check. Fix issue 2242
2015-11-25 09:34:49 +03:00
ArseniyShestakov
3d8f67f864
getFreeTiles: filter ROCK tiles. Fix issue 1870
2015-11-25 09:12:09 +03:00
ArseniyShestakov
2276af70dc
PreGame: avoid crashing on random map options
...
Options is still broken, but at least we shouldn't crash there.
2015-11-25 07:25:44 +03:00
DjWarmonger
45d183289d
Merge pull request #142 from edeksumo/Fix-Defence-Ani
...
Fix crash
2015-11-24 21:37:32 +01:00
edeksumo
aab5a05036
Fix crash during auto battle
2015-11-24 20:55:11 +01: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
df4515901d
CPathfinder: fix special movement boundary check
...
Forgot to fix it for water walking after fe12b8f664
2015-11-23 14:11:08 +03:00
ArseniyShestakov
f4c06660e4
CPathfinder::evaluateAccessibility: apply more optimizations
2015-11-22 21:31:47 +03:00
ArseniyShestakov
2632389aaf
CPathfinder: bring FoW reference back to avoid performance loss
...
This one is revert 148355908d
2015-11-22 21:06:37 +03:00
ArseniyShestakov
6dacb84404
CPathfinder::addNeighbours: avoid allocating new vector each time
2015-11-22 07:32:33 +03:00
ArseniyShestakov
e1a360408d
GameConstants: move operators into header and always inline them
2015-11-22 07:24:12 +03:00
ArseniyShestakov
5a87f58e09
CPathfinder: optimize checks order in calculatePaths
2015-11-22 06:23:54 +03:00
ArseniyShestakov
8217eb3a82
CPathfinder: split isLayerTransitionPossible into two functions
...
This way we can avoid usage of getNode for layers that clearly can't be used.
2015-11-22 06:16:16 +03:00
ArseniyShestakov
649ebfad2f
TerrainTile::topVisitableObj: avoid costly vector copying
2015-11-22 05:34:37 +03:00
ArseniyShestakov
a1fe2ebc44
Pathfinding: restore gamestate usage to avoid overhead
...
Also when possible pass TerrainTile pointers to getMovementCost instead of using getTile.
2015-11-21 14:31:30 +03:00
ArseniyShestakov
438a444443
CGHeroInstance: move native terrain check into getNativeTerrain
...
That make it easier to use that code independently in TurnInfo
2015-11-21 13:32:45 +03:00
ArseniyShestakov
a375c86ea2
movementPointsAfterEmbark: get max move points from TurnInfo
...
Missed that when originally implemented TurnInfo.
Not pretties code, but boost performance a lot.
2015-11-21 12:46:59 +03:00
ArseniyShestakov
5ae6225ebc
TurnInfo: implement internal bonus cache for most used bonuses
...
Bonus system even with caching add too big overhead so we'll only use it once for these bonuses.
Still I'm like it to be transparent for external code so it's a bit hacky code.
2015-11-21 10:00:09 +03:00
ArseniyShestakov
e91d79414b
PathfinderOptions: use settings and move all defaults into schema
2015-11-21 00:32:23 +03:00
ArseniyShestakov
b48d65ad57
addNewBonus: add turnsRemain check for N_TURNS, N_DAYS and ONE_WEEK
2015-11-20 14:37:57 +03:00
ArseniyShestakov
f99ffbd074
Bonus system: use duration helpers in selecters
2015-11-20 13:24:48 +03:00
ArseniyShestakov
cb61572878
TurnInfo: add cache for bonuses selection
2015-11-20 12:28:35 +03:00
ArseniyShestakov
6d395bcba7
Bonus system: add turnsRemain support for ONE_WEEK duration
2015-11-20 12:11:35 +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
ArseniyShestakov
7101083a24
CPathfinder: restore transit via garrisons
2015-11-18 00:07:25 +03:00
ArseniyShestakov
ab9680a7d9
CPathfinder: handle event object properly everywhere
...
Also add forgoted check for AdvmapInterface to avoid possible crash.
2015-11-17 07:09:01 +03:00
ArseniyShestakov
e9636a8d37
CPathfinder: add TODO and ideas for available options
2015-11-17 04:33:21 +03:00
ArseniyShestakov
fe12b8f664
Pathfinding: re-introduce EAccessibility::FLYABLE
...
That let us get rid of really hacky code in initializeGraph and also fix flying over tiles that aren't visible.
2015-11-17 03:59:02 +03:00
ArseniyShestakov
c2ba3e3faf
CPathfinderHelper: very firts pass over getNeighbours
2015-11-17 02:41:31 +03:00
ArseniyShestakov
73d8687785
CPathfinder: add some comments and TODO for future changes
2015-11-17 01:38:13 +03:00
ArseniyShestakov
578aa2acd4
Pathfinding: don't use gamestate directly as it's not needed
2015-11-16 21:22:11 +03:00
ArseniyShestakov
d524b4eabe
CPathfinder: get rid of addNeighbours coord argument
2015-11-16 19:54:17 +03:00
ArseniyShestakov
8f72d73241
CPathfinder: update teleport code and use TurnInfo for whirlpools
2015-11-16 19:14:18 +03:00
ArseniyShestakov
0949283cb9
Pathfinding: pass PathfinderOptions to helper and avoid changing them
...
Original idea behind options is that options should only be set on pathfinder object creation (or via some special method in case pathfinder become persistent).
2015-11-16 18:43:02 +03:00
ArseniyShestakov
3185b64fb0
CPathfinder: rename cObj and dObjt to ctObj and dtObj
...
This way it's more clear that it's pointer to object on tile and not path node.
It's important because air layer nodes don't have visitable objects while tile under them can have one.
2015-11-16 17:41:23 +03:00
ArseniyShestakov
6dd9572644
CPathfinder: cleanup checks for source node visitable object
2015-11-16 17:36:58 +03:00
ArseniyShestakov
aa59ad05ed
CPathfinder: don't access map->guardingCreaturePositions directly
2015-11-13 23:32:52 +03:00
ArseniyShestakov
324cf5490c
CPathfinder: fix movement into guardian tile
2015-11-13 23:07:56 +03:00
ArseniyShestakov
0be9d21132
CPathfinder: add rule that hero in boat can't visit empty boats
2015-11-13 10:28:44 +03:00
ArseniyShestakov
d2baa5b0d0
Pathfinding: move isLayerAvailable into TurnInfo
2015-11-12 14:40:56 +03:00
ArseniyShestakov
abc4ea272f
TurnInfo: store all bonuses and use TileInfo for everything
...
Currently this going to break ONE_WEEK bonuses because those don't work with CWillLastDays selector.
2015-11-12 14:30:29 +03:00
ArseniyShestakov
9ed9d94009
TurnInfo: first step towards better abstraction
2015-11-12 05:20:32 +03:00
ArseniyShestakov
4e11d81673
CGWhirlpool: fix random exit chooser
2015-11-12 01:23:27 +03:00
ArseniyShestakov
942c0cd718
CPathfinder: improve support for whirlpools
2015-11-12 01:16:06 +03:00
ArseniyShestakov
d76b2b7ca8
CPathsInfo: rework nodes multi_array allocation
2015-11-12 00:05:20 +03:00
ArseniyShestakov
09473f6648
CPathfinder: move embark special case to isMovementToDestPossible
2015-11-11 22:29:20 +03:00
ArseniyShestakov
46b923713b
Pathfinding: rework isLayerTransitionPossible and fix formatting
2015-11-11 22:08:15 +03:00
ArseniyShestakov
f1311abd0b
CPathfinder: move node action code into getDestAction
2015-11-11 19:51:08 +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
4aaf6191a5
CPathfinder: implemented originalMovementRules option
2015-11-10 21:07:27 +03:00
ArseniyShestakov
2b6851b3d2
Pathfinding: use unique_ptr for hlp and fix few rules
2015-11-10 19:15:59 +03:00
ArseniyShestakov
9a63735c24
CPathfinderHelper: implement TurnInfo to avoid bonus re-checking
...
TurnInfo contain information about what movement-related bonuses and MP hero going to have on certain turn.
This way we can collect this information once for each turn so it's huge performance boost.
2015-11-10 14:26:45 +03:00
ArseniyShestakov
2ef9d7c3ec
Rename getCost back to getMovementCost
...
Initially wanter to name main class differently and back then getCost make sense.
Then renamed class to CPathfinderHelper, but forgot to rename function back.
2015-11-10 02:30:05 +03:00
ArseniyShestakov
b2e1ee5363
CGameState: move two pathfinding-related functions to CPathfinderHelper
...
Both getMovementCost and getNeighbours have nothing to do with gamestate.
2015-11-10 02:15:27 +03:00
ArseniyShestakov
d3c8ca7c1c
Pathfinding: implement duration checking for fly and water walking
...
Now pathfinder take into account different bonuses for different tuns. So if you only have FLYING_MOVEMENT bonus from Fly spell for one turn then pathfinder will only let you use air layer within one turn only.
That work for cost calculations too. Let's say you have two bonuses:
- FLYING_MOVEMENT with 20% penalty for next 2 turns
- FLYING_MOVEMENT with 40% penalty for 5 turns
Now pathfinder using correct penalty for each turn so movements in air layer going to be more expensive on 3-5 turns.
2015-11-09 19:57:26 +03:00
ArseniyShestakov
5106738160
Merge branch 'develop' into feature/pathfinderLayers
2015-11-09 19:20:13 +03:00
ArseniyShestakov
96897acc46
CWillLastDays: add condition for permanent durations
...
Accidentally missed them in pull request
2015-11-09 19:05:22 +03:00
ArseniyShestakov
7f0b0bd1b5
Bonus system: use updateBonuses in battleTurnPasseed
2015-11-09 15:48:07 +03:00
ArseniyShestakov
ee1c5e452f
Bonus system: add CWillLastDays selector
2015-11-09 15:01:58 +03:00
ArseniyShestakov
5bfbd8526b
Bonus system: fix N_DAYS bonus duration
2015-11-09 14:18:36 +03:00
ArseniyShestakov
45e4cf354e
Revert "Pathfinding: do path calculation in separate thread"
...
This reverts commit f376b27999
.
2015-11-09 09:35:56 +03:00
ArseniyShestakov
f376b27999
Pathfinding: do path calculation in separate thread
2015-11-08 19:19:48 +03:00
ArseniyShestakov
9cf35d1bfd
CPathfinder: support for Castle Gate
...
No support for client / server implemented yet.
2015-11-08 10:06:24 +03:00
ArseniyShestakov
be37e1cd8b
CPathfinder: add const to appropriate methods
2015-11-08 08:39:00 +03:00
ArseniyShestakov
f590b364c5
Pathfinder: shorten EPathfindingLayer to ELayer
2015-11-08 08:27:51 +03:00
ArseniyShestakov
4af9c7c29d
CPathfinder: add one turn boundary for flying and water walking
...
Now when oneTurnSpecialLayersLimit is enabled hero won't be able to stop on blocked or water tiles between turns.
It's default H3 mechanics so it's enabled by default.
2015-11-08 07:44:00 +03:00
ArseniyShestakov
2fb73c55e1
CPathfinder: use node action in isMovementAfterDestPossible checks
2015-11-08 04:41:06 +03:00
ArseniyShestakov
4973a1ec90
CGPathNode: get rid of land member as it's now obsolete
...
CTerrainRect::showPath behaviour changed so it's will only add cross path graphics on embark/disembark and path ending.
We want continuous paths for flying and water walking even when land<-> water transition occur.
2015-11-08 04:01:58 +03:00
ArseniyShestakov
160fa38254
Client: change cursor using node action information of pathfinder
2015-11-08 03:10:48 +03:00
edeksumo
ba1062ed3c
Formating2
...
Change ani to anim
2015-11-07 23:30:01 +01:00
ArseniyShestakov
82048cbf2d
Pathfinder: implement new feature - node action
...
No action going to simplify isMovementAfterDestPossible and should be as well useful for cost calculations.
It's can be also used by client interface to show appropriate cursors and path.
2015-11-08 00:26:41 +03:00
ArseniyShestakov
bd8eec7fb8
CGPathNode: move resetting code into separate function
2015-11-07 22:16:45 +03:00
ArseniyShestakov
d8a612f5d6
CPathsInfo: use boost::multi_array for storing graph of nodes
2015-11-07 22:02:57 +03:00
ArseniyShestakov
3f2cdf3137
CPathfinder: implement priority queue and node locking
2015-11-07 21:11:07 +03: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
bd12989ad6
Artifacts: use ArtifactID instead of ints
2015-11-06 21:54:51 +03:00
ArseniyShestakov
148355908d
CPathfinder: get rid of FoW variable and bunch of small fixes
2015-11-05 15:04:56 +03:00
ArseniyShestakov
9fe442537b
Pass on EPathfindingLayer and small fixes for code around it
2015-11-05 12:46:44 +03:00
ArseniyShestakov
5f3e9deda7
CPathfinder: deny transit over whirlpools when hero not protected
2015-11-05 11:34:01 +03:00
ArseniyShestakov
a1290f548b
CPathfinder: only allow water walking over accessible tiles
2015-11-05 11:25:41 +03:00
ArseniyShestakov
3de94a8b99
CPathfinder: don't allow future movement after guarded tile
...
There is two exceptions:
- Hero start movement from guarded tile.
- Hero that embarking into boat that standing on guarded tile.
In other cases future movement is impossible.
2015-11-05 10:22:38 +03:00
edeksumo
dd525da153
Formatting
2015-11-04 23:37:53 +01:00
ArseniyShestakov
f4dea88e3b
CPathfinder: get rid of hero object usage when it's not needed
2015-11-04 15:38:15 +03:00
ArseniyShestakov
1bc335323d
CPathfinder: add lightweightFlyingMode option suggested by @alexvins
2015-11-04 15:05:22 +03:00
ArseniyShestakov
330c1666fc
CPathfinder: move isLayerTransitionPossible and remove outdated comment
2015-11-04 12:29:51 +03:00
ArseniyShestakov
934c682733
CPathfinder: always add air and water layer nodes to queue
...
It's should be possible to go into air layer from visitable object (but opposite isn't allowed).
And when walking on water player can't really interact with any object at all so future movement always possible.
2015-11-04 11:53:52 +03:00
ArseniyShestakov
595deda270
CPathfinder: rename functions to better represent what they doing
2015-11-04 11:47:43 +03:00
Alexander Shishkin
da01af319b
Merge pull request #124 from vcmi/issue/1372
...
Issue/1372
2015-11-04 10:39:40 +03:00
edeksumo
75a76c0bf0
FixDefenceAni
2015-11-04 00:19:40 +01:00
ArseniyShestakov
8b6b4e2e0b
Fix header case for Linux to Windows cross compilation using MingGW
2015-11-03 14:40:36 +03:00
ArseniyShestakov
dfd70849e9
CPathfinder: restore selective tile initialization to initializeGraph
...
This way we can avoid layer checks when calculating paths by ignoring unitialized tiles entirely.
Also at this point pathfinder and movement actually works for everything except flying.
2015-11-03 03:25:12 +03:00
AlexVinS
f6b9015324
Use constant for summoned creature slot
2015-11-03 02:18:34 +03:00
ArseniyShestakov
c85c7f4b61
CPathfinder: always initialize all nodes within initializeGraph
2015-11-03 01:29:43 +03:00
DjWarmonger
349f16a359
Version bump.
2015-11-02 17:28:54 +01:00
ArseniyShestakov
400152caee
CPathfinder: draft implementation of layers logic; not yet works
2015-11-02 16:03:03 +03:00
ArseniyShestakov
9c1c7d0caf
Pathfinding: move getNode into CPathsInfo
2015-11-02 14:04:26 +03:00
ArseniyShestakov
4b64bec711
EPathfindingLayer: copy other code from ETerrainType for debugging
2015-11-02 13:25:01 +03:00
ArseniyShestakov
2b6e1498d2
Pathfinding: change argument order for getPath and AUTO layer as default
...
This still need investigation, but likely most of external code shouldn't be aware of layers in order to work properly because only LAND and SAIL can be targeted and single tile can't have both of these layers.
2015-11-02 11:14:32 +03:00
ArseniyShestakov
b8253206c7
Pathfinding: make related code aware that layers exist
2015-11-02 11:06:06 +03:00
ArseniyShestakov
118039a368
Pathfinding: add copy-pasted EPathfindingLayer
2015-11-02 11:05:26 +03:00
AlexVinS
1bcfa986e4
Apply fixes to pathfinder
2015-11-01 01:52:43 +03:00
AlexVinS
d46364c4c3
Merge branch 'develop' into issue/2306
...
Need to reapply changes to pathfiner
Conflicts:
AI/VCAI/VCAI.cpp
lib/CGameState.cpp
lib/CGameStateFwd.h
2015-11-01 01:49:57 +03:00
AlexVinS
34cc9c78f7
[c::b] update projects
2015-11-01 00:01:41 +03:00
DjWarmonger
621c62b44e
Don't crash when spell school level is higher than 3 (which is another bug)
2015-10-31 21:15:40 +01:00
Vadim Markovtsev
e6e975e9ef
Fix adventure map movement segfault in some scenarios
2015-10-31 20:23:13 +03:00
DjWarmonger
5ef02aaf88
Updated MSVS project.
2015-10-31 15:08:13 +01:00
DjWarmonger
17071c6ec8
Merge pull request #125 from ArseniyShestakov/newMovementSystem
...
Okay, time to merge this.
2015-10-31 13:56:22 +01:00
ArseniyShestakov
c4ea0c7ff2
CPathfinder: don't include RegisterTypes
2015-10-27 17:42:31 +03:00
Vadim Markovtsev
c5ebec0d1f
Fix the second crash (dynamic_cast failure)
2015-10-27 09:09:42 +03:00
ArseniyShestakov
92fee1bdbf
CPathfinder: shorten options struct declaration
2015-10-27 03:50:38 +03:00
ArseniyShestakov
6b34eb729e
Move all pathfinding-related code into new file
2015-10-27 03:34:47 +03:00
ArseniyShestakov
9e8427a078
CPathfinder: update comment for isSourceGuarded condition
2015-10-27 00:22:40 +03:00
ArseniyShestakov
01257efc02
CPathfinder: get rid of curPos and pass on initializeGraph
2015-10-26 20:17:10 +03:00
ArseniyShestakov
68bd37aa45
Store penalty in value of FLYING_MOVEMENT and WATER_WALKING
2015-10-26 18:30:11 +03:00
ArseniyShestakov
44ca00cd16
CPathfinder: rename functions
2015-10-25 19:11:00 +03:00
ArseniyShestakov
a536691781
CPathfinder: fix typos and more code cleanups
2015-10-25 17:01:28 +03:00
Vadim Markovtsev
79fb5b0c7b
Fix typeid ordering bug on MacOSX
2015-10-25 13:08:59 +03:00
AlexVinS
cfb5853689
Just a bit of black magic
2015-10-25 03:29:16 +03:00
AlexVinS
0f9de1c560
Made CTypeList threadsafe
2015-10-25 03:26:48 +03:00
AlexVinS
687a82886f
cleanup CTypeList interface
2015-10-25 01:38:30 +03:00
AlexVinS
92ae56b369
Mingw build fix
2015-10-24 22:21:54 +03:00
DjWarmonger
a6ea0981b6
Merge branch 'develop' into mutexRelax
2015-10-24 18:30:43 +02:00
DjWarmonger
641aa13526
Some fixes for previous commit.
2015-10-24 17:02:00 +02:00
DjWarmonger
716c324695
Don't give a turn to player who is about to lose (days without town).
2015-10-24 16:21:30 +02:00
DjWarmonger
abe88ea890
- Refactoring legacy code
...
- Some checks for #2311
2015-10-24 15:09:46 +02:00
ArseniyShestakov
4f7c3ec60f
Minor formatting fixes within pathfinder-related code
2015-10-24 15:50:00 +03:00
ArseniyShestakov
939b3c05a1
CPathfinder: use struct instead of enum for options
...
Suggested by @DjWarmonger as better alternative from performance standpoint while struct still more organized than bunch of variables.
Other reason of change it's that in future we may need non-boolean options, e.g for patrol movement and some new pathfinder usages.
2015-10-24 15:34:27 +03:00
ArseniyShestakov
6934c6bc95
CPathfinder: move check into isBetterWay lambda
...
It's must be of course used for teleporters too.
2015-10-24 14:54:15 +03:00
ArseniyShestakov
5a04f05b9b
CPathfinder: move one more check into isMovementPossible
2015-10-24 12:09:57 +03:00
ArseniyShestakov
6ebe2abc1a
Fix penalties for FLYING_MOVEMENT and WATER_WALKING
2015-10-23 20:50:52 +03:00
ArseniyShestakov
fc6f62e633
getMovementCost: get rid of useless flying parameter
2015-10-19 07:27:00 +03:00
ArseniyShestakov
498eb1d032
Fix typos
2015-10-19 05:16:18 +03:00
DjWarmonger
8c9f8f22d9
Merge pull request #123 from ArseniyShestakov/mantis-1230
...
Okay, now we shouldn't get broken savegames. Merging.
2015-10-17 08:31:44 +02:00
ArseniyShestakov
3663b952ea
Fix issue 2276. Refugee Camp shouldn't be guarded
2015-10-16 06:45:06 +03:00
ArseniyShestakov
226650582d
Move base movement cost to GameConstants
2015-10-16 03:03:40 +03:00
ArseniyShestakov
3466e0fae7
getTileCost: one more pass over code and formatting fix
2015-10-15 15:17:21 +03:00
ArseniyShestakov
46c7e8e36d
Add list ending comment as suggested by @alexvins
...
This way we can add new bonuses without changing last line in list and avoid possible issues of extra concatenating.
2015-10-15 12:20:53 +03:00
ArseniyShestakov
25da9f249e
Move NO_TERRAIN_PENALTY to the end of list to avoid save breakage
2015-10-15 11:44:59 +03:00
ArseniyShestakov
52a52dcfd9
Implement NO_TERRAIN_PENALTY bonus
...
Penalty of specified terrain type is ignored if hero have this bonus
2015-10-15 01:09:02 +03:00
Alexander Shishkin
fca4deaad2
Merge pull request #122 from vmarkovtsev/feature/warnings
...
Fix warnings produced by recent Clang build
2015-10-14 07:28:47 +03:00
Vadim Markovtsev
b701835de0
Fix wrong comparison
2015-10-13 21:05:46 +03:00
Vadim Markovtsev
e4b1ef1405
Add "override" to virtual overriden methods
2015-10-13 21:05:36 +03:00
AlexVinS
b94432b4ba
Fixed http://bugs.vcmi.eu/view.php?id=2297
...
* allow banned spells by Tomes (XXX_SPELLS bonus), Spelbinders Hat (SPELLS_OF_LEVEL bonus)
* allow banned spells by cheat-code (now also SPELLS_OF_LEVEL bonus)
2015-10-13 13:16:46 +03:00
AlexVinS
eeb100d6a4
More comments about dispell special cases.
2015-10-13 07:11:49 +03:00
ArseniyShestakov
9954dfb33a
CPathfinder: move flying into options and add walk on sea
2015-10-12 19:03:08 +03:00
ArseniyShestakov
41c4323818
CGHeroInstance: add canFly and update canWalkOnSea
...
canWalkOnSea shouldn't check for FLYING_MOVEMENT because it's two separate mechanics that apply different limitations.
2015-10-12 18:52:23 +03:00
ArseniyShestakov
0faedde6b9
CPathfinder: store pathfinding options in set instead of variables
...
There is plenty of variables now and in future I'm going to add more more once pathfinder become usable for all kind of things.
2015-10-12 10:29:39 +03:00
ArseniyShestakov
886042dc11
CPathfinder: clean calculatePaths of code unsused for pathfinding
...
Map graph initialization should be there as well because it's needed for path checking.
This change wouldn't affect anything since currently CPathfinder object created from scratch every time.
2015-10-12 08:31:35 +03:00
ArseniyShestakov
213d8c2258
CPathfinder: turn checkDestinationTile into function
...
This code was only kept as lamba to access guard related variables that is now gone.
2015-10-12 08:22:31 +03:00
ArseniyShestakov
1beacf2260
CPathfinder: move guard checks into functions
2015-10-12 08:13:10 +03:00
ArseniyShestakov
cd7c5acbc4
CPathfinder: move embark special case code down
...
It's not affect cost calculations any way so let it's be in same order as it's used in condition under it.
2015-10-12 07:26:13 +03:00
ArseniyShestakov
c6f9cd1e52
CPathfinder: move passability checks into renamed goodForLandSeaTransition
...
There no need in dedicated function for embark / disembark and other conditions belong there perfectly.
This function is going to check what movements are plain impossible so we don't have to bother check their cost.
2015-10-12 07:10:33 +03:00
ArseniyShestakov
ee4305cd6d
CPathfinder: move destTopVisObjID where it's belongs to
2015-10-10 19:02:21 +03:00
ArseniyShestakov
13c2b5e2d8
CPathfinder: separate teleporter exits and neighbour tile code
...
This way code that handle real neighbour tiles is more readable and teleport exits don't have to go via all checks they ignore anyway.
2015-10-10 17:17:41 +03:00
ArseniyShestakov
f15065fdc5
CPathfinder: separate neighbours code into getNeighbours
...
This is first step to make this code usable outside of calculatePaths.
2015-10-10 16:09:40 +03:00
AlexVinS
2677d4a677
Fixed action cancel on active stack remove
2015-10-08 08:15:29 +03:00
AlexVinS
02c15085be
Remove (aready disabled in prev. commit) active stack change in sacrifice mechanics
...
* stack removing is evil, but changing active stack by spells is more evil ...
2015-10-06 03:59:05 +03:00
AlexVinS
f99bf099ca
Made player interface tolerant to active stack removal.
2015-10-06 03:46:35 +03:00
AlexVinS
4e60b4cf53
Fixed 0002280
2015-10-06 01:26:50 +03:00
AlexVinS
f1d9e15783
[Tweak] Magic values--
2015-10-06 00:33:46 +03:00
AlexVinS
6cf220b882
Partial fix for 2272, there are more active stack sacrifice problems.
2015-10-05 20:33:05 +03:00
AlexVinS
fa06e05487
Merge branch 'develop' into SpellsRefactoring7
2015-10-05 00:45:57 +03:00
DjWarmonger
abe02247b5
Fixed bank randomization.
2015-10-02 17:28:33 +02:00
DjWarmonger
2733927527
Version bump.
2015-10-01 17:22:07 +02:00
AlexVinS
b07d272c2a
Added new BattleSpellCastParameters support to SACRIFICE spell.
2015-10-01 02:36:00 +03:00
AlexVinS
939a9180e2
Added new BattleSpellCastParameters support to TELEPORT spell.
2015-09-30 22:38:50 +03:00
AlexVinS
57e5b768e8
Allow multiple destinations in BattleSpellCastParameters
2015-09-30 00:31:50 +03:00
AlexVinS
70d9be8447
Use ISpellCaster in battle callback
2015-09-29 17:26:52 +03:00
AlexVinS
75c2566410
"const" tweak
2015-09-29 17:26:51 +03:00
AlexVinS
36e154d9b9
Use ISpellCaster in getAffectedStacks
2015-09-29 17:26:50 +03:00
AlexVinS
947f6089d5
Use ISpellCaster in isImmuneByStack
2015-09-29 17:26:49 +03:00
AlexVinS
a4d4851d80
Fix typo: casted->cast
2015-09-29 17:26:48 +03:00
AlexVinS
d9cbe487c7
remove useless function CSpell::getTargetInfo
2015-09-29 17:26:47 +03:00
AlexVinS
72587a8299
Removed hardcoded check for ANIMATE_DEAD absolute imminity - there is json configuration for that
2015-09-29 17:26:46 +03:00
AlexVinS
5f41ec912f
fix sphereOfPermanence
2015-09-29 17:26:45 +03:00
AlexVinS
3d7435c520
Introduced absolute specific spell immunity.
2015-09-29 17:26:44 +03:00
AlexVinS
253b850ac3
Partial fix for 1791
2015-09-29 17:26:43 +03:00
AlexVinS
a44c606277
Use callback methods
2015-09-29 17:26:42 +03:00
AlexVinS
660203b436
Tweak BattleSpellCastParameters
2015-09-29 17:26:41 +03:00
AlexVinS
2b434111bf
More hero|creature casting unification
2015-09-29 17:26:40 +03:00
AlexVinS
e454649886
Use BattleSpellCastParameters for spell parameters override
2015-09-29 17:26:39 +03:00
AlexVinS
10318a3da3
Intoduce PASSIVE_CASTING mode for opening battle spells
...
* now at least one "caster" object is present
2015-09-29 17:26:39 +03:00
AlexVinS
6010bbe7ba
More correct usage of battleGetFightingHero
...
* this should fix "FIXME: battleGetFightingHero wrong argument!"
2015-09-29 17:26:38 +03:00
AlexVinS
e552e37cf7
Factored out CDefaultSpellMechanics::battleCast
...
(-) still huge
2015-09-29 17:26:36 +03:00
AlexVinS
baba3a46e1
Centralize creature spell bonuses handling
...
* unified heal and damage calculation
* apply SPELL_DAMAGE_REDUCTION, MORE_DAMAGE_FROM_SPELL for Fairy dragon
2015-09-29 17:26:35 +03:00
AlexVinS
67bd698019
Added some debug logging
2015-09-29 17:26:34 +03:00
AlexVinS
873979a300
The only usage of secHero cast parameter is mana channeling - better to get it OTF
2015-09-29 17:26:33 +03:00
AlexVinS
46f99db8d7
Hide some spell mechnaics details
2015-09-29 17:26:32 +03:00
AlexVinS
2c3a607497
Tweak StacksHealedOrResurrected
...
* flags should be bool
2015-09-29 17:26:31 +03:00
AlexVinS
a1e06aa217
Unify LIFE_DRAIN and Tent healing with magic healing
2015-09-29 17:26:30 +03:00
AlexVinS
9ed9075afc
Introduce calculateHealedHP again, now in better place.
2015-09-29 17:26:29 +03:00
AlexVinS
0929e009db
Remove suspicios code in display damage calculation
2015-09-29 17:26:28 +03:00
AlexVinS
16f0714474
More usage of OOP in HealingSpellMechanics::applyBattleEffects
2015-09-29 17:26:28 +03:00
AlexVinS
0fecb40039
Extract HealingSpellMechanics
...
* healing effects are too specific to be allowed for any spell
* mixing heal with direct damage does not make sence
* mixing heal with timed effect can be easy allowed if needed
2015-09-29 17:26:27 +03:00
AlexVinS
c050fde3f9
Get rid of DefaultSpellMechanics::calculateHealedHP
2015-09-29 17:26:26 +03:00
AlexVinS
a35b8a46d3
Comment out wrong code
2015-09-29 17:26:25 +03:00
AlexVinS
f66c29ea3b
fix comments
2015-09-29 17:26:24 +03:00
AlexVinS
05e52993fd
Simplified healed HP calculation
2015-09-29 17:26:23 +03:00
AlexVinS
eb1753851e
Fix comment
2015-09-29 17:25:04 +03:00
DjWarmonger
f81b46088a
Fixed #2218
2015-09-29 11:01:59 +02:00
AlexVinS
108d4c39b5
Fix build
2015-09-24 11:55:23 +03:00
DjWarmonger
6b45f323ea
Fixed logic regression from previous commit.
2015-09-23 21:38:16 +02:00
DjWarmonger
971f6d1c1f
Removed WoG dependency for random artifacts. WoG version in repository updated.
2015-09-23 21:14:41 +02:00
DjWarmonger
e2165a33a0
- Updated MSVS project
...
- Artifacts added via mods now work correctly without WoG
2015-09-23 19:34:12 +02:00
DjWarmonger
def56051fc
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2015-09-23 19:03:48 +02:00
ArseniyShestakov
76cd002f07
Remove unused variable found by valgrind
2015-09-23 11:09:15 +03:00
DjWarmonger
57637dd71a
Added some checks & logs for empty def names, but it only delays the crash.
2015-09-20 13:02:13 +02:00
DjWarmonger
e14faea181
Merge branch 'develop' of https://github.com/vcmi/vcmi into mutexRelax
2015-09-20 09:46:52 +02:00
AlexVinS
9e0fd70208
Move isCastableBy logic back to CGHeroInstance - it is Hero-specific
...
* When and if canCastThisSpell will also be implmented for creatures common part may be moved to CSpell class.
2015-09-16 04:39:44 +03:00
AlexVinS
dc8b05fbd8
Give banned spells only by SPELL bonus
2015-09-16 04:16:46 +03:00
AlexVinS
f2605e059c
Fix 2042
2015-09-16 02:20:57 +03:00
AlexVinS
395070b584
Fix 1974
2015-09-15 08:51:05 +03:00
AlexVinS
017b4c308c
Enable crashhandler for mingw. It works for mingw 4.0.
2015-09-15 07:27:18 +03:00
AlexVinS
080244f30e
MAXED_SPELL bonus should only affect spell effects
...
* fixes 2146
2015-09-15 06:00:24 +03:00
AlexVinS
27f2dfc576
Quick fix for SACRIFICE immunity check
2015-09-15 04:31:43 +03:00
AlexVinS
bd70f672c3
fix 1814
2015-09-15 03:08:45 +03:00
AlexVinS
466ddb37b3
fix 1556
2015-09-14 18:38:41 +03:00
AlexVinS
3ed3f1fa13
Use json configuration for special spell effect duration
2015-09-14 13:22:23 +03:00
AlexVinS
3c053e5dd5
Quick fix for 2245 & 2238
2015-09-14 12:35:58 +03:00
AlexVinS
329c1d6b94
Calculate magic mirror effect at same time as magic resistance.
2015-09-14 11:52:56 +03:00
AlexVinS
caf8ae62cc
Allow custom effect animation on any stack during spell cast.
2015-09-14 06:21:49 +03:00
AlexVinS
0f0e67dbe3
Do not include resisted stacks in affected
2015-09-14 05:45:05 +03:00
AlexVinS
843a2a39bd
Use general dispell algorithm for CURE
2015-09-13 01:06:07 +03:00
AlexVinS
32337102ac
Fix a typo
2015-09-13 00:54:39 +03:00
AlexVinS
3029b1a432
Fix initialization of CSpell::AnimationItem
2015-09-12 23:52:04 +03:00
AlexVinS
f310be5d5f
Fix pasring csv cells with multiple quoted parts
2015-09-12 23:03:10 +03:00
AlexVinS
7776d7bbf7
rename BattleSpellCastParameters::caster
2015-09-12 21:09:54 +03:00
AlexVinS
98ea8bf314
Introduce dummy spell animation/ animation pause configuration
...
* save format changed with backward compatibility, UNTESTED
2015-09-12 21:09:52 +03:00
AlexVinS
832d69ec11
Hide battle log algorithm in spell classes.
...
* not finished, to be moved to json of splitted between mechanics classes
2015-09-12 21:09:51 +03:00
AlexVinS
786acad70b
project update
2015-09-12 21:09:49 +03:00
AlexVinS
fb5903d610
Initial experiments on hero & creature casting unification
2015-09-12 21:09:44 +03:00
AlexVinS
8f2da66a18
fix mantiss 1967 + some refactoring
...
* remove TModDescr and realted APIs - they were only used in one place
2015-09-04 22:29:20 +03:00
AlexVinS
e82dfb5a85
fixed mantiss 0002254
2015-09-04 18:08:25 +03:00
DjWarmonger
1c14dbf7b2
Cache SectorMaps to evaluate multiple goals -> huge performance boost
2015-08-31 08:25:33 +02:00
DjWarmonger
a3ce1521e5
Cache visible tiles within SectorMap for quicker access.
2015-08-31 07:39:03 +02:00
DjWarmonger
904a66764c
Optimization to getPlayerTeam functions, not very successful :/
2015-08-30 21:42:19 +02:00
DjWarmonger
70801309bd
Optimization for CGameInfoCallback:getPlayer function. It also seems to be called more often than needed.
2015-08-30 20:51:22 +02:00
DjWarmonger
cdad9f88b7
Relaxed Mutex of Logger. Attempt to optimize format function.
2015-08-30 19:26:19 +02:00
AlexVinS
40d3bb40c3
Partial fix for mantiss #2237
2015-08-22 16:22:10 +03:00
AlexVinS
03a295f1a0
Added debug mingw64 build, minimum Windows version set to windows 7, SDL suffixes removed from Build Tagerts
2015-08-20 03:28:04 +03:00
AlexVinS
f24f744f4b
Fix a few warnings
2015-08-19 23:02:37 +03:00
Sandy Carter
bdee647525
CastleInterface: Exclude previous building upgrade in reqs
...
Hide CityHall from Capitol prerequisites in Capitol build window
2015-08-19 12:05:43 -04:00
DjWarmonger
237d3f2624
Refactoring: random spells
2015-08-12 16:40:08 +02:00
DjWarmonger
3863756009
Version bump.
2015-08-01 18:37:14 +02:00
DjWarmonger
50b7b8e47b
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2015-07-18 20:15:17 +02:00
DjWarmonger
e9654ef487
Fixed issue when player starting towns were wiped.
2015-07-18 20:14:45 +02:00
AlexVinS
a8c45df732
Merge branch 'SDL1Wipe' into develop
2015-06-22 14:24:00 +03:00
AlexVinS
53b85d16be
Cleanup C::B projects
2015-06-21 01:59:33 +03:00
AlexVinS
56a1805339
Merge branch 'issue/2185' into develop
2015-06-20 19:16:41 +03:00
DjWarmonger
f9781ffb47
Creature abilities won't spawn in random Pandora Boxes.
2015-06-10 14:27:53 +02:00
DjWarmonger
9e7b459882
Partial solution to #2206
...
TODO: add serialized field that contains custom guard config
2015-06-05 11:28:14 +02:00
DjWarmonger
3f1bc7e21c
One more case for Subterranean Gates
2015-06-04 09:42:39 +02:00
DjWarmonger
927dfa5565
Added correct connections for Subterranean Gates
2015-06-04 09:02:56 +02:00
DjWarmonger
63d6cf168f
- Solved problems with sealed-off objects for once and all.
...
- Refactoring
2015-06-03 21:57:22 +02:00
DjWarmonger
923437bf76
Corrected offset check for required objects.
2015-06-03 19:38:53 +02:00
DjWarmonger
55c1a7eade
Clear unused tiles to make more space for roads.
2015-06-03 15:16:11 +02:00
DjWarmonger
e21b2d9cbd
Attempt to use A* algorithm for required objects.
2015-06-02 20:29:37 +02:00
DjWarmonger
a68b58d969
- Use straight paths for some connections
...
- More fixes for template schema
2015-06-02 16:40:32 +02:00
DjWarmonger
8b1641d498
Generate main towns for zones with no player present.
2015-06-02 09:30:56 +02:00
DjWarmonger
1389ae0ea3
Fix Travis build
2015-06-02 07:01:38 +02:00
AlexVinS
2cb6cb7baa
Remove useless durationType selector
...
* duration is a mask, equality comparison is not enough
2015-06-02 07:12:02 +03:00
AlexVinS
b1837d0311
Fix removing STACK_GETS_TURN bonuses
...
* this should fix some crashes with FRENZY spell
2015-06-02 07:12:01 +03:00
AlexVinS
45a3ad94ae
fix autoremoving UNTIL_ATTACK & UNITL_BEING_ATTACKED bonuses
...
* this should fix crashes with paralyze, stonegaze & blind
2015-06-02 07:12:01 +03:00
AlexVinS
a2901cb8f0
Fix RemoveBonus::applyGs
...
* use CBonusSystemNode::removeBonus instead of direct modification of _cashe_
2015-06-02 07:12:00 +03:00
AlexVinS
3a50afe1a3
invalidate bonus cashe on effect actualization
2015-06-02 07:11:59 +03:00
DjWarmonger
c6f714db9c
Fixed generation of CPU teams.
2015-06-01 21:57:43 +02:00
DjWarmonger
34a59a2788
- Fixed issues with number of players selection
...
- Added new template for testing multiple players
2015-05-27 18:58:14 +02:00
DjWarmonger
6890ae9f02
- Fixed improper use of playersCount. Now RMG can generate maps up to 8 players, with CPU players only as well.
...
- Fixes for template scheme
2015-05-27 11:30:46 +02:00
DjWarmonger
2e70d8a084
- VCMI will now read templates from mods
...
- Added partial schema for RMG template
2015-05-26 18:19:41 +02:00
DjWarmonger
4e25d74e74
CRmgTemplateStorage now inherits from IHandlerBase
2015-05-26 15:12:24 +02:00
O01eg
8785e1f53c
Fix compilation with CMake.
2015-05-26 02:02:45 +03:00
DjWarmonger
e08a1f32bd
Some more fixes, updated changelog.
2015-05-25 20:04:24 +02:00
DjWarmonger
c6291412d7
Fixed one case of missing roads.
2015-05-25 19:44:03 +02:00
DjWarmonger
a0ed8e0d6d
An attempt to straighten roads.
2015-05-25 19:25:48 +02:00
DjWarmonger
353f6dc32e
Roads are generated between all nodes.
2015-05-25 19:11:44 +02:00
DjWarmonger
3ec91c550e
Correct road nodes iteration
2015-05-25 19:00:00 +02:00
DjWarmonger
fe6fa895c3
More or less working RMG roads.
2015-05-25 18:06:17 +02:00
DjWarmonger
2c88ddf5ed
Something works it seems
2015-05-25 17:47:32 +02:00
DjWarmonger
bfd4ff8954
Refactoring
2015-05-25 17:04:17 +02:00
DjWarmonger
6d502ef1a1
Implemented A* algorithm to draw shortest roads - but not correct roads yet.
2015-05-25 16:37:57 +02:00
Rohit Nirmal
aa00fdbd0e
Fix building with Boost 1.58.
2015-05-06 19:16:51 -05:00
DjWarmonger
b8a6455b39
Post-release version bump.
2015-05-01 21:56:17 +02:00
AlexVinS
b347fe5457
fix mantiss 0002147
2015-04-13 16:48:46 +03:00
AlexVinS
11b3426bea
Fix 0001331
2015-04-13 06:12:23 +03:00
AlexVinS
6448bc6a50
[gcc] fix build
2015-04-12 08:25:53 +03:00
DjWarmonger
cb394754c3
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2015-04-11 17:13:24 +02:00
AlexVinS
0134266fa1
Extract general dispell logic
2015-04-11 16:27:14 +03:00
AlexVinS
b8b9abcc08
Fix 0002169
2015-04-11 15:53:32 +03:00
AlexVinS
736cc14814
Quick fix for mantiss 0001875
...
* hardcoded permanent effect for animateDead
2015-04-11 15:02:42 +03:00
DjWarmonger
86e2dabdc9
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2015-04-11 13:46:32 +02:00
DjWarmonger
a0840100df
Different fractalization algorithm that enforces cycle generation.
2015-04-11 13:46:17 +02:00
DjWarmonger
69c58c6c25
Experiment: fractalize RMG zones before placing important objects. The downside is that it won't be possible to draw road as straight line anymore.
2015-04-11 12:47:41 +02:00
AlexVinS
41f1d3f21f
Quick fix for major spell configuration bug
...
* clean fix requires save format change
2015-04-11 13:14:26 +03:00
AlexVinS
2d8288d95a
Fix mantiss 0002167
...
* also refactored summon mechanics
2015-04-11 12:09:48 +03:00
AlexVinS
e5b9f76717
Merge branch 'dispellFixes' into develop
2015-04-11 11:02:56 +03:00
AlexVinS
cc8c1aea36
Fix DISPELL effect
2015-04-11 10:19:35 +03:00
AlexVinS
46e7a0f829
Remove no longer needed (and incomplete) explicit target existence check
2015-04-11 10:19:34 +03:00
AlexVinS
6356247108
Add dispell effect to ANTI_MAGIC
...
* fixes 0002156
2015-04-11 10:19:33 +03:00
AlexVinS
e4220fef82
Formatting
2015-04-11 10:19:33 +03:00
AlexVinS
9d0b29b973
expert DISPELL also removes spell-created obstacles
2015-04-11 10:19:32 +03:00
AlexVinS
2bf63b0ebd
log error if DISPELL was resisted
2015-04-11 10:19:31 +03:00
AlexVinS
f30d5612ed
Creature is immune to dispell is it has no active effects
2015-04-11 10:19:30 +03:00
AlexVinS
1747b5af9a
DISPELL should ignore all immunities
2015-04-11 10:19:29 +03:00
AlexVinS
67f917edbb
Partial fix for 0001554
2015-04-11 10:19:28 +03:00
DjWarmonger
f7387becb4
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2015-04-11 08:53:14 +02:00
AlexVinS
5b29e800f7
Cleanup: use only CBonusSystemNode::treeHasChanged() when changing treeChanged
2015-04-11 08:13:28 +03:00
AlexVinS
6cf82ceab5
Possible fix for #923
2015-04-11 07:18:40 +03:00
DjWarmonger
3e8c395156
- More fixes for wander targets
...
- SectorMap won't find paths through the rock
2015-04-10 08:50:21 +02:00
Fay
1cb54689cf
Prevents first aid tents from melee attacking;
...
Moves attack possibility checks to battle callback (for consistency with shooting checks);
2015-04-09 21:49:11 +02:00
DjWarmonger
9577ef4bda
Minor tweak.
2015-04-07 13:43:33 +02:00
AlexVinS
84a2623c37
more experiments
2015-04-03 07:06:29 +03:00
AlexVinS
27c46c83d6
describe roads placement in log
2015-04-03 05:50:02 +03:00
AlexVinS
76193c4c5c
More experiments WIP.
2015-04-03 05:47:22 +03:00
AlexVinS
eb60d9737f
more sensible road placement
2015-04-03 05:47:20 +03:00
AlexVinS
896a2b17c0
fix patterns
2015-04-03 05:47:03 +03:00
AlexVinS
4c4ad480c5
added experimental usage of roads
2015-04-03 05:47:01 +03:00
AlexVinS
6520d2a577
fix
2015-04-03 05:46:17 +03:00
AlexVinS
ae2c72ca52
Implemented road transitions.
...
* untested
* still unused
2015-04-03 05:46:16 +03:00
AlexVinS
b1d4ce0474
Road|river patterns are trivial compared to terrain patterns - no need to use json, just define them as a constatnt
2015-04-03 05:46:15 +03:00
AlexVinS
877634b3a3
Define public interface of CDrawRoadsOperation
2015-04-03 05:46:14 +03:00
AlexVinS
e42ca15a0d
Fix BERSERK effect
2015-04-03 05:20:17 +03:00
AlexVinS
10668974d6
Move SACRIFICE target existence check to mechanics
2015-04-03 00:35:29 +03:00
AlexVinS
0cce1ef2f1
Move ANOTHER_ELEMENTAL_SUMMONED problem check to SummonMechanics class
2015-04-03 00:02:15 +03:00
DjWarmonger
e529ac62c0
Tagging 0.98 release.
2015-04-01 09:34:55 +02:00
AlexVinS
6c334174d9
Use and check movement points in town portal.
...
* fixes mantiss 0002031
2015-04-01 04:48:50 +03:00
AlexVinS
d564520f04
Allow town portal to ally town.
...
fixes mantiss 0002064
2015-04-01 04:04:02 +03:00
AlexVinS
fb707a6576
fix mantiss 2142
2015-04-01 00:28:21 +03:00
Ivan Savenko
376b2436f8
Fixed weird bug in serializer which caused corrupted data in Json map (missing guards entry in banks)
2015-03-31 00:56:33 +03:00
Ivan Savenko
eef45b5ae8
Fixed warnings
2015-03-31 00:55:37 +03:00
DjWarmonger
ed33d99ac7
Silenced some more logs.
2015-03-28 22:17:45 +01:00
DjWarmonger
a0f534146c
Fixed underground Lava terrain.
2015-03-28 22:03:38 +01:00
DjWarmonger
999c2a92e0
Inverted approach - first generate rock all over, then free accessible tiles.
2015-03-28 21:13:22 +01:00
DjWarmonger
9515d51bd2
Generate underground tunnels first to get a bit more of them.
2015-03-28 20:09:54 +01:00
DjWarmonger
a0d9ae4849
Refactoring - create underground rock for whole level at once.
2015-03-28 18:56:28 +01:00
DjWarmonger
a90021364e
Disable logs for better performance.
2015-03-28 17:46:39 +01:00
beegee1
e9b7044c9b
Fix mantis #1859 , unknown pattern in underground
2015-03-28 16:41:26 +01:00
beegee1
dafaf86eef
Add some debug logging, Fix one special case when updating terrain type, Improve visual look of updated terrain types
2015-03-28 16:41:26 +01:00
AlexVinS
733308e8e2
Attack only present wallparts
2015-03-19 10:35:05 +03:00
AlexVinS
e1b9df9d0c
formatting
2015-03-19 09:54:53 +03:00
AlexVinS
9600446cf9
+smart target, +hit animation
2015-03-18 17:48:32 +03:00
AlexVinS
a1ea551a85
Block summon of elemtals only by ally summoned elementals
2015-03-18 16:48:21 +03:00
AlexVinS
c81d4203d7
Do not try to cast EARTHQUAKE with no fort
2015-03-18 16:39:07 +03:00
AlexVinS
cff8ecda46
simplify a bit
2015-03-18 14:28:34 +03:00
AlexVinS
729855ff60
Allow hit on any target including already destroyed, allow multiple hit on same target
2015-03-18 14:12:26 +03:00
AlexVinS
69c458e881
initial implementation.
2015-03-18 13:27:07 +03:00
ArseniyShestakov
783dcfea2e
CMapGenOptions: fix crash when computer only limit is used
...
Currently when there is computer only players set resetPlayersMap may try to change settings for more than 8 players which obviously cause crash.
Now if any of "players and computer limit" or "computer limit" is set to random we automatically set total limit to 8 players.
2015-03-14 22:19:24 +03:00
ArseniyShestakov
32009690eb
initTowns: only add Tovern by default to player-owned towns
...
Neutral towns with default buildings set should never get Tovern automatically.
This one fixes issue 2090.
2015-03-12 18:47:32 +03:00
DjWarmonger
d8114fa3fb
Post-release version bump.
2015-03-12 14:44:56 +01:00
DjWarmonger
a1da08f802
Disabled Seer Huts for 0.97c.
2015-03-12 10:45:24 +01:00
DjWarmonger
a832b7efee
Fixed #2026
2015-03-12 10:08:10 +01:00
DjWarmonger
f894abe494
Unified interface for object template.
2015-03-12 08:31:30 +01:00
DjWarmonger
e0134342c8
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2015-03-11 22:17:54 +01:00
DjWarmonger
cf74969603
Fixes, logging for Seer Huts
2015-03-11 22:17:35 +01:00
ArseniyShestakov
f2a237ce6c
CPathfinder: move allowed teleport check into lambda
...
This also fix accidental whirlpool usage as previously I messed up code a bit.
2015-03-11 23:53:35 +03:00
DjWarmonger
61071c46e1
Fixed monster amounts in Pandora Box.
2015-03-11 19:21:58 +01:00
DjWarmonger
3cc9705bfe
Minor tweak.
2015-03-11 16:54:42 +01:00
DjWarmonger
01390e0c2c
Optimization for random treasures.
2015-03-11 16:19:03 +01:00
ArseniyShestakov
17f3f94ca6
CGSubterraneanGate: fix pairing and always assign all gates to channel
...
Before gates on underground layer didn't had any channel assigned and of course any function that attempt to check -1 channel caused crash.
Also I find out that at point postInit executed It's possible to get mutable gamestate via gameState() callback so we don't need to pass it there.
2015-03-11 17:17:21 +03:00
AlexVinS
53af95f0a6
Few spell tweaks
2015-03-10 23:45:09 +03:00
AlexVinS
1fd4a6daae
Fix merge of SpellsRefactoring5
2015-03-10 23:23:28 +03:00
DjWarmonger
719fcef34e
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2015-03-10 19:57:35 +01:00
DjWarmonger
b5c270082b
Added missing files.
2015-03-10 18:32:05 +01:00
ArseniyShestakov
2145be281a
Merge pull request #86 from ArseniyShestakov/fixQuestSaving
...
Fix saving of player's quests and bump save format version
2015-03-10 18:01:38 +03:00