purchase_cost
Determine the gold or faith cost to rush-buy a unit or building in a city and verify if it can be purchased before committing.
Instructions
Read-only: cost to rush-buy item (UNIT_.../BUILDING_...) with gold or faith right now, and whether
it's actually purchasable. yield_type is "GOLD" (default) or "FAITH". Wonders (built via a BUILDING_* item
too) are never purchasable in vanilla BNW -- can_purchase will read false. Check this before purchase_production.
A refusal carries reason and, when the engine has one, engine_reason: the same sentence the
production popup puts under a greyed-out purchase button.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | ||
| city_id | Yes | ||
| yield_type | No | GOLD |