Source: ClothesManager.js

/**
 * @typedef {object} ClothesManager.clothesConfig
 * @property {string} ID - ID of the clothes
 * @property {string} Name - Name of the clothes
 * @property {string} Description - Description of the clothes
 * @property {number} Level - The total level required to wear these clothes
 * @property {string} Shop - What shop the clothes should be available at. If they are not buyable just put "Quest"
 * @property {number} Cost - How much the clothes cost to buy
 * @property {object} Stats - The bonus given from wearing these clothes
 * @property {number} Stats.Recovery - The amount of stamina a girl recovers in a boss battle
 * @property {number} Stats.Stamina - The amount of extra stamina a girl will have with this item
 * @property {number} Stats.Hands - The girl's hands level increased by
 * @property {number} Stats.Feet - The girl's feet level increased by
 * @property {number} Stats.Throat - The girl's throat level increased by
 * @property {number} Stats.Tits - The girl's tits level increased by
 * @property {number} Stats.Pussy - The girl's pussy level increased by
 * @property {number} Stats.Anal - The girl's anal level increased by
 */

/**
 * @class ClothesManager
 */
class ClothesManager {
    constructor() {
        this._clothes = {
            "Queen": ['MudQueen', 'ForestQueen', 'SchoolgirlQueen', 'DefaultQueen'],
            "Suki": ['MudSuki', 'ForestSuki', 'LeotardSuki', 'DefaultSuki'],
            "Esxea": ['MudEsxea', 'ForestEsxea', 'RedDressEsxea', 'DefaultEsxea'],
            "Scarlett": ['DefaultScarlett'],
            "DefaultQueen": {
                "ID": "DefaultQueen",
                "Girl": "Queen",
                "Level": 0,
                "Stats": {}
            },
            "DefaultSuki": {
                "ID": "DefaultSuki",
                "Girl": "Suki",
                "Level": 0,
                "Stats": {
                    "Pussy": 3
                }
            },
            "DefaultEsxea": {
                "ID": "DefaultEsxea",
                "Girl": "Esxea",
                "Level": 0,
                "Stats": {
                    "Feet": 2
                }
            },
            "DefaultScarlett": {
                "ID": "DefaultScarlett",
                "Girl": "Scarlett",
                "Level": 0,
                "Stats": {
                    "Tits": 3
                }
            },
            "MudQueen": {
                "ID": "MudQueen",
                "Girl": "Queen",
                "Name": "Mud Outfit",
                "Level": 65,
                "Shop": "Quest",
                "Description": "Not really clothes, just mud slathered onto her body.",
                "Cost": 0,
                "Stats": {
                    "Recovery": -0.2,
                    "Hands": 3,
                    "Feet": 2,
                    "Throat": 3,
                    "Tits": 2,
                    "Pussy": 3
                }
            },
            "ForestQueen": {
                "ID": "ForestQueen",
                "Girl": "Queen",
                "Name": "Greenhaven Outfit",
                "Level": 26,
                "Shop": "Quest",
                "Description": "Average clothing of Greenhaven. The women of Greenhaven don't seem to wear much clothing.",
                "Cost": 0,
                "Stats": {
                    "Recovery": 0.2,
                    "Hands": 1,
                    "Throat": 1,
                    "Pussy": 1
                }
            },
            "SchoolgirlQueen": {
                "Girl": "Queen",
                "Name": "Schoolgirl Outfit",
                "Level": 10,
                "Shop": "TownClothes",
                "Description": "A female uniform for school.",
                "Cost": 1000,
                "Stats": {
                    "Pussy": 3
                }
            },
            "MudSuki": {
                "ID": "MudSuki",
                "Girl": "Suki",
                "Name": "Mud Outfit",
                "Level": 65,
                "Shop": "Quest",
                "Description": "Not really clothes, just mud slathered onto her body.",
                "Cost": 0,
                "Stats": {
                    "Recovery": -0.2,
                    "Hands": 3,
                    "Feet": 2,
                    "Throat": 3,
                    "Tits": 2,
                    "Pussy": 3
                }
            },
            "LeotardSuki": {
                "ID": "LeotardSuki",
                "Girl": "Suki",
                "Name": "Leotard",
                "Level": 30,
                "Shop": "TownClothes",
                "Description": "Made for ballerinas, tears easily.",
                "Cost": 3000,
                "Stats": {
                    "Feet": 3,
                    "Hands": 1
                }
            },
            "ForestSuki": {
                "ID": "ForestSuki",
                "Girl": "Suki",
                "Name": "Greenhaven Outfit",
                "Level": 30,
                "Shop": "Quest",
                "Description": "Clothing of Greenhaven",
                "Cost": 0,
                "Stats": {
                    "Recovery": 0.2,
                    "Hands": 1,
                    "Throat": 1,
                    "Pussy": 1
                }
            },
            "MudEsxea": {
                "ID": "MudEsxea",
                "Girl": "Esxea",
                "Name": "Mud Outfit",
                "Level": 65,
                "Shop": "Quest",
                "Description": "Not really clothes, just mud slathered onto her body.",
                "Cost": 0,
                "Stats": {
                    "Recovery": -0.2,
                    "Hands": 3,
                    "Feet": 2,
                    "Throat": 3,
                    "Tits": 2,
                    "Pussy": 3
                }
            },
            "ForestEsxea": {
                "ID": "ForestEsxea",
                "Girl": "Esxea",
                "Name": "Greenhaven Outfit",
                "Level": 30,
                "Shop": "Quest",
                "Description": "Clothing of Greenhaven",
                "Cost": 0,
                "Stats": {
                    "Recovery": 0.2,
                    "Hands": 1,
                    "Throat": 1,
                    "Pussy": 1
                }
            },
            "RedDressEsxea": {
                "ID": "RedDressEsxea",
                "Girl": "Esxea",
                "Name": "Red Dress",
                "Level": 50,
                "Shop": "TownClothes",
                "Description": "A lustrous red dress. Not common clothing for female goblins.",
                "Cost": 3000,
                "Stats": {
                    "Tits": 2,
                    "Throat": 1,
                    "Pussy": 2
                }
            }
        }
    }

    /**
     * Returns an object of all the clothes
     * @method getAllClothes
     * @memberOf ClothesManager
     * @instance
     * @returns {Object}
     * */
    getAllClothes() {
        return this._clothes;
    }

    /**
     * @method buyClothes
     * @memberOf ClothesManager
     * @instance
     * @param {string} clothID - The ID of the clothes
     * @return {Promise<any>}
     */
    buyClothes(clothID) {
        return new Promise((resolve) => {
            GAME.removeGold(GAME.clothes.getAllClothes()[clothID].Cost);
            gameData.clothes[clothID].Unlocked = true;

            globalEvents.emit('refreshClothes');
            resolve();
        })
    }

    /**
     * Use this method to create new clothes
     * @method newClothes
     * @memberOf ClothesManager
     * @instance
     * @param {ClothesManager.clothesConfig} clothesConfig
     */
    newClothes(clothesConfig) {
        this._clothes[clothesConfig.Girl].push(clothesConfig.ID);
        this._clothes[clothesConfig.ID] = clothesConfig;
    }
}