public void Mutate(GamePropertyMutation mutation, string value) { switch (mutation) { case GamePropertyMutation.Reset: SetValue(_value); break; case GamePropertyMutation.Set: SetValue(value); break; default: throw new NotSupportedException("effect cannot be applied to boolean quality"); } }
public void Mutate(GamePropertyMutation mutation, int value) { switch (mutation) { case GamePropertyMutation.Reset: SetValue(_value); break; case GamePropertyMutation.Set: SetValue(value); break; case GamePropertyMutation.Add: SetValue(_currentValue + value); break; case GamePropertyMutation.Subtract: SetValue(_currentValue - value); break; } }