19517 Commits

Author SHA1 Message Date
Charles Dang
def4c7cb3b THoT S12: fixed a typo and a missing word
Then -> Then
We will able -> We will be able
2014-04-10 02:53:51 -07:00
Charles Dang
8a80c370fe THoT S2: added mission period 2014-04-10 02:51:34 -07:00
Charles Dang
165210d8a3 THoT S1: improved a sentence 2014-04-10 02:49:51 -07:00
Charles Dang
578b4324fe NR S10a: fixed typo in comment 2014-04-10 02:46:34 -07:00
Charles Dang
b363705e96 NR S7a: fixed typo in a comment 2014-04-10 02:45:13 -07:00
Iurii Chernyi
47b4f52c9e Merge pull request #143 from Kevin-Xi/bugfix
fix minor bug in get_healing_phase
2014-04-10 11:13:07 +02:00
Charles Dang
45db6360e6 AOI S6: correct user_team_name for side 2 to Undead 2014-04-10 02:11:46 -07:00
Kevin_Xi
841284881a fix minor bug in get_healing_phase 2014-04-10 14:52:43 +08:00
mattsc
7fc8e9797b Micro AIs: avoid code duplication between eval and exec functions 2014-04-09 18:23:46 -07:00
mattsc
6f40ed8046 Micro AIs: use new fight_on_without_leader= key as needed
So that the scenarios with leaderless AI sides work.
2014-04-09 18:21:52 -07:00
mattsc
f260dd3be5 Micro AIs: one more wesnoth.dofile -> wesnoth.require 2014-04-07 14:36:36 -07:00
mattsc
bb5ed2e5a2 Micro AIs: clean up loading of Lua files
Consistently use wesnoth.require, avoid wesnoth.dofile. Move commands
as close to beginning of file as possible in order to facilitate custom
modifications of MAIs.
2014-04-07 14:23:42 -07:00
Elvish_Hunter
729ebd58ff Restored support for [if] tags not containing [else] tags 2014-04-05 10:36:06 +02:00
Elvish_Hunter
0aa53a06cc Merge branch 'elseif_branch' of github.com:wesnoth/wesnoth-old into elseif_branch
Merging the branch with the one I created locally.
2014-04-04 10:55:45 +02:00
gfgtdf
9d3594620e added forgotten translatable mark 2014-04-04 01:26:09 +02:00
Elvish_Hunter
df3063ed70 [switch]: implemented checks for missing [case], variable= and value=, Lua part 2014-04-03 12:33:20 +02:00
Elvish_Hunter
7e4beb8630 Get rid of obsolete if_while_handler function 2014-04-03 12:30:22 +02:00
Elvish_Hunter
cf55cf84e6 [while]: added sanity checks for missing [do] tags 2014-04-03 12:28:17 +02:00
Elvish_Hunter
2cff4662e2 Added [elseif] support, Lua part. Also included sanity checks for missing [then] tags inside [if] 2014-04-03 12:19:05 +02:00
gfgtdf
8617a02a88 Merge pull request #121 from gfgtdf/sync_2
sync, attack events, start/prestart and more

sync attack events, sync start/prestart, fix  gna.org/bugs/?20871, partly implement gna.org/bugs/?21697 fixing OOS related to [get_global_variable], unify the rng for attacks and other things, implement a third argument for wesnoth.synchronize_choice, implement the deterministic mode for sp. See https://github.com/wesnoth/wesnoth/pull/121 for full descrition.
2014-04-03 00:38:45 +02:00
gfgtdf
b4847d95e7 implement the deterministic mode for sp. part2
the player can now choose whether he want to play a new SP game in the
deterministic mode where he'll get the same results when he reloads a
game.

i think it would also be nice to enable the deterministic mode for MP for players with verybad network connection, because that would result in less network traffic but more options to cheat.
but i currently don't know enough about the mp connect code to that.
2014-04-02 23:43:28 +02:00
Nils Kneuper
277b5dd698 updated credits for the Greek translation 2014-04-01 21:56:31 +02:00
mattsc
1dfd79c3a5 Micro AIs: use the new functions for storing information in self.data
… so that it is done in a consistent way and conflicts can be avoided
when setting up a subsequent MAI.
2014-03-31 20:04:18 -07:00
mattsc
73a11634f7 Micro AIs: check for existence of [micro_ai] tags in self.data when...
… setting up an MAI. Ideally, we would delete such previous occurrences
of [micro_ai] tags in the AI's self.data variable. However, the MAI can
be changed while it is not the AI's turn, when this is not possible. So
instead, we check for the existence of such tags and make sure we are
using a different ai_id.
2014-03-31 20:02:16 -07:00
mattsc
6cfe5fa351 MAIs: add utility functions for storing information in AI's self.data
These provide a simple and consistent method of storing variables
inside [micro_ai] tags in the AI's persistent self.data variable. This
is needed for fixing a bug with variables stored there from a previous
MAI causing problems with a subsequent MAI
2014-03-31 19:58:58 -07:00
mattsc
6bd3bae330 Fix typos in comments 2014-03-31 19:55:24 -07:00
mattsc
d69d4e9858 Goto MAI: store whether unit is released in the unit, not self.data
This is unit specific information, and therefore should go into the
unit.  By contrast, information whether all units of the side have been
released needs to remain in self.data.
2014-03-31 18:18:51 -07:00
mattsc
e1bbfc49ad Merge branch 'master' of github.com:wesnoth/wesnoth 2014-03-31 08:22:28 -07:00
mattsc
c24ddb71b2 Micro AIs bug fix: remove MAI unit variables on MAI removal
Previously this information remained in units and could alter the
behavior of subsequent MAIs, or even entirely disable them.
2014-03-31 08:21:50 -07:00
mattsc
49cc3bc7f9 Micro AIs: use the new functions for storing information in units
… such that it is done in a consistent way and this information can be
removed on MAI deletion.
2014-03-31 08:19:31 -07:00
mattsc
a4ee966d06 Fix comments 2014-03-31 08:16:14 -07:00
mattsc
bfb3315153 Micro AIs: another bug fix for required keys for MAI removal
The random recruiters MAI also required unnecessary keys to be provided
for MAI removal.
2014-03-31 08:15:12 -07:00
mattsc
24881edfb3 Micro AIs: use AI id instead of CA id as identifier
… for determining whether AI/CA ids are unique.  Also pass AI id to
eval/exec functions, instead of CA id.  This is also a step toward
fixing the bug with MAI variables remaining stored in units after an
MAI is removed.
In principle, the ca_id= key in the [micro_ai] tag should now be
renamed to ai_id, but that would break backward compatibility without
any benefit to the user, so we deal with it internally behind the
scenes instead.
2014-03-31 08:12:33 -07:00
mattsc
96e84f24c5 MAIs: add utility functions for storing information in unit variables
These provide a simple and consistent way of storing variables inside
[micro_ai] tags in unit variables.  This is needed for fixing a bug
with variables stored in units from a previous MAI causing problems
with a subsequent MAI.
2014-03-31 07:54:52 -07:00
mattsc
7c3d9093fb Micro AIs: fix bug requiring unnecessary keys for MAI removal
MAIs which take either [filter] or id= used to throw an error message
if neither was given even for MAI removal.
2014-03-31 07:49:56 -07:00
mattsc
84b1234835 [micro_ai] tag: move CA_path definition to beginning of file
To make it more visible for UMC authors who want to include their own
(modified) AIs.
2014-03-31 07:46:21 -07:00
Duthlet
5530cd0fc5 Fix bug #21759
Removed duplicate code that caused timer to be refreshed an additional
time if time runs out. The usual refreshing in
playmp_controller::after_human_turn is already called in this case as
well (after turn ends). The duplicate code gave the bonuses before the
turn ended, and after that the turn was ended (giving turn bonus again)
only if there was no random seed incoming from the server.

Conflicts:
	changelog
2014-03-30 13:48:53 -04:00
mattsc
0fd45763a9 MAIs: test for unit equality directly, not via coordinates 2014-03-29 17:19:56 -07:00
mattsc
f03c6052d0 Return guardian MAI: remove unnecessary condition
We can never get to this point in the code if the unit does not have
moves.
2014-03-29 17:19:56 -07:00
mattsc
a017e584f2 Coward MAI: remove unnecessary condition
ai_helper.movefull_stopunit takes care of this internally.
2014-03-29 17:19:56 -07:00
mattsc
187f1c489b Patrol MAI: fix bug with save/load persistent data storage
WML values may not be used as keys, this can make savegames invalid.
Store information in the units now rather than in self.data. (Note:
storing in self.data would also be possible if the syntax were changed.)
2014-03-28 07:49:09 -07:00
mattsc
244ad22ce2 MAIs: minor code simplification in AIs that take both [filter] and id=
These are the AIs that used to use Behavior Candidate Actions (BCA).
2014-03-28 07:00:59 -07:00
mattsc
c72c8e7ff2 Messenger MAI: add optional invert_order= key
In the default configuration, the AI moves the messenger which has
advanced the furthest through the waypoints first.  If this key is set,
the rearmost messenger is moved first.
2014-03-27 14:36:32 -07:00
mattsc
62f709aaa3 Messenger MAI: allow several messengers to be controlled by AI
For two of the CAs this mostly just means reading the [filter] tag and
picking one of the messengers.  However, for the CA moving the escort
units, it means a complete rewrite, as the AI now needs to figure out
which escort unit should be moved toward which messenger.
2014-03-27 13:36:29 -07:00
mattsc
2d458b642a Messenger MAI: fix bug with escort units blocking the messenger
When there were lots of escort units, they previously quite frequently
blocked the messenger’s way, preventing him from making progress even
when it was possible.  Escort units now specifically move out of the
way if they do not need to attack enemy units in the messenger’s way.
2014-03-26 18:06:36 -07:00
mattsc
9e6b780306 ai_helper.get_closest_location(): fix bug with tags in SLF
The way how the Standard Location Filter was dealt with only worked
with keys, not tags.
2014-03-26 18:03:50 -07:00
mattsc
f417faa2d5 Move path to Micro AI candidate actions files into variable
The purpose of this commit (and the previous) is to make it easier for
UMC authors to add functionality to the Micro AIs.
2014-03-25 08:09:49 -07:00
mattsc
5df117161a Move Micro AI auxiliary functions into their own file 2014-03-25 07:59:29 -07:00
mattsc
76bcdae73c Messenger MAI: add optional [filter_second] tag
This allows selection of the escort units.
2014-03-25 06:32:58 -07:00
Nils Kneuper
bbdf3a16de updated Greek translation 2014-03-22 09:27:56 +01:00