mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 14:47:38 +00:00
fixed a bug which caused the slow effect being applied twice (bug #8458)
also added some extra const modifiers forgot that in 1.2 but since it's a branch I leave it as is
This commit is contained in:
parent
c0b98d5c66
commit
8cffc834fa
@ -122,6 +122,7 @@ Version 1.3-svn:
|
||||
* added dwarvish walking corpse/soulless variations
|
||||
* added a generic macro to have a standard filter for all idle anim
|
||||
* fixed a bug which prevented a Mermaid Siren picking up a storm trident
|
||||
* fixed a bug which caused the slow effect being applied twice (bug #8458)
|
||||
* user interface
|
||||
* use "Save Replay" instead of "Save Game" when asking to save a replay
|
||||
(bug #7256)
|
||||
|
@ -70,6 +70,7 @@ Version 1.3-svn:
|
||||
* Increased the HP of the Goblin Rouser from 26 to 31.
|
||||
* Increased the melee damage of the Goblin Rouser from 5-3 to 6-3.
|
||||
* Fixed a bug which prevented a Mermaid Siren picking up a storm trident.
|
||||
* Fixed a bug which caused the slow effect being applied twice.
|
||||
|
||||
* User interface
|
||||
* Users in the MP lobby can be marked as friends, and notifications received
|
||||
|
@ -1967,7 +1967,7 @@ int unit::upkeep() const
|
||||
return lexical_cast_default<int>(cfg_["upkeep"]);
|
||||
}
|
||||
|
||||
int unit::movement_cost_internal(t_translation::t_letter terrain, int recurse_count) const
|
||||
int unit::movement_cost_internal(const t_translation::t_letter terrain, const int recurse_count) const
|
||||
{
|
||||
const int impassable = 10000000;
|
||||
|
||||
@ -2000,7 +2000,7 @@ int unit::movement_cost_internal(t_translation::t_letter terrain, int recurse_co
|
||||
revert = true;
|
||||
continue;
|
||||
}
|
||||
const int value = movement_cost(*i,recurse_count+1);
|
||||
const int value = movement_cost_internal(*i,recurse_count+1);
|
||||
if(value < ret_value && !revert) {
|
||||
ret_value = value;
|
||||
} else if(value > ret_value && revert) {
|
||||
@ -2042,9 +2042,9 @@ int unit::movement_cost_internal(t_translation::t_letter terrain, int recurse_co
|
||||
return res;
|
||||
}
|
||||
|
||||
int unit::movement_cost(t_translation::t_letter terrain, int recurse_count) const
|
||||
int unit::movement_cost(const t_translation::t_letter terrain) const
|
||||
{
|
||||
int res = movement_cost_internal(terrain,recurse_count);
|
||||
const int res = movement_cost_internal(terrain, 0);
|
||||
if(utils::string_bool(get_state("slowed"))) {
|
||||
return res*2;
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ class unit
|
||||
bool is_flying() const { return flying_; }
|
||||
bool is_fearless() const { return is_fearless_; }
|
||||
bool is_healthy() const { return is_healthy_; }
|
||||
int movement_cost(t_translation::t_letter terrain, int recurse_count=0) const;
|
||||
int movement_cost(const t_translation::t_letter terrain) const;
|
||||
int defense_modifier(t_translation::t_letter terrain, int recurse_count=0) const;
|
||||
int resistance_against(const attack_type& damage_type,bool attacker,const gamemap::location& loc) const;
|
||||
// std::map<terrain_type::TERRAIN,int> movement_type() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user