Skip to content

Implement character, currency, and shop changes#8

Open
konard wants to merge 3 commits into
RattusRex:mainfrom
konard:issue-7-1a3c7c68478f
Open

Implement character, currency, and shop changes#8
konard wants to merge 3 commits into
RattusRex:mainfrom
konard:issue-7-1a3c7c68478f

Conversation

@konard
Copy link
Copy Markdown

@konard konard commented May 27, 2026

Fixes #7

Summary

  • Added character fields for ability scores, subclass, race, investigation, HP, armor class, and background.
  • Extended inventories with gold, silver, and copper plus item rarity and consumable flags.
  • Wired inventory/shop routes into the FastAPI app and added rarity-based shop search, buy, and sell flows with character or hireling modifiers.
  • Moved table creation into FastAPI lifespan startup so tests can override the database cleanly.

Reproduction and Verification

  • Reproducing coverage: tests/test_issue_7.py exercises the new character fields, split currency normalization, item rarity/consumable storage, successful buy, failed search cost behavior, and selling only owned items.
  • Local checks: pytest -q passed with 5 tests.

API Notes

  • Buy/search requests accept rarity, is_consumable, searcher_type, and hireling_level.
  • Sell requests require an owned item_id; successful sales remove the item and add calculated currency.

konard added 2 commits May 27, 2026 11:24
Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: RattusRex#7
@konard konard changed the title [WIP] Изменения персонажа и валюты Implement character, currency, and shop changes May 27, 2026
@konard konard marked this pull request as ready for review May 27, 2026 11:33
@konard
Copy link
Copy Markdown
Author

konard commented May 27, 2026

Working session summary

Implemented issue #7 and updated PR #8: #8

What changed:

  • Added character fields: ability scores, subclass, race, investigation, HP, armor class, background.
  • Added split currency: gold, silver, copper.
  • Added item rarity and consumable flag.
  • Wired inventory/shop routes into app.main.
  • Implemented rarity-based shop search, buy, and sell flows with character/hireling modifiers, d20 checks, d100 price rolls, failed-search hireling costs, inventory ownership checks, and currency deduction/addition.
  • Added pytest coverage in tests/test_issue_7.py.

Verification:


This summary was automatically extracted from the AI working session output.

@konard
Copy link
Copy Markdown
Author

konard commented May 27, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $4.344699

📊 Context and tokens usage:

  • 105.6K / 1.1M (10%) input tokens, 18.2K / 128K (14%) output tokens

Total: (105.6K + 2.5M cached) input tokens, 18.2K output tokens, $4.344699 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (34778KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Author

konard commented May 27, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • No CI/CD checks are configured for this repository
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Изменения персонажа и валюты

1 participant