1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-04 09:42:40 +02:00
Commit Graph

258 Commits

Author SHA1 Message Date
AlexVinS
0011507e42 wipe constexpr on @DjWarmonger request 2016-01-29 00:34:54 +03:00
Arseniy Shestakov
b7fbbfdebe CQuest: add missing completedOption initialization for CGQuestGuard 2016-01-27 23:24:17 +03: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
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
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
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
Vadim Markovtsev
40cb48d65e Replace std::remove_if with vstd::erase_if 2016-01-26 10:19:58 +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
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
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
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
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
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
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
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
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
DjWarmonger
be50d699fb Compile fixes for MSVS 2015-12-23 15:23:56 +01:00
ArseniyShestakov
b6176649ec CGMonolith: avoid crash when all exits are blocked by friendly heroes 2015-12-18 01:08:19 +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
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
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
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
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
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
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
Ivan Savenko
90dfe3e782 reduced visibility for members of Mine and Dwellings 2015-12-02 22:34:13 +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
ArseniyShestakov
b5100bee94 Teleport: rework code to support exit point selection for whirlpools 2015-12-02 17:56:26 +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
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
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
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
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
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
4e11d81673 CGWhirlpool: fix random exit chooser 2015-11-12 01:23:27 +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
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
7eebcb9d60 Artifacts: replace few more ints by ArtifactID 2015-11-07 11:46:58 +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
DjWarmonger
17071c6ec8 Merge pull request #125 from ArseniyShestakov/newMovementSystem
Okay, time to merge this.
2015-10-31 13:56:22 +01: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
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
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
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
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
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
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
f2605e059c Fix 2042 2015-09-16 02:20:57 +03:00
AlexVinS
080244f30e MAXED_SPELL bonus should only affect spell effects
* fixes 2146
2015-09-15 06:00:24 +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
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
9e7b459882 Partial solution to #2206
TODO: add serialized field that contains custom guard config
2015-06-05 11:28:14 +02:00
AlexVinS
fb707a6576 fix mantiss 2142 2015-04-01 00:28:21 +03:00
Ivan Savenko
eef45b5ae8 Fixed warnings 2015-03-31 00:55:37 +03:00