UNPKG

fnbr

Version:

A library to interact with Epic Games' Fortnite HTTP and XMPP services

105 lines (104 loc) 2.71 kB
import STWItem from './STWItem'; import type Client from '../../Client'; import type { STWSurvivorSquadData, STWSurvivorType, STWItemRarity, STWSurvivorGender, STWItemTier } from '../../../resources/structs'; import type { STWProfileSurvivorData } from '../../../resources/httpResponses'; /** * Represents a Save The World profile's survivor */ declare class STWSurvivor extends STWItem { /** * The survivor's type. * Special means it's from an event (eg. halloween). * Manager means it's a lead survivor */ type: STWSurvivorType; /** * The survivor's name (will be undefined for basic survivors) */ name?: string; /** * The survivor's tier */ tier: STWItemTier; /** * The survivor's rarity */ rarity: STWItemRarity; /** * The survivor's manager synergy */ managerSynergy?: string; /** * The survivor's gender */ gender: STWSurvivorGender; /** * The survivor's level */ level: number; /** * The survivor's squad information. * Will be undefined if the survivor is not part of a squad */ squad?: STWSurvivorSquadData; /** * The survivor's portrait ID */ portrait?: string; /** * The survivor's max level bonus */ maxLevelBonus: number; /** * The survivor's personality */ personality: string; /** * The survivor's XP */ xp: number; /** * The survivor's equipped building's ID. * Seems to be unused by the game */ buildingSlotBuildingId?: string; /** * The survivor's set bonus */ setBonus: string; /** * Whether the survivor is marked as seen */ isSeen: boolean; /** * Whether the survivor is marked as favorite */ isFavorite: boolean; /** * @param client The main client * @param id The item ID * @param data The survivors's data */ constructor(client: Client, id: string, data: STWProfileSurvivorData); /** * Whether the survivor is a leader */ get isLeader(): boolean; /** * The survivor's power level. * Depends on the tier, level, rarity value and whether the survivor is a leader */ get powerLevel(): number; /** * The survivor's lead bonus. * Will return 0 if the survivor is not a leader or not part of a squad */ get leadBonus(): number; /** * Calculates the survivor's bonus. * Depends on the leader's rarity and personality. * Returns 0 if the survivor is a leader */ calcSurvivorBonus(leader: STWSurvivor): 0 | 2 | 4 | 8 | 3 | 5 | -2; } export default STWSurvivor;