Skip to content

Commit

Permalink
Merge pull request #18 from dval-in/14-format-good-formatting-to-simp…
Browse files Browse the repository at this point in the history
…lify-importexport

14 format good formatting to simplify importexport
  • Loading branch information
LudovicMalot authored Jan 14, 2024
2 parents af778ee + eec2bf9 commit e70c602
Show file tree
Hide file tree
Showing 12 changed files with 5,557 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/GOOD/AchievementCategoryKey.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type AchievementCategoryKey = "";
1 change: 1 addition & 0 deletions types/GOOD/AchievementKey.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type AchievementKey = "";
50 changes: 50 additions & 0 deletions types/GOOD/ArtifactSetKey.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
export type ArtifactSetKey =
| "Adventurer" //Adventurer
| "ArchaicPetra" //Archaic Petra
| "Berserker" //Berserker
| "BlizzardStrayer" //Blizzard Strayer
| "BloodstainedChivalry" //Bloodstained Chivalry
| "BraveHeart" //Brave Heart
| "CrimsonWitchOfFlames" //Crimson Witch of Flames
| "DeepwoodMemories" //Deepwood Memories
| "DefendersWill" //Defender's Will
| "DesertPavilionChronicle" //Desert Pavilion Chronicle
| "EchoesOfAnOffering" //Echoes of an Offering
| "EmblemOfSeveredFate" //Emblem of Severed Fate
| "FlowerOfParadiseLost" //Flower of Paradise Lost
| "Gambler" //Gambler
| "GildedDreams" //Gilded Dreams
| "GladiatorsFinale" //Gladiator's Finale
| "GoldenTroupe" //Golden Troupe
| "HeartOfDepth" //Heart of Depth
| "HuskOfOpulentDreams" //Husk of Opulent Dreams
| "Instructor" //Instructor
| "Lavawalker" //Lavawalker
| "LuckyDog" //Lucky Dog
| "MaidenBeloved" //Maiden Beloved
| "MarechausseeHunter" //Marechaussee Hunter
| "MartialArtist" //Martial Artist
| "NighttimeWhispersInTheEchoingWoods" //Nighttime Whispers in the Echoing Woods
| "NoblesseOblige" //Noblesse Oblige
| "NymphsDream" //Nymph's Dream
| "OceanHuedClam" //Ocean-Hued Clam
| "PaleFlame" //Pale Flame
| "PrayersForDestiny" //Prayers for Destiny
| "PrayersForIllumination" //Prayers for Illumination
| "PrayersForWisdom" //Prayers for Wisdom
| "PrayersToSpringtime" //Prayers to Springtime
| "ResolutionOfSojourner" //Resolution of Sojourner
| "RetracingBolide" //Retracing Bolide
| "Scholar" //Scholar
| "ShimenawasReminiscence" //Shimenawa's Reminiscence
| "SongOfDaysPast" //Song of Days Past
| "TenacityOfTheMillelith" //Tenacity of the Millelith
| "TheExile" //The Exile
| "ThunderingFury" //Thundering Fury
| "Thundersoother" //Thundersoother
| "TinyMiracle" //Tiny Miracle
| "TravelingDoctor" //Traveling Doctor
| "VermillionHereafter" //Vermillion Hereafter
| "ViridescentVenerer" //Viridescent Venerer
| "VourukashasGlow" //Vourukasha's Glow
| "WanderersTroupe"; //Wanderer's Troupe
96 changes: 96 additions & 0 deletions types/GOOD/BannerKey.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
export type BannerKey =
| "BalladInGoblets1"
| "SparklingSteps1"
| "FarewellOfSnezhnaya1"
| "GentryOfHermitage1"
| "SecretumSecretorum1"
| "AdriftInTheHarbor1"
| "InvitationToMundaneLife1"
| "DanceOfLanterns1"
| "MomentOfBloom1"
| "BornOfOceanSwell1"
| "LeavesInTheWind1"
| "TheHeronsCourt1"
| "TapestryOfGoldenFlames1"
| "ReignOfSerenity1"
| "DriftingLuminescence1"
| "TwilightArbiter1"
| "TwirlingLotus1"
| "TheMoongrassEnlightenment1"
| "DiscernerOfEnigmas1"
| "AuricBlaze1"
| "EverbloomViolet1"
| "FromAshesReborn1"
| "OnisRoyale1"
| "TheTranscendentOneReturns1"
| "AzureExcursion1"
| "CautionInConfidence1"
| "InvitationToMundaneLife2"
| "GentryOfHermitage2"
| "AdriftInTheHarbor2"
| "DriftingLuminescence2"
| "FarewellOfSnezhnaya2"
| "MomentOfBloom2"
| "SecretumSecretorum2"
| "BornOfOceanSwell2"
| "SparklingSteps2"
| "LeavesInTheWind2"
| "TheHeronsCourt2"
| "TapestryOfGoldenFlames2"
| "ReignOfSerenity2"
| "DriftingLuminescence3"
| "FromAshesReborn3"
| "OnisRoyale3"
| "ReignOfSerenity3"
| "AzureExcursion3"
| "BalladInGoblets2"
| "TheHeronsCourt3"
| "DiscernerOfEnigmas2"
| "InvitationToMundaneLife3"
| "OnisRoyale4"
| "LeavesInTheWind3"
| "SparklingSteps3"
| "TapestryOfGoldenFlames4"
| "ViridescentVigil1"
| "GentryOfHermitage3"
| "AdriftInTheHarbor4"
| "DriftingLuminescence4"
| "TwilightArbiter2"
| "BalladInGoblets3"
| "TwirlingLotus2"
| "SecretumSecretorum3"
| "TheMoongrassEnlightenment2"
| "TapestryOfGoldenFlames5"
| "EverbloomViolet2"
| "FarewellOfSnezhnaya4"
| "FromAshesReborn4"
| "OnisRoyale5"
| "ReignOfSerenity4"
| "AzureExcursion4"
| "BalladInGoblets4"
| "DiscernerOfEnigmas3"
| "InvitationToMundaneLife4"
| "GentryOfHermitage4"
| "FarewellOfSnezhnaya5"
| "MomentOfBloom3"
| "SecretumSecretorum4"
| "BornOfOceanSwell3"
| "SparklingSteps4"
| "DriftingLuminescence5"
| "FromAshesReborn5"
| "ConjuringChiaroscuro1"
| "DiscernerOfEnigmas4"
| "GentryOfHermitage5"
| "FarewellOfSnezhnaya6"
| "DecreeOfTheDeeps1"
| "MomentOfBloom4"
| "TempestuousDestiny1"
| "BalladInGoblets5"
| "ChansonOfManyWaters1"
| "ImmaculatePulse1"
| "TwilightArbiter3"
| "AzureExcursion5"
| "IntheNameOfTheRosula1"
| "TheHeronsCourt4"
| "ReignOfSerenity5"
| "TapestryOfGoldenFlames6";
79 changes: 79 additions & 0 deletions types/GOOD/CharacterKey.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
export type CharacterKey =
| "Albedo" //Albedo
| "Alhaitham" //Alhaitham
| "Aloy" //Aloy
| "Amber" //Amber
| "AratakiItto" //Arataki Itto
| "Baizhu" //Baizhu
| "Barbara" //Barbara
| "Beidou" //Beidou
| "Bennett" //Bennett
| "Candace" //Candace
| "Charlotte" //Charlotte
| "Chevreuse" //Chevreuse
| "Chongyun" //Chongyun
| "Collei" //Collei
| "Cyno" //Cyno
| "Dehya" //Dehya
| "Diluc" //Diluc
| "Diona" //Diona
| "Dori" //Dori
| "Eula" //Eula
| "Faruzan" //Faruzan
| "Fischl" //Fischl
| "Freminet" //Freminet
| "Furina" //Furina
| "Ganyu" //Ganyu
| "Gorou" //Gorou
| "HuTao" //Hu Tao
| "Jean" //Jean
| "KaedeharaKazuha" //Kaedehara Kazuha
| "Kaeya" //Kaeya
| "KamisatoAyaka" //Kamisato Ayaka
| "KamisatoAyato" //Kamisato Ayato
| "Kaveh" //Kaveh
| "Keqing" //Keqing
| "Kirara" //Kirara
| "Klee" //Klee
| "KujouSara" //Kujou Sara
| "KukiShinobu" //Kuki Shinobu
| "Layla" //Layla
| "Lisa" //Lisa
| "Lynette" //Lynette
| "Lyney" //Lyney
| "Mika" //Mika
| "Mona" //Mona
| "Nahida" //Nahida
| "Navia" //Navia
| "Neuvillette" //Neuvillette
| "Nilou" //Nilou
| "Ningguang" //Ningguang
| "Noelle" //Noelle
| "Qiqi" //Qiqi
| "RaidenShogun" //Raiden Shogun
| "Razor" //Razor
| "Rosaria" //Rosaria
| "SangonomiyaKokomi" //Sangonomiya Kokomi
| "Sayu" //Sayu
| "Shenhe" //Shenhe
| "ShikanoinHeizou" //Shikanoin Heizou
| "Somnia" //Somnia
| "Sucrose" //Sucrose
| "Tartaglia" //Tartaglia
| "Thoma" //Thoma
| "Tighnari" //Tighnari
| "Traveler" //Lumine
| "Venti" //Venti
| "Wanderer" //Wanderer
| "Wriothesley" //Wriothesley
| "Xiangling" //Xiangling
| "Xiao" //Xiao
| "Xingqiu" //Xingqiu
| "Xinyan" //Xinyan
| "YaeMiko" //Yae Miko
| "Yanfei" //Yanfei
| "Yaoyao" //Yaoyao
| "Yelan" //Yelan
| "Yoimiya" //Yoimiya
| "YunJin" //Yun Jin
| "Zhongli"; //Zhongli
87 changes: 87 additions & 0 deletions types/GOOD/GOOD.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import { AchievementCategoryKey } from "./AchievementCategoryKey";
import { AchievementKey } from "./AchievementKey";
import { ArtifactSetKey } from "./ArtifactSetKey";
import { BannerKey } from "./BannerKey";
import { CharacterKey } from "./CharacterKey";
import { MaterialKey } from "./MaterialKey";
import { ServerKey } from "./ServerKey";
import { SlotKey } from "./SlotKey";
import { StatKey } from "./StatKey";
import { WeaponKey } from "./WeaponKey";
import { WishBannerKey } from "./WishBannerKey";

export interface IGOOD {
format: "GOOD"; // A way for people to recognize this format.
version: number; // GOOD API version.
source: string; // The app that generates this data.
server: ServerKey;
ar: number; // 1-60 inclusive
characters?: ICharacter[];
artifacts?: IArtifact[];
weapons?: IWeapon[];
materials?: {
[key in MaterialKey]: number;
};
achievments?: IAchievement[];
furnishing?: IFurnishing[];
wishes?: IWishBanner[];
}
interface IArtifact {
setKey: ArtifactSetKey; //e.g. "GladiatorsFinale"
slotKey: SlotKey; //e.g. "plume"
level: number; //0-20 inclusive
rarity: number; //1-5 inclusive
mainStatKey: StatKey;
location: CharacterKey | ""; //where "" means not equipped.
lock: boolean; //Whether the artifact is locked in game.
substats: ISubstat[];
}

interface ISubstat {
key: StatKey; //e.g. "critDMG_"
value: number; //e.g. 19.4
}

interface IWeapon {
key: WeaponKey; //"CrescentPike"
level: number; //1-90 inclusive
ascension: number; //0-6 inclusive. need to disambiguate 80/90 or 80/80
refinement: number; //1-5 inclusive
location: CharacterKey | ""; //where "" means not equipped.
lock: boolean; //Whether the weapon is locked in game.
}

interface ICharacter {
key: CharacterKey; //e.g. "Rosaria"
level: number; //1-90 inclusive
constellation: number; //0-6 inclusive
ascension: number; //0-6 inclusive. need to disambiguate 80/90 or 80/80
talent: {
//does not include boost from constellations. 1-15 inclusive
auto: number;
skill: number;
burst: number;
};
}

interface IAchievement {
key: AchievementKey;
category: AchievementCategoryKey;
achieved: boolean;
preStage?: AchievementKey; // refer to the previous achievements of a series
}

interface IWishBanner {
key: WishBannerKey;
pulls: IWish[];
}

interface IWish {
type: "Weapon" | "Character";
key: WeaponKey | CharacterKey;
date: Date;
pity: 1;
banner: BannerKey;
}

interface IFurnishing {}
Loading

0 comments on commit e70c602

Please sign in to comment.