// Priority is set to -50 to ensure that all integration is completed before stage initialization. CrT recipes should be registered prior
// to this point. The actual staging script will fire at priority -99.
#priority -50

import crafttweaker.item.IIngredient;
import crafttweaker.enchantments.IEnchantmentDefinition;

import scripts.gamestages.classes.gamestage.GameStage;

static stageName as string = "adventuring";

/**
 *  List of modids that will be staged. Specific unstaged items can be specified in the stagedNamesBlacklist.
 */
static stagedMods as string[] = [
	"magicalmap",
	"scannable",
	"beneath",
	"wolfarmor",
	"capsule",
	"cloudboots",
	"recall"
];

/**
 *  Staged items.
 */
static stagedItems as IIngredient[] = [
	// xreliquary
	<xreliquary:mercy_cross:*>,
	<xreliquary:hero_medallion:*>,
	<xreliquary:holy_hand_grenade:*>,
	<xreliquary:lantern_of_paranoia:*>,
	<xreliquary:interdiction_torch:*>,
	<xreliquary:rod_of_lyssa:*>,
	<xreliquary:pedestal:*>,
	<xreliquary:sojourner_staff:*>,
	<xreliquary:fortune_coin:*>,
	<xreliquary:angelic_feather:*>,
	<xreliquary:phoenix_down:*>,
	<xreliquary:kraken_shell:*>,
	<xreliquary:serpent_staff:*>,
	<xreliquary:angelheart_vial:*>,
	
	// wings
	<wings:slime_wings:*>,
	
	// grimoire of gaia
	<grimoireofgaia:food_monster_feed>,
	<grimoireofgaia:food_monster_feed_premium>,
	
	// twilight forest
	<twilightforest:trophy:*>,
	
	// content tweaker
	<contenttweaker:cracked_pearl_2:*>,
	<contenttweaker:enchanted_leaf:*>,
	<contenttweaker:fossil_ore_1:*>,
	<contenttweaker:fossil_ore_2:*>,
	<contenttweaker:fossil_nether_ore_1:*>,
	<contenttweaker:fossil_nether_ore_2:*>
];

/**
 *  Names of recipes that will be staged. These only need to be set if there are different recipes for the same item in different stages.
 */
static stagedRecipeNames as string[] = [];

/**
 * Mobs that will only spawn around players with this stage unlocked.
 */
static stagedMobs as string[] = [
	// Grimorie of Gaia Mobs
	"grimoireofgaia:ant",
	"grimoireofgaia:ant_hill",
	"grimoireofgaia:ant_ranger",
	"grimoireofgaia:anubis",
	"grimoireofgaia:arachne",
	"grimoireofgaia:banshee",
	"grimoireofgaia:baphomet",
	"grimoireofgaia:beholder",
	"grimoireofgaia:bone_knight",
	"grimoireofgaia:bubble",
	"grimoireofgaia:butler",
	"grimoireofgaia:campfire",
	"grimoireofgaia:cecaelia",
	"grimoireofgaia:centaur",
	"grimoireofgaia:chest",
	"grimoireofgaia:cobble_golem",
	"grimoireofgaia:cobblestone_golem",
	"grimoireofgaia:creep",
	"grimoireofgaia:creeper_girl",
	"grimoireofgaia:cyan_flower",
	"grimoireofgaia:cyclops",
	"grimoireofgaia:deathword",
	"grimoireofgaia:dhampir",
	"grimoireofgaia:dullahan",
	"grimoireofgaia:ender_dragon_girl",
	"grimoireofgaia:ender_eye",
	"grimoireofgaia:ender_girl",
	"grimoireofgaia:flesh_lich",
	"grimoireofgaia:gelatinous_slime",
	"grimoireofgaia:goblin",
	"grimoireofgaia:goblin_feral",
	"grimoireofgaia:gorgon",
	"grimoireofgaia:gryphon",
	"grimoireofgaia:harpy",
	"grimoireofgaia:harpy_wizard",
	"grimoireofgaia:holstaurus",
	"grimoireofgaia:horse",
	"grimoireofgaia:hunter",
	"grimoireofgaia:illager_fire",
	"grimoireofgaia:illager_inquisitor",
	"grimoireofgaia:kikimora",
	"grimoireofgaia:kobold",
	"grimoireofgaia:mandragora",
	"grimoireofgaia:matango",
	"grimoireofgaia:mermaid",
	"grimoireofgaia:mimic",
	"grimoireofgaia:minotaur",
	"grimoireofgaia:minotaurus",
	"grimoireofgaia:mite",
	"grimoireofgaia:mummy",
	"grimoireofgaia:naga",
	"grimoireofgaia:nine_tails",
	"grimoireofgaia:oni",
	"grimoireofgaia:orc",
	"grimoireofgaia:selkie",
	"grimoireofgaia:shaman",
	"grimoireofgaia:sharko",
	"grimoireofgaia:siren",
	"grimoireofgaia:slime_girl",
	"grimoireofgaia:sludge_girl",
	"grimoireofgaia:sphinx",
	"grimoireofgaia:sporeling",
	"grimoireofgaia:spriggan",
	"grimoireofgaia:succubus",
	"grimoireofgaia:toad",
	"grimoireofgaia:trader",
	"grimoireofgaia:valkyrie",
	"grimoireofgaia:vampire",
	"grimoireofgaia:vase",
	"grimoireofgaia:vase_nether",
	"grimoireofgaia:web",
	"grimoireofgaia:werecat",
	"grimoireofgaia:weresheep",
	"grimoireofgaia:witch",
	"grimoireofgaia:wither_cow",
	"grimoireofgaia:yeti",
	"grimoireofgaia:yuki-onna",
		
	// Spectrite Mobs
	"spectrite:spectriteskeleton",
	"spectrite:spectriteblaze",
	"spectrite:spectritecreeper",
	"spectrite:spectriteenderman",
	"spectrite:spectriteskeleton",
	"spectrite:spectritewither",
	"spectrite:spectritewitherskeleton"
];

/**
 *  Enchantments that will only appear if the player has this stage.
 */
static stagedEnchants as IEnchantmentDefinition[] = [];

/**
 *  JEI categories that will be hidden until the player unlocks this stage.
 */
static stagedJeiCategories as string[] = [
	"gaia.satchel.loot",
	"gaia.box.loot"
];

/**
 *  The partial names of any items that will be exluded during mod staging. This is useful to keep saplings or wood unstaged.
 */
static stagedNamesBlacklist as string[] = [];

/**
 *  The partial names of any items that will be excluded from any blacklist overlap. This is useful to ensure specific items are staged when there is overlap.
 */
static stagedNamesWhitelist as string[] = [];

/**
 *  This function does not actually stage the items. It is used to create the GameStage object that will be used during the actual staging.
 */
function initStage() as GameStage {
    val stage = GameStage(stageName);

    stage.setStagedMods(stagedMods);
    stage.setStagedItems(stagedItems);
    stage.setStagedRecipeNames(stagedRecipeNames);
    stage.setStagedMobs(stagedMobs);
    stage.setStagedEnchants(stagedEnchants);
    stage.setStagedJeiCategories(stagedJeiCategories);

    stage.setNamesBlacklist(stagedNamesBlacklist);
    stage.setNamesWhitelist(stagedNamesWhitelist);

    return stage;
}