Piotr Wójcik
97d358b70f
Marking visited for team
...
Also no longer gives reward every player
2016-09-20 22:05:44 +02:00
Dydzio
bd651ec5ef
Improve pandora box secondary skill handling
2016-09-20 12:40:58 +02:00
Dydzio
563a5d53c0
Update secondary skill handling. Fix issue 2307
...
Also making secondary skill icon display behavior same as in H3 during popup message.
2016-09-19 20:05:57 +02:00
Arseniy Shestakov
635c48f889
CGHeroInstance::setType: fix to give proper subID to random heroes
...
Hero class id is used to determine hero object appearance, but after than we use subID to store it's unique id.
This change should fix issues 2127 and 2277 since random heroes not going to override others in heroesPool.
2016-09-18 10:01:09 +03:00
Arseniy Shestakov
f6df107a55
Replace more magic subIDs with readable enums
2016-09-18 00:53:37 +03:00
Dydzio
beae354536
Correcting random amount of gold in gold piles
...
In original H3 allowed amounts of gold in treasure piles are multipliers of 100. Before this fix gold amount can be any value from range 500-1000.
2016-09-17 23:22:13 +02:00
AlexVinS
53fbf88316
Spell cast logging refactored.
2016-09-17 23:04:23 +03:00
AlexVinS
d993710f8e
Merge branch 'develop' into SpellsRefactoring8
2016-09-17 20:29:44 +03:00
Piotr Wójcik
28d859419c
Revert the old code
2016-09-16 22:01:21 +02:00
Piotr Wójcik
29d6fb0f04
Properly check if corpse was visited
...
Fixes two issues:
- corpse without loot couldn't be marked as visited
- taking loot from once visitable objects marked them as visited for all players
2016-09-16 20:59:07 +02:00
ArseniyShestakov
b5fa97b697
Merge pull request #211 from Chocimier/iss2321
...
Tested. Everthing looks fine so merging.
2016-09-14 00:37:17 +03:00
Piotr Wójcik
c5e4eaf9c1
Check if hero knows spell even without wisdom
2016-09-13 22:28:21 +02:00
Arseniy Shestakov
1e60ba6516
Only delete CQuest in CMap destructor and not with IQuestObject
...
Quest information must remain accessible even if map object removed. Fix issue 2472
2016-09-13 01:30:47 +03:00
AlexVinS
505e53c17d
Merge remote-tracking branch 'remotes/origin/develop' into SpellsRefactoring8
...
# Conflicts:
# client/battle/CBattleInterface.cpp
# lib/spells/BattleSpellMechanics.cpp
2016-09-12 10:13:40 +03:00
AlexVinS
33d1895d21
Merge branch 'develop' into SpellsRefactoring8
2016-09-11 18:34:18 +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
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
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
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
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
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
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
c6d257f328
Fixed CQuest leak
2016-08-30 09:48:10 +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
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
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
ab06cfd586
More fixes for uninitialized fields
2016-08-18 18:53:28 +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
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
201ed26795
Fixed #1213
2016-06-06 09:30:45 +02: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
8f1fba9551
Merge pull request #146 from vcmi/feature/VCMIMapFormat1
...
Ok let's try it.
2016-03-01 07:49:54 +01:00
AlexVinS
5408b6c1ff
Formatting
2016-02-26 18:19:41 +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
2021decb91
Serialize town spells
2016-02-25 22:59:17 +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
17e557be17
Advance Logical identifier condition
2016-02-23 16:36:21 +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
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
53b5587c2e
Advance map header serialization
2016-02-21 21:21:22 +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
4d9058e412
Whitespace cleanup. (No code changes.)
2016-02-15 13:34:37 +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
Arseniy Shestakov
d4524c2fbd
CGDwelling: dont set owner for Refugee Camp. Fix issue 2029
2016-02-13 19:26:47 +03:00
AlexVinS
a59f0c23ce
Dedug tweaks
2016-02-13 17:16:00 +03:00
AlexVinS
fb17914ae5
Debug tweaks
2016-02-10 08:59:24 +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
Arseniy Shestakov
a13aec4fd7
Aplly some fix for merge and explicitly specify type for std::max
2016-02-08 04:09:02 +03: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
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
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
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
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
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
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
DjWarmonger
ed33d99ac7
Silenced some more logs.
2015-03-28 22:17:45 +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
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
DjWarmonger
ec879046ca
Merge pull request #93 from ArseniyShestakov/feature/pathfindingTeleports
...
Okay let's do this!
2015-03-10 09:04:25 +01:00
DjWarmonger
f32849a73e
Attempt to compile refactored spells in MSVS.
2015-03-09 19:24:45 +01:00
ArseniyShestakov
1801b5eaf4
CGTeleport: use vstd::erase_if_present in getAll functions
2015-03-09 15:44:48 +03:00
ArseniyShestakov
8f8d237d5d
Use isTeleportChannel callback functions to check teleport channel type
2015-03-09 02:13:40 +03:00
ArseniyShestakov
3b057e0408
CGMonolith: fix switch formatting
2015-03-09 01:27:40 +03:00
ArseniyShestakov
606013c535
CGSubterraneanGate::postInit put const back
...
Originally I removed it when change this code to actually change object.
Though this sorting can work with constant object just fine.
2015-03-08 21:16:30 +03:00
ArseniyShestakov
826a64b579
Pack of tiny code improvements for @alexvins request
2015-03-08 20:19:00 +03:00
ArseniyShestakov
6d77322d6a
CGMonolith: add text dialog when player visit one-way monolith exit
2015-03-08 18:07:06 +03:00
ArseniyShestakov
c9eba40fe6
Updated CGTeleport and new CGMonolith / CGSubterraneanGate / CGWhirlpool
...
Now CGTeleport is not publicly available handler, but generic class for teleport channels usage.
Teleport channels are stored as part of information about the map.
2015-03-08 16:11:23 +03:00
ArseniyShestakov
04a1df29ad
Add TeleportChannel / TeleportChannelID / ETeleportChannelType
...
TeleportChannel is structure that contain two vectors of entrances and exits for certain teleport channel. It's also store passability state independently which almost only useful for Player and AI as they can't know if channel passible or not until enough entrances / exits are visible or server passed them information that certain channel is impassible when they visited entrance.
ETeleportChannelType is determined by checking intersection between entrances and exit vectors or checking their size:
- IMPASSABLE: one of vectors empty or only one entrance id is same as only one exit id.
- BIDIRECTIONAL: contents of both vectors is exactly the same.
- UNIDIRECTIONAL: contents of both vectors do not intersect.
- MIXED: contents of vectors only partially intersect. Not currently used; added for future modding.
2015-03-08 15:18:53 +03:00
DjWarmonger
67ab90616d
Seer Huts with exp / gold rewards.
2015-03-01 09:46:09 +01:00
DjWarmonger
dd887eb929
Fixes for Seer Huts.
2015-03-01 09:07:43 +01:00
AlexVinS
b9bdc95a7e
Handle monster agressivness for VISIONS spell
2015-02-26 08:39:57 +03:00
AlexVinS
b846b717a1
implemented VISIONS spell (partially)
...
(-) todo: agressivnes
2015-02-26 08:39:56 +03:00
AlexVinS
2156204306
Visions spell in case of monsters
2015-02-26 08:39:55 +03:00
AlexVinS
685deddac1
Start spell-relatet files reorganisation
...
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
DjWarmonger
ef4e199f15
Implemented "Quantity does not grow" for monsters ( #2094 )
2015-02-22 20:54:09 +01:00
DjWarmonger
200bcd7da6
Merge pull request #88 from ArseniyShestakov/improvedQuestLog
...
Awesome, thanks!
2015-02-17 06:44:38 +01:00
ArseniyShestakov
43f1e37546
Quest Log: fix text for quests with minimal level requirement
...
This is needed because m13478val is ui32 while translation expect %s string.
2015-02-16 00:53:44 +03:00
ArseniyShestakov
789da96a81
Stables: give 400 movement points bonus instead of 600
...
Tested it and now VCMI work exactly as original game.
This one fix issues 2077 / 2082
2015-02-15 07:55:59 +03:00
ArseniyShestakov
746914d219
Added missionType check to CQuest::getRolloverText
...
This function shouldn't be called if quest type is MISSION_NONE as this type used for quest that don't have text yet.
For example Keymaster`s border guards in H3 didn't add any entries to Quest Log so there is no text for them or at least it's not defined how to use it in VCMI.
2015-02-14 00:57:33 +03:00
DjWarmonger
9f05f53e65
Corrected monster agressiveness #2034
2015-01-10 10:23:58 +01:00
DjWarmonger
84b2510aa4
Merge pull request #62 from vcmi/SpellsRefactoring4
...
OK
2014-12-26 08:46:29 +01:00
DjWarmonger
5271ca156b
Merge pull request #70 from vcmi/StackSplitting
...
Stack splitting
2014-12-25 19:59:02 +01:00
DjWarmonger
e46f03fabe
Upgrades, stack splitting. Results now are identical to OH3.
2014-12-25 10:21:39 +01:00
DjWarmonger
3c39ef477f
Implemented original stack splitting algorithms proposed by AlexSpl. Save format changed.
2014-12-24 23:53:56 +01:00
AlexVinS
eebf65e88f
Merge branch 'develop' into SpellsRefactoring4
2014-12-24 00:15:27 +03:00
ArseniyShestakov
5d59bbc0d4
Fix CGBonusingObject serialization
...
Now state of adventure map objects that use this handler will be saved properly and they'll work as indended after save loaded. Affect following objects: Buoy, Swan Pond, Faerie Ring, etc.
2014-12-22 11:56:53 +03:00
DjWarmonger
a3a42ae144
Merge branch 'develop' of https://github.com/vcmi/vcmi into fuzzyFix
2014-12-19 14:21:44 +01:00
DjWarmonger
a1e42caddd
Banks won't use fuzzy engine at all, only center of mass.
2014-12-10 12:29:51 +01:00
ArseniyShestakov
6391f0f85a
Fix crash on Cartographer if there is no underground level
...
Show "already visited" text for stalagmite cartographer if map don't have underground level.
This one fixes bug #1985
2014-12-09 14:01:32 +03:00
AlexVinS
aa31625774
More flexible way of spell school access
2014-11-24 19:14:10 +03:00
AlexVinS
f7ff61ce4f
Merge remote-tracking branch 'remotes/origin/develop' into SpellsRefactoring4
2014-11-24 12:41:17 +03:00
KroArtem
e73c60740c
corrected text in vcmibuilder, corrected errors and warnings from cppcheck
2014-11-16 20:48:29 +03:00
AlexVinS
7af4f44237
rewrite CGHeroInstance::canCastThisSpell
2014-11-13 17:57:35 +03:00
AlexVinS
3fcb1254f7
Rewrite CGHeroInstance::getSpellSchoolLevel using SPELL_SCHOOL_CONFIG
2014-11-13 17:24:30 +03:00
Patrick Simmons
436272f00c
Fix pathfinding bug.
2014-10-25 21:15:40 -04:00
AlexVinS
54453aee73
get rid of boost::assign
2014-10-04 00:34:13 +04:00
DjWarmonger
8e1e8abe90
Default constructors for Scholar, Pandora and Event.
2014-09-23 09:46:31 +02:00
DjWarmonger
5cb6eaa252
Fixed major RMG bug.
2014-09-21 20:57:42 +02:00
Ivan Savenko
b551bdb725
Final part of the merge
...
Merging VCMI Dirs refactoring + GUI refactoring with current develop
2014-09-04 20:59:07 +03:00
Ivan Savenko
de9c5b1af7
Merge branch 'develop' of github.com:karol57/vcmi into karol57-develop
2014-09-04 20:29:24 +03:00
Ivan Savenko
1647b3670c
Merge pull request #35 from rhn/rhn
...
Fixes to sound handling.
2014-09-04 20:26:32 +03:00
Ivan Savenko
69c6a3fa79
Fixed crash on visiting multi-creature dwellings (1874)
2014-08-19 13:16:25 +03:00
Ivan Savenko
7e05945a6a
Swapped skills on level-up screen
2014-08-19 13:15:40 +03:00
Karol
c16e7d4bcf
VCMIDirs update #4
...
Added stderr color handling
Updated logger to use boost::filesystem::path. Minor fixes.
Some classes are now structs.
2014-08-11 20:17:17 +02:00
Ivan Savenko
b1285bc506
Merged GUI refactoring into develop, fixed conflicts
2014-08-09 15:01:55 +03:00
Ivan Savenko
c0e4591bc7
Added workaround for random objects on water, fixes 1828
2014-08-09 13:48:38 +03:00
Ivan Savenko
05d8fad314
Miscellaneous fixes to banks:
...
- fixed evaluation of bank thread by AI (1850)
- fixed crash on evaluating bank threat after loading from save (1830)
- fixed typo in bank config. TODO: schema?
2014-08-09 12:31:43 +03:00
Ivan Savenko
f55d335e1c
Fixed visitable objects resetting on day 7 (1847)
2014-08-08 15:53:04 +03:00
Ivan Savenko
d1dd7eef48
Proper fix for #1712 - Building requirement tests are now fixed
...
- added minimize() method in logical expressions that will remove excessive elements
- replaced forEach() with morph() that allows replacing types in variant
2014-08-07 19:53:07 +03:00
rhn
e9534603c2
Fixed sound on object pickup with dialog
2014-08-06 17:19:53 +02:00
beegee1
c1ac95b288
- fixed Clang compiler warnings
2014-08-04 20:36:00 +02:00
Ivan Savenko
0882201b17
Miscellaneous fixes to toggle buttons
2014-08-03 16:19:16 +03:00
rhn
aba3421e0a
Fixed: 0001854: Rewarding objects loose their state after game is reloaded (breaks savegames)
2014-07-29 15:28:58 +02:00
DjWarmonger
fe292dfa1d
Fixed desync due to uninitialized objects. Added some logging. RMG maps don't work yet, though.
2014-07-27 19:30:17 +02:00
DjWarmonger
0763b9a758
- Implemented object per zone limit
...
- Various tweaks for Travis & repo
2014-07-15 22:33:51 +02:00
DjWarmonger
173111955e
Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG
2014-07-15 12:27:59 +02:00
DjWarmonger
6c0a396094
Corrected y-axis orientation, now object placement is correct.
2014-07-09 16:39:17 +02:00
DjWarmonger
492b866806
- Fixed crash caused by randomShuffle
...
- Banned Magic Spring as it has 2 visitable positions
2014-07-09 14:27:12 +02:00
DjWarmonger
22d26db694
Correct placement of non-overlapping objects.
2014-07-08 20:13:51 +02:00
DjWarmonger
f65239b51f
- Added faction-specific dwellings
...
- Fixed generation of terrain-specific objects
2014-07-06 22:14:37 +02:00
DjWarmonger
0782557814
- Place all standard visitable objects
...
- Fixed some constructors
2014-07-05 19:36:12 +02:00
AlexVinS
195eae48ca
Merge branch 'develop' into SDL2
...
Conflicts:
client/CPlayerInterface.cpp
2014-07-02 17:15:12 +04:00
Ivan Savenko
cc349fa64f
Fixed Faerie Ring bonus, removed unused code
2014-07-01 18:19:51 +03:00
Ivan Savenko
c956b3f02a
Fixed #1820 , better detection of object below cursor that uses same logic as renderer
2014-07-01 17:19:08 +03:00
DjWarmonger
bae9f2083f
Workaround for hero & town issue. Game still crashes elsewhere, though.
2014-07-01 12:07:53 +02:00
DjWarmonger
54390ea81c
Merge branch 'develop' into RMG
2014-07-01 08:25:53 +02:00
DjWarmonger
bda71bed83
Uploading misc tweaks.
2014-07-01 07:07:40 +02:00
Ivan Savenko
db221829aa
Modding-related bugfixes:
...
- hero classes will be loaded correctly
- objects without index will have correctly assigned ID's
2014-06-30 17:13:01 +03:00
DjWarmonger
a556ef64e9
Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG
2014-06-30 06:45:35 +02:00
Ivan Savenko
a1fff864e6
Fixed missing names for dwellings and creature banks
2014-06-30 00:16:45 +03:00
Ivan Savenko
f01ab0d48f
Fixed rest of reported on forums bugs in rewardables
2014-06-29 20:13:25 +03:00
Ivan Savenko
1157111fcf
More bugfixing:
...
- Fixed compile in VCAI (precompiled headers should not include VCMI headers)
- Fixed crash on visiting observatories, including shroud of darkness
2014-06-29 17:23:06 +03:00
DjWarmonger
7dbe2f5c40
Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG
2014-06-28 16:31:06 +02:00
Ivan Savenko
917b1ffca8
Bugfixing:
...
- Added missing types for serialization
- Fixed possible crash in removable objects (campfire)
- Fixed typo in bank config
2014-06-28 17:21:38 +03:00
DjWarmonger
920f56969b
Create random obstacles that match terrain.
2014-06-28 09:46:32 +02:00
DjWarmonger
383280f72a
Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG
2014-06-27 18:26:43 +02:00
Ivan Savenko
f01e30a3b1
Added random objects to configs. For now as separate "random handlers", should be merged into main handlers later
2014-06-27 19:15:47 +03:00
DjWarmonger
57fa905a2b
Something that compiles.
2014-06-26 22:05:27 +02:00
DjWarmonger
e51e2190fd
Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG
2014-06-26 20:12:37 +02:00
Haryaalcar
ce6940e272
build fix for mac os:
...
1) type_info visibility for CatapultAttack
2) using IObjectInfo::CArmyStructure in min_element : operator< should be const
2014-06-26 01:24:48 +03:00
Ivan Savenko
955552488e
- H3M parser will create objects that don't have data in map file via
...
object handler.
- Added large number of missing objects to config
2014-06-25 20:26:47 +03:00
Ivan Savenko
32240da34e
Reduced number of #include's in headers. May break compilation on Win
...
since some net packs now need DLL_LINKAGE
2014-06-25 17:11:07 +03:00
Ivan Savenko
a0689fa377
Refactoring of hoverText from objects:
...
- removed hoverText field
- split getHoverText() method into 3:
- - getObjectName() for generic name
- - getHoverText(Player) for player-specific text
- - getHoverText(Hero) for hero-specific strings
2014-06-24 20:39:47 +03:00
Ivan Savenko
ad632d1e8a
Moved FoW management from CGObjectInstance to callback
2014-06-24 20:39:47 +03:00
Ivan Savenko
5ebc0e8614
First part of object instance API cleanup
...
- removed passability() method in favour of passableFor(PlayerColor)
- moved operator < code to map handler
- updated class documentation
2014-06-24 20:39:47 +03:00
AlexVinS
4e4ba6654c
fix Eye of magi, also fix #1608
...
Conflicts:
lib/CObjectHandler.cpp
2014-06-24 18:20:28 +04:00
Ivan Savenko
13bc4cb24f
Added -fvisibility=hidden parameter for gcc.
...
Should help a bit with endless missing DLL_LINKAGE attributes and
(according to gcc docs) help a bit with library loading times.
2014-06-24 00:05:53 +03:00
DjWarmonger
79036484dd
Trying to sort out project changes and compile issues.
2014-06-23 19:58:19 +02:00
Ivan Savenko
db49798b4d
Fixed random artifact selection
2014-06-23 20:47:09 +03:00
AlexVinS
46d92f11cb
Project update, fix build
...
(!) register types as usual too huge
2014-06-23 10:24:49 +04:00
Ivan Savenko
c605e2d10c
Gcc compile & warning fixes
2014-06-22 17:26:08 +03:00
Ivan Savenko
ab475195ac
Banks now use new scheme as well
...
- Implemented Bank Constructor object.
- Merged Pyramid object into common Bank class. Banks can now grant
spells as part of their reward.
- Move bank config code to config/objects/creatureBanks.json. Note: WoG
banks are not updated yet, should be moved to WoG mod.
- Updated AI code so it can correctly evaluate bank danger (should be
generic enough for use with other objects)
- New files JsonRandom.* that contain routines for loading random
objects from Json (still WiP but should be stable)
2014-06-22 13:39:40 +03:00
Ivan Savenko
0a71e89f58
Created large number of missing objects in configs
...
Minor bugfixes in code
2014-06-17 14:57:47 +03:00
Ivan Savenko
09d595e385
- Implemented "mapObject" entry for hero classes
...
- Updated schemas
- Some bugfixing
2014-06-16 19:27:26 +03:00
Ivan Savenko
89b89ff85d
Bugfixing. Game seems to be working without major bugs.
2014-06-15 23:25:10 +03:00
Ivan Savenko
836c466f81
- Implementation of overrides for towns
...
- Converted dwellings.json into new format
- Implemented "mapObject" entry in town format
- Removed capital/fort/village fields from town in favor of overrides
2014-06-15 19:43:01 +03:00
Ivan Savenko
7cfd9a0903
First part of implementation of some type-specific handlers.
...
TODO:
- merge dwellings.json into object configs
- proper implementation of overrides for towns
- fully connect new API to RMG/H3M
2014-06-14 18:42:13 +03:00
Ivan Savenko
44742814cd
More cleanup:
...
- moved SoundBase.h to lib since it contains shared data
- added RMG info to object format. Note that data is not yet imported in
configs
- slightly updated API of object handlers
2014-06-05 23:51:24 +03:00
Ivan Savenko
b2e8c92383
Cleanup:
...
- removed commented-out #includ'es
- renamed some files to match name of class
2014-06-05 20:26:50 +03:00
Ivan Savenko
76bf5351c6
Line endings are now unix-style
2014-06-05 19:57:43 +03:00
Ivan Savenko
652ceb2bde
Finally shattered CObjectHandler.cpp into tiny bits
...
- This file is now split into multiple smaller files in mapObjects
directory
- CObjectHandler itself now contains only core classes (Handler itself,
CGObject and interfaces)
- Cleaned up excessive #include's through whole project
2014-06-05 19:52:14 +03:00
Ivan Savenko
0afdfa529c
Moved all object-related files to lib/mapObjects directory.
...
Renamed some classes to more readable names
2014-06-05 14:19:47 +03:00