mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-02 16:36:58 +00:00
Allow effect to toggle the zoc
[effect] apply_to=zoc value=<new value> [/effect]
This commit is contained in:
parent
a481843d64
commit
7ee3b19d34
@ -26,6 +26,7 @@ Version 1.3.1+svn:
|
||||
* all [store_*] tags get a default variable name
|
||||
* use complex variable substitution almost everywhere
|
||||
* new key for [set_variable], literal=, to avoid variable substitution
|
||||
* [effect] can now toggle the zoc
|
||||
* Misceleanous bug fixes
|
||||
* a unit that dies while attacking will now correctly play it's own death
|
||||
sounds
|
||||
|
@ -2571,7 +2571,12 @@ void unit::add_modification(const std::string& type, const config& mod,
|
||||
if (ap) {
|
||||
mod_mdr_merge(*mv, *ap, !utils::string_bool(replace));
|
||||
}
|
||||
}else if (apply_to == "image_mod") {
|
||||
} else if (apply_to == "zoc") {
|
||||
const std::string& zoc_value = (**i.first)["value"];
|
||||
if(!zoc_value.empty()) {
|
||||
emit_zoc_ = lexical_cast_default<int>(zoc_value);
|
||||
}
|
||||
} else if (apply_to == "image_mod") {
|
||||
LOG_UT << "applying image_mod \n";
|
||||
std::string mod = (**i.first)["replace"];
|
||||
if (!mod.empty()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user