UNPKG

lol-constants

Version:

League of Legends constants, functions, and types. Provides a plathera of functions to easily convert between ID, Name, and Key for champions, items, summoner spells, and runes.

58 lines (57 loc) 1.72 kB
export const MonsterTypes = { 'HORDE': 'HORDE', 'DRAGON': 'DRAGON', 'RIFTHERALD': 'RIFTHERALD', 'BARON_NASHOR': 'BARON_NASHOR', 'ATAKHAN': 'ATAKHAN', }; export function isMonsterType(type) { return typeof type == 'string' && type in MonsterTypes; } export const DragonTypes = { 'EARTH_DRAGON': 'EARTH_DRAGON', 'CHEMTECH_DRAGON': 'CHEMTECH_DRAGON', 'AIR_DRAGON': 'AIR_DRAGON', 'HEXTECH_DRAGON': 'HEXTECH_DRAGON', 'WATER_DRAGON': 'WATER_DRAGON', 'FIRE_DRAGON': 'FIRE_DRAGON', 'ELDER_DRAGON': 'ELDER_DRAGON', }; export function isDragonType(type) { return typeof type == 'string' && type in DragonTypes; } export const KillTypes = { 'KILL_FIRST_BLOOD': 'KILL_FIRST_BLOOD', 'KILL_MULTI': 'KILL_MULTI', 'KILL_ACE': 'KILL_ACE', }; export function isKillType(type) { return typeof type == 'string' && type in KillTypes; } export const BuildingTypes = { 'TOWER_BUILDING': 'TOWER_BUILDING', 'INHIBITOR_BUILDING': 'INHIBITOR_BUILDING', }; export function isBuildingType(type) { return typeof type == 'string' && type in BuildingTypes; } export const TowerTypes = { 'OUTER_TURRET': 'OUTER_TURRET', 'INNER_TURRET': 'INNER_TURRET', 'BASE_TURRET': 'BASE_TURRET', 'NEXUS_TURRET': 'NEXUS_TURRET', }; export function isTowerType(type) { return typeof type == 'string' && type in TowerTypes; } export const WardTypes = { 'UNDEFINED': 'UNDEFINED', 'YELLOW_TRINKET': 'YELLOW_TRINKET', 'CONTROL_WARD': 'CONTROL_WARD', 'SIGHT_WARD': 'SIGHT_WARD', 'BLUE_TRINKET': 'BLUE_TRINKET', 'TEEMO_MUSHROOM': 'TEEMO_MUSHROOM', }; export function isWardType(type) { return typeof type == 'string' && type in WardTypes; }