Made units with the 'healthy' trait always rest heal...

...but take normal damage from poison.
This commit is contained in:
Gunter Labes 2009-09-21 00:26:04 +00:00
parent 5e3fe2fd5c
commit 0f03c1f8dc
6 changed files with 21 additions and 17 deletions

View file

@ -6,12 +6,13 @@ Version 1.7.5+svn:
* Added recall capabilities to default ai.
* Added recall formula ai function and ai.recall_list formula ai attribute.
* Modified default ai recruitment to recall good units from recall list.
* Modified default ai recruitment to consider enemy potential recruits during recruitment.
* Modified default ai recruitment to consider enemy potential recruits
during recruitment.
* Formula AI:
* New 'reduce()' formula function
* Graphics:
* New portraits for Merman Spearman, Bat, Merman Netcaster, Nightgaunt, Spectre,
Shadow
* New portraits for Merman Spearman, Bat, Merman Netcaster, Nightgaunt,
Spectre, Shadow
* Added a couple of missing frames for the Inferno Drake
* Language and i18n:
* Updated translations: Czech, Dutch, Estonian, Finnish, French, German,
@ -24,6 +25,8 @@ Version 1.7.5+svn:
* Fixed bug #14239 (check_fogged ignored by sound sources)
* Implemented FR #14246 (check_shrouded= for sound sources)
* Units:
* Made units with the 'healthy' trait always rest heal but take normal
damage from poison.
* Changed the Drake Glider movetype to give 40% defense almost everywhere.
* Gave the Fire Dragon 100% fire resistance.
* User interface:

View file

@ -132,13 +132,12 @@
#enddef
#define TRAIT_HEALTHY
# Units with trait Healthy get 1 more HP plus 1 per level and can move and rest in the same turn.
# They also suffer a quarter less damage from poison.
# Units with trait Healthy get 1 more HP plus 1 per level and always rest heal.
[trait]
id=healthy
male_name= _ "healthy"
female_name= _ "female^healthy"
description= _ "Can rest while moving, takes a quarter less poison damage"
description= _ "Always rest heals"
[effect]
apply_to=hitpoints
increase_total=1

View file

@ -634,10 +634,9 @@ Dextrous::
inflict an additional point of damage with each arrow.
Healthy::
Renowned for their vitality, some dwarves are sturdier than others and can
rest even when traveling.
rest heal even when traveling or fighting.
Healthy units have 1 HP plus 1 HP per level more than usual and rest heal the
usual 2 HP after each turn they did not fight.
They also suffer a quarter less damage from poison.
usual 2 HP after each turn regardless.
Fearless::
Does not suffer from a negative attack bonus during its unfavorable
time of day (Heavy Infantry, Necrophage, Trolls, Walking Corpses).

View file

@ -4,12 +4,13 @@ changelog: http://svn.gna.org/viewcvs/*checkout*/wesnoth/trunk/changelog
Version 1.7.5+svn:
* AI:
* In some campaigns, such as in Legend of Wesmere, allied AI sides can now recall their veterans from earlier scenarios.
* AI will now recruit somewhat more intilligently.
* In some campaigns, such as in Legend of Wesmere, allied AI sides can now
recall their veterans from earlier scenarios.
* AI will now recruit somewhat more intelligently.
* Graphics:
* New portraits for Merman Spearman, Bat, Merman Netcaster, Nightgaunt, Spectre,
Shadow
* New portraits for Merman Spearman, Bat, Merman Netcaster, Nightgaunt,
Spectre, Shadow
* Language and translations:
* Updated translations: Czech, Dutch, Estonian, Finnish, French, German,
@ -19,7 +20,9 @@ Version 1.7.5+svn:
* New map: 4p Ruins of Terra-Dwelve.
* Units:
* Changed the Drake Glider movetype to give 40% defense almost everywhere.
* Made units with the 'healthy' trait always rest heal but take normal
damage from poison.
* Changed the Drake Glider's movetype to give 40% defense almost everywhere.
* Gave the Fire Dragon 100% fire resistance.
* User interface:

View file

@ -1805,7 +1805,7 @@ void calculate_healing(int side, bool update_display)
curing = "cured";
curer = units.end();
}
if(i->second.resting()) {
if(i->second.resting() || i->second.is_healthy()) {
rest_healing = game_config::rest_heal_amount;
healing += rest_healing;
}
@ -1826,7 +1826,7 @@ void calculate_healing(int side, bool update_display)
healers.clear();
healing = rest_healing;
if(i->second.side() == side) {
healing -= i->second.is_healthy() ? game_config::poison_amount * 3/4 : game_config::poison_amount;
healing -= game_config::poison_amount;
}
}
}

View file

@ -798,7 +798,7 @@ void unit::new_turn()
void unit::end_turn()
{
set_state(STATE_SLOWED,false);
if((movement_ != total_movement()) && !(get_state(STATE_NOT_MOVED)) && (!is_healthy_ || attacks_left_ < max_attacks_)) {
if((movement_ != total_movement()) && !(get_state(STATE_NOT_MOVED))) {
resting_ = false;
}
set_state(STATE_NOT_MOVED,false);