Basic Trope: A character does incredibly unwise things and plays it off by stating that they're adhering to a code of honor.
Straight: Alice has the chance to ambush and kill Emperor Evulz for good, but decides against it because she finds sneak attacks dishonorable.
Exaggerated: Alice has a ridiculously specific code of honor, to the point where she's almost ineffective as a hero.
Downplayed: Alice believes in putting honor before reason, but she is usually smart enough to arrange matters so she doesn't have to choose.
Alice doesn't like being dishonorable - she'd rather get killed.
Alice is a Paladin or other person who gains their powers through honor.
Alice was shown a prophecy by the Oracle of Delphi, stating that if she becomes the Rebel Leader than her rebellion will commit so many atrocities that the UN will step in and arrest Alice for genocide and crimes against humanity. Her honor system is a way of saying Screw Destiny.
Discussed: "Emperor Evulz! Turn around, I want you to see this one coming!"
"Alice had a clear shot at the Emperor, just one pull of the trigger and they'd be scraping his brains off the carpet, but she wouldn't shoot him". "Why not?" "Because she only saw the back of his head, and Alice never attacks a guy when he has his back turned to her".
Emperor Evulz repeatedly invokes Alice's code of honor, to the point where she's not able to fight back and he successfully kills her.
Alice has a code of honour and lives by it extremely strictly, but is capable of manipulating events so that she can avoid doing something she doesn't want to and still upholding her moral code. For example, avoiding killing Emperor Evulz while he's unarmed and defenceless, and ensuring that her LancerBob gets the kill. That way, Evulz is dead and unable to bring harm upon the world ever again, the day is saved, and since she didn't landing the killing blow, her code is upheld.