MantisBT - VCMI
View Issue Details
0001590VCMIAI - Adventure Mappublic2013-11-17 13:502016-04-07 13:37
Povelitel 
SXX 
normalminoralways
closedfixed 
PCWindowsWindows7 sp1
0.94 
0.98g 
0001590: border guard - useless expenditure of a turn.
The blue and green heroes tries to open infinitely border guard, can't remember
that he didn't visit tent! Also spends completely the turn, and several heroes.

http://youtu.be/BL-Bf-CvWNU [^]

Probably an example not so successful (because he has no place to go). But it spends real time of the player. Absolutely useless actions.

Tuning is necessary :)
No tags attached.
related to 0002374assigned SXX VisitHero::fulfillsMe goal check used after battle with killed hero 
has duplicate 0002096closed SXX Freeze. AI infinitely try open Border Quard 
related to 0002383closed SXX AI infinitely loops with this save - secSkill desync 
related to 0002326closed SXX AI turn takes really long when there is many completely blocked heroes 
rar border guard.rar (833,136) 2013-11-17 13:50
https://bugs.vcmi.eu/file_download.php?file_id=1621&type=bug
? testowanie mantisa.h3m (5,926) 2014-06-01 20:10
https://bugs.vcmi.eu/file_download.php?file_id=1821&type=bug
Issue History
2013-11-17 13:50PovelitelNew Issue
2013-11-17 13:50PovelitelStatusnew => assigned
2013-11-17 13:50PovelitelAssigned To => Tow
2013-11-17 13:50PovelitelFile Added: border guard.rar
2013-12-21 20:48WarmongerAssigned ToTow => Warmonger
2013-12-21 20:50WarmongerNote Added: 0004196
2013-12-21 21:33WarmongerNote Added: 0004197
2013-12-21 21:33WarmongerStatusassigned => resolved
2013-12-21 21:33WarmongerFixed in Version => 0.94b
2013-12-21 21:33WarmongerResolutionopen => fixed
2014-06-01 20:09KantorNote Added: 0004696
2014-06-01 20:10KantorFile Added: testowanie mantisa.h3m
2014-06-01 20:12KantorNote Added: 0004697
2014-06-01 20:12KantorStatusresolved => feedback
2014-06-01 20:12KantorResolutionfixed => reopened
2016-01-31 19:25SXXAssigned ToWarmonger => SXX
2016-01-31 19:25SXXStatusfeedback => assigned
2016-01-31 19:26SXXRelationship addedrelated to 0002374
2016-02-04 13:50PovelitelNote Added: 0006404
2016-02-04 15:53SXXNote Added: 0006406
2016-02-04 15:53SXXRelationship addedrelated to 0002096
2016-02-25 03:17SXXRelationship addedrelated to 0002383
2016-02-25 03:21SXXRelationship addedhas duplicate 0002326
2016-02-25 03:23SXXRelationship deletedrelated to 0002096
2016-02-25 03:23SXXRelationship addedhas duplicate 0002096
2016-02-25 03:27SXXNote Added: 0006449
2016-02-25 05:55SXXNote Added: 0006450
2016-02-25 05:55SXXStatusassigned => resolved
2016-02-25 05:55SXXFixed in Version0.94b => 0.98g
2016-02-25 05:55SXXResolutionreopened => fixed
2016-02-25 05:56SXXRelationship deletedhas duplicate 0002326
2016-02-25 05:56SXXRelationship addedrelated to 0002326
2016-02-25 06:30WarmongerNote Added: 0006453
2016-02-25 10:45WarmongerNote Added: 0006456
2016-02-25 12:33SXXNote Added: 0006457
2016-04-07 13:37PovelitelStatusresolved => closed

Notes
(0004196)
Warmonger   
2013-12-21 20:50   
Oh yes nice psy.
(0004197)
Warmonger   
2013-12-21 21:33   
Fixed in r3670.
(0004696)
Kantor   
2014-06-01 20:09   
This one is still an issue. I'm including a map.
(0004697)
Kantor   
2014-06-01 20:12   
The AI is still wasting it's move on border guard.
(0006404)
Povelitel   
2016-02-04 13:50   
it's may be related? bugs.vcmi.eu/view.php?id=2096
(0006406)
SXX   
2016-02-04 15:53   
Likely.
(0006449)
SXX   
2016-02-25 03:27   
So problem occur because VCAI use check CQuest::checkQuest while code for border guard visits can only be found in CGBorderGuard::checkQuest.

Also there is quest type of CQuest::MISSION_KEYMASTER, but it's not really implemented so quest type of border guard is MISSION_NONE. In the end this cause infinite loop since AI thinking it's possible to "open" that tile when it's not.
(0006450)
SXX   
2016-02-25 05:55   
So I fixed this one:
https://github.com/vcmi/vcmi/commit/4f7664926ead65d57a3591ee2f0cd310d5edfb84 [^]

It's would be much better to implement quest usage for CGKeys, but it's not that easy as quest system isn't finished really to do that.
(0006453)
Warmonger   
2016-02-25 06:30   
That's a good explanation, but I can't see anything in the commit that would fix it?
(0006456)
Warmonger   
2016-02-25 10:45   
Ahh here is the correct link: https://github.com/vcmi/vcmi/commit/57780828426778b4a1c81aa3b1f71f5147fdae03 [^]
(0006457)
SXX   
2016-02-25 12:33   
Oops! Thanks!