The description text does not get rendered very well on a webpage. One
solution might be to use pre-wrap/word-wrap in the CSS, but due to
differences between browsers, that's a can of worms (at least for me, I'm
not a web pro).
So, the not-so-elegant solution is to add <br/> to every line.
URLs are also not linked in the plain text. Although in modern browsers
you can select the text and right-click, it's still convenient to turn
them into actual links.
There seems no particular reason to require that this magic comment be at
the very beginning of the line, so why not switch from re.match to
re.search.
Also, update comments to reflect the fact that UtBS no longer uses this
magic comment.
A suggestion has been made to get rid of this magic comment now that UtBS
is no longer using it, but it may still be in use in some UMC somewhere.
If several Goto MAIs are used on the same side and both have
unique_goals=yes set, they previously might have interfered with each
other, one preventing the other from working correctly. Now the “goal
taken” information is saved such that it only applies to the CA by
which it was set.
previously this was done in side 1 turn 1 events because start events
wasn't synced.
After the fix for 21933 players now loose when they have no units after
start events, so we need to do this in a start event.
replacing check_victory with check_end_level after start events in
play_controller.cpp line 572 doesn't work because we still have the
check_victory in playmp_controller when waiting
for remote packages, that check_victory is needed in order to sync the
behavior of ai turns which calls check_victory after every action on the
local client.
Don’t check whether rating equals (or doesn’t equal) -9e99 or the like,
verify that a valid move was found instead. Also, avoid setting
variables to empty tables if not needed.
It’s slow for finding units with moves or attacks left. The alternative
method of getting all units and then looping over the table with a
condition is much faster.
These function libraries are still work in progress and change
frequently, so the code cleanup is mostly just to make sure the syntax
is consistent with that used in the Micro AIs. Changes or improvements
to the algorithms might be made at a later time.
There was a typo in the goal table indexing. It worked for the
multi-unit test scenario (the Elves Besieged) because the goal x
coordinates for both units were the same.
It’s theoretically possible that different Micro AIs’ evaluation
functions store information in the same variable within self.data.
This would only happen if the CAs have the same score and while this
should generally be avoided when setting up a scenario, it is better to
ensure that it cannot cause conflicts (not in the stored data at least,
the MAIs might still interfere with each other in other respects).
Allows units other than Gweddry to find the gold, and triggers the
academy-finding dialogue when moving close to it, but not if Dacyn
already got there first.