genshin-manager
    Preparing search index...

    Class Artifact

    Represents a game artifact with stats and set bonuses

    Index

    Constructors

    • Create a Artifact

      Parameters

      • artifactId: number

        artifact ID

      • mainPropId: number = 10001

        main stat ID from ReliquaryMainPropExcelConfigData.json. Default: 10001

      • level: number = 0

        artifact level (0-20). Default: 0

      • appendPropIds: number[] = []

        artifact sub stat IDs

      Returns Artifact

      const artifact = new Artifact(81101, 10001, 20, [501221, 501231])
      console.log(artifact.name)
      console.log(artifact.mainStat.value)

    Properties

    appendProps: ArtifactAffixAppendProp[]

    Artifact sub stats

    description: string

    Artifact description

    Artifact icon

    id: number

    Artifact ID

    level: number

    Artifact level

    mainStat: StatProperty

    Main stat

    name: string

    Artifact name

    rarity: number

    Artifact rarity

    setDescriptions: Record<number, string | undefined> = {}

    Artifact set description (index:1 = 1pc, 2 = 2pc , 4 = 4pc)

    setId: undefined | number

    Artifact set ID

    setName: undefined | string

    Artifact set name

    subStats: StatProperty[]

    Artifact sub stats

    Artifact type

    Accessors

    • get allArtifactIds(): number[]

      Get all artifact IDs

      Returns number[]

      all artifact IDs

      const allIds = Artifact.allArtifactIds
      console.log(allIds.length)

    Methods

    • Get max level by artifact ID

      Parameters

      • artifactId: number

        artifact ID

      Returns number

      max level

      const maxLevel = Artifact.getMaxLevelByArtifactId(81101)
      console.log(maxLevel) // 20 for 5-star artifacts