Haggle with the merchant
A game character you can really talk to. Grub the ogre runs a market stall and you've got 100 gold. Charm him, make him laugh, haggle him down. When you shake on a price, the sale goes through in the game.
Your purse100 gold
Loading...
He can come down a bit for a good haggler. Prices are in made-up gold: nothing here costs anything.
The character gets a sell tool. The game checks each sale (enough gold? still in stock?) and answers, and the character reacts to what it says.
const tools = {
sell: ({ item, price }) => {
if (price > gold) return `The player only has ${gold} gold.`;
gold -= price; bag.push(item);
return 'Sold!';
},
};
// and the face: grub.face, from buildCharacter('grub')