h1-testing-fictional-characters
v1.0.1
Published
A collection of fictional characters for use as gaming assets.
Maintainers
Readme
gaming-fictional-characters
A collection of original fictional characters for use as gaming assets. Each
character ships with game-ready metadata: class, element, rarity, and base
stats.
Install
npm install gaming-fictional-charactersUsage
ESM:
import characters, { characterList, getCharacter, getByRarity } from "gaming-fictional-characters";
console.log(characters.aeloria.name); // "Aeloria Dawnblade"
console.log(getCharacter("nyx").stats.speed); // 150
console.log(getByRarity("legendary").length); // 3CommonJS:
const characters = require("gaming-fictional-characters");
console.log(characters.emberly.class); // "Mage"Character shape
{
id: "aeloria",
name: "Aeloria Dawnblade",
class: "Paladin",
element: "Light",
rarity: "legendary",
description: "...",
stats: { hp: 1200, attack: 85, defense: 140, speed: 60, magic: 70 }
}API
| Export | Description |
| --- | --- |
| characters (default) | Object of all characters keyed by id. |
| characterList | Flat array of every character. |
| getCharacter(id) | Returns one character by id, or undefined. |
| getByRarity(rarity) | Array of characters with the given rarity. |
| getByClass(className) | Array of characters with the given class. |
License
MIT
