Spelunky is © 2008, 2009 Derek Yu and Mossmouth, LLC, and is used under the [Spelunky User License v1.1b](https://spelunky.ai/LICENSE.txt). spelunky.ai is an unofficial fan project, not affiliated with or endorsed by Mossmouth. The game and its assets may not be sold.

Music by George Buzinkai and Jonathan Perry; sound effects made in SFXR. From Spelunky Classic 1.1, © 2008, 2009 Derek Yu and Mossmouth, LLC.

# Mattock

From the spelunky.ai wiki: <https://spelunky.ai/wiki/mattock>. Verified against the spelunky.ai port [v0.1.10](https://github.com/851-labs/spelunky/releases/tag/v0.1.10) on 27 October 2026.

The Mattock is a digging tool and weapon in Spelunky Classic that breaks a block with each swing and can break itself; shops sell it from $8,000.

![A mattock: a brown wooden handle with a curved grey head](https://spelunky.ai/wiki/media/66c8732d531340f4/sprites/sMattockRight/frames/0%404x.png)

| Mattock    |                                                                           |
| ---------- | ------------------------------------------------------------------------- |
| Kind       | Weapon                                                                    |
| Effect     | Breaks blocks and hits monsters[^1]                                       |
| Damage     | 2 hit points[^2]                                                          |
| Price      | $8,000[^3]                                                                |
| Objects    | `oMattock`, `oMattockHit`, `oMattockPre`, `oMattockHead`                  |
| Sold in    | General Store, Rare Shop, Dice House                                      |
| Found in   | The Mines, The Jungle, The Ice Caves, The Temple, Olmec's Lair, Snake pit |
| Dropped by | [Crate](https://spelunky.ai/wiki/crate)                                   |

Held in the player's hands, it's swung like the [Whip](https://spelunky.ai/wiki/whip), but only on the ground: its hit in front of
him breaks a block of rock, and hurts monsters for 2 hit points a step, as does its wind-up
behind him. Every block it breaks may break it. General Stores, Rare Shops
and the Dice House sell it, and [Crates](https://spelunky.ai/wiki/crate), buried blocks and the bottom of every
Snake Pit give it away.

## Usage

**Clip: Mattock digging.** The player picks up a mattock and walks into a wall two blocks thick. Each swing breaks one block of it, and he walks on through. ([video](https://spelunky.ai/wiki/media/66c8732d531340f4/clips/mattock/dig/clip.mp4))

The Mattock is picked up like any item, crouching over it and pressing the attack key. While it's held, the
attack key swings it, only while the player stands on the ground, and he can't jump for 20 steps after; crouching,
the key puts it down in front of him instead[^4]. It isn't thrown.
A swing makes a wind-up behind the player and a hit 16 pixels in front of him, once the swing's animation is
past its fifth frame[^5][^6].

### Digging

When the hit's animation ends, it breaks the block at its middle, or if there's none, the one 9 pixels
lower: the block in front of the player's feet. A block that can't be destroyed, such as the level's border,
stops it. It also makes every treasure in the level active again, so treasure the block held up falls,
and breaks every Spike with nothing under it[^7]. The clip shows a wall two blocks
thick dug through with two swings[^8].

Which block breaks is chosen with the hit's whole shape, not only the point the code tests, and of the
blocks that shape touches it takes the first one made[^9][^10].
Facing right, the shape reaches 8 pixels back toward the player, so when he stands over the left half of a
block, it can be the block he stands on: in the second clip, a swing to the right breaks the floor under
him, and he drops into the hole[^11]. Facing left, it reaches 3 pixels past the
point, so over the first 3 pixels of a block it can be the block beyond the one in front of him, which
stays[^12].

Each block it breaks has a 1 in 20 chance of breaking the Mattock: its
head flies off, its handle is gone from the player's hands, and the sound of it breaking plays; otherwise the
sound is a crunch[^13][^14]. The head is an item of its own, which can
be picked up and thrown.

## Damage

The hit and the wind-up each take 2 hit points on every step they touch a
monster on the code most monsters share[^15][^16][^17].
The hit punctures, as the [Machete](https://spelunky.ai/wiki/machete)'s slash does, but the code that treats the Machete apart
tests for its name, which the Mattock hasn't got: to a [Caveman](https://spelunky.ai/wiki/caveman), a Hawkman or a Vampire the
Mattock is a harder Whip, nothing while it's stunned.

The wind-up is made twice in a swing. The code that makes it checks that no Machete's wind-up exists rather
than a Mattock's, so on the swing's first two steps it makes one each
time[^6][^10]. Each lasts 3 steps, and where they overlap a monster
behind the player takes 4 a step: the clip's [Yeti King](https://spelunky.ai/wiki/yeti-king) loses 12 of its 30 hit points to one
swing, 2, 4, 4 and 2[^11].

| Monster                                                                                                                                                                            | Hit                                                               | Wind-up                          |            |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------- | ---------- |
| Most monsters                                                                                                                                                                      | 2 hit points a step                                               | 2 hit points a step from each    | [^18]      |
| [Caveman](https://spelunky.ai/wiki/caveman), [Hawkman](https://spelunky.ai/wiki/hawkman), [Vampire](https://spelunky.ai/wiki/vampire), [Mantrap](https://spelunky.ai/wiki/mantrap) | 2, and stuns it; nothing while it's stunned                       | The same                         | [^19][^20] |
| [Yeti](https://spelunky.ai/wiki/yeti)                                                                                                                                              | 2, and stuns it; at most once every 10 steps                      | Nothing: it knocks the Yeti back | [^21][^22] |
| [Yeti King](https://spelunky.ai/wiki/yeti-king)                                                                                                                                    | 2, at most once every 10 steps, only level with its top 12 pixels | 2 a step from each               | [^23]      |
| [Tomb Lord](https://spelunky.ai/wiki/tomb-lord)                                                                                                                                    | 2, at most once every 10 steps, only level with its top 12 pixels | 2 a step from each               | [^24]      |
| [Giant Spider](https://spelunky.ai/wiki/giant-spider)                                                                                                                              | 1, at most once every 10 steps                                    | 2 a step from each               | [^25]      |
| [Magma Man](https://spelunky.ai/wiki/magma-man)                                                                                                                                    | Nothing                                                           | 2 a step from each, off its life | [^26]      |
| [Ghost](https://spelunky.ai/wiki/ghost)                                                                                                                                            | Nothing                                                           | Nothing                          | [^27]      |

**Clip: Mattock wind-up and the floor.** With his back to the yeti king, the player swings a mattock. The swing makes its wind-up behind him twice, and the two take 12 of the yeti king's 30 hit points in four steps. The hit in front breaks the block he stands on, and he drops into the hole. ([video](https://spelunky.ai/wiki/media/66c8732d531340f4/clips/mattock/wind-up/clip.mp4))

## Obtaining

| Source                                    | Chance                                                                                                                                                                                                                                                                                     |            |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- |
| General Store                             | 1 in 20 for each ware, its first roll                                                                                                                                                                                                                                                      | [^28]      |
| Rare Shop                                 | Each of its wares is one of its eleven items or a Bomb Box                                                                                                                                                                                                                                 | [^29]      |
| The Dice House's prize                    | 1 in 8, once the rolls for a [Jetpack](https://spelunky.ai/wiki/jetpack), a [Cape](https://spelunky.ai/wiki/cape), a [Shotgun](https://spelunky.ai/wiki/shotgun), [Climbing Gloves](https://spelunky.ai/wiki/climbing-gloves) and a [Teleporter](https://spelunky.ai/wiki/teleporter) fail | [^30]      |
| A [Crate](https://spelunky.ai/wiki/crate) | 1 in 100, once the rolls for a Jetpack, a Cape and a Shotgun fail                                                                                                                                                                                                                          | [^31]      |
| Buried in a block                         | 1 in 19 of the items buried in blocks                                                                                                                                                                                                                                                      | [^32]      |
| The bottom of a Snake Pit                 | Always, inside a brick                                                                                                                                                                                                                                                                     | [^33][^34] |

A shop stocks one only if the level hasn't got one
already[^35], and it adds 10% of the base price for each level past
the second[^36]. Shops are made from level 2
on[^37], and level 16, Olmec's Lair, has none:

| Area          | 1st level | 2nd level | 3rd level | 4th level |
| ------------- | --------- | --------- | --------- | --------- |
| The Mines     | —         | $8,000    | $8,800    | $9,600    |
| The Jungle    | $10,400   | $11,200   | $12,000   | $12,800   |
| The Ice Caves | $13,600   | $14,400   | $15,200   | $16,000   |
| The Temple    | $16,800   | $17,600   | $18,400   | —         |

The Dice House puts its prize up from the same set of rare items, and a roll of seven gives it
away[^38][^39]. Every
block of rock away from the level's edges that isn't gold and holds no gem has a 1 in 1200 chance of hiding
an item, one of nineteen at random[^40][^32]. A Snake Pit's bottom room puts a free Mattock inside a
brick, which a bomb or the Mattock itself digs out. In custom levels, it's the level
editor's tile `(`[^41].

Paying for one, or carrying one out of a shop without paying, which angers the Shopkeeper,
shows "YOU GOT A MATTOCK!" and "IT SEEMS A BIT RUSTY.", and it stays in the player's
hands[^42][^10]. Digging a shop's floor angers the
Shopkeeper too[^43].

## Interactions

- **Shopkeepers.** The hit and the wind-up don't hurt one, but make him
  attack[^44].
- **Treasure.** Every block it breaks makes every treasure in the level active again, so gold and gems left
  in the air where blocks were drop[^45].
- **The level's edge.** The border's blocks can't be broken, and a swing at one does nothing and can't
  break the Mattock[^46].

## Tips

- With the player's back to it, one swing took 12 of the Yeti King's hit points in the clip, where the
  Whip's wind-up takes 3: the Mattock's double wind-up is its strongest attack on the Yeti King, the Tomb
  Lord and the Magma Man.
- Facing right, a swing can break the floor under the player when he stands over the left half of a block,
  so digging sideways over a drop is risky.

## Trivia

- The Tunnel Man, one of the characters, swings a Mattock's hit with empty hands, and his never
  breaks[^47][^48].
- The blocks it breaks leave their decorations behind, as GameMaker 8.0's `tile_layer_find` never finds
  the tiles the game looks for[^49][^50].

## FAQ

### What does the Mattock do in Spelunky Classic?

Swung on the ground, it breaks the block in front of the player, or the one below that, and hits monsters for 2 hit points a step. Each block it breaks has a 1 in 20 chance of breaking the Mattock too.

### How many blocks can the Mattock dig in Spelunky Classic?

No set number. Each block it breaks rolls a 1 in 20 chance of breaking it, so on average it lasts 20 blocks, but it can break on the first.

### Where do you find the Mattock in Spelunky Classic?

In General Stores, Rare Shops and as the Dice House's prize. Free ones come out of [Crates](https://spelunky.ai/wiki/crate) (a 1 in 100 roll, once the rolls before it fail), out of blocks that hide them, and from the bottom of every Snake Pit, buried in a brick.

### How much does the Mattock cost in Spelunky Classic?

$8,000 on level 2, the first with shops, and 10% of that more on each level after it, up to $18,400 on level 15.

## See also

- **Related:** [Whip](https://spelunky.ai/wiki/whip), [Machete](https://spelunky.ai/wiki/machete)
- **Damages:** [Alien](https://spelunky.ai/wiki/alien), [Alien Boss](https://spelunky.ai/wiki/alien-boss), [Bat](https://spelunky.ai/wiki/bat), [Caveman](https://spelunky.ai/wiki/caveman), [Dead Fish](https://spelunky.ai/wiki/dead-fish), [Fire Frog](https://spelunky.ai/wiki/fire-frog), [Frog](https://spelunky.ai/wiki/frog), [Giant Spider](https://spelunky.ai/wiki/giant-spider), [Hawkman](https://spelunky.ai/wiki/hawkman), [Magma Man](https://spelunky.ai/wiki/magma-man) (only its wind-up)[^51], [Mantrap](https://spelunky.ai/wiki/mantrap), [Megamouth](https://spelunky.ai/wiki/megamouth), [Monkey](https://spelunky.ai/wiki/monkey), [Piranha](https://spelunky.ai/wiki/piranha), [Scarab](https://spelunky.ai/wiki/scarab), [Skeleton](https://spelunky.ai/wiki/skeleton), [Snake](https://spelunky.ai/wiki/snake), [Spider](https://spelunky.ai/wiki/spider), [Tomb Lord](https://spelunky.ai/wiki/tomb-lord), [UFO](https://spelunky.ai/wiki/ufo), [Vampire](https://spelunky.ai/wiki/vampire), [Yeti](https://spelunky.ai/wiki/yeti), [Yeti King](https://spelunky.ai/wiki/yeti-king), [Zombie](https://spelunky.ai/wiki/zombie)

## References

[^1]: `objects/oMattockHit/other_animation_end.gml:1-59`

[^2]: `objects/oMattockHit/create.gml:5`

[^3]: `objects/oMattock/create.gml:6`

[^4]: `scripts/scrUseItem.gml:168-215`

[^5]: `objects/oPlayer1/step.gml:415-431`

[^6]: `objects/oPlayer1/step.gml:497-509`

[^7]: `objects/oMattockHit/other_animation_end.gml:1-36`

[^8]: Clip mattock/dig

[^9]: `objects/oMattockHit/other_animation_end.gml:7-11`

[^10]: Quirk 1 (docs/quirks.md)

[^11]: Clip mattock/wind-up

[^12]: Replay `fidelity/replays/weapon-mattock-wrong-block.txt`

[^13]: `objects/oMattockHit/other_animation_end.gml:38-56`

[^14]: Replay `fidelity/replays/item-seed-35-mattock-break.txt`

[^15]: `objects/oMattockHit/create.gml:3-6`

[^16]: `objects/oMattockPre/create.gml:3-4`

[^17]: `objects/oEnemy/collision_oWhip.gml:1-8`

[^18]: `objects/oEnemy/collision_oWhip.gml:1`

[^19]: `objects/oCaveman/collision_oWhip.gml:1-17`

[^20]: `objects/oManTrap/collision_oWhip.gml:1-20`

[^21]: `objects/oYeti/collision_oWhip.gml:1-21`

[^22]: `objects/oYeti/collision_oWhipPre.gml:22-30`

[^23]: `objects/oYetiKing/collision_oWhip.gml:1-10`

[^24]: `objects/oTombLord/collision_oWhip.gml:1-8`

[^25]: `objects/oGiantSpider/collision_oWhip.gml:1-7`

[^26]: `objects/oMagmaMan/collision_oWhip.gml:1-6`

[^27]: `objects/oGhost/collision_oWhip.gml:1`

[^28]: `scripts/scrShopItemsGen.gml:156-177`

[^29]: `scripts/scrShopItemsGen.gml:102-155`

[^30]: `scripts/scrGenerateItem.gml:47-54`

[^31]: `objects/oPlayer1/step.gml:617-620`

[^32]: `scripts/scrGenerateItem.gml:63-89`

[^33]: `scripts/scrRoomGen.gml:212-218`

[^34]: `scripts/scrRoomGen.gml:475-481`

[^35]: `scripts/scrShopItemsGen.gml:117-120`

[^36]: `scripts/scrShopItemsGen.gml:179-191`

[^37]: `scripts/scrLevelGen.gml:240`

[^38]: `scripts/scrRoomGen.gml:392-397`

[^39]: `objects/oShopkeeper/step.gml:173-200`

[^40]: `objects/oBrick/create.gml:7-16`

[^41]: `scripts/scrCreateTileObj.gml:399-404`

[^42]: `scripts/scrStealItem.gml:253-262`

[^43]: Replay `fidelity/replays/weapon-seed-35-mattock.txt`

[^44]: `objects/oShopkeeper/collision_oWhip.gml:1-19`

[^45]: `objects/oMattockHit/other_animation_end.gml:25-28`

[^46]: `objects/oMattockHit/other_animation_end.gml:2-13`

[^47]: `objects/oPlayer1/step.gml:432-446`

[^48]: `objects/oMattockHit/other_animation_end.gml:39`

[^49]: `objects/oMattockHit/other_animation_end.gml:15-20`

[^50]: Quirk 5 (docs/quirks.md)

[^51]: `objects/oEnemy/collision_oWhipPre.gml:1`

### Source code

- `objects/oMattock/create.gml`
- `objects/oMattockHit/create.gml`
- `objects/oMattockHit/other_animation_end.gml`
- `objects/oMattockPre/create.gml`
- `objects/oPlayer1/step.gml`
- `scripts/scrUseItem.gml`
- `scripts/scrShopItemsGen.gml`
- `scripts/scrGenerateItem.gml`
