Ignacio R. Morelle
57ae45387a
New Year copyright update
2015-01-01 19:07:35 -03:00
Ignacio R. Morelle
a4f47a63c7
New Year copyright update
2014-01-01 02:08:52 -03:00
Eric S. Raymond
043c4f9fd3
Remove $Id$ cookies.
2013-03-26 21:41:37 -04:00
Mark de Wever
43b71f2ff0
New year copyright update.
2013-01-01 09:22:03 +00:00
Mark de Wever
5d3e36b2ff
Let operator= return a reference.
...
Issue found by cppcheck.
2012-11-03 15:08:45 +00:00
Steven Panek
c2cb357a48
'favour' -> 'favor', 'colour' -> 'color', 'behaviour' -> 'behavior'...
...
...in the source code.
2012-09-23 22:16:02 +00:00
Ignacio R. Morelle
6ca69b2df5
New year copyright update
2012-01-07 02:35:17 +00:00
Mark de Wever
8ef22b2269
Let operator++() return a reference.
2011-09-28 19:21:16 +00:00
Mark de Wever
5e5ebdad23
Add missing copyright headers.
2011-06-05 09:31:11 +00:00
Mark de Wever
43faecf73c
Remove an unneeded explicit keyword.
2011-06-05 09:26:17 +00:00
Mark de Wever
79a08559bf
Make some constructors explicit.
2011-06-02 11:53:15 +00:00
Mark de Wever
f873fd0bb2
Fixes issues with singular variant iterators.
...
The variant_iterator class used singular iterators in several cases,
which lead to undefined behaviour. The following changes have been made:
- Removed variant::get_iterator() it always returned singular iterators,
also updated all callers.
- Fixed construction and copying in variant_iterator to not copy
singular iterators.
- Added doxygen comment.
2011-06-02 11:53:12 +00:00
Mark de Wever
9c17a7586d
Remove an unneeded include.
2010-10-26 21:37:48 +00:00
Alexander van Gessel
6ff8ec8748
Make type_error and parse_error inherit from game::error
2010-08-07 02:21:29 +01:00
Mark de Wever
4b8f17ceb3
Pass parameter by const ref instead of const value.
...
Issue found by cppcheck.
2009-10-02 19:25:06 +00:00
Iurii Chernyi
fd7f9970a5
ai.recall_list formula ai property, which allows to get access...
...
...to the recall list
2009-09-17 18:23:27 +00:00
Mark de Wever
671b0b256c
Strip trailing whitespace.
2009-08-29 18:46:38 +00:00
Bartek Waresiak
debc721016
New formula functions: as_decimal, ceil, floor, round
2009-08-14 23:43:33 +00:00
Bartek Waresiak
b1baf2e36f
Added fixed-point arythmetic for formula language
2009-08-14 12:35:36 +00:00
Bartek Waresiak
3bb651f0f4
Added safe_call() formula function...
...
...that allows execution of 'backup formula' in case of failure, made
formula check for action result and return appriopriate error number
in case of error. It's still a bit WIP, but it should be good enough
for now
2009-07-11 10:27:12 +00:00
Bartek Waresiak
5a720bcb1d
Added operators: .+ .- .* ./ for formula language
2009-07-04 21:16:39 +00:00
Bartek Waresiak
c50c39edc6
Made debug_print print complete info to the console
2009-06-24 09:09:05 +00:00
Mark de Wever
973a0a7d5c
Remove trailing whitespace.
2009-01-01 10:28:26 +00:00
Bartek Waresiak
0c37c667e3
[[Engine improvements]]
...
* added variant_iterator to iterate over variant elements
* added key_value_pair class, used while iterating over variant_list and
variant_map type
* fixed bug in map, filter and find formula functions, which caused game to
crash when optional parameter was specified and self was used within a
function formula
* changed choose, filter, find and map funcions, to use new variant_iterator
so they work for both variant_lists and variant_maps now
* added tolist formula function
2008-06-28 08:47:15 +00:00
Bartek Waresiak
664cf01cc7
New formula AI function: unit_chooser
2008-05-21 18:23:55 +00:00
Mark de Wever
7e993d3f78
Make sure #include "variant.hpp" can be used...
...
...without the need to include more items.
Cleaned a duplicate in variant.cpp.
2008-04-12 09:31:59 +00:00
Bartek Waresiak
43a4d8a62a
Added new formula functions: keys() and values()
...
Added support for [] operator, examples:
[1, 2, 3][0] returns 1,
{'elf' -> 1, 'orc' -> 2}['orc'] returns 2
2008-04-10 22:11:46 +00:00
Bartek Waresiak
980047b054
Add support for a map to the formula system
...
Syntax:
{ 'elvish fighter' -> 40, 'elvish archer' -> 30 }
Changed comments in the formula system from
{ text of a comment } to # text of a comment #
2008-04-09 18:36:16 +00:00
David White
a86d16a8db
fixed behavior of map function
2008-04-02 05:33:53 +00:00
Benoît Timbert
584c664cba
Fix some svn properties (eol style=native; keyword substitution)
2008-03-09 16:41:10 +00:00
Patrick Parker
cf8a968a75
make formula_ai compile for some outdated compilers
2008-03-05 04:44:48 +00:00
Bartek Waresiak
117f16f8ec
Added missing variant destructor
2008-02-28 22:49:04 +00:00
David White
1be59961e3
changes to improve formula AI
2008-02-23 16:38:09 +00:00
David White
d9d5905b69
added very basic AI which uses the formula AI
2008-02-03 18:59:40 +00:00
David White
5c0df60c23
initial branch changes
2008-01-28 03:04:25 +00:00