﻿using HamstarHelpers.Helpers.Debug;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;


namespace HamstarHelpers.Services.ModTagDefinitions {
	/// <summary>
	/// Describes a basic attribute of a given mod. Meant to be combined in sets to create a comprehensive
	/// categorical description of a mod.
	/// </summary>
	public partial class ModTagDefinition {
		/// <summary>Descriptions of each tag category.</summary>
		public readonly static IReadOnlyDictionary<string, string> CategoryDescriptions;
		/// <summary>A map of tag definitions to their tags.</summary>
		public readonly static IReadOnlyDictionary<string, ModTagDefinition> TagMap;
		/// <summary>An ordered list of the tag definitions.</summary>
		public readonly static IReadOnlyList<ModTagDefinition> Tags;


		////

		static ModTagDefinition() {
			ModTagDefinition m( string tag,
					string cat,
					string desc,
					TagFlavor flavor = TagFlavor.Specification,
					ISet<string> forces = null,
					ISet<string> excludesOnAdd = null ) {
				var def = new ModTagDefinition( tag, cat, desc, flavor, forces, excludesOnAdd );
				return def;
			}

			////

			var catDescs = new Dictionary<string, string> {
				{ "Specifications", "General descriptions of a mod." },
				{ "Mechanics",      "Describes what game mechanics are associated with a mod." },
				{ "Gameplay",       "Describes how a mod affects gameplay (more than specific mechanics)." },
				{ "State",          "Describes the existential state of a mod." },
				{ "Multiplayer",    "Describes what manner of relevance a mod has to multiplayer." },
				{ "Privilege",      "Indicates what manner of user or system priviledges a mod needs to function." },
				{ "Content",        "Describes what types of content a mod features." },
				{ "Theme",          "Describes the apparent thematic elements of a mod." },
				{ "When",           "Indicates what part of the game's (vanilla) progression a mod most pertains to." },
				{ "Where",          "Indicates where in a world the mod specifically emphasizes relevance to." },
				//{ "Judgmental",		"Wholly-subjective tags. Must be enabled in settings." }
			};
			ModTagDefinition.CategoryDescriptions = new ReadOnlyDictionary<string, string>( catDescs );

			////

			var list = new List<ModTagDefinition> {
				m(	tag: "Core Game",
					cat: "Mechanics",
					desc: "Fundamental; adds a \"SHMUP\" mode, adds a stamina bar, removes mining, etc.",
					flavor: TagFlavor.Important ),
				m(	tag: "Combat",
					cat: "Mechanics",
					desc: "Adds weapon reloading, dual-wielding, monster AI changes, etc.",
					flavor: TagFlavor.Emphasis ),
					// new HashSet<string> { "Core Game" } ),
				m(	tag: "Crafting",
					cat: "Mechanics",
					desc: "Adds bulk crafting, UI-based crafting, item drag-and-drop crafting, etc.",
					flavor: TagFlavor.Emphasis ),	
					// new HashSet<string> { "Core Game" } ),
				m(	tag: "Movement",
					cat: "Mechanics",
					desc: "Gives super speed, adds dodging mechanics, adds unlimited flight, etc.",
					flavor: TagFlavor.Emphasis ),	// new HashSet<string> { "Core Game" } ),
				m(	tag: "Mining",
					cat: "Mechanics",
					desc: "Adds fast tunneling, area mining, shape cutting, etc.",
					flavor: TagFlavor.Emphasis ),	// new HashSet<string> { "Core Game" } ),
				m(	tag: "Building",
					cat: "Mechanics",
					desc: "Add fast building options, measuring tools, world editing, etc.",
					flavor: TagFlavor.Emphasis ),	// new HashSet<string> { "Core Game" } ),
				m(	tag: "Traveling",
					cat: "Mechanics",
					desc: "Adds fast travel options, new types of minecarts/travel-mounts, etc.",
					flavor: TagFlavor.Emphasis ),	// new HashSet<string> { "Core Game" } ),
				m(	tag: "Misc. Interactions",
					cat: "Mechanics",
					desc: "Adds new block interactions, fishing mechanics, NPC dialogues, etc.",
					flavor: TagFlavor.Emphasis ),	// new HashSet<string> { "Core Game" } ),
				m(	tag: "Item Storage",
					cat: "Mechanics",
					desc: "Adds or changes chest behavior, adds item sharing, global organization, etc." ),
				m(	tag: "Item Equiping",
					cat: "Mechanics",
					desc: "Dual wielding, additional accessory slots, equipment management, etc."),
				m(	tag: "Item Stats",
					cat: "Mechanics",
					desc: "Adjusts item damage, defense, price, etc." ),
				m(	tag: "Item Behavior",
					cat: "Mechanics",
					desc: "Changes item projectile type or quantity, item class, equipability, etc." ),
				m(	tag: "Player State",
					cat: "Mechanics",
					desc: "Applies (de)buff-like effects; resistances/weaknesses, terrain access/hindrance, etc." ),
				m(	tag: "Player Class(es)",
					cat: "Mechanics",
					desc: "Adds or edits player 'classes'; custom damage types or abilities/strengths."),
				m(	tag: "Player Stats",
					cat: "Mechanics",
					desc: "Modifies player attack, defense, and other intrinsic elements (minion slots, etc.)."),
				m(	tag: "Inventory",
					cat: "Mechanics",
					desc: "Adds behavior to player inventories; additional slots, pages, organization, etc." ),
				m(	tag: "NPC Stats",
					cat: "Mechanics",
					desc: "Modifies NPC attack, defense, and other intrinsic elements."),
				m(	tag: "NPC Behavior",
					cat: "Mechanics",
					desc: "Modifies NPC AIs or state for new or altered behaviors."),

				m(	tag: "Informational",
					cat: "Specifications",
					desc: "Adds game state reports (time, weather, progress, scores, etc.)." ),
				m(	tag: "Specialized",
					cat: "Specifications",
					desc: "Focuses on a specific, well-defined function." ),
				m(	tag: "Technical",
					cat: "Specifications",
					desc: "May require a brain." ),
				//{ tag: "Multi-faceted",
				//	cat: "Specifications",	"Does more than one thing, whether focusing mainly on one thing or not." ),
				m(	tag: "Replacements",
					cat: "Specifications",
					desc: "Primarily meant as an alternative to something the game already provides." ),
				m(	tag: "Restrictions",
					cat: "Specifications",
					desc: "Limits or removes elements of the game; may make things easier or harder." ),
				m(  tag: "User Friendly",
					cat: "Specifications",
					desc: "Reduces annoyances; auto-trashes junk items, reduces grinding, etc."),
				//{ tag: "Esoteric",
				//	cat: "Specifications",	"Does something uncommon or unexpected. Likely one-of-a-kind."),
				//{ tag: "Visuals",
				//	cat: "Specifications",	"Implements new or improved sprites, adds new background details, etc."),
				//m( tag: "Spoilers",
				//	cat: "Specifications",	"Reveals information in advance about game or story elements, especially prematurely."),
				m(	tag: "Needs New World",
					cat: "Specifications",
					desc: "Playing an existing world is difficult, problematic, or just impossible.",
					flavor: TagFlavor.TechnicallyImportant ),
				m(	tag: "Needs New Player",
					cat: "Specifications",
					desc: "Character must begin as a blank slate, similarly.",
					flavor: TagFlavor.TechnicallyImportant ),
				m(	tag: "Affects World",
					cat: "Specifications",
					desc: "Adds set pieces, alters biome shapes, adds new types of growth, etc."),
				m(	tag: "Affects Game State",
					cat: "Specifications",
					desc: "Alters shop prices, activates invasion events, changes weather, etc."),
				m(	tag: "Mod Interacting",
					cat: "Specifications",
					desc: "Supplies data, alters behavior, provides APIs, or manages other mods."),
				m(	tag: "Mod Collab",
					cat: "Specifications",
					desc: "May be specifically paired with (an)other mod(s) to create a more-than-sum-of-parts result."),
				m(	tag: "Adds UI",
					cat: "Specifications",
					desc: "Adds user interface components for mod functions."),
				m(	tag: "Configurable",
					cat: "Specifications",
					desc: "Provides options for configuring game settings (menu, config file, commands, etc.)."),
				
				m(	tag: "MP Compatible",
					cat: "Multiplayer",
					desc: "Built for multiplayer.",
					flavor: TagFlavor.Important ),
				m(	tag: "MP Emphasis",
					cat: "Multiplayer",
					desc: "Mod is meant primarily (if not exclusively) for multiplayer use.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "MP Compatible" } ),
				m(	tag: "MP Unstable",
					cat: "Multiplayer",
					desc: "Has issues in multiplayer.",
					flavor: TagFlavor.Warning ),
				m(	tag: "PvP",
					cat: "Multiplayer",
					desc: "Player vs player (multiplayer).",
					flavor: TagFlavor.Specification,
					forces: new HashSet<string> { "MP Compatible" } ),
				m(	tag: "Coop",
					cat: "Multiplayer",
					desc: "Requires or involves direct player-to-player cooperation (multiplayer).",
					flavor: TagFlavor.Specification,
					forces: new HashSet<string> { "MP Compatible" } ),
				m(	tag: "Teams",
					cat: "Multiplayer",
					desc: "Requires or involves teams of players (multiplayer).",
					flavor: TagFlavor.Specification,
					forces: new HashSet<string> { "MP Compatible" } ),
				m(	tag: "Client Only",
					cat: "Multiplayer",
					desc: "Intended to run only on a local client. Does not pertain to servers.",
					flavor: TagFlavor.TechnicallyImportant,
					forces: new HashSet<string> { "MP Compatible" },
					excludesOnAdd: new HashSet<string> { "Server Use" } ),
				m(	tag: "Server Use",
					cat: "Multiplayer",
					desc: "Player management tools, permissions, game rule changes, scheduled events, etc.",
					flavor: TagFlavor.TechnicallyImportant,
					forces: new HashSet<string> { "MP Compatible" },
					excludesOnAdd: new HashSet<string> { "Client Only" } ),

				////
				
				m(	tag: "Open Source",
					cat: "State",
					desc: "Freely available source code." ),
				m(	tag: "Has Documentation",
					cat: "State",
					desc: "Has an associated wiki or other comprehensive information source."),
				m(	tag: "Made By Team",
					cat: "State",
					desc: "Features significant contributions from multiple people." ),
				m(	tag: "Unmaintained",
					cat: "State",
					desc: "No longer receives version updates.",
					flavor: TagFlavor.Deficient ),
				m(	tag: "Unfinished",
					cat: "State",
					desc: "Has missing or partially-working features.",
					flavor: TagFlavor.Deficient ),
				m(	tag: "May Lag",
					cat: "State",
					desc: "May use system resources or network bandwidth heavily. Good computer recommended.",
					flavor: TagFlavor.Alert ),
				m(	tag: "Buggy",
					cat: "State",
					desc: "Does unexpected or erroneous things.",
					flavor: TagFlavor.Warning ),
				m(	tag: "Non-functional",
					cat: "State",
					desc: "Does not work (for its main use).",
					flavor: TagFlavor.Broken ),
				m(	tag: "Misleading Info",
					cat: "State",
					desc: "Missing or unhelpful mod information (description, tooltips, etc.).",
					flavor: TagFlavor.Warning ),
				m(	tag: "Poor Homepage",
					cat: "State",
					desc: "Missing or unhelpful homepage.",
					flavor: TagFlavor.Warning,
					forces: new HashSet<string> { "Misleading Info" } ),
				//{ tag: "Rated R",               "State",		"Guess." },
				//{ tag: "Simplistic",			"" },
				//{ tag: "Minimalistic",			"" },
				//{ tag: "Polished",				"" },
				
				////
				
				m(	tag: "Game Mode(s)",
					cat: "Gameplay",
					desc: "New game rules; added end goals, progression, setting, session, etc.",
					flavor: TagFlavor.TechnicallyImportant ),
				//m( tag: "Changes Genre",
				//	cat: "Gameplay",		"Adds linear progression, includes a SHMUP sequence, adds cooking minigames, etc."),
				m(	tag: "Quests",
					cat: "Gameplay",
					desc: "Adds goals for player to progress the game or gain profit from."),
				m(	tag: "Creativity",
					cat: "Gameplay",
					desc: "Emphasizes building or artistic expression (as opposed to fighting and adventuring)."),
				//m( tag: "Cheat-like",
				//	cat: "General",		"Significantly reduces or removes some game challenges; may be 'unfair'."),
				//m(	tag: "Adds Convenience",
				//	cat: "Gameplay",
				//	desc: "Reduces annoyances; auto-trashes junk items, reduces grinding, etc."),
				m(	tag: "Challenge",
					cat: "Gameplay",
					desc: "Increases difficulty of specific elements: Time limits, harder boss AI, etc."),
				m(	tag: "Challenge Emphasis",
					cat: "Gameplay",
					desc: "Focuses significantly on adding challenge to the game.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Adds Challenge" } ),
				//m( tag: "Easings",
				m(	tag: "Lowers Difficulty",
					cat: "Gameplay",
					desc: "Decreases difficulty of specific elements: Stronger weapons, added player defense, etc." ),
				//m( tag: "Vanilla Balanced",
				//	cat: "General",		"Balanced around plain Terraria; progress will not happen faster than usual."),
				m(	tag: "Loosely Balanced",
					cat: "Gameplay",
					desc: "Inconsistent or vague attempt to maintain consistent balance, vanilla or otherwise.",
					flavor: TagFlavor.Alert ),
				m(	tag: "Plus Balanced",
					cat: "Gameplay",
					desc: "Balanced in excess of vanilla; expect sequence breaks (e.g. killing powerful bosses early).",
					flavor: TagFlavor.Alert ),

				m(	tag: "Needs Credentials",
					cat: "Privilege",
					desc: "Requires input of user information or a login for features to work.",
					flavor: TagFlavor.TechnicallyImportant ),
				m(	tag: "Accesses System",
					cat: "Privilege",
					desc: "Accesses files, opens programs, uses system functions, etc.",
					flavor: TagFlavor.TechnicallyImportant ),
				m(	tag: "Accesses Web",
					cat: "Privilege",
					desc: "Makes web requests to send or receive data.",
					flavor: TagFlavor.TechnicallyImportant ),
				//{ tag: "Injects Code",
				//	cat: make( "Priviledge",	"Uses Reflection, swaps methods, or invokes libraries that do these."),
				
				////

				//{ tag: "Item Sets",				"Content",	"Adds or edits discrete (often themed) sets or types of items."),
				m( tag: "Weapons",
					cat: "Content",
					desc: "Adds or edits weapon items."),
				m( tag: "Tools",
					cat: "Content",
					desc: "Adds or edits tool items."),
				m( tag: "Armors",
					cat: "Content",
					desc: "Adds or edits armor items in particular."),
				m( tag: "Accessories",
					cat: "Content",
					desc: "Adds or edits player accessory items (includes wings)."),
				m( tag: "Mounts & Familiars",
					cat: "Content",
					desc: "Adds or edits player mounts."),
				m( tag: "Pets",
					cat: "Content",
					desc: "Adds or edits player pets (including light pets)."),
				m( tag: "Vanity",
					cat: "Content",
					desc: "Adds or edits player vanity items, dyes, or non-gameplay pets."),
				m( tag: "Ores",
					cat: "Content",
					desc: "Adds mineable ores (and probably matching equipment tiers)."),
				m( tag: "Recipes",
					cat: "Content",
					desc: "Adds or edits recipes beyond the expected minimum, or provides recipe information."),
				m( tag: "Hostile NPCs",
					cat: "Content",
					desc: "Adds or edits hostile NPCs (monsters)."),
				m( tag: "Friendly NPCs",
					cat: "Content",
					desc: "Adds or edits town or actively helpful NPCs."),
				m( tag: "Critters",
					cat: "Content",
					desc: "Adds or edits (passive) biome fauna."),
				m( tag: "Bosses",
					cat: "Content",
					desc: "Adds or edits boss monsters."),
				m( tag: "Invasions & Events",
					cat: "Content",
					desc: "Adds or edits invasions or game events."),
				m( tag: "Fishing",
					cat: "Content",
					desc: "Adds or edits tools for fishing or types of fish."),
				m( tag: "Blocks",
					cat: "Content",
					desc: "Adds or edits new block types."),
				m( tag: "Biomes",
					cat: "Content",
					desc: "Adds or edits world biomes."),
				m( tag: "Decorative",
					cat: "Content",
					desc: "Adds or edits decorative objects (e.g. furniture for houses)."),
				m( tag: "Wiring",
					cat: "Content",
					desc: "Adds or edits tools and toys for use for wiring."),
				m( tag: "Music",
					cat: "Content",
					desc: "Adds or edits music."),
				m( tag: "Rich Art",
					cat: "Content",
					desc: "Adds extensive or detailed art for new or existing content."),
				m( tag: "Sounds",
					cat: "Content",
					desc: "Adds or edits sound effects or ambience."),
				m( tag: "Story or Lore",
					cat: "Content",
					desc: "Implements elements of story telling or universe lore."),
				m( tag: "Special FX",
					cat: "Content",
					desc: "Adds gore effects, adds motion blurs, improves particle effects, etc."),
				m( tag: "Buffs & Pots.",
					cat: "Content",
					desc: "Adds or edits buffs and potion items."),
				m( tag: "Weapon Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified weapon items.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Weapons" } ),
				m( tag: "Tools Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified tool items.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Tools" } ),
				m( tag: "Armors Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified armor items.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Armors" } ),
				m( tag: "Accessory Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified player accessory items (includes wings).",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Accessories" } ),
				m( tag: "Mounts Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified player mounts.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Mounts & Familiars" } ),
				m( tag: "Vanity Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified player vanity items, dyes, or non-gameplay pets.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Vanity" } ),
				m( tag: "Ores Emphasis",
					cat: "Content",
					desc: "Emphasizes added mineable ores (and probably matching equipment tiers).",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Ores" } ),
				m( tag: "Recipes Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified recipes beyond the expected minimum, or provides recipe information.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Recipes" } ),
				m( tag: "Foes Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified hostile NPCs (enemies).",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Hostile NPCs" } ),
				m( tag: "Friends Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified town or actively helpful NPCs.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Friendly NPCs" } ),
				m( tag: "Critters Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified (passive) biome fauna.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Critters" } ),
				m( tag: "Bosses Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified boss monsters.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Bosses" } ),
				m( tag: "Invasions Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified invasions or game events.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Invasions & Events" } ),
				m( tag: "Fishing Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified tools for fishing or types of fish.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Fishing" } ),
				m( tag: "Blocks Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified new block types.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Blocks" } ),
				m( tag: "Biomes Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified world biomes.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Biomes" } ),
				m( tag: "Decorative Emph.",
					cat: "Content",
					desc: "Emphasizes added or modified decorative objects (e.g. furniture for houses).",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Decorative" } ),
				m( tag: "Wiring Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified tools and toys for use for wiring.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Wiring" } ),
				m( tag: "Music Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified music.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Music" } ),
				m( tag: "Rich Art Emphasis",
					cat: "Content",
					desc: "Emphasizes added extensive or detailed art for new or existing content.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Rich Art" } ),
				m( tag: "Sounds Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified sound effects or ambience.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Sounds" } ),
				m( tag: "Story Emphasis",
					cat: "Content",
					desc: "Emphasizes added elements of story telling or universe lore.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Story" } ),
				m( tag: "SFX Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified special FX.",
					flavor: TagFlavor.Emphasis,
					forces: new HashSet<string> { "Special FX" } ),
				m( tag: "Projectile Emphasis",
					cat: "Content",
					desc: "Emphasizes added or modified projectiles.",
					flavor: TagFlavor.Emphasis ),

				m( tag: "Dark",
					cat: "Theme",
					desc: "Gloomy, edgy, or just plain poor visibility." ),
				m( tag: "Silly",
					cat: "Theme",
					desc: "Light-hearted, immersion-breaking, or just plain absurd." ),
				m( tag: "Fantasy",
					cat: "Theme",
					desc: "Elements of mythologies, swords & sorcery, and maybe a hobbit or 2." ),
				m( tag: "Medieval",
					cat: "Theme",
					desc: "Chivalry, castles, primitive technology, melee fighting, archery, etc." ),
				m( tag: "Magical",
					cat: "Theme",
					desc: "Specifically meta-physical, spiritual, or heavily involving things of magic." ),
				m( tag: "Military",
					cat: "Theme",
					desc: "Guns and stuff." ),
				m( tag: "Nature",
					cat: "Theme",
					desc: "Birds, bees, rocks, trees, etc." ),
				m( tag: "Sci-Fi",
					cat: "Theme",
					desc: "Robots, lasers, flying machines, etc." ),
				//m( tag: "Futuristic",
				//	cat: "Theme",	desc: "" ),
				m( tag: "Civilized",
					cat: "Theme",
					desc: "NPC interactions, town workings, player living spaces, etc." ),
				//{ tag: "Mixed",
				//	cat: "Theme",	desc: "Mashup of genres, but not purely in a silly way." ),
				m( tag: "Joke",
					cat: "Theme",
					desc: "Does not take itself seriously, or tries focuses exclusively on meta." ),

				m( tag: "Surface",
					cat: "Where",
					desc: "Emphasizes involvement with a world's surface-level region." ),
				m( tag: "Sky",
					cat: "Where",
					desc: "Emphasizes involvement with a world's skies." ),
				m( tag: "Underground",
					cat: "Where",
					desc: "Emphasizes involvement with a world's underground regions (except underworld)." ),
				m( tag: "Ocean",
					cat: "Where",
					desc: "Emphasizes involvement with a world's oceans." ),
				m( tag: "Underworld",
					cat: "Where",
					desc: "Emphasizes involvement with a world's underworld region." ),
				m( tag: "Dungeon",
					cat: "Where",
					desc: "Emphasizes involvement with a world's dungeon." ),
				m( tag: "Snow Biomes",
					cat: "Where",
					desc: "Emphasizes involvement with a world's snow biomes." ),
				m( tag: "Desert Biomes",
					cat: "Where",
					desc: "Emphasizes involvement with a world's desert biomes." ),
				m( tag: "Jungle Biome",
					cat: "Where",
					desc: "Emphasizes involvement with a world's jungle biomes." ),
				m( tag: "Evil Biome",
					cat: "Where",
					desc: "Emphasizes involvement with a world's evil biomes (crimson or corruption)." ),
				m( tag: "Hallow Biome",
					cat: "Where",
					desc: "Emphasizes involvement with a world's hallowed biomes." ),

				m( tag: "The Beginning",
					cat: "When",
					desc: "Emphasizes time before any boss kills or invasion events."),
				m( tag: "Bosses Begun",
					cat: "When",
					desc: "Emphasizes time after player has begun killing bosses (world now mostly accessible)."),
				m( tag: "Post-BoC & EoW",
					cat: "When",
					desc: "Emphasizes time after corruption/crimson conquered. Underworld accessible."),
				m( tag: "Hard Mode",
					cat: "When",
					desc: "Emphasizes time after Wall of Flesh conquered (hallowed+evil biomes, harder monsters)."),
				m( tag: "Post-Mech bosses",
					cat: "When",
					desc: "Emphasizes time after Mech bosses conquered (restless jungle)."),
				m( tag: "Post-Plantera",
					cat: "When",
					desc: "Emphasizes time after Plantera conquered. Temple accessible."),
				m( tag: "Post-Moonlord",
					cat: "When",
					desc: "Emphasizes time after Moon Lord killed."),
				m( tag: "Contextual",
					cat: "When",
					desc: "Concerns with a specific, discrete event or (non-boss) game context.")
			};

			if( !ModHelpersConfig.Instance.DisableJudgmentalTags ) {
				list.Add(
					m( tag: "Unimaginative",
						cat: "Judgmental",
						desc: "Nothing special; exceedingly common, generic, or flavorless.",
						flavor: TagFlavor.IllFavored
					)
				);
				list.Add(
					m( tag: "Low Effort",
						cat: "Judgmental",
						desc: "Evident lack of effort involved.",
						flavor: TagFlavor.IllFavored,
						forces: null,
						excludesOnAdd: new HashSet<string> { "Shows Effort" }
					)
				);
				list.Add(
					m( tag: "Shows Effort",
						cat: "Judgmental",
						desc: "Evident investment of effort involved.",
						flavor: TagFlavor.Specification,
						forces: null,
						excludesOnAdd: new HashSet<string> { "Low Effort" }
					)
				);
				list.Add(
					m( tag: "Unoriginal Content",
						cat: "Judgmental",
						desc: "Contains stolen or extensively-derived content.",
						flavor: TagFlavor.IllFavored
					)
				);
			}

			ModTagDefinition.TagMap = new ReadOnlyDictionary<string, ModTagDefinition>(
				list.ToDictionary( tagDef => tagDef.Tag, tagDef => tagDef )
			);
			ModTagDefinition.Tags = list.ToList().AsReadOnly();
		}
	}
}
