artipy.analysis
Submodules
artipy.analysis.analyse module
This module contains functions for analysing artifacts and their rolls.
- artipy.analysis.analyse.calculate_artifact_crit_value(artifact: Artifact) Decimal [source]
Calculate the crit value of an artifact. This is the sum of the crit damage and the crit rate times two.
- Parameters:
artifact (artipy.artifacts.Artifact) – The artifact to calculate the crit value
- Returns:
The crit value of the artifact.
- Return type:
Decimal
- artipy.analysis.analyse.calculate_artifact_maximum_roll_value(artifact: Artifact) Decimal [source]
Calculate the maximum roll value of an artifact. This is the roll value of the artifact with all remaining rolls being maximum rolls.
- Parameters:
artifact (artipy.artifacts.Artifact) – The artifact to calculate the maximum
- Returns:
The maximum roll value of the artifact.
- Return type:
Decimal
- artipy.analysis.analyse.calculate_artifact_roll_value(artifact: Artifact) Decimal [source]
Calculate the roll value of an artifact. This is the sum of the roll values of all substats.
- Parameters:
artifact (artipy.artifacts.Artifact) – The artifact to calculate the roll value
- Returns:
The roll value of the artifact.
- Return type:
Decimal
- artipy.analysis.analyse.calculate_substat_roll_magnitudes(substat: SubStat) tuple[RollMagnitude, ...] [source]
Calculate the roll magnitudes of a substat. This is the closest roll magnitude to the actual roll value for each roll.
- Parameters:
substat (artipy.stats.SubStat) – The substat to calculate the roll magnitudes for.
- Returns:
The roll magnitudes of the substat.
- Return type:
tuple[RollMagnitude, …]
- artipy.analysis.analyse.calculate_substat_roll_value(substat: SubStat) Decimal [source]
Calculate the substat roll value. This is the value of the substat divided by the highest possible value of the substat.
- Parameters:
substat (artipy.stats.SubStat) – The substat to calculate the roll value for.
- Returns:
The roll value of the substat.
- Return type:
Decimal
- artipy.analysis.analyse.calculate_substat_rolls(substat: SubStat) int [source]
Calculate the number of rolls of a substat. This is the difference between the actual roll value and the average roll value divided by the average roll value.
- Parameters:
substat (artipy.stats.SubStat) – The substat to calculate the rolls for.
- Returns:
The number of rolls of the substat.
- Return type:
int
artipy.analysis.plots module
This module contains functions to plot various statistics of artifacts.
- artipy.analysis.plots.plot_artifact_substat_rolls(artifact: Artifact) None [source]
Plot the substat rolls of an artifact.
- Parameters:
artifact (artipy.artifacts.Artifact) – The artifact to plot the substat rolls for.
- artipy.analysis.plots.plot_crit_value_distribution(iterations: int = 1000) None [source]
Plot the crit value distribution of artifacts.
- Parameters:
iterations (int, optional) – The artifacts to generate. Defaults to 1000.
- artipy.analysis.plots.plot_expected_against_actual_mainstats(iterations: int = 1000) None [source]
Plot the expected mainstats against the actual mainstats of artifacts.
- Parameters:
iterations (int, optional) – The artifacts to generate. Defaults to 1000.
- artipy.analysis.plots.plot_multi_value_distribution(iterations: int = 1000, *, attributes: tuple[str]) None [source]
Plot a combined histogram of multiple attributes of artifacts.
- Parameters:
attributes (tuple[str]) – The attributes to plot.
iterations (int, optional) – The artifacts to generate. Defaults to 1000.
- Raises:
ValueError – If an invalid attribute is passed.
artipy.analysis.simulate module
This module contains functions to simulate artifacts.
- artipy.analysis.simulate.create_multiple_random_artifacts(amount: int = 1) list[Artifact] [source]
Create multiple random artifacts.
- Parameters:
amount (int, optional) – The amount of artifacts to generate. Defaults to 1.
- Returns:
The list of random artifacts.
- Return type:
- artipy.analysis.simulate.create_random_artifact(slot: ArtifactSlot, rarity: int = 5) Artifact [source]
Create a random artifact.
- Parameters:
slot (artipy.types.ArtifactSlot) – The slot of the artifact.
rarity (int, optional) – The rarity of the artifact. Defaults to 5.
- Returns:
The random artifact.
- Return type:
- artipy.analysis.simulate.upgrade_artifact_to_max(artifact: Artifact) Artifact [source]
Upgrade an artifact to its maximum level.
- Parameters:
artifact (artipy.artifacts.Artifact) – The artifact to upgrade.
- Returns:
The upgraded artifact.
- Return type:
Module contents
Module for analysing artifacts.
- artipy.analysis.calculate_artifact_crit_value(artifact: Artifact) Decimal [source]
Calculate the crit value of an artifact. This is the sum of the crit damage and the crit rate times two.
- Parameters:
artifact (artipy.artifacts.Artifact) – The artifact to calculate the crit value
- Returns:
The crit value of the artifact.
- Return type:
Decimal
- artipy.analysis.calculate_artifact_maximum_roll_value(artifact: Artifact) Decimal [source]
Calculate the maximum roll value of an artifact. This is the roll value of the artifact with all remaining rolls being maximum rolls.
- Parameters:
artifact (artipy.artifacts.Artifact) – The artifact to calculate the maximum
- Returns:
The maximum roll value of the artifact.
- Return type:
Decimal
- artipy.analysis.calculate_artifact_roll_value(artifact: Artifact) Decimal [source]
Calculate the roll value of an artifact. This is the sum of the roll values of all substats.
- Parameters:
artifact (artipy.artifacts.Artifact) – The artifact to calculate the roll value
- Returns:
The roll value of the artifact.
- Return type:
Decimal
- artipy.analysis.calculate_substat_roll_value(substat: SubStat) Decimal [source]
Calculate the substat roll value. This is the value of the substat divided by the highest possible value of the substat.
- Parameters:
substat (artipy.stats.SubStat) – The substat to calculate the roll value for.
- Returns:
The roll value of the substat.
- Return type:
Decimal
- artipy.analysis.calculate_substat_rolls(substat: SubStat) int [source]
Calculate the number of rolls of a substat. This is the difference between the actual roll value and the average roll value divided by the average roll value.
- Parameters:
substat (artipy.stats.SubStat) – The substat to calculate the rolls for.
- Returns:
The number of rolls of the substat.
- Return type:
int