feat(currency): money moves through the bounded vocabulary (§6)

give_item(gold) is +10,000c and does NOT mark gifts_given — that gate is a
global one-shot keyed by item id, so marking money would let an NPC pay you
exactly once per campaign. accept_item(<denom>) is offered only for the
denominations the purse can actually pay.

The eight moves do not grow. MoveValidator is untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QYa9u7Kdxv5gX4AnwWexy8
This commit is contained in:
2026-07-12 18:32:14 -05:00
parent 8a71671df7
commit c106dbbd37
4 changed files with 82 additions and 9 deletions

View File

@@ -21,12 +21,20 @@ static func available_moves(npc_dict: Dictionary, game_state, canon_log) -> Arra
moves.append("reveal(%s)" % t)
for i in caps.get("giveable_items", []):
if not game_state.is_gift_given(i):
# Currency is exempt from the one-shot gift gate — an NPC can pay you twice.
if Currency.is_currency(i) or not game_state.is_gift_given(i):
moves.append("give_item(%s)" % i)
for item_id in game_state.inventory.keys():
if int(game_state.inventory[item_id]) > 0:
moves.append("accept_item(%s)" % item_id)
# Money is not in the inventory dict, so it needs its own offer. Only the
# denominations the purse can actually pay: an NPC cannot ask a party holding
# 47c for a gold coin.
for denom in Currency.VALUES:
if game_state.purse_copper >= Currency.value(denom):
moves.append("accept_item(%s)" % denom)
moves.append_array(UNIVERSAL)
return moves