DJWarmonger
8eec7d71ad
Little tweak - prioritize instant buildings over ones we can't afford. May be useful with multiple towns.
2018-08-06 17:42:58 +02:00
DJWarmonger
36e44adc8c
rebase
2018-08-06 10:02:59 +02:00
DJWarmonger
6615870045
Rebase
2018-08-04 15:59:59 +02:00
DJWarmonger
aa9c6d3716
Cleanup
2018-08-04 13:18:05 +02:00
DJWarmonger
9e34ef5534
AI will not try to sell reserved resources.
2018-08-04 11:51:19 +02:00
DJWarmonger
2aa0a6fe2f
More fixes for trading. Seems to work now.
2018-08-04 10:20:40 +02:00
DJWarmonger
a5ca32ad38
Some checks and log for CollectRes goal.
2018-08-04 09:24:43 +02:00
AlexVinS
f17783cfb5
[c::b] Updated projects, applied fixes
2018-07-29 22:07:40 +03:00
DJWarmonger
70549197b6
Naah, revert my changes.
2018-07-28 09:08:53 +02:00
DJWarmonger
e7cb8d7d17
Fixed GetObj (TRADING_POST) incorrectly set to elementar.
2018-07-28 06:47:37 +02:00
DJWarmonger
a8696a9957
formatting
2018-07-27 09:22:07 +02:00
DJWarmonger
e5b979d4ad
- ResourceManager now returns abstract goal so it can be decomposed many times
2018-07-26 16:15:37 +02:00
DJWarmonger
b687688f5a
Do not add duplicate objectives to GatherArmy pool (or any other, if it ever exist)
2018-07-26 13:29:46 +02:00
DJWarmonger
273802c92c
I have no idea what I'm doing
2018-07-26 12:14:29 +02:00
Arseniy Shestakov
25dea1a599
Code style: formatting and refactoring of VCAI code
2018-04-08 17:43:20 +07:00
Nikolay Shalakin
3795985de9
Eliminate warnings / errors. Pull request #388
2018-02-11 15:17:14 +03:00
Arseniy Shestakov
324717acbe
Spelling fixes: privilaged -> privileged, retreive -> retrieve
2018-02-10 21:52:23 +03:00
AlexVinS
0a2b04709f
Fixed https://bugs.vcmi.eu/view.php?id=2873
2018-02-09 22:12:21 +03:00
AlexVinS
15138c23de
Finished conversion to new logging API
...
* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
2017-08-11 23:06:27 +03:00
Arseniy Shestakov
cdd9dbc7f1
Code style: avoid some ambiguous else if indentation
...
If some code intentionally want to break else if to achieve specific indentation there must be braces.
2017-07-19 03:42:26 +03:00
Dydzio
0cb6515ae8
VCAI tweaks ( #311 )
...
* Add extra priority support for town capture evaluation
* Improve building algorithm
* GatherArmy: check free gold instead of total for when hiring heroes
2017-07-15 01:15:08 +03:00
Arseniy Shestakov
f1e5797834
Code style: move or add licensing information on top of every file
2017-07-14 01:26:03 +03:00
AlexVinS
a85b4cf2a5
* WIP on event condition format
...
* Hero portrait serialization
* Fix town spells serialization
* Added support for float exponential part in Json
* Added support for int64 in Json
* Added basic Hero definitions serialization
* Added rumors serialization
* Advanced player info serialization.
* Added Disposed heroes serialization, (!) not covered with tests yet
* Added Local event serialization
* Added Pandoras box serialization
* Added Seer hut reward serialization
* Added CQuest serialization
* Added API for map object instance names serialization.
* Added random dwelling options serialization
* Advanced town options serialization
* Advanced hero options serialization
* More map format tests
* A lot of fixes, cleanup and refactoring
2017-05-27 00:23:19 +03:00
DjWarmonger
eaf14f6429
Should fix #2624 .
2016-11-29 22:07:35 +01:00
Arseniy Shestakov
fd3992ddc9
GatherTroops: avoid crash if nearest dwelling wasn't found. Issue 2624
2016-11-29 21:57:00 +03:00
DjWarmonger
169334f877
VCAI: do not buy heroes with single creatures for GatherArmy
2016-11-26 18:03:09 +01:00
AlexVinS
22884d9150
AI logging convert 1
2016-08-13 17:44:37 +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
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
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
ArseniyShestakov
03e9dd3bab
Add hero gold cost to GameConstants
2015-12-07 00:13:58 +03:00
Ivan Savenko
faa7cbff18
Fixed gcc/clang warnings
2015-12-04 01:17:43 +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
7b5a7f43ad
Removed includes of CGameState from headers
2015-12-02 21:39:53 +02:00
DjWarmonger
1e36f3cecd
Cache SectorMap where possible and update when necessary.
2015-10-26 16:38:17 +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
f3c7774576
AiI will ignore winning conditions that require defeating his own objects. Fixes #2174
2015-04-13 18:45:43 +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
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
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
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
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
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