Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item Manager Component #9

Open
loothero opened this issue May 10, 2024 · 0 comments
Open

Item Manager Component #9

loothero opened this issue May 10, 2024 · 0 comments

Comments

@loothero
Copy link
Member

loothero commented May 10, 2024

struct Item {
    #[key]
    id: u64,
    creator_id: u64,
    name: felt252,
    description: ByteArray,
    category: Category,
    tier: Tier,
    elemental: Elemental,
    modifier: Modifier,
    onchain_art: ByteArray,
    offchain_art: ByteArray,
    image_prompt: ByteArray,
}

enum Category {
    Weapon,
    Armor,
    Special,
}

enum Tier {
    Poor,
    Common,
    Uncommon,
    Rare,
    Epic,
    Legendary,
    Mythical,
    Divine,
}

enum Elemental {
    None,
    Earth,
    Fire,
    Water,
}

struct Modifier {
    modifier_type: ModifierType,
    amount: u8,
    stat: Stat,
    is_percentage: bool,
}

enum ModifierType {
    Attack: u8,
    Defense: u8,
    Slot0: u8,
    Slot1: u8,
    Slot2: u8,
    Slot3: u8,
    Slot4: u8,
    Slot5: u8,
    Slot6: u8,
    Slot7: u8,
    Stat: (Stat, u8),
}

enum Stat {
    Strength,
    Dexterity,
    Vitality,
    Intelligence,
    Wisdom,
    Charisma,
    Luck,
}

depends on Creator Component

@loothero loothero changed the title Item Registration Component Item Manager Component May 14, 2024
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

No branches or pull requests

1 participant