IRpgCharactersApi
Interface
Members
13
AddXpAsync
method
Grants XP to a joined viewer and applies any level-ups, or null on failure (spec 064).ValueTask<RpgAddXpInfo> AddXpAsync(string twitchUserId, long amount, CancellationToken cancellationToken = default)AllocatePointAsync
method
Spends amount points into stat (blank / "fortune" targets Fortune) for a joined viewer, or null over the cap / over the pool / on an unknown stat / on failure (spec 064).ValueTask<RpgProgressionInfo> AllocatePointAsync(string twitchUserId, string stat, int amount = default, CancellationToken cancellationToken = default)ConsumeItemAsync
method
Uses a consumable the viewer holds (applies its effects). False when not held / not usable / on failure.ValueTask<bool> ConsumeItemAsync(string twitchUserId, string itemSlug, CancellationToken cancellationToken = default)ExistsAsync
method
True when the viewer has an RPG character (i.e. has joined).ValueTask<bool> ExistsAsync(string twitchUserId, CancellationToken cancellationToken = default)GetAsync
method
The viewer's character, or null when they haven't joined (or RPG is unavailable).ValueTask<RpgCharacterInfo> GetAsync(string twitchUserId, CancellationToken cancellationToken = default)GetFortuneAsync
method
The viewer's luck (Fortune) value used to shape loot rolls. 0 when RPG is unavailable.ValueTask<int> GetFortuneAsync(string twitchUserId, CancellationToken cancellationToken = default)GetInventoryAsync
method
The viewer's inventory holdings (rarest first), or an empty list when not joined / unavailable.ValueTask<IReadOnlyList<RpgInventoryItem>> GetInventoryAsync(string twitchUserId, CancellationToken cancellationToken = default)GetLevelAsync
method
The viewer's current level; 0 when not joined / unavailable (spec 064).ValueTask<int> GetLevelAsync(string twitchUserId, CancellationToken cancellationToken = default)GetPendingModifierAsync
method
The viewer's single pending one-shot next-fight modifier, or null when none is set.ValueTask<RpgPendingModifierInfo> GetPendingModifierAsync(string twitchUserId, CancellationToken cancellationToken = default)GetProgressionAsync
method
The viewer's progression (level, XP toward the next level, Fortune, unspent points), or null when not joined / unavailable (spec 064).ValueTask<RpgProgressionInfo> GetProgressionAsync(string twitchUserId, CancellationToken cancellationToken = default)GrantItemAsync
method
Grants quantity of an item to a joined viewer (stacking). False on any failure.ValueTask<bool> GrantItemAsync(string twitchUserId, string itemSlug, int quantity = default, CancellationToken cancellationToken = default)GrantPointsAsync
method
Grants unspent allocation points to a joined viewer, or null on failure (spec 064).ValueTask<RpgProgressionInfo> GrantPointsAsync(string twitchUserId, int amount, CancellationToken cancellationToken = default)RespecAsync
method
Respecs a joined viewer (debits the cost, refunds spent points, resets stats), or null when unaffordable / on cooldown / on failure (spec 064).ValueTask<RpgRespecInfo> RespecAsync(string twitchUserId, CancellationToken cancellationToken = default)
