Slay the Spire run information#
- class FileParser(data: dict[str, Any])[source]#
- prefix: str = ''#
String to prepend to most data access.
- done: bool = False#
Whether the run is over.
- abstract property floor: int#
The last or latest floor.
- abstract property timestamp: datetime#
Save time, as UTC.
- abstract property timedelta: timedelta#
Time delta, semantics depending on the subclass.
- abstract property profile: Profile#
The profile this run is played on.
- abstract property character_streak: StreakInfo#
The run position in the character streak.
- abstract property rotating_streak: StreakInfo#
The run position in the rotating streak.
- property display_name: str#
The display name to be used on the website.
- property skipped_rewards: tuple[defaultdict[int, list[Relic]], defaultdict[int, list[Potion]]]#
All of the skipped relics and potions this run.
- property character: str | None#
Human-readable character name.
- property modded: bool#
Whether the run uses a modded character.
- property current_hp_counts: list[int]#
The current HP in all the floors, including Neow.
- property max_hp_counts: list[int]#
The max HP in all the floors, including Neow.
- property gold_counts: list[int]#
The gold in all the floors, including Neow.
- property potions: defaultdict[int, list[Potion]]#
The potions obtained through normal rewards or purchases.
- property potions_use: defaultdict[int, list[Potion]]#
The potions that were used during the run.
- property potions_alchemize: defaultdict[int, list[Potion]]#
The potions that were obtained from Alchemize during the run.
- property potions_entropic: defaultdict[int, list[Potion]]#
The potions that were obtained from Entropic Brew during the run.
- property potions_discarded: defaultdict[int, list[Potion]]#
The potions that were discarded during the run.
- property boss_relics: list[tuple[Relic | None, tuple[Relic, ...]]]#
Picked and skipped boss relics this run.
- property ascension_level: int#
The Ascension level of the run.
- property playtime: int#
Time between the start of the run and the latest save.
- abstract property keys: KeysObtained#
The Heart keys obtained this run.
- property card_choices: tuple[defaultdict[int, list[SingleCard]], defaultdict[int, list[SingleCard]]]#
A tuple of (picked, skipped) cards this run.
- get_cards() Generator[CardData, None, None] [source]#
Yield each card with no repetition, with count.
- property cards: Generator[str, None, None]#
All the cards in the deck, with upgrade.
- get_purchases() defaultdict[int, ShopContents] [source]#
Return a mapping of purchases for a given floor.
- get_shop_contents() defaultdict[int, ShopContents] [source]#
Return a mapping of unpurchased shop contents for a given floor.
- get_removals() Generator[CardData, None, None] [source]#
Yield each removed card with no repetition, with count.
- property has_removals: bool#
Whether we removed any card at all.
- property removals: Generator[tuple[str, int], None, None]#
Every (name, floor) tuple of removed card and their floor.
- property relics: list[RelicData]#
- property relics_bare: list[Relic]#
- property relics_obtained: defaultdict[int, list[Relic]]#
- property seed: str#
The seed being used for the pRNG in this run.
- property is_seeded: bool#
Whether a seed was manually chosen.
- property modifiers: list[str]#
- property modifiers_with_desc: list[str]#
- abstract property score: int#
- abstract property score_breakdown: list[str]#
- class BottleRelic(bottle_id, card)[source]#
Bases:
NamedTuple
- bottle_id: str#
The name of the bottle.
- card: SingleCard#
The card which is bottled.
- class Savefile(_debug=False)[source]#
Bases:
FileParser
Hold data related to the ongoing run.
API information: This should never be instantiated by custom code. There is only ever one savefile in memory, and it can be accessed by get_savefile().
The
data
instance attribute may occasionally be None, which means that no run is currently ongoing. To check if a run is ongoing, test forin_game
.- prefix: str = 'metric_'#
String to prepend to most data access.
- property in_game: bool#
- property act: int#
- property timestamp: datetime#
Save time for the run, as UTC.
- property timedelta: timedelta#
Time spent between the beginning and the latest save.
- property display_name: str#
The display name to be used on the website.
- property keys: KeysObtained#
The Heart keys obtained this run.
- property profile#
The profile this run is played on.
- property current_health: int#
- property max_health: int#
- property current_gold: int#
- property current_purge: int#
- property purge_totals: int#
- property shop_prices: tuple[tuple[range, range, range], tuple[range, range], tuple[range, range, range], tuple[range, range, range]]#
- property event_chances: tuple[int, int, int, int]#
- property current_floor: int#
- property floor: int#
The last or latest floor.
- property potion_chance: int#
- property rare_chance: tuple[float, float, float]#
- available_relic(relic: Relic) bool [source]#
Return True if the relic can be acquired still this run.
- property upcoming_boss: str#
- property bottles: list[BottleRelic]#
- property rotating_streak: StreakInfo#
The run position in the rotating streak.
- property character_streak: StreakInfo#
The run position in the character streak.
- property score: int#
- property score_breakdown: list[str]#
- property monsters_killed: int#
- property act1_elites_killed: int#
- property act2_elites_killed: int#
- property act3_elites_killed: int#
- property perfect_elites: int#
- property perfect_bosses: int#
- property has_overkill: bool#
- property mystery_machine_counter: int#
- property total_gold_gained: int#
- property has_combo: bool#
- property act_num: int#
- property deck_card_ids: list[str]#
- property has_activemods: bool#
- property activemods: ActiveMods#
- property ascension_level: int#
The Ascension level of the run.
- bar(dtype: str, items: Iterable[str], label: str | None = None, title: str | None = None, *, allow_private: bool = False) str | bytes #
- property boss_relics: list[tuple[Relic | None, tuple[Relic, ...]]]#
Picked and skipped boss relics this run.
- property card_choices: tuple[defaultdict[int, list[SingleCard]], defaultdict[int, list[SingleCard]]]#
A tuple of (picked, skipped) cards this run.
- property cards: Generator[str, None, None]#
All the cards in the deck, with upgrade.
- property character: str | None#
Human-readable character name.
- property current_hp_counts: list[int]#
The current HP in all the floors, including Neow.
- done: bool = False#
Whether the run is over.
- get_cards() Generator[CardData, None, None] #
Yield each card with no repetition, with count.
- get_purchases() defaultdict[int, ShopContents] #
Return a mapping of purchases for a given floor.
- get_removals() Generator[CardData, None, None] #
Yield each removed card with no repetition, with count.
- get_shop_contents() defaultdict[int, ShopContents] #
Return a mapping of unpurchased shop contents for a given floor.
- property gold_counts: list[int]#
The gold in all the floors, including Neow.
- graph(req: Request) Response #
- property has_removals: bool#
Whether we removed any card at all.
- property is_seeded: bool#
Whether a seed was manually chosen.
- master_deck_as_html()#
Return the cards from the deck suitable for the website.
- property max_hp_counts: list[int]#
The max HP in all the floors, including Neow.
- property modded: bool#
Whether the run uses a modded character.
- property modifiers: list[str]#
- property modifiers_with_desc: list[str]#
- property playtime: int#
Time between the start of the run and the latest save.
- property potions: defaultdict[int, list[Potion]]#
The potions obtained through normal rewards or purchases.
- property potions_alchemize: defaultdict[int, list[Potion]]#
The potions that were obtained from Alchemize during the run.
- property potions_discarded: defaultdict[int, list[Potion]]#
The potions that were discarded during the run.
- property potions_entropic: defaultdict[int, list[Potion]]#
The potions that were obtained from Entropic Brew during the run.
- property potions_use: defaultdict[int, list[Potion]]#
The potions that were used during the run.
- property relics: list[RelicData]#
- property relics_bare: list[Relic]#
- property relics_obtained: defaultdict[int, list[Relic]]#
- property removals: Generator[tuple[str, int], None, None]#
Every (name, floor) tuple of removed card and their floor.
- removals_as_html()#
Return the removed cards suitable for the website.
- property seed: str#
The seed being used for the pRNG in this run.
- property skipped_rewards: tuple[defaultdict[int, list[Relic]], defaultdict[int, list[Potion]]]#
All of the skipped relics and potions this run.
- get_savefile() Savefile [source]#
Get the current savefile. Check for
Savefile.in_game()
before using.
- class RunParser(filename: str, profile: int, data: dict[str, Any])[source]#
Bases:
FileParser
- done: bool = True#
Whether the run is over.
- property display_name: str#
The display name to be used on the website.
- property profile#
The profile this run is played on.
- property timestamp: datetime#
Time when the run finished, as UTC.
- property timedelta: timedelta#
Difference between now and the run.
- property keys: KeysObtained#
The Heart keys obtained this run.
- property won: bool#
- property verb: str#
- property killed_by: str | None#
- property floor_reached: int#
- property floor: int#
The last or latest floor.
- property acts_beaten: int#
Return how many acts were beaten.
- property final_health: tuple[int, int]#
- property score: int#
- property score_breakdown: list[str]#
- property run_length: str#
- property character_streak: StreakInfo#
The run position in the character streak.
- property rotating_streak: StreakInfo#
The run position in the rotating streak.
- property has_activemods: bool#
- property activemods: ActiveMods#
- property ascension_level: int#
The Ascension level of the run.
- bar(dtype: str, items: Iterable[str], label: str | None = None, title: str | None = None, *, allow_private: bool = False) str | bytes #
- property boss_relics: list[tuple[Relic | None, tuple[Relic, ...]]]#
Picked and skipped boss relics this run.
- property card_choices: tuple[defaultdict[int, list[SingleCard]], defaultdict[int, list[SingleCard]]]#
A tuple of (picked, skipped) cards this run.
- property cards: Generator[str, None, None]#
All the cards in the deck, with upgrade.
- property character: str | None#
Human-readable character name.
- property current_hp_counts: list[int]#
The current HP in all the floors, including Neow.
- get_cards() Generator[CardData, None, None] #
Yield each card with no repetition, with count.
- get_meta_scaling_cards() list[tuple[str, int]] #
Return info about the meta-scaling cards.
- get_purchases() defaultdict[int, ShopContents] #
Return a mapping of purchases for a given floor.
- get_removals() Generator[CardData, None, None] #
Yield each removed card with no repetition, with count.
- get_shop_contents() defaultdict[int, ShopContents] #
Return a mapping of unpurchased shop contents for a given floor.
- property gold_counts: list[int]#
The gold in all the floors, including Neow.
- graph(req: Request) Response #
- property has_removals: bool#
Whether we removed any card at all.
- property is_seeded: bool#
Whether a seed was manually chosen.
- master_deck_as_html()#
Return the cards from the deck suitable for the website.
- property max_hp_counts: list[int]#
The max HP in all the floors, including Neow.
- property modded: bool#
Whether the run uses a modded character.
- property modifiers: list[str]#
- property modifiers_with_desc: list[str]#
- property playtime: int#
Time between the start of the run and the latest save.
- property potions: defaultdict[int, list[Potion]]#
The potions obtained through normal rewards or purchases.
- property potions_alchemize: defaultdict[int, list[Potion]]#
The potions that were obtained from Alchemize during the run.
- property potions_discarded: defaultdict[int, list[Potion]]#
The potions that were discarded during the run.
- property potions_entropic: defaultdict[int, list[Potion]]#
The potions that were obtained from Entropic Brew during the run.
- property potions_use: defaultdict[int, list[Potion]]#
The potions that were used during the run.
- prefix: str = ''#
String to prepend to most data access.
- property relics: list[RelicData]#
- property relics_bare: list[Relic]#
- property relics_obtained: defaultdict[int, list[Relic]]#
- property removals: Generator[tuple[str, int], None, None]#
Every (name, floor) tuple of removed card and their floor.
- removals_as_html()#
Return the removed cards suitable for the website.
- property seed: str#
The seed being used for the pRNG in this run.
- property skipped_rewards: tuple[defaultdict[int, list[Relic]], defaultdict[int, list[Potion]]]#
All of the skipped relics and potions this run.