fix apply_to=variation/type

apply_to=variation/type should have no effect when object were reapplied for example at unit creation. This is also the 1.12 behaviour. This also prevents infinite recursion.
This commit is contained in:
gfgtdf 2016-04-25 22:55:39 +02:00
parent 694fb9d36e
commit 067b2a872f

View file

@ -2157,7 +2157,7 @@ void unit::add_modification(const std::string& mod_type, const config& mod, bool
times --;
bool was_poisoned = get_state(STATE_POISONED);
if ((apply_to == "variation" || apply_to == "type") && no_add == false) {
if (apply_to == "variation" || apply_to == "type") {
// Apply unit type/variation changes last to avoid double applying effects on advance.
set_poisoned = false;
last_effect = effect;