Blood Rush is normal BattleTabs with one hook: sink an enemy ship and you shoot again straight away. Both players get the same fleet: Kayak, Sailboat, Raft and Sea Turtle.
The player's request:
Make a BattleTabs mod called Blood Rush: when you sink an enemy ship, you get a bonus shot.
It took 17 calls to the mod tool and two versions. Here's every step, including the bug we caught along the way: a counter in the mod's data spotted it when the game result never would have.
All in one go: Paste this into your agent with the battletabs-mod tool connected, and it runs the whole loop by itself: build, test, tune.
Make a BattleTabs mod called Blood Rush: when you sink an enemy ship, you get a bonus shot.
Read the battletabs-mod ship-mods docs first, and only use ships that are allowed in the Arcade.
Typecheck it, then play a few test games on different seeds and check the rule works.
Run 500 bot games and compare the win split and game length with normal rules. If one side wins much more often, or games run much longer, change it and test again.
Save it as case-blood-rush, then tell me what you changed along the way and why.Or step by step, as we did it: Going one prompt at a time lets you look at each result and steer, the way the decisions on this page were made. Some prompts react to what came back, so read the result before you send the next one.
Make a BattleTabs mod called Blood Rush: when you sink an enemy ship, you get a bonus shot.Use only ships I could publish to the Arcade, and pick ones that sink things often.Check it compiles, then play one bot game and show me the log around a sink.The counter says 7 bonus shots but I only see 6 skipped turns. Is the winning shot giving a bonus too? Skip it when the game's already over.Play a few more seeds and check the counter matches the skipped turns every time.Run 200 bot games and tell me the win split, how long games last, and if anything errored.First mover went up a bit. Run 500 games and tell me if that's real or noise.Show me a picture of the board right after someone gets a bonus shot.Save it as case-blood-rush.Prompt 1
Make a BattleTabs mod called Blood Rush: when you sink an enemy ship, you get a bonus shot.get_docs (ship-mods)onSink hook runs whenever a ship goes down, and ctx.extraTurn(seat) lets a player go again. The guide spells out this exact rule: "Sinker gets another shot: extraTurn(sink.by)." It works by skipping the other player's next turn.sink.by is the player who sank the ship, and sink.owner is the player who lost it.Prompt 2
Use only ships I could publish to the Arcade, and pick ones that sink things often.list_ships (arcade_only)Prompt 3
Check it compiles, then play one bot game and show me the log around a sink.sink.owner, flipped it to sink.by, and added a bonusShots counter to see how often the hook fires.get_docs (examples/second-wind), save_mod, typecheckPrompt 3
Check it compiles, then play one bot game and show me the log around a sink.play_once (seed 1){"bonusShots":7}. Seven bonus shots, but only six skipped turns. The seventh was the winning sink: the hook gave a bonus shot and showed the blood rush message after the game was already over.Prompt 4
The counter says 7 bonus shots but I only see 6 skipped turns. Is the winning shot giving a bonus too? Skip it when the game's already over.get_docs (types), render_state, save_mod, typecheckshipsLeft count. The docs didn't say whether it updates before onSink runs, so the agent didn't guess: it added a second counter, finalSinks.ctx.fleets[sink.owner].shipsLeft === 0 and returns early. Typecheck was clean.Prompt 5
Play a few more seeds and check the counter matches the skipped turns every time.play_once (seeds 1 to 4)finalSinks was 1 every time. Seed 1 gave the same game and the same winner as before.shipsLeft is already updated when onSink runs. The fix changed the bookkeeping, not the play.Prompts 6 to 9
Run 200 bot games and tell me the win split, how long games last, and if anything errored.First mover went up a bit. Run 500 games and tell me if that's real or noise.Show me a picture of the board right after someone gets a bonus shot.Save it as case-blood-rush.simulate_n (200, then 500 games), render_stateThe first version gave a bonus shot, and showed the blood rush message, on the sink that won the game. The game result was right, so only the counter (7 bonus shots against 6 skipped turns) showed it.
Fix: Skip the bonus when the loser has no ships left. Count what your hook does, and compare it with the game log.
sink.by sank the ship, sink.owner lost it. The example the agent copied, Second Wind, uses owner. Copy it without flipping that word and you build the opposite game.
Fix: Flip owner to by when you copy the example.
The docs didn't say whether a fleet's shipsLeft updates before onSink runs.
Fix: A second counter, finalSinks, and four test games settled it, instead of an assumption.
At 200 games the first mover's wins rose from 109 to 114, which looked like it might snowball.
Fix: 500 games showed a 2-point gap, inside the noise. Don't tune without a problem, and run 500 games before reading anything into a small swing.
500 bot games on the final version, seeds 1 to 500, against normal rules on the same fleets and seeds.
| Blood Rush | Normal rules | |
|---|---|---|
| Wins, seat 0 / seat 1 | 258 / 242 (52% / 48%) | 256 / 244 (51% / 49%) |
| First mover won | 282 (56%) | 272 (54%) |
| Average turns played | 27.7 | 28.5 |
| Bonus shots per game | 5.5 | – |
| Draws / errors | 0 / 0 | 0 / 0 |
Every version along the way:
| Version | Change | Result | Kept? |
|---|---|---|---|
| v1 | onSink gives the sinker an extra turn | 7 bonus shots, 6 skipped turns on seed 1 | No, bonus on the winning shot |
| v2 | No bonus when the loser has no ships left | 52% / 48%, 27.7 turns (normal 28.5), 500 games | Final |
TODO: in-game screenshot of this game in the BattleTabs Arcade.
The mod tool's render_state draws the boards as 2D pictures. Dark red cells are a sunk ship.


The whole mod, as saved by save_mod. Copy it into your own mods folder to start from it.
// Blood Rush: sink an enemy ship and you get a bonus shot.
import { defineShipMod } from "@battletabs/mod-api";
export default defineShipMod({
id: "case-blood-rush",
apiVersion: 1,
classicVersion: "classic-2",
rules: {
pitch: "Sink a ship and the blood rush gives you a bonus shot.",
bullets: ["Sink every enemy ship to win", "Sink an enemy ship and you shoot again straight away"],
},
maxTurns: 200,
fleet: ["kayak", "sailboat", "raft", "turtle"],
data: { bonusShots: 0, finalSinks: 0 },
hooks: {
onSink(sink, ctx) {
// The last ship ends the game: no bonus shot, no toast.
if (ctx.fleets[sink.owner].shipsLeft === 0) {
ctx.data.finalSinks += 1;
return;
}
ctx.data.bonusShots += 1;
ctx.extraTurn(sink.by);
ctx.emit({ type: "show-message", audience: "all", template: "blood-rush" });
},
},
});
Install the mod tools and connect your agent with the Arcade guide. Then paste the prompts above into your agent, all in one go or one at a time. To play against the bot yourself, ask your agent to open the play page.