19527 Commits

Author SHA1 Message Date
Elvish_Hunter
082992beed Removed sanity checks for missing variable=, [case] and value= in [switch] 2014-04-12 10:15:28 +02:00
Elvish_Hunter
c35e08dbfd Removed sanity check for missing [do] in [while] 2014-04-12 10:15:28 +02:00
mattsc
bb8c08a314 Micro AIs: standardize eval/exec function table setup 2014-04-11 17:21:58 -07:00
David Mikos
59e95ff304 Add 'elemental' trait to mudcrawler line. 2014-04-12 09:33:25 +09:30
Bär Halberkamp
70322185d4 Restored lightred and darkred TC 2014-04-11 23:46:11 +02:00
mattsc
98509aa2bf Fix a typo
I had actually introduced this typo intentionally for testing purposes
and then forgotten to remove it.  :-P
2014-04-10 10:39:12 -07:00
mattsc
c4cb6168e4 Micro AIs: avoid using formula= in SUFs
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.
2014-04-10 10:06:25 -07:00
mattsc
161470c149 Micro AIs: avoid using table.remove
It’s slow.  The inverse logic using table.insert is much faster,
especially for large tables.  Only kept table.remove in a couple places
where it doesn’t matter.
2014-04-10 07:36:45 -07:00
mattsc
a131572e09 Messenger Micro AI: minor code simplification 2014-04-10 07:36:44 -07:00
Charles Dang
3ec612b063 UtBS S6a: fixed typo in comment 2014-04-10 02:57:03 -07:00
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