enka-network-api
Version:
Enka-network API wrapper for Genshin Impact.
77 lines (76 loc) • 3.43 kB
TypeScript
import { ImageAssets } from "../assets/ImageAssets";
import { TextAssets } from "../assets/TextAssets";
import { Skill } from "./talents/Skill";
import { Constellation } from "./Constellation";
import { ElementalBurst } from "./talents/ElementalBurst";
import { Costume } from "./Costume";
import { PassiveTalent } from "./talents/PassiveTalent";
import { ElementalSkill } from "./talents/ElementalSkill";
import { NormalAttack } from "./talents/NormalAttack";
import { NameCard } from "../material/Material";
import { CharacterDetails } from "./CharacterDetails";
import { CharacterAscension } from "./CharacterAscension";
import { EnkaClient } from "../../client/EnkaClient";
import { Element } from "../Element";
import { WeaponType } from "../weapon/WeaponData";
import { StatProperty } from "../StatProperty";
import { ExcelJsonObject } from "../../client/ExcelTransformer";
export type BodyType = "BODY_MALE" | "BODY_BOY" | "BODY_LADY" | "BODY_GIRL" | "BODY_LOLI";
export type CharacterRarity = "QUALITY_ORANGE" | "QUALITY_PURPLE" | "QUALITY_ORANGE_SP";
export type Gender = "MALE" | "FEMALE";
export type Arkhe = "Pneuma" | "Ousia" | "Furina";
export declare class CharacterData {
readonly id: number;
readonly enka: EnkaClient;
readonly name: TextAssets;
readonly description: TextAssets;
readonly bodyType: BodyType;
readonly weaponType: WeaponType;
readonly gender: Gender;
readonly icon: ImageAssets;
readonly sideIcon: ImageAssets;
readonly splashImage: ImageAssets;
/** This is not available for Travelers */
readonly gachaSlice: ImageAssets;
readonly cardIcon: ImageAssets;
/** This will be null if the character is Traveler */
readonly nameCard: NameCard | null;
readonly rarity: CharacterRarity;
readonly stars: number;
readonly costumes: Costume[];
readonly skillDepotId: number;
readonly elementalBurst: ElementalBurst | null;
readonly element: Element | null;
readonly arkhe: Arkhe | null;
readonly skills: Skill[];
/** Can be null if the character doesn't have element such as traveler without elements */
readonly elementalSkill: ElementalSkill | null;
readonly normalAttack: NormalAttack;
readonly passiveTalents: PassiveTalent[];
readonly constellations: Constellation[];
/** This will be null if the character is not (being) released character, like Travelers and test avatars */
readonly releasedAt: Date | null;
readonly isArchon: boolean;
readonly isTraveler: boolean;
/** Information in the profile menu in in-game character screen */
readonly details: CharacterDetails | null;
readonly _data: ExcelJsonObject;
readonly _nameId: string;
readonly _skillData: ExcelJsonObject;
readonly _releaseData: ExcelJsonObject | null;
constructor(data: ExcelJsonObject, enka: EnkaClient, candSkillDepotId?: number);
/**
* @returns character's original name (Travelers -> Aether, Lumine)
*/
getOriginalName(): TextAssets;
/**
* @param ascension ascension level between 0 and 6
*/
getAscensionData(ascension: number): CharacterAscension;
/**
* @param ascension ascension level between 0 and 6
* @param level character level between 1 and 90
*/
getStats(ascension: number, level: number): StatProperty[];
static getById(id: number, enka: EnkaClient, candSkillDepotId?: number): CharacterData;
}