Defense cubes drop as black. Cannons on cards or your Ship can't be used against buildings, and no one gains plunder (p.20).
5 steps: Take battle cubes → Drop cubes → Resolve battle abilities → Resolve the battle ship → Determine the outcome.
Cubes taken = your Cannons (Ship + cards). Islands you control add +1 cube per Building; a defender attacked in Harbor gets +4. Buildings defend with a fixed number: Garrison 2, Fort 5, both 7 (no card/Ship cannons).
Battle-ship zones resolve in order: (1) Exploding shots — each cube here is re-dropped plus 1 extra of the same color, repeat until the zone is clear; (2) Battle abilities; (3) Plunder — coins/barrels go to the cube's owner (skipped vs Buildings); (4) Damage — each cube in a fire zone deals 1 🔥 to the opponent's Ship (does not help you win); (5) Determine the winner — most Battle Strength (crowns worth 1 or 2) wins; ties go to the active player.
Outcome: the loser places 1 🔥 on their Ship; a losing Pirate ship flips to Mercantile. The winner (if not yet Legendary) advances the Legendary achievement — 4 non-Building wins earns it. A Ship with 5+ 🔥 sinks. Building battles give no plunder and no rewards; win removes the Fort/Garrison, lose and your Ship takes 🔥 as normal.