Saplings-Projects / 1M_sub

Game project for Fauna's 1M sub : a dungeon crawler
GNU General Public License v3.0
2 stars 12 forks source link

Shop event #119

Open Turtyo opened 1 month ago

Turtyo commented 1 month ago

Feature Description

The shop is a place used to buy new cards, torches, items and consumables. You can also remove cards from your deck in the shop.

Motivation

Player get card rewards with fights and items with mini-boss / boss. All fights also yield gold, and the shop is a way to spend it to be able to customize your build / deck more.

Concept art / Designs

The items should be organized on a cat tree (since the shopkeeper is a cat) image

The card removal should be a box of dirt (the shopkeeper buries the card). Buying a card makes the shopkeeper sweep the card from the tree with its paw.

Those last two points are more on the animation side and should probably not be implemented yet.

Acceptance Criteria

Proposed Solution

Adding torches, items and consumable is already managed by the Inventory, so it should just be a question of linking the visual interface to the inventory.

For adding cards and removing cards, we don't have a proper system yet I think. Need to see how we add or remove cards. We have the current deck as an array of cards I think ? it's a copy of a default deck, so we need to modify this (not the original deck).

Each card, item, consumable should be done with a texture button, as it's probably the easiest way to interact with it.

Additional Context

The interface should have card/items/removal in number 3/2/1 or 3/3/1, probably making the top row 3 cards, then below 2 or 3 items. The item removal can be at the bottom right; the consumables can be on the last row at the bottom, 3 consumables should be good. Keep it a bit modular so if we want to change it to have more or less item / cards later we don't need to redo everything.

This probably means that the interface should be a UI control and we spawn buttons in the UI control depending on the number we want. The image for the cat tree will be done later when we decide on the game balance and how many of each we want.

JonaLam commented 1 day ago

I don't think we have a proper system for a in game deck yet, the system you mentioned under Proposed Solution I think uses Resources which I don't think is a good solution for decks that change over the course of the game. So unless there is a deck system I'm not aware of I think it would be better to wait with this pr and maybe make a new pr regarding decks and building of the deck

Turtyo commented 13 hours ago

The default deck is a resource, and it only contains an array of cards. When starting the game, the array of card is copied into the current deck, it's an array. Adding and removing cards then just comes to adding and removing things from an array. I think we have the tools for this PR already