Ordinary war has rules. You can't go around killing innocents, you can't kill medics, you probably can't rape villagers or set fire to villages (at least not without orders), and you can't use certain weapons. After the first World War, hollow point bullets, some types of gas, possibly barbed wire, and in general much of the methods employed in that war were outlawed. For more information on the weapons that can't be used, see the other Wiki.
Now, what happens when you have a fantasy setting? There are obviously rules of magic, making certain spells impossible (such as resurrection in an All Deaths Final setting). But in a war, the must be certain rules, or people would be doing unthinkable things in a battlefield with nothing to stop them. For weapons, the rules are possibly the same as above (with the change that there is a larger likelihood of having swords than guns), so this will mainly discuss magical laws.
The Great Houses in Dune have Kanly, a set of laws enforced by the emperor's Sardaukar. The big ones include having a legitimate grievance against the opposing house, and no use of atomics on humans.
Honor Harrington has the Eridani Edict, which requires attacking fleets to take out all orbital ships and structures and offer an opportunity to surrender before bombarding a planet.
Traveller has the Imperial Rules of War, which are an unwritten guideline as to how Imperial vassals will settle difficulties between them. Basically they boil down to, "Have fun boys, but don't make to much of a mess because The Emperor has means to punish you." "Too much of a mess" meaning no WMDs on the ground, war crimes, or excessive death and destruction.
The Inner Sphere successor states in BattleTech signed the Ares Conventions to limit civilian casualties. Rules include no nukes in atmosphere, no orbital bombardment of non-military targets, and no chemical or biological weapons. The Clans follow a more restrictive code of conduct called batchall based on highly ritualized warfare, which bit them in the back when they invaded the Inner Sphere.
In Fullmetal Alchemist (Brotherhood) one military scientist tells one of the protagonists an alternate reason why messing with human alchemy is forbidden (besides it being creepy, generally tampering with life, and the fact the Homunculi are using it as energy for their own ritual). It's also forbidden by the military, because a person could create their own invincible army to use against the state.
The anime Dog Days has rules so that their wars are more like a sporting event than actual war. They take place on special settings, and defeated creatures turn into animal balls rather than any serious injury. The thought of actually getting injured in war horrifies the people in that land.
The Antarctic Treaty in Mobile Suit Gundam, which prohibits the use of chemical, biological, atomic weapons, Colony Drops as well as stipulating that POWs be treated humanely and the rights of neutral zones be respected. Considering the wanton destruction caused prior to the Treaty, it may be there was no formal treaties between the Federation and Zeon limiting warfare before the war.
Scrapped Princess: Ginnungagap is the strongest known military grade offensive spell in their world and is so powerful that it not only requires numerous high level clerics to simultaneously cast the spell, it must be sanctioned and unanimously agreed upon, by the High Council, for use.
The Mercenaries Code in the Childe Cycle. It works much like the Geneva convention, but also provides guarantees and responsibilities of Merc officers to their men. For example, if a Officer fails to do his duty or wanton endangers his men, that officer could be court martialed and executed.
Harry Turtledove's Darkness Series is largely based on WWII. This troper hasn't read them all, but based on this fact, one can assume something similar to the Geneva Conventions.
Marion Zimmer Bradley's Darkover novels have the Compact that says any who would seek to kill must risk death in return, forbidding any type of ranged weapons. It's main purpose is preventing the use of the Darkovan psychic powers as weapons, but it also has the effect of outlawing things like bows and guns.
Less fantastical than some, but in Dune, almost the only rule of warfare is that using nukes against people is absolutely forbidden. Paul gets around this by using nukes against a mountain range, opening up a new pass to an enemy fortification.
Terran Bonding Authority in Hammers Slammers exists to enforce contracts between Mercenary companies and governments, as well as reduce or prevent atrocities.
In His Dark Materials it's mentioned that even in battle, fighters do not attack or touch each others' daemons.
Not a formal international law, but after the destruction of Suroch, New Crobuzon (from the Bas-Lag Cycle novels) shut down all of its attempts to weaponize the reality-warping force known as Torque. It's just too freakin' scary a thing to mess with, even for a city-state as ruthless as New Crobuzon.
The organized governments of the Honorverse generally abide by two sets of war rules. The Eridani Edict requires attacking fleets to take out all orbital ships and structures and offer an opportunity to surrender before bombarding a planet. This was imposed on the galaxy by the Solarian League with the threat of total annihilation of the offending government. The other set is the Deneb Accords, applied to declared wars between star nations and which amount to the Geneva Conventions IN SPACE!
In the previous Age in The Wheel of Time, both sides stopped using Balefire - a weave that erased people from existence retroactively - after reality literally started unravelling from its overuse. Thousands of years later, the weave is still banned, and Aes Sedai generally have their panties in a bunch about Rand's liberal use of it.
Orson Scott Card's Enderís Game. During the wars between the Buggers and humanity, the Buggers had never attacked a human planetary population, and the humans reciprocated by never attacking a Bugger-occupied planet. During the last battle between the Bugger and human fleets over the Bugger home planet, Ender breaks the (unspoken) rule. He uses the Little Doctor device to destroy the planet (and kill all of the Bugger Queens), thus ending the war.
The immortals of the Highlander franchise have rules against fighting each other on holy ground, and using ranged weapons to incapacitate an opponent before closing in for the kill is considered "cheating".
In the Babylon 5 'verse, mass drivers (weapons that bombard planets with large objects such as asteroids) are forbidden by treaty. In the instance where they are used in the show however, none of the other powers have the will to enforce this treaty.
On Doctor Who the Shadow Proclamation covers several scenarios (besides the ones we haven't seen yet). Convention 15 deals with the cessation of hostile activities while parley is taken. Article 57 prohibits the destruction of a Level 5 planet if no laws were broken.
In Star Trek: The Next Generation, the Treaty of Algeron defined the limits of the Romulan Neutral Zone (namely violating the Zone without adequate reason could start a war). It also prohibits the use of cloaking devices for the Federation. It proves a plot point in the episode "The Pegasus".
By DS9, the Romulans made an exception to the treaty, and loaned a cloaking device for Starfleet use, in exchange for intel on the Dominion.
Another plot-relevant agreement is the Federation-Cardassian Treaty. It establishes a Demilitarized Zone, in which no military forces could be deployed, nor bases established. It also redrew the map, which resulted in colonies landing in each other territories. The Cardassians begin the undermine the treaty, and begin to oppress former Federation citizens. The Federation, on the other hand, fear another war and end up doing little to nothing to resolve any issues.
In the Webcomic Drowtales, there used to be several unwritten rules of warfare to limit collateral damage. The most important rule was that innocent bystanders are not to be harmed. Other rules include no poisoning water supplies and no fighting in the city. When the Nidraa'chal attacked, they broke virtually every rule, shattering the existing status quo of following the rules and causing future battles to ignore those rules.
In the Webcomic Flipside, one of the kingdoms is a constitutional anarchy, running on the premise of personal responsibility. That is, the only rule is against force. Bernadette breaks the law by holding a healer at swordpoint, meaning it does have some military context.
Oracle Of Tao has a One World Orderrunning the world as an organized anarchy, conducting trade and keeping peace. Building troops is illegal, as is invasion of countries, or even ruling more than one town (you cannot, for instance, have an empire). The purpose is to prevent expansion of lands or governments. In terms of rules of combat, it is unclear if there are any, but war itself is frowned upon since it is typically for the purpose of gaining land or control.
Sid Meiers Alpha Centauri: The UN colonial charter prohibits the use of WMDs, though it is possible for factions in game to use chemical weapons and planet busters. Using the former will impose trade sanctions on the offending faction while the latter will cause every other faction, including allies, to declare Vendetta.
Star Ocean: Till the End of Time has a rule about not interfering with the technology of developing planets. Which is ridiculous for two reasons: first, between Crafting and Fayt's impact during the plot, this law is already broken if not shattered; and second, all of these worlds are effectively part of a game.
Five hats means that five tropers think it is ready to publish.
You are saying that you think this draft is ready to be published. That means the description is not ambiguous,
it doesn't duplicate an existing trope, there are at least three examples, and the title makes sense.
Is that what you meant to do?
You are saying this draft has a ready-to-publish hat it does not deserve and you are taking it back.