Remove [effect]apply_to=attacks_left due to not being very useful
This commit is contained in:
parent
8fc2c7cc1f
commit
db9aae730a
2 changed files with 1 additions and 16 deletions
|
@ -48,7 +48,7 @@ Version 1.13.1+dev:
|
|||
dialog.
|
||||
* Added new possibilities for [effect]:
|
||||
* apply_to=alignment - change a unit's alignment
|
||||
* apply_to=max_attacks, apply_to=attacks_left - change a unit's attacks per turn
|
||||
* apply_to=attacks_left - change a unit's attacks per turn
|
||||
* apply_to=recall_cost - change a unit's recall cost
|
||||
* apply_to=vision, apply_to=jamming - change a unit's vision/jamming points
|
||||
* apply_to=new_advancement - add new advancement possibilities (either units
|
||||
|
|
15
src/unit.cpp
15
src/unit.cpp
|
@ -1982,21 +1982,6 @@ void unit::add_modification(const std::string& mod_type, const config& mod, bool
|
|||
if(new_align.parse(effect["set"])) {
|
||||
alignment_ = new_align;
|
||||
}
|
||||
} else if (apply_to == "attacks_left") {
|
||||
const std::string &increase = effect["increase"];
|
||||
const std::string &set = effect["set"];
|
||||
|
||||
if(set.empty() == false) {
|
||||
if(set[set.size()-1] == '%') {
|
||||
attacks_left_ = lexical_cast_default<int>(set)*max_attacks_/100;
|
||||
} else {
|
||||
attacks_left_ = lexical_cast_default<int>(set);
|
||||
}
|
||||
}
|
||||
|
||||
if(increase.empty() == false) {
|
||||
attacks_left_ = utils::apply_modifier(attacks_left_, increase, 1);
|
||||
}
|
||||
} else if (apply_to == "max_attacks") {
|
||||
const std::string &increase = effect["increase"];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue