new value "portrait" for apply_to= in [effect]

This commit is contained in:
Patrick Parker 2007-04-11 23:42:26 +00:00
parent e97e014266
commit 95e9b4ed3c
2 changed files with 3 additions and 0 deletions

View file

@ -73,6 +73,7 @@ Version 1.3.1+svn:
* use complex variable substitution almost everywhere
* new key for [set_variable], literal=, to avoid variable substitution
* [effect] can now toggle the zoc
* [effect] can now apply new portrait images
* 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

View file

@ -2403,6 +2403,8 @@ void unit::add_modification(const std::string& type, const config& mod,
wassert(gamedata_ != NULL);
const game_data::unit_type_map::const_iterator var = gamedata_->unit_types.find(id());
advance_to(&var->second.get_variation(variation_));
} else if(apply_to == "portrait") {
cfg_["profile"] = (**i.first)["image"];
} else if(apply_to == "new_attack") {
attacks_.push_back(attack_type(**i.first,id(),image_fighting((**i.first)["range"]=="ranged" ? attack_type::LONG_RANGE : attack_type::SHORT_RANGE)));
} else if(apply_to == "remove_attacks") {