In attack modification [effect]s:

- set_name no longer change the weapon description

- set_description (new key) change the weapon description
This commit is contained in:
Benoît Timbert 2007-03-13 10:32:45 +00:00
parent d9c9103aa6
commit 2ed280e8af
2 changed files with 8 additions and 2 deletions

View file

@ -39,6 +39,8 @@ Version 1.3.1+svn:
* [effect] can now toggle the zoc
* new key for [variable], boolean_equals=, to test boolean equality
* remove some old backward compatibility support
* set_name in attack modification [effect] no longer change the weapon's
description, use the new set_description instead
* user interface:
* new sounds for user interface events
* added the option to show warnings about deprecated WML usage

View file

@ -128,7 +128,8 @@ bool attack_type::apply_modification(const config& cfg,std::string* description)
if(!matches_filter(cfg,0))
return false;
const t_string& set_name = cfg["set_name"];
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& del_specials = cfg["remove_specials"];
const config* set_specials = cfg.child("set_specials");
@ -140,10 +141,13 @@ bool attack_type::apply_modification(const config& cfg,std::string* description)
std::stringstream desc;
if(set_name.empty() == false) {
description_ = set_name;
id_ = set_name;
}
if(set_desc.empty() == false) {
description_ = set_desc;
}
if(set_type.empty() == false) {
type_ = set_type;
}