Merchant

The merchant is a special type of friendly npc. Several merchants will be spawned throughout a run somewhere in a level. There are five types of merchants, but they all work the same and they all will sell at least 3 different items, usually ammo or weapons. Unless attacked the merchant is friendly and will not attack. The items can be bought in exchange for ammo, health or hearts. The sold items will become better the further the player progresses. Starting a B-Level will cause existing merchants to regenerate their offerings.

All items can be bought. It is also possible to come back to a merchant in a previous level to trade at some later point.

Enemies will usually ignore the merchant and the merchant will ignore enemies, but when in doubt the merchant will join the enemies.

## Merchant types

Merchant types are random and can be identified by their offerings but also be the slightly different carriage next to them.

### General Merchant

This merchant is the default merchant and the most common type. He will always offer three items. The first one will always be some kind of ammo. The second option is some kind of weapon and the third option could be anything, including health or upgrades but also more ammo or weapons.

### Ammo Trader

This merchant is specialized in trading ammunition. He will have every ammo type in stock, but the quantity is randomized. He is the only merchant with five choices to choose from.

### Doctor

This merchant is selling health items. This means you can buy regular medicine, but also large medicine to increase your maximum health. It's very useful to know where a doctor is located, just in case.

### Arms Dealer

This merchant is trading with weapons. Sometimes he will offer surprisingly rare or powerful weapons way before they would usually show up. The prices vary from very cheap to extremely expensive. Make sure you know what you are spending your ammo on.

### Upgrade Merchant

This merchant is rather rare and very similar to the general merchant but is selling 4 instead of 3 items and has an increased chance for offering an upgrade.

## Spawning behavior

**Merchants** will only appear in open areas and try to avoid standing close to the borders of the level. They will also avoid other traders. If no valid spawn area can be found no merchant will be spawned.

The level generation rules for spawning merchants are different in looped runs, where every level is expected to have a merchant. In non-looped runs the rules are as follows:

* Level 1-1 and 3-3 will never have a merchant.
* Level 1-3, 2-2 and 3-1 are expected to have a merchant, with only level 2-2 rarely having multiple merchants (up to an extremely rare theoretical maximum of 4)
* Level 1-2, 2-1, 2-3, and 3-2 have a 1 in 3 chance to have a merchant

If there have been more than 5 merchants spawned in a run no additional merchants will be spawned. This limit does not apply when looping.

## Currency

The Canyon does not have a cash-based currency. Instead people usually use ammunition as currency.

The trader will put a price on his items. Usually this is a set of different ammo types. But sometimes he will also trade for health points (red hearts) instead. On rare occasions he will also ask for hearts (gray hearts), which will decrease the player's maximum health but is very valuable.

## Fighting the merchant

It is possible to attack and to kill the merchant. This will turn the merchant hostile and destroy all offered items except for one. The remaining item is decided on level generation and is completely random. If the item that would not get destroyed was bought, before attacking the merchant, no item will remain. So to make sure you get a guaranteed free item you cannot buy any items from that merchant beforehand.

Merchant's combat strength is similar to elite enemies, but can become much stronger later in the game and also when there have been a lot of merchants killed already. The more merchants are killed throughout a run the stronger future merchants will become.

When turning hostile merchants will get some additional health, a gun and a shield.

It is possible to kill merchants immediatly without them becoming hostile (and therefore getting their health and shield boost), but this requires a very high damage weapon (damage needs to be done within a single tick) and becomes harder later in the game because the base health of merchants increases with run progress. If the weapon does about 40 damage or more in a single shot it is worth a try.