Skip to content

buy beta ​

Function of @v12-engine/engine

ts
export declare function buy(world: World, shop: Entity, item: string, player: number, buyer?: Entity): boolean;

Sells an item to a hero standing at the shop: the one that is named, or the closest one with room. Tells the player why when it cannot