void monster::add_effect(monster_effect_type effect, int duration) { for (int i = 0; i < effects.size(); i++) { if (effects[i].type == effect) { effects[i].duration += duration; return; } } effects.push_back(monster_effect(effect, duration)); }
void monster::add_effect(monster_effect_type effect, int duration) { effects.push_back(monster_effect(effect, duration)); }