51457 Commits

Author SHA1 Message Date
J. Tyne
7c67404a10 Make some variables names more consistent...
...by using the name "type" only when dealing with an actual unit_type
object.
2013-01-14 17:23:55 +00:00
J. Tyne
21eaf5e35f No need to convert a unit type to its ID...
...so that we can search for a unit type with that ID -- just use the
unit type we already have.
2013-01-14 14:13:10 +00:00
J. Tyne
4fc92ade45 Remove an unused variable. 2013-01-14 02:03:55 +00:00
Charles Dang
3c1b40e1b2 Added myself to credits 2013-01-14 01:49:15 +00:00
J. Tyne
e7d28c0211 Punctuate a comment. 2013-01-13 21:40:19 +00:00
J. Tyne
f703943dec Convert a simulated hash map to boost::unordered_map.
This is a @todo that was pending BfW requiring Boost 1.35 or
preferably 1.36.
2013-01-13 21:39:25 +00:00
Simon Forsyth
dd7045ddb5 Allow SoF to continue after gathering materials (bug reported in forums) 2013-01-13 21:28:12 +00:00
Fabian Müller
44a453da3e Report the unit's vision value in the sidebar. 2013-01-13 20:11:15 +00:00
Fabian Müller
06269beeaf Support for vision in [unit], previously it worked only in [unit_type]. 2013-01-13 20:00:58 +00:00
Fabian Müller
ed41ff9803 Report for the unit's vision value. 2013-01-13 19:41:10 +00:00
Simon Forsyth
3afbd449ba Do not count regenerating units without moves...
...as having moves in healer support micro AI
2013-01-13 03:54:17 +00:00
Simon Forsyth
1ea4ff0f26 Add healer support micro AI to experimental multiplayer AI 2013-01-12 23:31:59 +00:00
Boldizsár Lipka
5cca2a1988 Don't show 'Toggle planning mode' option for observers 2013-01-12 23:08:17 +00:00
Simon Forsyth
d09dc44505 Promote lurker and Mefisto in Art contributions section...
...in recognition of the large amount of terrain artwork they have
done recently
2013-01-12 22:30:24 +00:00
Fabian Müller
921c415651 Test case for modifing the vision range. 2013-01-12 21:26:24 +00:00
Matthias Schoeck
ffe0ab21ad Initialize side and replay data so that replays work for MP games...
...launched from the command-line with the -m option.  This fixes bug
#19877.  The code paths for command-line and lobby MP games are
entirely separate, so this has no effect on lobby games.
2013-01-12 05:12:59 +00:00
Fabian Müller
50bc8adb08 Nulling resources pointers in the editor_controller's destructor.
At least fixing some of the segfaults mentioned in bug #20409.
2013-01-11 22:24:41 +00:00
Boldizsár Lipka
84d257f90f Credit irker in about.cfg 2013-01-10 18:06:10 +00:00
Mark de Wever
68fcaf664a Add copyright headers. 2013-01-09 19:57:01 +00:00
Mark de Wever
e5b193d1e9 Fix a missing new year update. 2013-01-09 19:56:57 +00:00
Mark de Wever
c7900949eb Fix a signed vs. unsigned comparison warning. 2013-01-09 18:48:31 +00:00
Matthias Schoeck
0215fd9bd9 Update changelog to reflect leader_shares_keep CA renaming 2013-01-09 17:23:26 +00:00
Matthias Schoeck
ce6ee7e586 Rename passive_leader_shares_keep candidate action to leader_shares_keep.
This CA is on by default, dealing with a passive leader is only a
special case.  The old syntax still works for backward compatibility
(for both CA and macros).
2013-01-09 17:18:45 +00:00
Matthias Schoeck
f6cfcb9822 Fix AI bug in passive_leader_shares_keep candidate action.
When the AI leader moves off the keep for an ally leader and doesn't
have full moves left, it was previously not checked that the goal hex
is within reach of the leader.
2013-01-09 02:14:23 +00:00
Simon Forsyth
7df1b138e3 Update copyright string for Xcode project 2013-01-06 06:44:06 +00:00
J. Tyne
110484bca6 Add a variant on parenthetical_split() to helper.lua...
...and use it to fix bug #20401.

If no problems are found with this approach, I can backport it to stable.
2013-01-05 23:47:53 +00:00
Simon Forsyth
8c0f21f9eb Consider regenerating units as effectively unpoisonable 2013-01-05 21:19:38 +00:00
J. Tyne
26c993207b Convert some WML macros and lua functions to use...
...unpoisonable/undrainable instead of not_living.

One remaining use of "not_living" is in the feeding ability.
2013-01-05 18:16:02 +00:00
J. Tyne
ee19578fc4 Suppress the level-up animation when [transform_unit] is used...
...to transform a unit to its normal advancement (for consistency with
transforming to a specified type).
2013-01-05 17:56:39 +00:00
J. Tyne
01c20ecea5 Make it a default to remove poison from immune units.
This impacts wesnoth.transform_unit, [effect]apply_to=type, and
[effect]apply_to=variation.  If desired, the poisoned state can still
be explicitly set for immune units; this change only affects default
behavior, making it correspond better to the core rules.
2013-01-05 17:46:59 +00:00
J. Tyne
c4f81f2ebf More regular enforcement of maximum hit points.
This impacts [transform_unit], [effect]apply_to=type,
[effect]apply_to=variation, and wesnoth.transform_unit().
2013-01-05 15:12:25 +00:00
J. Tyne
7b0a480254 Make Lua's wesnoth.transform_unit() function preserve hit points.
This is actually simpler to implement and is more consistent with the
[transform_unit] tag.  Plus, the wiki documentation for
wesnoth.transform_unit() does not state that the hit points definitely
will be changed (it's a bit vague on that point), so this is
consistent with the existing documentation.
2013-01-05 14:53:05 +00:00
J. Tyne
e8796a8279 Have unit::advance_to() no longer change the unit's current hit points.
This was overridden more often than not anyway, and the code is
overall simpler without hit points being changed by this function.
2013-01-05 14:11:53 +00:00
J. Tyne
391198f281 Expire modifications (which might affect max movement)...
...before restoring movement and attacks in unit::new_turn().
2013-01-05 00:18:35 +00:00
J. Tyne
73a54cfae1 Merge the code for expiring effects.
I hope this is adequate for future growth (specifically, for when
someone implements objects that last until the unit gains a level).
2013-01-04 23:22:52 +00:00
Steven Panek
9bd93c5d60 UtBS: updated strings from wesnoth-help. 2013-01-04 20:06:25 +00:00
J. Tyne
f89139da29 Mark some constructors explicit...
...and block assignment for a noncopyable class.
2013-01-04 06:03:55 +00:00
J. Tyne
e14c1c8722 Documenting some functions. 2013-01-04 00:17:46 +00:00
J. Tyne
119d02ecbd Improve the laziness of the lazy bulding of unit types. 2013-01-04 00:09:55 +00:00
J. Tyne
273b2ccc62 Make unit_type_data::build_unit_type() public,
...and update various parts of the code to call it (instead of using
unit_type_data::find() to "find" a known unit_type).

There was one call in the editor's code where I am unsure if there are
supposed to be side effects other than building the unit_type. So I
left the code as-is and just added a comment for someone else to
evaluate later.
2013-01-03 23:29:45 +00:00
Steven Panek
c97cf24d44 Updated the Latin translation. 2013-01-03 21:54:13 +00:00
J. Tyne
c5564c1bd1 Push the logic controlling incremental building of unit types...
...into the unit_type class.
2013-01-03 21:51:06 +00:00
Elvish_Hunter
aab7c8afcf Lua: added new helper.shuffle() function 2013-01-03 13:22:15 +00:00
Elvish_Hunter
3397a38cff Lua: added new wesnoth.get_time_stamp() function 2013-01-03 13:19:16 +00:00
J. Tyne
6434e6eea9 Convert spaces to tabs. 2013-01-03 06:08:05 +00:00
J. Tyne
d374ffdf81 Relink documentation with what it documents by removing unused declaration. 2013-01-03 06:05:37 +00:00
J. Tyne
4555889028 Document and use (existing) non-empty guarantee for unit_type::genders(). 2013-01-03 05:34:46 +00:00
J. Tyne
83958a10fb Use unit_type::race() instead of getting the race id...
...then searching for a matching unit_race.
2013-01-03 05:00:38 +00:00
J. Tyne
76285dd388 Rename unit_type::race_ptr() to unit_type::race().
This is for consistency with unit::race(), as both functions return
the same kind of data.
2013-01-03 04:28:58 +00:00
J. Tyne
239b4e30b4 Rename unit_type::race() to unit_type::race_id().
This is for more consistent naming of functions (this function returns a string,
while unit::race() returns a pointer to unit_race).
2013-01-03 03:07:03 +00:00