Vadim Markovtsev
d0beb27197
Add git commit hash into the version string
2016-10-23 15:45:47 +02:00
Vadim Markovtsev
4bcc43d3d0
Fix Mantis #2234
...
CPlayerInterface instances were removed from CClient::playerint with
clear() and finish() was not called on each. Added multiple insurance.
2016-10-22 16:22:00 +02:00
Vadim Markovtsev
63383502c3
Add the option to forcefully use bundled fuzzylite
...
cmake -DFORCE_BUNDLED_FL=TRUE ...
As requested in #231
2016-10-02 17:47:27 +02:00
Vadim Markovtsev
2c1dddde33
Fix memory problems with BonusList
...
Bonus * -> std::shared_ptr<Bonus>
This cures the following problems:
1) Memory corruption at exit. Some Bonus-es were deleted twice (mods?).
2) Memory leaks. Some Bonuses were not deleted.
3) Reduce the number of "Orphaned child" messages.
Valgrind reports 0 leaked memory now and no invalid reads/writes.
2016-09-29 15:08:00 +02:00
AlexVinS
bd79298ca6
Let AI do not self-destruct with armageddon too often.
2016-09-22 22:29:48 +03:00
AlexVinS
fb384d83b8
Probably fixed crash when AI finish battle with spell
2016-09-22 20:51:13 +03:00
AlexVinS
ea2e336f54
Merge branch 'develop' into SpellsRefactoring8
2016-09-22 16:40:32 +03:00
Arseniy Shestakov
02a45007e7
VCAI::showGarrisonDialog: don't try to pick army from locked garrison
2016-09-19 03:30:55 +03:00
AlexVinS
d993710f8e
Merge branch 'develop' into SpellsRefactoring8
2016-09-17 20:29:44 +03:00
Arseniy Shestakov
84137dcaa5
Add DLL_LINKAGE to getStr and fix player id logging in VCAI
2016-09-16 05:45:00 +03:00
Arseniy Shestakov
30042cac3d
VCAI::performTypicalActions: always check that hero is still available
...
It's weird why this only appear now so if you have ideas check issue 2479.
2016-09-16 04:52:17 +03:00
Arseniy Shestakov
ca0fe8fdc4
VCAI: do not attempt artefact and army exchange with ally hero
...
While visits of ally heroes supposedly occur accidentally It's still nice to handle it's gracefully.
No reason to prevent visits completely as they useful if hero have skill like Scholar.
2016-09-14 13:34:22 +03:00
Arseniy Shestakov
7ec9601acd
VCAI: safety checks to avoid crashes with boat objects
...
Probably we should rewrite boat-related code to make AI boat handling easier.
2016-09-14 03:44:35 +03:00
Arseniy Shestakov
6dcb9a6068
VCAI: don't remove flagged objects from visitableObjs
...
This make my new shipyard-related changes work properly and might improve owned dwelling usage.
In case there still some code that might cause useless visits it's better just rewrite it insted of removing objects from visitableObjs.
2016-09-13 23:39:32 +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
Arseniy Shestakov
9296382bc6
More fixes for clang warning...
2016-09-08 19:58:01 +03:00
Arseniy Shestakov
78a560767b
VCAI compareArtifacts: consider that art with highest price is best
...
That is suboptimal way as well, but let us avoid infinite loop there. Fix issue 2461
2016-09-08 04:29:27 +03:00
AlexVinS
289cbbf2e7
Teach AI how to use massive timed effects.
2016-09-05 14:17:46 +03:00
AlexVinS
4cd264ef86
Merge branch 'develop' into SpellsRefactoring8
2016-09-05 05:22:50 +03:00
Arseniy Shestakov
8e94b1c4d2
VCAI::objectRemoved: handle hero boat removal. Fix issue 2350
...
Avoid situation when AI attempt to visit boat after it's killed hero who used it.
2016-09-04 15:44:42 +03:00
AlexVinS
3de47d4df6
[AI] Teach BattleAI how to use offensive location spells (like fireball)
...
* AI already can evaluate effect of smart and not smart offensive spells.
2016-08-30 12:19:55 +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
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
ab06cfd586
More fixes for uninitialized fields
2016-08-18 18:53:28 +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
Arseniy Shestakov
91c298bdaa
VCAI::tileHidden: added clearPathsInfo
...
Sector map likely updated anyway after AI turn starts, but cleaning of heroesUnableToExplore when tile hidden feels reasonable.
2016-08-18 03:51:00 +03:00
Arseniy Shestakov
c931fa5081
SectorMap::exploreNewSector: only store visible visitable objects
...
Fix crash that I initially missed. AI unable to access information about hidden objects like events via callbacks so we shouldn't store them here too.
2016-08-18 03:33:23 +03:00
AlexVinS
f06e9c8538
VCAI convert logging
2016-08-15 08:30:06 +03:00
AlexVinS
22884d9150
AI logging convert 1
2016-08-13 17:44:37 +03:00
AlexVinS
72f79a3ad7
Draft boost::format based log proxy.
2016-08-13 16:57:09 +03:00
AlexVinS
dd70e74769
[AI] relaxed logging
2016-08-13 16:57:07 +03:00
Arseniy Shestakov
7bdcd209e6
VCAI::wander: only use nearby objects from SectorMap when possible
...
Now AI only check full object list if there is no suitable objects found in current sector and sectors around it.
This optimization drastically increase wandering performance on maps with tons of objects when AI see most of it.
2016-08-12 09:08:53 +03:00
Arseniy Shestakov
aabf4808da
SectorMap: remember all visitable objects in sector for wandering
2016-08-12 09:02:14 +03:00
Arseniy Shestakov
b83dea2008
VCAI::wander: map object selection refactoring
...
Avoid doing extra steps that's not needed. Related to issue 2454.
2016-08-11 16:53:05 +03:00
Arseniy Shestakov
8533ee3256
VCAI::validateVisitableObjs: drop unused code that
...
For whatever reason it's not removed at compile time and still wasting CPU.
2016-08-11 14:54:58 +03:00
Arseniy Shestakov
6433d7dd40
VCAI::getFlaggedObjects: don't use thread specific ptr within VCAI
2016-08-11 12:19:08 +03:00
Arseniy Shestakov
25fd4d85e2
VCAI::getFlaggedObjects: use visitableObjs for better performance
...
This change is drastically improve performance on maps with water. One part that caused issue 2454.
2016-08-11 03:58:24 +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
Arseniy Shestakov
5778082842
VCAI: dont visit border guard if tent not visited. Fix issue 1590
...
CQuest::checkQuest cant be used for border guard since CGKeys not yet work using quests.
Currently border guard have MISSION_NONE quest that always return true and make AI stuck.
2016-02-25 08:40:28 +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
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
ArseniyShestakov
4e8486da7b
Merge pull request #160 from vmarkovtsev/issue/2388
...
Fix 2388 obelisks puzzle revealing
2016-01-27 20:49:03 +03:00
AlexVinS
d7c0c3759a
Merge branch 'Zyx-develop' into develop
...
Conflicts:
lib/filesystem/AdapterLoaders.h
2016-01-27 18:53:41 +03:00
AlexVinS
bffdc2813d
revert some project changes
2016-01-27 15:21:29 +03:00
ArseniyShestakov
c7ca88f84b
Merge pull request #157 from vmarkovtsev/issue/2383
...
Issue/2383 fix invalid AI path detection
2016-01-23 22:02:10 +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
6eefce23fe
Check against nullptr in VisitHero::fulfillsMe()
2016-01-19 21:15:07 +03:00
Vadim Markovtsev
2bfc8ec8cb
Fix AI hero infinite move on the same tile
2016-01-19 13:14:05 +03:00
Zyx-2000
a50a702073
switched to -std=gnu++11
2016-01-18 17:49:07 +01:00
Zyx-2000
203b2dccc3
hopefully fixed things
2016-01-09 21:23:55 +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
6f5c52a229
Refactoring: use cleaner CCreatureSet::stacksCount everywhere
2015-12-24 21:30:57 +03:00
DjWarmonger
a1f5a0a85c
Removed unused code, which is not needed with new Pathfinder.
2015-12-24 11:28:14 +01:00
Ivan Savenko
a051a08a46
Merge remote-tracking branch 'origin/issue/2306' into develop
2015-12-18 22:21:11 +02:00
Vadim Markovtsev
0661aa0e6e
Remove undefined behavior in requestActionASAP
2015-12-13 11:04:42 +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
975e049a3e
SectorMap: disable knownSubterraneanGates support to avoid loops
2015-12-10 17:35:46 +03:00
ArseniyShestakov
5aadc1ed6f
CasualtiesAfterBattle: dont remove catapult artifact. Fix 2346 issue
2015-12-10 13:31:03 +03:00
ArseniyShestakov
9e6f836b25
VCAI::pickBestArtifacts: don't try to move catapult between heroes
2015-12-09 18:49:22 +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
cf4cb5c948
VCAI: silence callback on visibility check
2015-12-08 04:18:31 +03:00
ArseniyShestakov
03e9dd3bab
Add hero gold cost to GameConstants
2015-12-07 00:13:58 +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
7708810148
VCAI: don't serialize destinationTeleportPos to avoid crash
...
This won't affect AI functionality except if game saved while AI moving through teleporters.
Serialization for some reason don't work properly and cause save loading to fail.
2015-12-05 08:08:02 +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
791d1e7ab4
VCAI: finish fixing of teleport probing for whirlpools
2015-12-04 05:30:43 +03:00
Ivan Savenko
faa7cbff18
Fixed gcc/clang warnings
2015-12-04 01:17:43 +02:00
ArseniyShestakov
3800bd45b7
Movement: initialize destinationTeleportPos with invalid int3 position
2015-12-04 01:54:25 +03:00
Ivan Savenko
c2f4991e99
Replaced barrier with mutex due to data races:
...
Destruction of barrier while one of the threads is still in barrier.wait() is illegal. This may happen if caller thread reaches wait() after helper thread and immediately return's from the function destroying barrier which is still in use by helper thread
2015-12-04 00:12:49 +02:00
Ivan Savenko
2e56b547ee
replaced references to SectorMap with shared_ptr to avoid data races in AI code
2015-12-04 00:10:51 +02:00
Ivan Savenko
73b4188fab
Fixed access to unitialized memory causing StupidAI to act stupid
2015-12-03 21:28:01 +02:00
ArseniyShestakov
ee08749743
VCAI: more work on teleport exit probing
2015-12-03 21:18:40 +03:00
ArseniyShestakov
2f9ca778b2
VCAI: add channel probing support for teleporters with multiple exits
2015-12-03 17:20:03 +03: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
ArseniyShestakov
eb9f29e368
VCAI: restoring teleport probing feature for updated mechanics
2015-12-02 19:26:24 +03: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
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
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
5106738160
Merge branch 'develop' into feature/pathfinderLayers
2015-11-09 19:20:13 +03:00
ArseniyShestakov
866a0a1fc0
VCAI: little improvement for 2a59cb6191
2015-11-08 23:02:59 +03:00
ArseniyShestakov
ac12a0735e
Plumbing on client and server to make flying actually work
2015-11-05 10:02:13 +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
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
Vadim Markovtsev
fa8a282696
Fix pthread_mutex_lock abort() in requestActionASAP impl
2015-10-31 18:04:06 +03:00
DjWarmonger
1e36f3cecd
Cache SectorMap where possible and update when necessary.
2015-10-26 16:38:17 +01:00
AlexVinS
c9e03405f2
fix a warning
2015-10-25 23:17:33 +03:00
AlexVinS
e8e484bbca
Merge branch 'mutexRelax_fix' into develop
2015-10-25 22:35:19 +03:00
DjWarmonger
2a59cb6191
Fixed #2308 - AI didn't attack enemy heroes at all.
2015-10-25 11:55:50 +01:00
DjWarmonger
768b1ca289
More consitent code.
2015-10-25 11:16:43 +01:00
DjWarmonger
87f838f286
AI should poke inaccessible Quest Guards less often.
2015-10-25 08:39:03 +01:00
DjWarmonger
520e42bcd7
Fixed #2317
2015-10-25 08:21:15 +01:00
DjWarmonger
4e444abf66
Few more uses of cached visibleTiles.
2015-10-24 20:46:55 +02:00
DjWarmonger
a6ea0981b6
Merge branch 'develop' into mutexRelax
2015-10-24 18:30:43 +02: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
d24fd10e21
Fix std::abs warning
...
Recent clang wants std::abs instead of plain abs
2015-10-13 21:05:46 +03:00
AlexVinS
a4d4851d80
Fix typo: casted->cast
2015-09-29 17:26:48 +03:00
DjWarmonger
e14faea181
Merge branch 'develop' of https://github.com/vcmi/vcmi into mutexRelax
2015-09-20 09:46:52 +02:00
AlexVinS
466ddb37b3
fix 1556
2015-09-14 18:38:41 +03:00
DjWarmonger
fe2a72f543
Minor optimization.
2015-08-31 10:08:50 +02:00
DjWarmonger
afe65d1264
Relaxed some locks in VCAI.
2015-08-31 09:18:24 +02: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
2012d53dd6
Fixed issues with exchanging combo artifacts ( #2132 ).
2015-08-30 15:15:04 +02:00
DjWarmonger
6af8db2c69
Fixed logic discrepancy for (in)visible objects. Fixes #2224 , #2225 and possibly more.
2015-08-30 09:14:54 +02:00
AlexVinS
782c8ec40b
Changed windows minimum version back to winxp due to mingw bug
...
* will be changed back after newer mingw tests
2015-08-20 04:22:54 +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
DjWarmonger
2dfcead9ef
- Updated MSVS project
...
- Updated changelog to 0.98c
2015-08-01 17:49:12 +02:00
AlexVinS
53b85d16be
Cleanup C::B projects
2015-06-21 01:59:33 +03:00
DjWarmonger
f3c7774576
AiI will ignore winning conditions that require defeating his own objects. Fixes #2174
2015-04-13 18:45:43 +02:00
DjWarmonger
f7387becb4
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2015-04-11 08:53:14 +02:00
DjWarmonger
3e8c395156
- More fixes for wander targets
...
- SectorMap won't find paths through the rock
2015-04-10 08:50:21 +02:00
Dmitry Marakasov
eab0b1e674
Fix build with clang 3.6
...
This is backported commit 509ccac9dd53932b158ee10b47e95d495deb3fd9
from fuzzylite
2015-04-09 13:18:33 +03:00
DjWarmonger
d32461d9d1
Complete solution for artifact equip & exchange.
2015-04-09 09:53:17 +02:00
DjWarmonger
b3f482b8a8
Restored artifact selection & exchange, work in progress.
2015-04-07 22:48:35 +02:00
DjWarmonger
264a0c4fe7
- Restored evaluation of wander targets at every step.
...
- First wander target will be sorted by distance (closest) as well.
2015-04-07 08:55:13 +02:00
DjWarmonger
2f588b548e
Fixed one case when heroes exchanged armies until ran out of movement points.
2015-04-07 08:43:10 +02:00
DjWarmonger
6cfc89dc7c
A number of fixes for wander / SectorMap.
2015-04-05 21:13:47 +02:00
DjWarmonger
a208afeee6
Removed new code, it was enough to fix the old one.
2015-03-30 16:54:32 +02:00
DjWarmonger
b2a75551c8
- Extensive use of SectorMap. AI will not eagerly pick guarded and blocked treasures.
...
- Fixed usage of boats, added Boat building as a part of Explore goal. This resolves #2151
2015-03-30 15:32:23 +02:00
DjWarmonger
299e9d5a0b
Experiment - do not prioritize reserved objects during wandering to prevent running back and forth.
2015-03-30 10:07:37 +02:00
DjWarmonger
8820bc05a9
MSVS compiler doesn't allow default arguments for Lambdas.
2015-03-10 10:06:45 +01:00
DjWarmonger
ec879046ca
Merge pull request #93 from ArseniyShestakov/feature/pathfindingTeleports
...
Okay let's do this!
2015-03-10 09:04:25 +01:00
ArseniyShestakov
11d4b4291c
VCAI: always clear teleport channel probing list if we lost hero
2015-03-10 03:23:36 +03:00
ArseniyShestakov
431f3bd857
VCAI: use cannotFulfillGoalException instead of runtime_error
2015-03-09 17:09:34 +03:00
ArseniyShestakov
f7a999f0f3
VCAI: add destinationTeleport to serialization
2015-03-09 15:37:54 +03:00
ArseniyShestakov
8524bdbc25
VCAI: use copy_if instead of erase_if for teleport exit probing list
2015-03-09 03:24:39 +03:00
ArseniyShestakov
496338813c
VCAI: explicitly check for teleportation between subterranean gates
2015-03-09 02:27:49 +03:00
ArseniyShestakov
8f8d237d5d
Use isTeleportChannel callback functions to check teleport channel type
2015-03-09 02:13:40 +03:00
ArseniyShestakov
8d901ad4d0
VCAI Explore goal: fix switch formatting
2015-03-09 01:25:52 +03:00
ArseniyShestakov
f490ea1fcd
VCAI Explore goal: remove useless check
2015-03-08 18:36:25 +03:00
ArseniyShestakov
afac28a2f5
VCAI little fix for typo in retreiveVisitableObjs
2015-03-08 17:56:59 +03:00
ArseniyShestakov
9ece636cf8
VCAI Explore goal: add monolith's exploration support
...
Explore will also suggest AI to re-enter bidirectional teleporter in case of one of it's exits is not visible for some reason.
Also now AI won't try to visit teleporters in case if it's know that it's channel is impassable. E.g if map have several entrance monoliths of with same same SubID that don't have exit then AI will only try to visit one of them and later of he'll know that all other monoliths of this subtype is blocked because they all using same channel.
2015-03-08 17:49:14 +03:00
ArseniyShestakov
12cf883740
VCAI: add all new movement code include teleports and transit support
2015-03-08 17:47:58 +03:00
ArseniyShestakov
665712c196
VCAI: add any newly found teleports to knownTeleportChannels
...
Now all new objects added to visitableObjs only using addVisitableObj so we can catch them for teleports handling.
I also simplified one of retreiveVisitableObjs functions because it's only used for inserting things into visitableObjs.
2015-03-08 17:38:09 +03:00
ArseniyShestakov
ab7ad4741a
AIStatus: add teleport channel probing mode
...
When AI going through bidirectional teleport it's always getting list of all available exits.
If some of exits are invisible it's will attempt to visit each of them teleport probing begins.
2015-03-08 17:23:56 +03:00
ArseniyShestakov
25656aa586
Add showTeleportDialog everywhere except actual code for AI and player
...
Just like TeleportDialog it's based off showBlockingDialog, but as number of package is higher when possible showTeleportDialog will be after other dialogs handling code.
2015-03-08 16:52:50 +03:00
AlexVinS
f4c683cd5e
Move VievXXX logic to server side (except expert ViewEarth)
2015-02-26 17:15:17 +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
ArseniyShestakov
ea46be03f3
AI: check if hero killed while visiting object he stayed on
...
This is need to avoid crashes like one happen in 2084, but then game bahaviour incorrect.
I'm not exactly sure if this possible currently, but I can imaging this would happen if hero decide to attack bank while staying on it.
2015-02-22 20:56:50 +03:00
DjWarmonger
60932d9ed0
AI won't ignore owned objects taken by enemies.
2015-01-24 21:38:22 +01:00
DjWarmonger
84b2510aa4
Merge pull request #62 from vcmi/SpellsRefactoring4
...
OK
2014-12-26 08:46:29 +01:00
DjWarmonger
5b8180e327
Cleaning logs.
2014-12-25 12:58:15 +01:00
AlexVinS
eebf65e88f
Merge branch 'develop' into SpellsRefactoring4
2014-12-24 00:15:27 +03:00
DjWarmonger
7735e193f0
Merge branch 'develop' into experimental/serializerrefactoring
2014-12-22 19:17:40 +01:00
AlexVinS
3bca68fd2d
Initial refactoring
...
* reduce registerTypes* templtates instantiation
2014-12-21 17:29:42 +03:00
DjWarmonger
da76a2f227
Fixed AI trying to visit tile already occupied by different hero, including #1902 .
2014-12-21 14:50:26 +01:00
DjWarmonger
af02655b30
Fixed #1962
2014-12-21 11:33:53 +01:00
DjWarmonger
a823fae822
Fixed NaNs in FuzzyHelper::getTacticalAdvantage
2014-12-19 19:15:41 +01:00
DjWarmonger
cd060c00c5
Each fuzzy set of rules will use separate fuzzy engine.
2014-12-19 10:52:41 +01:00
DjWarmonger
a1e42caddd
Banks won't use fuzzy engine at all, only center of mass.
2014-12-10 12:29:51 +01:00
DjWarmonger
7adb0fd600
Fuzzy engine fix by Jcrada.
2014-12-05 09:28:58 +01:00
DjWarmonger
6463c33c26
Rewrite / update terms for TacticalAdvantage.
2014-11-28 14:17:17 +01:00
DjWarmonger
9ca991282a
Taken JCrada patch as it is.
2014-11-27 21:51:48 +01:00
AlexVinS
f7ff61ce4f
Merge remote-tracking branch 'remotes/origin/develop' into SpellsRefactoring4
2014-11-24 12:41:17 +03:00
DjWarmonger
b0cd4f4117
Added limits and assertions which show that fuzzy engine is completely bugged.
2014-11-22 18:57:17 +01:00
josch
2812334de9
add FL_CPP11 preprocessor define independent of which fuzzylite is used
2014-11-17 11:42:30 +01:00
AlexVinS
a06dae1f96
Move getAffectedCreatures to CSpell. + more drafts
2014-11-13 04:53:25 +03:00
AlexVinS
d7800b834e
get rid of CBattleInfoCallback::calculateSpellDmg
2014-11-12 09:52:11 +03:00
AlexVinS
e4b726151d
get rid of CBattleInfoCallback::battleStackIsImmune
2014-11-12 09:20:20 +03:00
AlexVinS
5e42fb8a2a
[MinGW]FL build fix
2014-11-05 03:34:14 +03:00
DjWarmonger
3e724bc564
Merge pull request #51 from Mixaill/fuzzylite-fix-3
...
Fix fuzzylite compilation, again
2014-11-03 17:41:30 +01:00
Mikhail Paulyshka
d0da88a515
define FL_CPP11 outside Fuzzylite source
2014-11-03 01:00:22 +03:00
Mikhail Paulyshka
941dcee0f5
Fix AI and VCAI CMakeLists.txt
2014-11-02 23:43:10 +03:00
Mikhail Paulyshka
a867faae1e
use vanilla Fuzzylite
2014-11-02 23:41:41 +03:00
DjWarmonger
229ef66699
Fix for MSVS project.
2014-11-02 18:07:32 +01:00
DjWarmonger
dc9082d88c
Merge branch 'develop' of https://github.com/vcmi/vcmi into develop
2014-11-02 08:21:25 +01:00
DjWarmonger
e2a6008aa4
Removed unnecessary MSVS settings.
2014-11-02 08:20:58 +01:00
Mikhail Paulyshka
53298c1fd1
ad FL_Windows prepocessor definition
2014-11-02 00:44:00 +03:00
Mikhail Paulyshka
f2ed40f0de
fix compilation on non-MSVC compilators (Global.h not found)
2014-11-01 23:40:33 +03:00
DjWarmonger
040fcd30e1
Merged https://github.com/vcmi/vcmi/pull/47
2014-11-01 17:04:51 +01:00
DjWarmonger
9eeea7299a
- Removed unecessary includes
...
- Fixed town types configured from RMG templates
2014-10-31 17:09:34 +01:00
AlexVinS
f16e859242
[C::B] update FL project 2
2014-10-27 15:17:40 +03:00
AlexVinS
49b1b6559d
[C::B] update FL project
2014-10-27 14:46:20 +03:00
DjWarmonger
c87f2cdaaf
Updated build for MSVS. Some compile fixes to FuzzyLite source.
2014-10-26 12:32:19 +01:00
DjWarmonger
8bf413e0c5
Restored Visual and Code::Blocks projects wiped by previous merge.
2014-10-26 10:49:05 +01:00
jcrada
a4f98a9ebd
Upgraded to FuzzyLite version 5.0
2014-10-25 16:13:20 +02:00
josch
101ac04c13
Replaced embedded copy of fuzzylite with fuzzylite 5.0
...
- retrieved from
https://github.com/fuzzylite/fuzzylite/archive/v5.0.tar.gz
- only modification to tarball content was the removal of the examples
directory
- fuzzylite release 5.0 tags fuzzylite git commit c11556f
2014-10-25 16:00:44 +02:00
josch
fab31642d9
prepare for update to fuzzylite 5.0
...
- use system version of fuzzylite if available
- adapt include paths
2014-10-25 16:00:44 +02:00
AlexVinS
66b022f93e
initializer lists part1
2014-10-02 19:43:46 +04:00
DjWarmonger
95e442898e
Fixed #1900
2014-10-01 13:26:04 +02:00
Ivan Savenko
33c0e24940
Fixes 1895 - Properly select upper army for recruitment
2014-09-23 14:28:55 +03:00
Ivan Savenko
4bb5784922
Fixing AI - dwelling visitation code should now work properly
2014-09-21 18:08:47 +03:00
Ivan Savenko
b67618ab53
First batch of AI fixes:
...
- wiped not actually used set/get selection
- replaced isReachable with VCAI::isAccessible
2014-09-21 17:03:20 +03:00
Ivan Savenko
6c0c03d74b
Refactoing of pathfinder <-> client/AI interaction to remove dependency on selected hero
...
- finished removal of server-side setSelection
- disabled some broken code (AI & cheats). TODO: fix
2014-09-21 16:42:08 +03:00
Ivan Savenko
78709e223b
Breaking things - trying to remove server-side knowledge of selected objects
2014-09-19 00:18:49 +03: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
DjWarmonger
0edaf4fa8a
Merge pull request #26 from vcmi/FFMpeg
...
Let's do this, way too many branches running now.
2014-09-01 10:35:30 +02:00
DjWarmonger
8b10f70afd
Migrating to MSVS 2013, which allows to delete inttypes.h file.
2014-08-31 19:08:39 +02:00
Karol
1b6f2ea3b7
VCMIDirs update #5 fix
...
- Updated old OS detect macros.
- Fixed 1 misspell.
2014-08-26 12:19:04 +02:00
beegee1
5139378319
- migrated boost::function/ref/bind to std:: variants
2014-08-04 20:33:59 +02:00
Michael Pavlyshko
13cbf0bbca
disable fPIC for windows
2014-07-11 23:11:19 +03:00
Michael Pavlyshko
f7d8faa540
install only .dll (without .dll.a)
2014-07-11 17:27:50 +03:00
AlexVinS
195eae48ca
Merge branch 'develop' into SDL2
...
Conflicts:
client/CPlayerInterface.cpp
2014-07-02 17:15:12 +04: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
Haryaalcar
88122ee253
another build fix:
...
Undefined symbols for architecture x86_64:
"operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, EVictoryLossCheckResult const&)
2014-06-26 02:19:10 +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
AlexVinS
3b8d0e44d4
Merge branch 'develop' into SDL2
2014-06-24 14:09:44 +04:00
DjWarmonger
3ac306f501
Merge pull request #19 from vcmi/feature/mapObjects
...
Feature/map objects
2014-06-22 14:49:42 +02: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
DjWarmonger
5c431da0f9
Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG
2014-06-15 10:01:18 +02:00
AlexVinS
56c74bc46a
+More build target to support both SDL1 and SDL2 builds
2014-06-13 07:55:48 +04:00
AlexVinS
bbd0312b45
Tweak configuration
2014-06-13 07:55:47 +04:00
Haryaalcar
2ee139977f
crash in VCAI::completeGoal() fixed
2014-06-09 11:24:17 +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
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
DjWarmonger
e54c816c92
Treasure piles can now cover several tiles.
2014-06-05 17:19:11 +02: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
Ivan Savenko
32b6568b65
Merged changes from upstream and fixed compilation caused by API changes
2014-06-03 22:45:18 +03:00
DjWarmonger
aee748d8d6
- Added monoliths between remote zones
...
- Fixed land connections between zones, now they're generated correctly.
2014-06-01 12:02:43 +02:00
DjWarmonger
8c24ea0bfb
Introduced 3-value logic for free, blocked and possibly occupied tiles. Refactoring.
2014-05-30 16:50:06 +02:00
Ivan Savenko
1d17d60449
gcc update:
...
- removed support for 4.6
- compilation fixes for 4.7
2014-05-29 13:42:05 +03:00
Ivan Savenko
7f276185bd
Moving files:
...
- new config for objects (config/objects/generic.json)
- renamed lib/CDefObjectHandler to lib/CObjectClassesHandler
2014-05-24 02:07:54 +03:00
AlexVinS
6f65d2484b
Extract battleStackIsImmune from battleIsImmune
...
This fix possible problems with rising spells as now immunty is handled on stack level not on hex level
* battleIsImmune in now protected - only used in canCastThisSpellHere
2014-05-19 13:44:38 +04:00
DjWarmonger
6658e173f1
- Possible fix for #1769
...
- Fixed all possible (even unexpected) crashes when AI looses active hero
2014-05-18 13:13:31 +02:00
Ilya Zhuravlev
db7cd79cf7
Android port.
...
Conflicts:
lib/vcmi_endian.h
2014-05-16 23:24:29 +04:00
DjWarmonger
fb5152254d
Merge branch 'develop' of git://github.com/Macron1Robot/vcmi into WarmysBackup
...
Conflicts:
client/CKingdomInterface.cpp
2014-05-02 12:03:02 +02:00
Macron1Robot
21c2efbc64
Update VCAI.cpp
...
Deleted commented text and optimized estimateIncome
2014-04-28 10:33:42 +04:00
Macron1Robot
ede9818b38
Update VCAI.cpp
...
corrected typo
2014-04-28 08:26:21 +04:00
DjWarmonger
4a71442c80
Missing changes.
2014-04-27 14:38:20 +02:00
Macron1Robot
8ec7a9b919
Moved "max heroes on map per player", "max heroes available for player" to "defaultMods.json"
2014-04-27 10:43:46 +04:00
Macron1Robot
907caedb13
Added "produce" section in "building" structure. Changed dailyIncome.
2014-04-26 18:23:35 +04:00
Macron1Robot
b7b890acff
Added "tavernVideo","guildBackground" to "faction" JSON config and schema. If "primaryResource" is set to "gold", silo will generate 500 gold per day
2014-04-24 23:36:18 +04:00
DjWarmonger
9e7013de77
Backup for my own MVS project configuration
2014-04-24 21:07:43 +02:00
beegee1
e2bcac4d27
- fixed include random generator header
2014-04-18 18:45:47 +02:00
beegee1
1d57b75bc5
- random number generation refactoring
...
- fixed mantis #1743
2014-04-10 19:22:32 +02:00
Ivan Savenko
43ba3d30ea
Breaking things - first commit towards configurable object(s).
...
- New files: lib/CObjectWithReward.h/cpp
- Classes that will be replaced by configurable object are now in this
fil
Status: far from functional, currently at "it compiles" point, some
essential pieces are still missing.
2014-04-06 23:14:26 +03:00
DjWarmonger
2da3d7d7c3
Removed AI bottleneck on water-based maps.
2014-04-03 09:57:44 +00:00
DjWarmonger
30b79588db
- Moved gameState::guardingCreaturePosition() to CMap so it doesn't need to be recalculated many times for every player.
...
- Some optimizations with local cb pinter in VCAI.
2014-04-01 11:53:28 +00:00
DjWarmonger
a64df5718f
Some nontrivial optimizations based on profiling results:
...
- Movement bonuses will be calculated ONCE per pathfinder loop
- Goals will be sorted by hero to reduce number of calculatePaths calls
2014-03-31 14:26:09 +00:00
DjWarmonger
8683c8c0eb
- Added and improved some propagators, including Crystal Dragons ability ( #1232 )
...
- Minor refactoring in AI
2014-03-29 21:39:19 +00:00
Ivan Savenko
771c1ce255
- some effords to get rid of bottlenecks in AI code
...
- fixes, probably partially #1577
- enabled code for reading map object templates from json, still not
used
- disabled PCH for launcher due to speed issues.
2014-03-23 16:36:16 +00:00
DjWarmonger
441e4b2cb2
Improvements for AI speed ( #1760 )
...
AI heroes will be excluded from exploration if:
- There is no clear way to next exploration point or
- There is no possible exploration point at all
AI heroes will be erased from the list above if:
- FoW changes
- New object is added
- To prevent lock, primary hero will be erased at the start of each turn
2014-03-23 16:00:43 +00:00
Ivan Savenko
9c0df68cb8
Fixing spelling mistakes. Patch from josch, fixes #1759
2014-03-23 12:59:03 +00:00
beegee1
fe1b16a7ec
Some preparation towards mantis #1743 :
...
- refactored CRandomGenerator (added util methods, improved method names)
- usages of std::minstd_ran are replaced by CRandomGenerator (not in entire code base, C rand() usages are still not replaced)
- refactored getArtSync method of CArtHandler -> now named pickRandomArtifact
- fixed some compiler warnings
- updated source code URL in VCMI spec
2014-03-17 19:51:07 +00:00
alexvins
4203d69525
Part 2 of new spell configuration
...
1) spell handler refactored to support modding in general way
2) imunnity icons moved to WoG as they depends on wog`s graphics
3) introduced new class template for handlers (todo: use this in other handlers)
4) save format changed
5) introduced "absolute immunity" - unaffected by "the Orb" etc. (todo: use it in config)
6) new format documented on wiki, added json schema.
* more split of registertypes - fixes 32 mingw build
2014-03-07 13:21:09 +00:00
Michał W. Urbańczyk
93b8d2e59a
AI crash — do not modify container when iterating it.
2014-03-01 12:53:09 +00:00