Colours in the Steel by K.J. Parker
Triple-walled Perimadeia is one of the richest city-states in the world, famed for its teeming markets and its impregnable defences. After decades of trying fruitlessly to take the city, one of the plains tribes comes up with an ingenious idea: send one of their own to get a job in the city arsenal and learn its secrets from the inside. Even as an ambitious young chieftain's son plans the most audacious siege in history, life in the city goes on. Bardas Loredan, a former soldier, now works as a defence advocate. In the courts of Perimadeia cases are settled through swordplay and Bardas is very good at what he does...until a vengeful young woman hires the city's Patriarch to curse him. Colours in the Steel was originally published in 1998 and was the debut novel by the enigmatic K.J. Parker. It's also the first in The Fencer Trilogy , although it also works quite well as a stand-alone book. It can be best described as a sort-of anti-epic fantasy. The trappings of much of th...