mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-27 11:19:40 +00:00
fix weapon abilities showed in void attack in attack dialog window
if by example, formation affect a dark Adept, and he is defender, then formation name appear in defender attack.(if name and description of formation in chance_to_hit abilities) (cherry picked from commit 0728ae834e7766d885aedb2b57aae2abcca7d38d)
This commit is contained in:
parent
71ebc1ced7
commit
6b88cfa755
@ -116,7 +116,8 @@ void unit_attack::pre_show(window& window)
|
||||
);
|
||||
|
||||
std::string attw_specials = attacker_weapon.weapon_specials(true, attacker.backstab_pos);
|
||||
std::string defw_specials = defender_weapon.weapon_specials(true);
|
||||
bool defender_attack = !(defender_weapon.name().empty() && defender_weapon.damage() == 0 && defender_weapon.num_attacks() == 0 && defender.chance_to_hit == 0);
|
||||
std::string defw_specials = defender_attack ? defender_weapon.weapon_specials(true) : "";
|
||||
|
||||
if(!attw_specials.empty()) {
|
||||
attw_specials = " " + attw_specials;
|
||||
|
Loading…
x
Reference in New Issue
Block a user