Add set_range in [effect]apply_to=attack

This commit is contained in:
Celtic Minstrel 2018-03-11 18:57:21 -04:00 committed by Charles Dang
parent 26e8c148b1
commit 500a7def2e
2 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,7 @@ Version 1.13.11+dev:
repeat_on_hold=yes to [default_hotkey].
* [set_variable] now supports prefix and suffix operations for
string concatenation.
* [effect]apply_to=attack now supports set_range
* Miscellaneous and bug fixes:
* Fixed standing animation toggle not taking immediate effect (bug
#1653).

View File

@ -196,6 +196,7 @@ bool attack_type::apply_modification(const config& cfg)
const std::string& set_name = cfg["set_name"];
const t_string& set_desc = cfg["set_description"];
const std::string& set_type = cfg["set_type"];
const std::string& set_range = cfg["set_range"];
const std::string& set_icon = cfg["set_icon"];
const std::string& del_specials = cfg["remove_specials"];
const config &set_specials = cfg.child("set_specials");
@ -226,6 +227,10 @@ bool attack_type::apply_modification(const config& cfg)
type_ = set_type;
}
if(set_range.empty() == false) {
range_ = set_range;
}
if(set_icon.empty() == false) {
icon_ = set_icon;
}