CoCalc is a real-time collaborative commercial alternative to JupyterHub and Overleaf that provides Jupyter Notebooks, LaTeX documents, and SageMath.
CoCalc is a real-time collaborative commercial alternative to JupyterHub and Overleaf that provides Jupyter Notebooks, LaTeX documents, and SageMath.
Path: blob/master/typings/player.d.ts
Views: 713
import { TODO } from "./util";1import { Game } from "./game";2import { Item } from "./item";3import { Backpack } from "./backpack";4import { Pet } from "./pet";5export declare type ItemType =6| "follow"7| "hat"8| "outfit"9| "spellRelic"10| "weapon"11| "boots";12export declare type Zones = "tower_town";13export declare class Player {14static ACCOUNT_RESET_ZONE_KEEPERS: Zones[];15static HP_BONUS: {16A: number;17"A+": number;18"A-": number;19B: number;20"B+": number;21"B-": number;22C: number;23"C+": number;24"C-": number;25};26static LEVEL_CURVE: { lvl: number, a: number }[]27static enemiesPerLevel(level: number): number;28static getAoeEvolutions(): number[];29static getAttacksFromCurve(prop0: unknown[], prop1: number, prop2: number): unknown[]30static getAttacksOfType(prop0: unknown, prop1: unknown): unknown[];31static getEvolutionsFromCurve(prop0: unknown[], prop1: number, prop2: number): unknown[]32static getHeartsFromCurve(prop0: unknown[], prop1: number, prop2: number): number33static getLevelPercent(stars: number): number;34static getSingleShotEvolutions(): number[];35static levelFromStars(stars: number): number;36static starsToLevel(stars: number): number37static MAX_HEARTS: number38achievements: TODO;39appearance: TODO;40backpack: Backpack;41daily: TODO;42dailyQuestions: TODO;43encounters: TODO;44equipment: TODO;45house: TODO;46kennel: {47addPet(id: number): unknown48data: Pet[];49petTeam: Pet[];50};51onHPChange: TODO;52quests: TODO;53state: TODO;54_remoteLogger: TODO;55tutorial: TODO;56game: Game;57immortal: boolean;58inPVP: boolean;59isClassCodeAttached: boolean;60readonly isFocusModeEnabled: boolean; // Getter61danceID?: unknown;62emoteID?: unknown;63appearanceChanged: boolean;64broadcastId: number;65catchAttempt: number;66chatID: number;67classIDs: number[];68coOpTeam?: unknown;69currentVideoSkillId?: unknown;70curriculumTreeID: number;71earlyBirdLastChance: boolean;72grade: number;73isOpponent: boolean;74hasUsedTicket: boolean;75/** Membership */76P: boolean;77justLeveled: boolean;78/** A date ISOString */79lastVisited: string;80locationSelectionType: string; // home81memberEndDate?: unknown; // possibly Date?82memberPrompt: boolean;83memberShareDate?: unknown; // possibly Date?84/** A date ISOString */85memberStartDate?: string;86modifiers: {87maxHearts: number;88damage: number;89miss: number;90ignoreElement: number;91potion?: unknown;92};93overrideClassSelect: boolean;94owners: {95id: number;96ownerID: number;97startDate: number;98}[];99parentEmail: string;100parentalLink: boolean;101password: string;102playerParents: unknown[];103playerTeachers: {104id: number;105type: string;106startDate: number;107}[];108pvpHP: number;109registerDate: Date;110readonly saveEnabled: boolean; // Getter111source?: unknown;112spellStreak: number;113starsEarned: number;114starsReward: number;115starsRewardBase: number;116starsToProcess: number;117data: PlayerData;118team?: unknown;119transformID?: unknown; // Possibly number?120tutorialCompletedThisSession: boolean;121type: string; // Possibly "A" | "B" | "C" | "D" | "F"122updated: boolean;123userID: number;124username: string;125world: {126id: number;127full: number;128name: string;129meta: unknown; // Seems to be {type: "hat", ID: 47} for me.130count: number;131};132_isFocusModeEnabled: false;133_saveEnabled: true;134name: PlayerName;135addAsset(asset: unknown): void;136addBattle(): void;137addBountyScore(bountyScore: number): void;138addLoss(): void;139addSpell(spell: number): void;140addStars(stars: number, prop1: boolean, prop2: boolean): boolean;141addWin(): void;142anyPetsAboveLevel(level: number): boolean;143canCatch(): boolean;144canSpin(): boolean;145castSpell(prop0: boolean): void;146changeCurrentHearts(prop0: number, prop1: number): void;147changeCurrentHeartsPercent(percent: number): void;148changeEnergy(energy: number): void;149changeGold(gold: number, prop1: boolean): void;150checkVersion(): void;151completeDaily(daily: keyof PlayerData, completed: boolean): void;152completeTower(tower: number): void;153constructor(prop0: unknown);154createDataClone(): Player;155createRandom(): void;156diffAttackSlots(level: number): void;157equip(id: number, type: ItemType): boolean;158evolve(unused0: never, unused1: never): never;159forceSaveCharacter(): void;160getAllAttacks(): number[];161getAllowsHouseVisitors(): boolean;162getArenaPoints(): number;163getAttacks(): number[];164getAvailableEvolutions(): unknown[]; // What does this return?165getBaseMaxHearts(): number;166getBattles(): number;167getBountyScore(): number;168getColiseum(): number;169getCurrentBamSpells(): number[];170getCurrentHearts(): number;171getDailyQuestions(): Player["dailyQuestions"];172getDamageBonus(): ReturnType<Player["equipment"]["getDamageBonuses"]>;173getDataAndClear(): Partial<Player>;174getElement(): "wizard";175getEnergy(): number;176getEquipmentSpell(): { ID: number; type: unknown; locked: boolean };177getFirstName(): string;178getGold(): number;179getHeartBonus(): number;180getID(): Player["userID"];181getLatestClassIDLegacy(): number;182getLevel(): number;183getLevelingCurve(level: number): unknown[];184getLosses(): number;185getMaxHearts(level: number): number;186getMaxTimeForCurrentMorphMarbleEffect(): number;187getName(): string;188getNameWithoutNickname(): string;189getNativeSpell(190prop0: unknown,191prop1: unknown[],192prop2: unknown,193prop3: unknown194): unknown;195getNumAttacks(): number;196getNumRelics(): number;197getPercentToLevel(): number;198getPlayerClass(): string;199getPlayerData(): PlayerData;200getRegisterDate(): Date | null;201getSettings(): PlayerData["settings"];202getSpellAssets(): unknown[];203getSpellStreak(): Player["spellStreak"];204getStarReward(): number;205getStarRewardByDamage(damage: number): number;206getStars(): number | null;207getStarsToLevel(): number;208getStatHealth(): number;209getStatPower(): number;210getTeamScore(): number;211getTowerProgress(): number;212getUpdatedData(prop0: unknown, prop1: unknown): unknown;213getWins(): number;214hasCompletedTowerTownTutorial(): boolean;215hasCompletedTutorial(): boolean;216hasHouseItem(item: Item): boolean;217hasMaxQuantityOfItem(type: unknown, item: unknown): boolean;218hasMembership(): Player["it"];219hasValidatedParentEmail(): boolean;220hasValidatedTeacherEmail(): boolean;221heal(): void;222healTeam(hearts: number): void;223healTeamMember(hearts: number, prop1: unknown, prop2: unknown): void;224init(prop0: unknown): unknown;225initFromProtobuf(prop0: unknown): void;226isBlockedByDarkTowerMemberGate(): boolean;227isItemOwned(item: Item): boolean;228isKnockedOut(): boolean;229isPlayerTransformed(): boolean;230onTutorialComplete(): void;231processDeserter(): void;232processStars(): void;233processTrialMembership(): void;234resetAccount(): void;235resetModifiers(): void;236rewardMembershipPrizes(prop0: unknown): void;237setAllowsHouseVisitors(allow: boolean): void;238setBGMVolume(volume: number): void;239setColiseum(coliseum: number): void;240setData(data: PlayerData): void;241setDefault(gender: "male" | "female"): void;242setEnergy(energy: number): void;243setMemberDebug(): void;244setMembership(player: Player, member: boolean): void;245setParentEmail(email: string): void;246setPlayerClass(playerClass: unknown): void;247setSFXVolume(volume: number): void;248setSpinDate(date: Date): void;249setVoiceVolume(volume: number): void;250setZone(zone: unknown): void;251spinWheel(wheel: 1 | 2): void;252swapSpells(prop0: unknown, prop1: unknown): unknown;253transformPlayer(prop0: unknown, prop1: unknown, prop2: number): void;254unequip(type: ItemType): boolean;255updateMembershipVideoAdData(): void;256updateModifier(type: "potion" | "barrier", modifier: number): void;257validateLevel(): void;258}259export declare interface PlayerName {260generateRandomName(): void;261data: {262firstName: number | null;263lastName: number | null;264middleName: number | null;265nickname: number | null;266};267gender: "male" | "female";268localizer: { dataSource: TODO };269}270export declare class PlayerData {271allowsHouseVisitors: boolean;272arena: number;273atHomeTimestamp: number;274atSchoolTimestamp: number;275battleCounter: number;276bountyScore: number;277daily: {278festivalName: string;279isComplete: boolean;280lastStarted: number;281location: string;282monsterID: number;283};284deserter: number;285dungeonRunsTimeStamps: {286dungeonName: string;287lastRunTimeStamp: number;288}[];289energy: number;290gold: number;291hp: number;292lastArchiveRun: number;293level: number;294memberStarsExpirationDate: number;295nm: number;296numSpins1: number;297numSpins2: number;298school: string;299settings: {300bgmVolume: number;301voiceVolume: number;302sfxVolume: number;303};304spellbook: number[];305spells: number[];306spinDate1: number;307spinDate2: number;308stars: number;309startDate: number;310storedMemberStars: number;311team: number;312titanID: number;313tower: number;314trialSkipAvailable: boolean;315trialStartDate: string;316versionID: number;317win: number;318zone: string;319}320// TODO: Get types for unknowns.321322323