Skip to content

Feat/items#62

Merged
Darrin-Lin merged 6 commits into
mainfrom
feat/items
Jun 1, 2026
Merged

Feat/items#62
Darrin-Lin merged 6 commits into
mainfrom
feat/items

Conversation

@MaxWutw
Copy link
Copy Markdown
Contributor

@MaxWutw MaxWutw commented May 29, 2026

This pull request adds support for consumable potions and dungeon ticket items, including their serialization, deserialization, and in-game logic for drops and usage. It introduces new item types (ConsumableItem and TicketItem), updates item encoding/decoding, and ensures their assets are correctly imported and loaded. Additionally, it enhances monster drop logic to include potions and tickets.

New item types and logic:

  • Added ConsumableItem and TicketItem classes, encapsulating properties and behaviors for potions and dungeon tickets, including healing, burn removal, and ticket difficulty. Also added the ItemCatalog utility for item creation and identification.

Serialization and deserialization:

  • Updated PlayerProfileSnapshot.Encode and Decode methods to properly handle the new ConsumableItem and TicketItem types, ensuring correct storage and retrieval of their properties. [1] [2]
  • Improved LoadTextureOrNull to search for item textures in the new Assets/items/ path.
  • Added a ReadBool helper method to robustly parse boolean values from dictionaries.

Monster drop logic:

  • Modified Monster.TrySpawnDrops to roll and spawn potion and ticket drops using the new item types and utilities. [1] [2]

Asset imports:

  • Added .import files for all potion and ticket item sprites to ensure textures are available in the Godot project. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Copy link
Copy Markdown
Contributor

@whyer123 whyer123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

@Darrin-Lin Darrin-Lin merged commit 33f919c into main Jun 1, 2026
1 check passed
@NaoCoding NaoCoding deleted the feat/items branch June 1, 2026 07:37
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.

3 participants