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
DjWarmonger
1e36f3cecd
Cache SectorMap where possible and update when necessary.
2015-10-26 16:38:17 +01: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
3e8c395156
- More fixes for wander targets
...
- SectorMap won't find paths through the rock
2015-04-10 08:50:21 +02:00
DjWarmonger
b3f482b8a8
Restored artifact selection & exchange, work in progress.
2015-04-07 22:48:35 +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
ec879046ca
Merge pull request #93 from ArseniyShestakov/feature/pathfindingTeleports
...
Okay let's do this!
2015-03-10 09:04:25 +01:00
ArseniyShestakov
f7a999f0f3
VCAI: add destinationTeleport to serialization
2015-03-09 15:37:54 +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
AlexVinS
3bca68fd2d
Initial refactoring
...
* reduce registerTypes* templtates instantiation
2014-12-21 17:29:42 +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
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
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
8c24ea0bfb
Introduced 3-value logic for free, blocked and possibly occupied tiles. Refactoring.
2014-05-30 16:50:06 +02: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
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
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
DjWarmonger
8ce6659633
Important fix for unreserving objects.
2014-02-23 20:37:33 +00:00
DjWarmonger
94c8f01732
Commiting some minor tweaks before next dev version.
2014-02-23 16:55:42 +00:00
Michał W. Urbańczyk
458ba47965
Compile fix for non-msvc, as per https://github.com/vcmi/vcmi/pull/8
2014-02-21 12:27:56 +00:00
DjWarmonger
b0b0249524
- Implemented serialization of Goals. Loaded games work, at least.
...
- Attempts to add Subterranean Gates to SectorMap
- Extensive use of ClearWayTo goal.
2014-02-20 20:18:49 +00:00
DjWarmonger
a3cad2883f
- Restored correct specialty serialization ( #1599 and all its children)
...
- Fixed rare AI crash
- Fixed AI visiting some objects many times
- Some cleanup and refactoring
2014-02-17 17:28:39 +00:00
DjWarmonger
6ee823298a
- Various improvements for exploration
...
* Heroes will try to use SectorMap if there are no accessible tiles
* Remove some loopholes and pitfalls when all the ways are blocked
* Fixed AI not conquering some (reserved) objects
Still missing: SectorMap does not use Subterranean Gates :(
- Improvements for army exchange
* Fixed exchange condition
* Bidirectional exchange is possible
2014-02-17 07:36:03 +00:00
DjWarmonger
b368e565ab
- fixed #1714
...
- Performance improvements, refactoring
2014-02-15 19:39:03 +00:00
DjWarmonger
c2cbd8da27
Un-abstracted AbstractGoal to allow serialization.
2014-01-06 14:17:56 +00:00
beegee1
b8eddcd9a8
- Moved place bonus hero before normal random hero and starting hero placement -> same behaviour as in OH3
...
- Moved placing campaign heroes before random object generation -> same behaviour as in OH3
- Refactored pickHero into pickNextHeroType (hero generation sequence) and pickUnusedHeroTypeRandomly
- Added a SIGSEV violation handler to vcmiserver executable for logging stacktrace (for convenience only)
- Fixed Fuzzy.cpp and VCAI.h compilation on Clang
- Added a handleException function in addition to our macros (no use of macros, enables debugging support, does not re-throw, catches ...-case too)
2013-12-28 12:47:55 +00:00
DjWarmonger
e5b011abe0
- Fixed heroes stalling. Locked heroes now try to decompose their goals exhaustively, which FINALLY works as intended.
...
- Fixed multiple issues with ClearWayTo goal.
2013-12-26 09:53:37 +00:00
DjWarmonger
7af9b0ea74
Replaced AI vectors by sets for both performance and safety.
2013-12-25 13:38:20 +00:00
DjWarmonger
aec04d920e
Endless crusade against AI issues and loopholes!
...
- Fixed #1126
- ClearWayTo and GatherArmy goals will also consider multiple subgoals
- GatherArmy may include building dwellings in town (experimental)
2013-12-23 20:46:01 +00:00
DjWarmonger
a6ce282f8a
Dramatically reduced exploration complexity. AI will check only nearby objects.
2013-12-21 19:17:27 +00:00
DjWarmonger
983c0496d0
Some work towards fuzzy goal comparison.
2013-12-19 20:21:21 +00:00
Ivan Savenko
881a7cf862
- added check to avoid recursion in AI town building code
...
- restored previously missing AI shield during AI turn
2013-12-19 17:29:35 +00:00
DjWarmonger
54c52869cf
- Fixed some more cases when heroes could block each other
...
- More generous checking of complete goals and their dependencies
2013-11-24 19:15:08 +00:00
DjWarmonger
b0bdfff117
Compile fixes, refactoring
2013-11-24 15:30:17 +00:00
DjWarmonger
0ab7b498f5
VCAI is now functional again!
...
Implemented Visitor pattern for double-dispatch (actually only goal type dispatch).
2013-11-23 18:16:25 +00:00
DjWarmonger
e6bb39d3a4
More work on VCAI Goals, still derived functions are not called :/
2013-11-23 12:30:10 +00:00
beegee1
3e4407593f
- Refactoring for checking victory/loss conditions (use enum class instead of magic numbers)
...
- Improved showing player lost message for one special case
2013-11-17 17:57:04 +00:00
DjWarmonger
900d7a03f0
Template magic. Implemented method chaining + clone pattern for Goals.
2013-11-15 17:30:16 +00:00