Commit graph

105 commits

Author SHA1 Message Date
mattsc
4b6681a300 Do not load helper.lua where it is not used any more 2018-05-13 20:53:01 -07:00
mattsc
1684e2f5da Remove unnecessary inclusions of helper.set_wml_action_metatable {} 2018-05-13 20:52:51 -07:00
mattsc
08a000a7da Lua code: remove deprecated helper.set_wml_var_metatable() call
It’s not needed here.
2018-05-13 20:52:40 -07:00
mattsc
f1764d182f Lua code: replace deprecated wesnoth.get_variable() calls 2018-05-13 20:03:34 -07:00
Charles Dang
33725add8f Data/AI: wmlindent run
[ci skip]

Addresses some of the whitespace issues noted in #2613.
2018-03-09 11:07:23 +11:00
mattsc
cfb2aa8050 AIs: idle_ai is not a "Dev AI", fixes #1955
As indicated in the comment of the idle_ai config file, an AI needs to
contain at least one stage, otherwise the default AI will be injected
under certain circumstances. Unlike indicated in the comment, this now
also applies to loading a mid-scenario save. (I will add that to the
comment in the next commit.)

As this AI was in data/ai/dev/, it was previously only loaded when
Wesnoth was started in debug mode. The config was thus not available
when playing in no-debug mode, causing the default AI to be injected on
reload. This caused issue #1955.

While not strictly necessary, we keep a redirect in data/ai/dev for
backward compatibility, in case the file is included in add-ons.
2017-10-04 16:48:08 -07:00
mattsc
ba6973f543 High XP Attack CA test scenario: use new syntax for [option] 2016-10-17 17:59:02 -07:00
mattsc
d781e6263a High XP attacks: adapt other AIs to existence of new CA
This means:
1. Adding the new CA to AI configs
2. Removing it whenever the combat CA is removed
3. Preventing conflicts for AIs that previously used overlapping scores
2016-09-03 20:00:12 -07:00
mattsc
f76e2d0c59 High XP attack CA: remove a debug message
Also remove a related message from the test scenario.
2016-09-03 16:47:15 -07:00
mattsc
6950ee1dd0 New high_xp_attack candidate action for default AI
This CA performs attacks on enemy units so close to leveling that the
default AI's combat CA would not attack them (with some exceptions).
This is meant to keep players from being able to exploit this known
weakness of the default AI.
2016-09-02 20:22:17 -07:00
mattsc
91130a3df2 Fix error in Formula AI test scenario 2016-03-30 07:33:37 -07:00
Celtic Minstrel
678444133e Suppress end turn confirmation in all interactive test scenarios 2016-03-27 15:13:24 -04:00
Celtic Minstrel
ba5eb7bc91 Move some AI test scenarios from data/ to data/ai/scenarios/
(And update them to modern syntax)
2016-03-27 15:13:23 -04:00
mattsc
df5714801c AI Arena: fix the menus 2016-03-25 14:15:34 -07:00
mattsc
09ee5c7a4b AI Arena: update [option] tags to new syntax 2016-03-25 13:58:52 -07:00
mattsc
202aa804bb AI Arena: remove akihara_recruitment test
Since akihara_recruitment has been removed.
2016-03-24 19:34:12 -07:00
Celtic Minstrel
d48060bc00 Fix external Lua CA example for new syntax 2016-03-24 17:49:02 -04:00
mattsc
dd2d193cbd Remove move_to_targets test scenario
This was useful when the composite AI was introduced (in Wesnoth 1.7),
but does not serve a purpose any more now.
2016-03-24 10:56:45 -07:00
mattsc
be505342bf Lua AI test scenarios: rename files 2016-03-24 08:16:03 -07:00
mattsc
5774872e04 Lua AI test scenarios: update id= and name= keys 2016-03-24 08:09:59 -07:00
mattsc
961d134ee2 Fix and simplify Lua AI test scenario 2016-03-24 08:07:01 -07:00
Celtic Minstrel
9c2027a8d8 Remove version key from AI configs
This has a lot of cascade effects and may remove support for some old syntaxes, such as [protect_unit].
2016-03-22 07:22:22 -07:00
Celtic Minstrel
9859091c7c Convert test scenario maps to new format 2015-10-07 14:19:48 -04:00
mattsc
c0ee2c8e87 Add wmllint spelling exceptions for files in data/ai/ 2013-11-02 20:20:10 -07:00
Espreon
3f20785d02 Split all of the AI-related strings (except for the AI controller's) into a new 'wesnoth-ai' textdomain. Includes a pot-update for 'wesnoth' as a side effect. 2013-05-22 22:19:43 -04:00
Espreon
edcf801caa Ran wmlindent. 2013-05-22 22:19:42 -04:00
Espreon
cadb752ccf Made various strings translatable; disambiguated and split some strings; eliminated an Earth name. 2013-05-22 22:19:42 -04:00
Espreon
5203d7d7b5 Filter for id instead of name; converted some tabs to spaces. 2013-05-22 18:02:43 -04:00
Matthias Schoeck
665fe20f79 AI Arena test scenario: minor changes to two messages
In order to make wmllint happy: add wesnoth-icon.png as image
to two messages and change the way one message is wrapped.
2013-03-04 21:11:29 +00:00
Matthias Schoeck
1c5a1aeba4 AI test scenarios: Add missing translation marks
As found by wmllint
2013-03-04 20:48:27 +00:00
Matthias Schoeck
4410fd190f AI test scenario files: remove trailing whitespaces 2013-03-04 20:40:01 +00:00
Alexander van Gessel
f4ab3722dc Apply patch #3570 by mattsc 2012-11-26 23:50:17 +01:00
Dmitry Kovalenko
51e818b43b LuaAI: wesnoth.debug_ai() slightly refactored,
...now provides access to the ai.* table, the Lua engine table and the
component tree
2012-08-14 07:26:58 +00:00
Dmitry Kovalenko
83d0e06ee8 AI: exposure of the component tree to the AI developers in debug mode 2012-08-06 17:22:47 +00:00
Riss Aline
104a28654d Adding new files concerning new AI...
...(ai/akihara/recruitment.?pp) and new scenario for the ai_arena_small.
2012-07-13 08:38:01 +00:00
Dmitry Kovalenko
b207a1b1ca LuaAI: the need to define an engine is now deprecated.
All CAs can be store in external .lua files. If the scenario config
lacks an [engine] tag for the Lua AI engine, but still tries to use CA
with engine=lua, a dummy engine will be automatically generated,
providing the needed functionality
2012-06-12 12:36:06 +00:00
Dmitry Kovalenko
a72febe0e4 LuaAI: first draft of the external candidate action system,
...with on-the-fly file reloading, if you use the --debug-lua launch argument
2012-06-07 09:53:19 +00:00
Dmitry Kovalenko
57aa197583 LuaAI:
(1) Lua CA_wrapper slightly refactored, in preparation for adding CA
definitons using external files

(2) --debug_lua command line argument added. Unused at the moment, but
will be used for Lua debug mechanisms
2012-06-01 12:57:14 +00:00
Dmitry Kovalenko
d7f6b2c26e LuaAI: fixed bug that always cause ai.attack() to use -1 as the weapon 2012-05-30 13:15:47 +00:00
Dmitry Kovalenko
e810953bea Removed an unneeded function introduced in 2012-04-16T20:49:02Z!nephro.wes@gmail.com 2012-04-17 19:30:15 +00:00
Dmitry Kovalenko
f54f2b0e75 LuaAI:
(1) added wesnoth.is_debug_mode();

(2) disabled the LuaAI debug library usage for non-debug launch modes
2012-04-16 20:49:02 +00:00
Dmitry Kovalenko
8f99e3f995 LuaAI: created some debug methods
ai.debug will be registered by stdlib on demand
2012-04-15 16:33:36 +00:00
Dmitry Kovalenko
a7604b5bf0 LuaAI: exposed action checker functions 2012-04-15 09:43:23 +00:00
Dmitry Kovalenko
b9f9e29a0b LuaAI:
(1) fixed some naming inconsistencies;

(2) hidden some methods to the cache table, so that they don't lie
around unused in the ai table
2012-04-12 17:48:34 +00:00
Dmitry Kovalenko
175d0a84f5 LuaAI: rewired caching functions to ai.get_*() instead of ai.get_cached_*() 2012-04-11 17:05:09 +00:00
Dmitry Kovalenko
0c238ef35c LuaAI: added missing field from the attacks vector 2012-04-10 15:19:39 +00:00
Dmitry Kovalenko
65a50eb638 LuaAI: attacks in the attacks vector now have a rating() function 2012-04-09 22:25:53 +00:00
Dmitry Kovalenko
51fd066a51 LuaAI: exposed the attacks() vector values 2012-04-09 15:34:03 +00:00
Dmitry Kovalenko
2adbf5ae5f Refactored the move map structuring when exposed to LuaAI 2012-04-08 23:54:34 +00:00
Dmitry Kovalenko
9ddd3d4408 [[lua AI fixes]]
(1) First draft of the caching system for LuaAI. (2) Added validation
variables and setters/getters in the ai contexts, to allow LuaAI cache
check the movemaps for validity
2012-04-08 00:00:14 +00:00