From 3ce892f846305e63a4e66997fc39abfcdb4aafdb Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Mon, 14 Sep 2026 12:00:46 -0500 Subject: [PATCH] Move items.jsonc under items/, add starter battle/moves.jsonc Groups item data under assets/items/ to match the cutscenes/ folder convention, updating itemInit()'s asset path accordingly. Also adds assets/battle/moves.jsonc as a starting point for move data - there's no JSON loader consuming it yet (battleability_t is still just a bare enum), so its field shape is a placeholder rather than a contract. Co-Authored-By: Claude Sonnet 5 --- assets/battle/moves.jsonc | 14 ++++++++++++++ assets/{ => items}/items.jsonc | 0 src/dusk/rpg/item/item.c | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 assets/battle/moves.jsonc rename assets/{ => items}/items.jsonc (100%) diff --git a/assets/battle/moves.jsonc b/assets/battle/moves.jsonc new file mode 100644 index 00000000..0f1d2da5 --- /dev/null +++ b/assets/battle/moves.jsonc @@ -0,0 +1,14 @@ +{ + // Keyed by move id. "ability" matches a BATTLE_ABILITY_* enum name + // (see src/dusk/rpg/battle/battleability.h) - there's no JSON loader + // consuming this file yet, so field names/shape here are a starting + // point, not a contract. + "moves": { + "fire": { + "ability": "FIRE", + "power": 12, + "mpCost": 4, + "target": "SINGLE_ENEMY" + } + } +} diff --git a/assets/items.jsonc b/assets/items/items.jsonc similarity index 100% rename from assets/items.jsonc rename to assets/items/items.jsonc diff --git a/src/dusk/rpg/item/item.c b/src/dusk/rpg/item/item.c index 937e4302..4be5f980 100644 --- a/src/dusk/rpg/item/item.c +++ b/src/dusk/rpg/item/item.c @@ -34,7 +34,8 @@ errorret_t itemInit(void) { ITEM.typeCount = ITEM_TYPE_NULL + 1; ITEM.defCount = ITEM_ID_NULL + 1; - assetentry_t *entry = assetLock("items.jsonc", ASSET_LOADER_TYPE_JSON, NULL); + assetentry_t *entry = + assetLock("items/items.jsonc", ASSET_LOADER_TYPE_JSON, NULL); errorret_t ret = assetRequireLoaded(entry); if(errorIsNotOk(ret)) { assetUnlockEntry(entry);