How Alliances Work in Frontlines, and What Betrayal Costs
A solo alliance lasts 10 minutes. Leaving gives a 5-minute truce, betraying makes you 35% easier to conquer for good. Every number from the game code.

In a solo game an alliance with an AI nation lasts 10 minutes and then ends on its own. That is also the one exit with no penalty: once it has expired, you can attack the ex-ally the same second.
Leave early and you get a 5-minute truce. Betray and you can attack immediately, but your defense is 35% worse for the rest of the match.
Online it is different again. A pact between two players has no clock and no cost to break. This page lays out both rule sets, with the numbers read from the game code and replayed in a script.
In a solo game the AI asks, you cannot
There is no propose button for an AI nation. The only alliance offers you will see come from the bots, and they come with conditions.
A nation (the aggressive AI type) only courts a neighbor that holds at least 1.1 times its tiles. A settler (the peaceful type) only asks a neighbor whose available troops are at least 1.25 times its own. Pirates and the Outbreak horde never ask. Nobody asks a traitor, in team modes, or online.
Each bot decides every 1.5 times its think interval on average. A nation rolls a 4% chance per decision and a settler 8%, so once you qualify the wait is short. We computed the expected seconds from the think intervals in config.js:
| Difficulty | Nation, expected wait | Settler, expected wait |
|---|---|---|
| Easy | 98 s | 73 s |
| Normal | 68 s | 51 s |
| Hard | 45 s | 34 s |
Read these as a best case. A settler's pact check sits after its building decisions, and a build ends that decision early. After any offer the same bot stays quiet for 15 minutes (nation) or 10 minutes (settler).
You have 20 seconds to answer an offer. Ignoring it counts as a no.
An alliance blocks more than land attacks
While a pact stands, four things stop between you and the ally.
- Land attacks, both directions.
launchAttackrefuses and returns false. - Amphibious landings. A transport cannot put troops ashore on an ally's coast.
- Naval fire. Warships and carriers skip allied ships, so their patrols leave each other alone.
- Missiles. In a solo game, aim a rocket, nuke or H-bomb at a tile an ally owns and the game first marks you a betrayer, then fires. A 4,500-gold rocket is an expensive way to find that out. The SAM post has the missile prices.
What a pact does not do is share a win. Outside team modes the 70% check counts only your own tiles, so an ally is still a rival for the last 20% of the map.

Letting it expire is the only exit with no penalty
When the term runs out, the game deletes the alliance and writes one log line. It sets no truce and no debuff. You are simply free to attack.
Here is every way out, and how long until you can attack with no penalty at all. The times come from the alliance rules in game.js and config.js.
| Exit | First attack | Penalty |
|---|---|---|
| Let it expire | 600 s minus the pact's age | None |
| Leave, then wait | 600 s from now | None |
| Leave, then attack after the truce | 300 s from now | 35% worse defense for 5 minutes |
| Betray and attack | Now | 35% worse defense, permanent, and no more offers |
Leaving early is never faster than waiting for a clean attack, because the leave clock (5 minutes of truce plus a 5-minute surprise window) is always longer than what remains of the term. Its one edge is the middle row: if the pact is younger than 5 minutes, leaving gets you a debuffed attack sooner than expiry would.
The truce also protects you. It works in both directions, so the ex-ally cannot attack you during those 5 minutes either.
In the last 90 seconds the ally offers an extension. Accept and the term resets to 10 minutes from that moment. Decline or ignore it and the pact ends at its original time.
A betrayer is cheaper to conquer for the whole match
The game stores one flag for a betrayer and applies it to every attack aimed at you, not just the ex-ally's. The note next to the number in the game code states the intent:
— frontlines-io/src/config.js, next to traitorDefenseMultbetrayers defend 35% worse (permanent)
The 0.65 factor multiplies the two terms that make enemy land expensive: how densely it is held and how badly the attack is outnumbered. We replayed the real formula at minute 10, plains only, with the defender holding a compact blob. Our troops-needed post explains the method.
| Defender | State | First tile costs | Troops to take the whole nation |
|---|---|---|---|
| 500 tiles, 5,000 troops | Normal | 9.62 | 8,550 |
| 500 tiles, 5,000 troops | Betrayer | 6.75 | 7,450 (13% fewer) |
| 500 tiles, 5,000 troops | Betrayer, capital just lost | 5.68 | 6,850 (20% fewer) |
| 200 tiles, 2,000 troops | Normal | 8.67 | 3,350 |
| 200 tiles, 2,000 troops | Betrayer | 6.13 | 3,000 (10% fewer) |
The first tile gets 30% cheaper, but the whole nation only gets 10 to 13% cheaper, because a garrison that is being ground down makes the late tiles cheap anyway. That is still a permanent discount for every neighbor you have.
Two more costs sit outside the formula:
- A nation picks the softest bordering rival by the lowest score, and your score is multiplied by 0.55 as a human. For a traitor that multiplier drops to 0.4, so the AI prefers you more.
- A traitor gets no alliance offers and no extension offers for the rest of the match, so any other pact you hold runs out at its normal time.
Online, a pact has no clock and no price
The online rules are a separate system in server.js. Players propose to each other from the leaderboard or a nation's menu. A request stays open for 60 seconds, the other player accepts or declines, and the pact exists until someone ends it.
There is no term, no extension prompt, no truce and no traitor flag. Leaving is instant, the table sees one line saying who left, and you can attack on the next tick. The "Betray and attack" button in the menu does exactly that: leave, then attack.
Two protections do hold while the pact lasts. Allies cannot attack each other and cannot fire missiles at each other, and warships hold fire. AI nations never take part in online pacts, in either direction.
That makes an online alliance as strong as the other player's patience and no stronger. If you want a duration that holds, the lobby's team modes are permanent for the whole match. Our room setup guide covers how to start one.
OpenFront runs a shorter pact with a lighter penalty
If you play OpenFront as well, do not carry these numbers over. In its Config.ts the default alliance lasts 5 minutes, the host can set anything from 1 to 15 minutes or turn alliances off, and a traitor's status lasts 30 seconds. Its EngineConfig.ts adds a speed debuff of 0.8 for traitors.
Frontlines' betrayal mark never wears off, and OpenFront's does within half a minute. We make Frontlines and CONQUEST, not OpenFront, so read its own rules before relying on this paragraph.
Picking an exit
Our recommendation is to treat the 10-minute term as a loan and plan the repayment. If you need that border quiet to finish a war elsewhere, take the pact, and watch the clock: you know the exact second it ends. Decline the extension when you are ready to move, and the attack costs you nothing extra.
Betrayal pays only when a head start of several minutes is worth more than a permanent 35% on every attack aimed at you. The discount is the same whether the match lasts 20 more minutes or 60, so it is a poor trade at minute 10 and a better one when the match is nearly decided. Against a healthy neighbor, the clean wait is cheaper.
You can try both in a free match at playfrontlines.com, and the controls are on the FAQ page.
More from the blog.

Frontlines Trade Ships: How Much Gold a Trader Earns
A trader costs 800 gold and earns about 830 gold a minute on a typical 120-tile route. Payback, the port ladder and the catch, replayed from the game code.
Oct 15, 2026 · 6 min
First-Player Advantage in RISK-Style Games, Measured
Seat 1 wins 74% of two-player CONQUEST games between equal bots, 92% with a manual draft. With 3 to 6 players on the World map, order barely matters.
Oct 12, 2026 · 6 min
Troops vs Workers in Frontlines: Where to Set the Slider
The slider does not change how fast you expand. It trades gold for defense: 95/5 earned 45% less than 20/80 but survived 39 of 48 matches, not 26.
Oct 11, 2026 · 6 min