RapidGameFramework
Reusable Godot managers for data-driven small games
Loading...
Searching...
No Matches
card_manager.gd File Reference

Loads card definitions from JSON and indexes them by id, load order, and rarity. More...

Go to the source code of this file.

Namespaces

namespace  card_manager
 

Variables

 card_manager.DataCacheManager
 
 card_manager.data_cache_manager
 
 card_manager.card
 Load and index all cards from a JSON file.
 
 card_manager.id
 
 card_manager.rarity
 
 card_manager.list
 Return one card definition by id, or an empty Dictionary when missing.
 
 card_manager.options
 Return all cards matching a rarity string such as Common, Rare, Epic, or Legendary.
 
 card_manager.all_cards
 Return a random duplicated card definition from the full card library.
 

Detailed Description

Loads card definitions from JSON and indexes them by id, load order, and rarity.

Expected JSON shape:

{ "cards": [ { "id": "1", "name": "Example", "rarity": "Common" } ] }

Card data is intentionally stored as Dictionaries so different games can add custom fields without changing this manager.

Definition in file card_manager.gd.