예제 #1
0
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));
}
예제 #2
0
void monster::add_effect(monster_effect_type effect, int duration)
{
    effects.push_back(monster_effect(effect, duration));
}