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

2766 Commits

Author SHA1 Message Date
Arseniy Shestakov
575a68d78b CRewardableObject: fix onVisited message duplication for Idol of Fortune 2016-01-17 15:16:35 +03: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
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
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
DjWarmonger
cdd50b1603 Version bump. 2016-01-01 20:06:38 +01: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
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
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