Module:Game

From Hero Siege Wiki
Jump to navigation Jump to search

Documentation for this module may be created at Module:Game/doc

local game = {}

game.classes = {
	'Random',
	'Viking',
	'Pyromancer',
	'Marksman',
	'Pirate',
	'Nomad',
	'Redneck',
	'Necromancer',
	'Samurai',
	'Paladin',
	'Amazon',
	'Demon Slayer',
	'Demonspawn',
	'Shaman',
	'White Mage',
	'Plague Doctor',
	'Shield Lancer',
	'Jötunn',
	'Illusionist',
	'Exo',
	'Marauder',
	'Butcher',
	'Stormweaver',
}

game.type = {
	'Sword',
    'Dagger',
    'Mace',
    'Axe',
    'Claw',
    'Polearm',
    'Chainsaw',
    'Staff',
    'Cane',
    'Wand',
    'Book',
    'Spellblade',
    'Bow',
    'Gun',
    'Flask',
    'Throwing Weapon',
    'Shield',
    'Helmet',
    'Boots',
    'Body Armor',
    'Gloves',
    'Belt',
    'Amulet',
    'Ring',
    'Charm',
    'Potion',
    'Rune',
    'Gem',
    'Jewel',
    'Material',
    'Key',
    'Consumable',
    'Collectible',
    'Relic',
    'Novelty'
}

game.tier = {
	'D',
	'C',
	'B',
	'A',
	'S',
	'SS'
}

game.rarity = {
	'Common',
	'Satanic',
	'Satanic Set',
	'Heroic',
	'Unholy',
	'Angelic',
	'Runeword',
	'Relic'
}

game.key = {
	dungeon = {
	    smelly_cheese = {
	        name = "Smelly Cheese",
	        dungeon = "Rat Den",
	        location = "Outskirts of Inoya",
	        act = "1-1"
	    },
	    cellar_key = {
	        name = "Cellar Key",
	        dungeon = "Pumpkin Cellar",
	        location = "The Pumpkin Patch",
	        act = "1-3"
	    },
	    tower_key = {
	        name = "Tower Key",
	        dungeon = "Black Tower",
	        location = "Woodhill Plains",
	        act = "1-4"
	    },
	    frosted_key = {
	        name = "Frosted Key",
	        dungeon = "Frozen Cellar",
	        location = "Crystal Village",
	        act = "2-1"
	    },
	    ancient_key = {
	        name = "Ancient Key",
	        dungeon = "Ancient City",
	        location = "The Glacial Trail",
	        act = "2-5"
	    },
	    shovel_key = {
	        name = "Shovel Key",
	        dungeon = "Sand Cave",
	        location = "Dry Hills",
	        act = "3-2"
	    },
	    mystic_key = {
	        name = "Mystic Key",
	        dungeon = "Forgotten City",
	        location = "Mos'Arathim Desert",
	        act = "3-3"
	    },
	    tomb_key = {
	        name = "Tomb Key",
	        dungeon = "Cauflax Tomb",
	        location = "Pyramid Level 2",
	        act = "3-5"
	    },
	    copper_key = {
	        name = "Copper Key",
	        dungeon = "Old Copper Mine",
	        location = "Old Mining Village",
	        act = "4-1"
	    },
	    rusted_key = {
	        name = "Rusted Key",
	        dungeon = "Abandoned Mine",
	        location = "The Highland Mines",
	        act = "4-2"
	    },
	    devils_key = {
	        name = "Devil's Key",
	        dungeon = "Devil's Hole",
	        location = "The Devil's Breach",
	        act = "4-5"
	    },
	    pickaxe_key = {
	        name = "Pickaxe Key",
	        dungeon = "Fuji Crater",
	        location = "Mt. Fuji",
	        act = "5-1"
	    },
	    garden_key = {
	        name = "Garden Key",
	        dungeon = "Underground Garden",
	        location = "Misty Swamp",
	        act = "5-2"
	    },
	    battle_key = {
	        name = "Battle Key",
	        dungeon = "Kaojin Temple",
	        location = "Fuji Coast",
	        act = "5-3"
	    },
	    golden_key = {
	        name = "Golden Key",
	        dungeon = "Temple Trapdoor",
	        location = "Temple of Zamjo",
	        act = "5-5"
	    },
	    axe_key = {
	        name = "Axe Key",
	        dungeon = "Unmarked Grave",
	        location = "Highland Graveyard",
	        act = "6-1"
	    },
	    storage_key = {
	        name = "Storage Key",
	        dungeon = "Arms Storage",
	        location = "Steam Train",
	        act = "6-4"
	    },
	    warp_key = {
	        name = "Warp Key",
	        dungeon = "Distorted Horizon",
	        location = "Event Horizon",
	        act = "7-2"
	    },
	    valor_key = {
	        name = "Valor Key",
	        dungeon = "Gladsheim Halls",
	        location = "Forest of the Slain",
	        act = "8-1"
	    },
	    naga_scale_key = {
	        name = "Naga Scale Key",
	        dungeon = "Naga Temple",
	        location = "Flooded Plains",
	        act = "8-2"
	    },
	    magma_key = {
	        name = "Magma Key",
	        dungeon = "Muspelheim",
	        location = "Forgotten Caves",
	        act = "8-3"
	    },
	    helflame_torch = {
	        name = "Helflame Torch",
	        dungeon = "Niflhel",
	        location = "Helheim",
	        act = "8-5"
	    },
    },
    unique_zone = {
        angelic_key = {
	        name = "Angelic Key",
	        dungeon = "Angelic Realm",
	        location = "Dawn's Chapel",
	        act = "6-1"
    	},
        ruby_key = {
	        name = "Ruby Key",
	        dungeon = "Ruby Garden",
	        location = "Dawn's Chapel",
	        act = "6-1"
    	},
        bifrost_key = {
	        name = "Bifröst Key",
	        dungeon = "Bifröst",
	        location = "Astral Encampment",
	        act = "7-1"
    	}
    },
    chest = {
        key = {
	        name = "Key",
	        chest = "Golden Chest"
    	},
        crystal_key = {
	        name = "Crystal Key",
	        chest = "Crystal Chest"
    	}
    }
}

game.weaponClass = {
	'1-Handed',
	'2-Handed',
}

function game.isWeaponType(itemType)
	local weaponTypes = {
    Sword = true,
    Dagger = true,
    Mace = true,
    Axe = true,
    Claw = true,
    Polearm = true,
    Chainsaw = true,
    Staff = true,
    Cane = true,
    Wand = true,
    Book = true,
    Spellblade = true,
    Bow = true,
    Gun = true,
    Flask = true,
    ["Throwing Weapon"] = true }
    
    return weaponTypes[itemType] or false
end

function game.isArmorType(itemType)
	local armorTypes = {
		Helmet = true,
		["Body Armor"] = true,
		Gloves = true,
		Belt = true,
		Amulet = true,
		Ring = true,
		Boots = true,
		Shield = true,
		Charm = true,
	}
	
	return armorTypes[itemType] or false
end

function game.isMiscType(itemType) 
	local miscTypes = {
	Consumable = true,
	Potion = true,
	Key = true,
	Material = true,
	Collectible = true
	}
	
	return miscTypes[itemType] or false
end

return game