SpelunkyFan wiki

Machete

Verified against the spelunky.ai port v0.1.10 on .

The Machete is a weapon in Spelunky Classic that swings like the Whip but takes 2 hit points a step and cuts webs; shops sell it from $7,000.

Held in the player's hands, it takes the Whip's place: the attack key swings it, with a wind-up behind him and a slash in front, each of which takes 2 hit points on every step it touches a monster, and the slash cuts through webs. Weapon Shops and the Dice House sell it, and Crates and buried blocks give it away.

Usage

#
Machete against a caveman. The player picks up a machete. A caveman spots him and charges; one swing hits it on three steps for 2 each, taking all 3 of its hit points before it reaches him, and it falls dead.

The Machete is picked up like any item, crouching over it and pressing the attack key. While it's held, the attack key swings it as the Whip is swung, on the ground or in the air; crouching, the same key puts it down in front of the player instead [4]. It isn't thrown. A swing makes:

  • The wind-up, 16 pixels behind the player, for 3 steps [5] [6].
  • The slash, in front of him, once the swing's animation is past its fifth frame; it goes when its own animation ends, and while the swing lasts a new one takes its place [7] [8]. In play a swing makes two slashes of 2 steps each [9]. Like the Whip's crack, a slash follows the player 16 pixels in front of him [10].

In the clip, a Caveman charges the player, and one swing hits it on three steps for 2 each, from 3 hit points to -3; it falls dead before it reaches him [9].

The Machete goes with the player through a level's exit if he's holding it, and is in his hands on the next level [11] [12]. He drops it when he's stunned, or when he teeters too long at a ledge's edge [13] [14].

Damage

#

Both parts take the Machete's 2 hit points where the Whip takes 1 hit point, on every step they touch a monster on the code most monsters share [15] [16] [17] [18]. The slash punctures, which the Whip doesn't, and several monsters test for the Machete by name [19]:

MonsterSlashWind-up
Most monsters2 hit points a step2 hit points a step[20]
Caveman, Hawkman, Vampire2 a step, and stuns it, even while it's stunnedThe same[21]
Mantrap4, and stuns it; nothing while it's stunnedThe same[22]
Yeti2, and stuns it; at most once every 10 stepsThe same[23] [24]
Yeti King2, at most once every 10 steps, only level with its top 12 pixels2 a step[25] [26]
Tomb Lord2, at most once every 10 steps, only level with its top 12 pixels2 a step[27]
Giant Spider1, at most once every 10 steps2 a step[28]
Magma ManNothing2 a step, off its life[29]
GhostNothingNothing[30]

Obtaining

#
SourceChance
Weapon Shop1 in 4 for each ware, once the rolls for a Web Cannon, a Shotgun and a Bomb Box fail[31]
The Dice House's prize1 in 8, once the rolls before it, from a Jetpack's 1 in 40 to a Pistol's 1 in 8, fail[32]
A Crate1 in 60, once the rolls before it, from a Jetpack's 1 in 500 to Spike Shoes' 1 in 60, fail[33]
Buried in a block1 in 19 of the items buried in blocks[34]

A Weapon 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:

Area1st level2nd level3rd level4th level
The Mines—$7,000$7,700$8,400
The Jungle$9,100$9,800$10,500$11,200
The Ice Caves$11,900$12,600$13,300$14,000
The Temple$14,700$15,400$16,100—

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] [34]. In custom levels, it's the level editor's tile / [41].

Paying for one with the pay key, or carrying one out of a shop without paying, which angers the Shopkeeper, shows "YOU GOT A MACHETE!", and it stays in the player's hands [42] [43] [44] [18] [45].

Interactions

#
  • Webs. A slash destroys any web it touches, which the Whip doesn't [46].
  • Shopkeepers. The slash and the wind-up take 2 of a Shopkeeper's hit points, at most once every 10 steps, and make him attack [47].
  • Damsels. A Damsel takes 2, at most once every 10 steps, where the Whip only makes her jump [48].

Tips

#
  • One swing kills a charging Caveman before it reaches the player, as the clip shows: its 3 hit points go in the swing's first steps, stunned or not.
  • Of the weapons, only the Machete cuts webs, a Giant Spider's among them.

Trivia

#
  • The slash is a kind of whip to the game (its object's parent is the whip's), so every monster's whip code handles it, and code that wants the Machete tests the swing's type for "Machete" [49] [50].

FAQ

#
How much damage does the Machete do in Spelunky Classic?

2 hit points for each step its slash or its wind-up touches a monster, twice the Whip's. A Mantrap takes double that, 4, which kills it.

Is the Machete better than the Whip in Spelunky Classic?

It hits twice as hard, and a few monsters' code treats it differently: a Caveman, a Hawkman or a Vampire takes it even while stunned, and a Yeti, which the Whip only knocks back, takes it. It has to be held, though, so the player can't carry anything else.

Where do you find the Machete in Spelunky Classic?

In Weapon Shops and as the Dice House's prize. Free ones come out of Crates (a 1 in 60 roll, once the rolls before it fail) and out of blocks that hide them.

How much does the Machete cost in Spelunky Classic?

$7,000 on level 2, the first with shops, and 10% of that more on each level after it, up to $16,100 on level 15.

See also

#

References

#
  1. objects/oPlayer1/step.gml:415-496
  2. objects/oSlash/create.gml:4
  3. objects/oMachete/create.gml:6
  4. scripts/scrUseItem.gml:121-167
  5. objects/oPlayer1/step.gml:484-496
  6. objects/oWhipPre/create.gml:5
  7. objects/oPlayer1/step.gml:415-424
  8. objects/oSlash/other_animation_end.gml:1
  9. Clip machete/caveman
  10. objects/oSlash/step.gml:5-14
  11. objects/oPlayer1/step.gml:842-850
  12. objects/oLevel/create.gml:25-30
  13. objects/oPlayer1/step.gml:329-345
  14. objects/oPlayer1/step.gml:150-171
  15. objects/oSlash/create.gml:3-6
  16. objects/oMachetePre/create.gml:3-4
  17. objects/oEnemy/collision_oWhip.gml:1-8
  18. Quirk 1 (docs/quirks.md)
  19. objects/oSlash/create.gml:6
  20. objects/oEnemy/collision_oWhip.gml:1
  21. objects/oCaveman/collision_oWhip.gml:1-17
  22. objects/oManTrap/collision_oWhip.gml:1-20
  23. objects/oYeti/collision_oWhip.gml:1-21
  24. objects/oYeti/collision_oWhipPre.gml:1-21
  25. objects/oYetiKing/collision_oWhip.gml:1-10
  26. objects/oEnemy/collision_oWhipPre.gml:1
  27. objects/oTombLord/collision_oWhip.gml:1-8
  28. objects/oGiantSpider/collision_oWhip.gml:1-7
  29. objects/oMagmaMan/collision_oWhip.gml:1-6
  30. objects/oGhost/collision_oWhip.gml:1
  31. scripts/scrShopItemsGen.gml:36-67
  32. scripts/scrGenerateItem.gml:47-62
  33. objects/oPlayer1/step.gml:617-630
  34. scripts/scrGenerateItem.gml:63-89
  35. scripts/scrShopItemsGen.gml:56-59
  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:333-338
  42. objects/oPlayer1/step.gml:1359-1386
  43. objects/oPlayer1/step.gml:541-557
  44. scripts/scrStealItem.gml:243-252
  45. Replay fidelity/replays/weapon-seed-66-shop.txt
  46. objects/oWeb/collision_oSlash.gml:1
  47. objects/oShopkeeper/collision_oWhip.gml:1-19
  48. objects/oDamsel/collision_oWhip.gml:1-12
  49. objects/oSlash/create.gml:3
  50. objects/oCaveman/collision_oWhip.gml:1

Source code

  • objects/oMachete/create.gml
  • objects/oSlash/create.gml
  • objects/oSlash/step.gml
  • objects/oMachetePre/create.gml
  • objects/oPlayer1/step.gml
  • scripts/scrUseItem.gml
  • scripts/scrShopItemsGen.gml
  • scripts/scrGenerateItem.gml
#