mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 14:24:15 +00:00
Add [effect]apply_to=jamming
This commit is contained in:
parent
d685bea4aa
commit
aa60b9451a
21
src/unit.cpp
21
src/unit.cpp
@ -1795,6 +1795,19 @@ void unit::add_modification(const std::string& mod_type, const config& mod, bool
|
||||
}
|
||||
|
||||
vision_ = effect["set"].to_int(vision_);
|
||||
} else if(apply_to == "jamming") {
|
||||
const std::string &increase = effect["increase"];
|
||||
|
||||
if(increase.empty() == false) {
|
||||
if (!times) {
|
||||
description += utils::print_modifier(increase) + " " +
|
||||
t_string(N_("jamming"), "wesnoth");
|
||||
}
|
||||
|
||||
jamming_ = utils::apply_modifier(jamming_, increase, 1);
|
||||
}
|
||||
|
||||
jamming_ = effect["set"].to_int(jamming_);
|
||||
} else if(apply_to == "experience") {
|
||||
const std::string &increase = effect["increase"];
|
||||
const std::string &set = effect["set"];
|
||||
@ -2035,7 +2048,13 @@ void unit::add_modification(const std::string& mod_type, const config& mod, bool
|
||||
const std::string &increase = effect["increase"];
|
||||
|
||||
if(increase.empty() == false) {
|
||||
description += utils::print_modifier(increase) + t_string(N_(" see"), "wesnoth");
|
||||
description += utils::print_modifier(increase) + t_string(N_(" vision"), "wesnoth");
|
||||
}
|
||||
} else if(apply_to == "jamming") {
|
||||
const std::string &increase = effect["increase"];
|
||||
|
||||
if(increase.empty() == false) {
|
||||
description += utils::print_modifier(increase) + t_string(N_(" jamming"), "wesnoth");
|
||||
}
|
||||
} else if(apply_to == "max_experience") {
|
||||
const std::string &increase = effect["increase"];
|
||||
|
Loading…
x
Reference in New Issue
Block a user