Fix a bug where getting a mutation that restricts equipment slots could cause permanent stat loss by subtracting the stat bonuses from a piece of equipment being removed twice.
BRSLHEHFPOELD2WMSTMLKMU2PWQTEP6NLFJQWFSCTVEYBCYIFHCAC for (int i = 0; i < 3; ++i)
// Don't run this loop if we lost some equipment slots since// removing armour with stat modifiers makes the value of new_modifier// below different from the previously recorded value, and the// remove_one_equip call chain already does stat change from// removing items correctly. -caoif(!modified_eq)
modify_stat(stats[i], new_modifier - modifiers[i],!stat_msg, "losing a mutation");
const int new_modifier = stat_modifier(stats[i]);if (new_modifier != modifiers[i]){modify_stat(stats[i], new_modifier - modifiers[i],!stat_msg, "losing a mutation");}