code
stringlengths 2
1.05M
|
---|
// Inject Bower components into source code
//
// grunt-wiredep: <https://github.com/stephenplusplus/grunt-wiredep>
// wiredep: <https://github.com/taptapship/wiredep>
'use strict';
module.exports = {
markups: {<% if (cfg.html) { %>
src: ['<%%= path.markups %>/**/*.html']<% } %><% if (cfg.pug) { %>
src: ['<%%= path.markups %>/**/*.{pug,jade}']<% } %><% if (cfg.modernizr) { %>,
exclude: ['bower_components/modernizr/modernizr.js']<% } %>,
// Force absolute URL
// "../bower_components/xxxx" -> "/bower_components/xxxx"
ignorePath: /(\.\.\/)*\.\.(?=\/)/<% if (cfg.pug) { %>,
// Support "*.pug" files
fileTypes: {
pug: {
block: /(([ \t]*)\/\/-?\s*bower:*(\S*))(\n|\r|.)*?(\/\/-?\s*endbower)/gi,
detect: {
js: /script\(.*src=['"]([^'"]+)/gi,
css: /link\(.*href=['"]([^'"]+)/gi
},
replace: {
js: 'script(src=\'{{filePath}}\')',
css: 'link(rel=\'stylesheet\', href=\'{{filePath}}\')'
}
}
}<% } %>
}<% if (cfg.sass || cfg.less || cfg.stylus) { %>,
styles: {<% if (cfg.sass) { %>
src: ['<%%= path.styles %>/**/*.{scss,sass}']<% } %><% if (cfg.less) { %>
src: ['<%%= path.styles %>/**/*.less']<% } %><% if (cfg.stylus) { %>
src: ['<%%= path.styles %>/**/*.styl']<% } %>,
// Import from bower_components directory
// "../bower_components/xxxx" -> "xxxx"
ignorePath: /(\.\.\/)*bower_components\//
}<% } %>
};
|
'use strict';
// WEB PUBLICO
// =============================================================================
var express = require('express');
var router = express.Router();
//var request = require('request');
var Model = require('../../models/jugando.js');
/***********************alarma***************************
var http = require('http');
var url = require('url');
var SerialPort = require("serialport");
var com = new SerialPort("COM13");
var usuario1 = '_e4_0e_09_6f';
var alarma = 0;
/*****************alarma*******************
http.createServer(function(peticion, respuesta){
var query = url.parse(peticion.url,true).query;
var puerta = query.puerta;
var codigo = query.codigo;
var actual = query.actual;
console.log("puertaaaaaaaaaaaaaaaaaaaaaaaaaaaa",puerta);
console.log("codigoooooooooooooooooooooooooooo",codigo);
console.log("codigoooooooooooooooooooooooooooo",actual);
respuesta.writeHead(200, {'Content-Type': 'text/html'});
respuesta.end(puerta);
if (puerta === '0') {
console.log('Puerta abierta');
if (alarma === 0) {
console.log('Entrada habilitada.');
} else {
com.write('<1');
/*************************************
console.log('Alarma activada!.');
var nombre = "Alarma Activada!. La Puerta está abierta";
var alarma = "Alarma de Portón";
var index = Model.Alarma.build({
nombre: nombre,
alarma: alarma
});
index.add(function (success) {
console.log('Se guardo la alarma');
},
function (err) {
console.log(err);
});
/*************************************
}
}
if (puerta === '1') {
console.log('Puerta igual a cerrada');
alarma = 1;
}
if (codigo ==='a' && puerta === '3') {
if (actual === '0') {
console.log('Puerta abierta');
com.write('<1');
}
if (actual === '1') {
console.log('Puerta cerrada');
alarma = 1;
}
}
/*************************************leyendo para el lector********************************************************
var empleado = Model.Empleado.build();
console.log("codigo",codigo);
//************************************
empleado.retrieveByCodigo(codigo, function (empleadooq) {
if (empleadooq) {
alarma = 0;
console.log('Usuario registrado. Alarma desbloqueada.');
com.write('<0');
var f = new Date();
//new Date().toJSON().slice(0,10)
var fechaIngreso = f.getFullYear() + "/" + (f.getMonth() +1) + "/" + f.getDate();
var horaIngreso = f.getHours()+":"+f.getMinutes()+":"+f.getSeconds();
var observacionIngreso = "Ingreso del Usuario al Corral";
var EmpleadoIdEmpleado= empleadooq.idEmpleado;
var index = Model.IngresoCorral.build({
fechaIngreso: fechaIngreso,
horaIngreso: horaIngreso,
observacionIngreso: observacionIngreso,
EmpleadoIdEmpleado: EmpleadoIdEmpleado
});
index.add(function (success) {
console.log('Se guardo el acceso');
},
function (err) {
console.log(err);
});
} else{
alarma = 1;
console.log('Alarma activada!.');
}
}, function (error) {
console.log('Empleado no encontrado',error);
});
}).listen(8000);
console.log('Servidor iniciado.');
com.on('error', function(err){
console.log('Error: ', err.message);
});
/*******************************sector lector**************************************************/
var idlector = "";
var valor ="";
var SerialPort = require('serialport');
var serialport = new SerialPort("/COM12", {
baudRate: 115200
});
var buffer3 = new Buffer(6);
buffer3[0] = 0xA0;
buffer3[1] = 0x04;
buffer3[2] = 0x01;
buffer3[3] = 0x89;
buffer3[4] = 0x01;
buffer3[5] = 0xD1;
serialport.on('data', function(data) {
var buff = new Buffer(data, 'utf8');
var imprimir = buff.toString('hex');
var cmd = imprimir.charAt(3);
var enviar = imprimir.slice(14,-4);
if(cmd == 3){
console.log('este es cmd********', cmd);
idlector = enviar.trim();
console.log('soy id del lector',idlector);
var animal = Model.Animal.build();
console.log('estoy adentro y tengo el id:',idlector);
animal.retrieveByTag(idlector, function (animales) {
if (animales) {
//console.log(animales);
valor = animales.idAnimal;
console.log('soy animalid--------',valor);
}else{
console.log("error");
serialport.write(buffer3);
}
});
}
});
// open errors will be emitted as an error event
serialport.on('error', function(err) {
console.log('Error: ', err.message);
});
/******************************************************************************/
var horaC="";
var horasC="";
var nivelC="";
var pesoBatea="";
var pesoRacionC="";
var pesoBateaC="";
var idInsumoC="";
var consumoId="";
var niv = 5;
var SerialPort = require('serialport');
var parsers = require('serialport').parsers;
var port = new SerialPort("/COM14", {
baudRate: 9600,
parser: parsers.readline('\r\n')
});
leerNivel();
leerPesoyRacion();
leerHora();
/************************leer el nivel actual del comedero***********************/
function leerNivel(){
port.on('open', function() {
port.write('main screen turn on', function(err) {
if (err) {
return console.log('Error: ', err.message);
}
console.log('mensaje 2 escrito');
});
setTimeout(function(){
port.write('>2', function(err) {
if (err) {
return console.log('Error: ', err.message);
}
console.log('cmd 2');
});
}, 1000);
});
}
/*************leer la hora actual del comedero*********************/
function leerHora(){
port.on('open', function() {
port.write('main screen turn on', function(err) {
if (err) {
return console.log('Error: ', err.message);
}
console.log('mensaje 1 escrito');
});
setTimeout(function(){
port.write('>1', function(err) {
if (err) {
return console.log('Error: ', err.message);
}
console.log('cmd 1');
});
}, 3000);
});
}
/*************leer el peso actual del comedero********************/
function leerPesoyRacion(){
port.on('open', function() {
port.write('main screen turn on', function(err) {
if (err) {
return console.log('Error: ', err.message);
}
console.log('mensaje 4 escrito');
});
setTimeout(function(){
port.write('>4', function(err) {
if (err) {
return console.log('Error: ', err.message);
}
console.log('cmd 4');
});
}, 2000);
});
}
/***************funcion para leer datos recibidos del comedero*******************/
//setTimeout(function(){
port.on('data', function(data) {
var imprimir = data.toString();
var cmd = imprimir.charAt(0);
var enviar = imprimir.substring(1);
console.log('valor**************', imprimir);
if (cmd == 1) {
console.log('dentro de cmd 1',cmd);
horaC = enviar.trim();
console.log('hora:', horaC);
} else if(cmd == 2){
console.log('dentro de cmd 2',cmd);
nivelC = enviar.trim();
console.log('nivel:', nivelC);
} else if(cmd == 4){
console.log('dentro de cmd 4',cmd);
pesoRacionC = '2';
console.log('pesoRacion:', pesoRacionC);
}else if(cmd == 3){
console.log('dentro de cmd 3',cmd);
pesoBatea = enviar.trim();
console.log('pesoBatea:', pesoBatea);
var detalleConsumo = Model.DetalleConsumo.build();
detalleConsumo.retrieveId(function (detalleQ) {
if (detalleQ) {
console.log('dentro de detalleQ ultimo id del detalle consumo>', detalleQ[0].dataValues['idDetalleConsumo']);
var idDetalleQ = detalleQ[0].dataValues['idDetalleConsumo'];
detalleConsumo.updateById2(idDetalleQ,pesoBatea,function (success) {
if (success) {
console.log('se guardo la sobra');
} else {
console.log('Detalle Consumo1 no encontrado');
}
}, function (error) {
console.log('Detalle Consumo2 no encontrado');
});
} else {
console.log('Detalle Consumo3 no encontrado');
}
}, function (error) {
res.send('Detalle Consumo4 no encontrado');
});
} else if(cmd == "x"){
//serialport.write(buffer3);
console.log('dentro de cmd x',cmd);
horasC = imprimir.substring(1,9);
console.log('horas:', horasC);
//pesoBateaC = imprimir.slice(9,-1);
pesoBateaC = '2';
console.log('pesoBatea:', '2');
idInsumoC = imprimir.slice(-1);
console.log('idInsumo:', idInsumoC);
serialport.write(buffer3);
var f = new Date();
var fecha = f.getFullYear() + "/" + (f.getMonth() +1) + "/" + f.getDate();
var consumo = Model.Consumo.build();
var stock = Model.Stock.build();
serialport.write(buffer3);
var index = Model.Consumo.build({
fechaConsumo: fecha,
horaConsumo: horasC,
InsumoIdInsumo: idInsumoC
});
serialport.write(buffer3);
index.add(function (success) {
console.log("listo cabecera");
serialport.write(buffer3);
consumo.retrieveId(function (consumoQ) {
if (consumoQ) {
consumoId = consumoQ[0].dataValues['idConsumo'];
console.log("soy consumoId*********", consumoId);
var index2 = Model.DetalleConsumo.build({
cantidad: 2,
observacion: "Consumo de Balanceados",
AnimalIdAnimal: valor,
ConsumoIdConsumo: consumoId
});
index2.add(function (success) {
console.log("dentro");
stock.retrieveByInsumo(consumoId, pesoBateaC, function (detalleConsumos) {
if (detalleConsumos) {
console.log("listo xfin");
index2.guardar(consumoId, function (detalleConsumoss) {
if (detalleConsumoss) {
console.log('se guardo el total del consumo');
} else {
console.log('No se puede cargar el total del consumo');
}
},function (err) {
console.log('Error al intentar cargar el total del consumo',err);
});
} else {
console.log('No se encontraron detalles');
}
}, function (error) {
console.log('Detalle no encontrado');
});
},
function (err) {
console.log('error aca', err);
});
}else {
console.log('No se encontraron Consumos');
}
});
},
function (err) {
console.log(err);
});
}
});
//}, 1000);
/*********************************************************************/
router.get('/abrir', function (req, res) {
console.log('dentro de abrir');
port.write('>i');
});
/*router.get('/abrir', function (req, res) {
console.log('dentro de abrir');
port.write('<1');
});
/********************************************************************/
router.get('/cerrar', function (req, res) {
console.log('dentro de cerrar');
port.write('>j');
});
/*
router.get('/cerrar', function (req, res) {
console.log('dentro de cerrar');
port.write('<0');
});
/********************************************************************/
router.get('/liberar', function (req, res) {
console.log('dentro de liberar');
console.log('obteniendo id del animal');
port.write('>x');
});
/********************************************************************/
router.get('/sobra', function (req, res) {
console.log('dentro de sobra');
console.log('obteniendo id del animal');
port.write('>3');
});
/***************************************************************************/
router.get('/', function (req, res) {
req.session.destroy(function(err) {
if(err) {
console.log(err);
} else {
res.render('publico/home/indexa.jade');
}
});
});
/****************************************************************************/
router.get('/perfil', function (req, res) {
//************************************
var mensaje = Model.Mensaje.build();
//************************************
var alarma = Model.Alarma.build();
//************************************
if(!req.session.user){
res.render('web/index/404.jade');
}
var nivelUsuario = req.session.user.Nivel['nivel'];
console.log('soy nivelUsuario', nivelUsuario);
if(nivelUsuario =='admin'){
mensaje.retriveCount(function (mensaje1) {
console.log('mensaje1', mensaje1);
if (mensaje1) {
mensaje.retrieveAll(function (mensaje2) {
console.log('mensaje2', mensaje2);
if (mensaje2) {
console.log(req.body);
alarma.retriveCount(function (alarma1) {
console.log('alarma1', alarma1);
if (alarma1) {
alarma.retrieveAll(function (alarma2) {
console.log('alarma2', alarma2);
if (alarma2) {
console.log(req.session);
var usuario = req.session.user.usuario;
var pass = req.session.user.pass;
var fechaCreacion = req.session.user.fechaCreacion;
res.render('web/index/perfil.jade',{
alarmas1: alarma1,
alarmas2: alarma2,
mensajes: mensaje1,
mensajeria: mensaje2,
usuarios: usuario,
passs: pass,
fechaCreacions: fechaCreacion
});
}else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
} else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
}else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje no encontrado');
});
} else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje no encontrado');
});
} else{
mensaje.retriveCount(function (mensaje1) {
console.log('mensaje1', mensaje1);
if (mensaje1) {
mensaje.retrieveAll(function (mensaje2) {
console.log('mensaje2', mensaje2);
if (mensaje2) {
console.log(req.body);
alarma.retriveCount(function (alarma1) {
console.log('alarma1', alarma1);
if (alarma1) {
alarma.retrieveAll(function (alarma2) {
console.log('alarma2', alarma2);
if (alarma2) {
console.log(req.body);
var usuario = req.session.user.usuario;
var pass = req.session.user.pass;
var fechaCreacion = req.session.user.fechaCreacion;
res.render('web/index/errores.jade',{
alarmas1: alarma1,
alarmas2: alarma2,
mensajes: mensaje1,
mensajeria: mensaje2,
usuarios: usuario,
passs: pass,
fechaCreacions: fechaCreacion
});
}else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
} else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
}else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje no encontrado');
});
} else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje1 no encontrado');
});
}
});
/****************************************************************************/
router.get('/reportes', function (req, res) {
//************************************
var mensaje = Model.Mensaje.build();
//************************************
var alarma = Model.Alarma.build();
//************************************
if(!req.session.user){
res.render('web/index/404.jade');
}
var nivelUsuario = req.session.user.Nivel['nivel'];
console.log('soy nivelUsuario', nivelUsuario);
if(nivelUsuario =='admin'){
mensaje.retriveCount(function (mensaje1) {
console.log('mensaje1', mensaje1);
if (mensaje1) {
mensaje.retrieveAll(function (mensaje2) {
console.log('mensaje2', mensaje2);
if (mensaje2) {
console.log(req.body);
alarma.retriveCount(function (alarma1) {
console.log('alarma1', alarma1);
if (alarma1) {
alarma.retrieveAll(function (alarma2) {
console.log('alarma2', alarma2);
if (alarma2) {
console.log(req.body);
var usuario = req.session.user.usuario;
var pass = req.session.user.pass;
var fechaCreacion = req.session.user.fechaCreacion;
console.log('soy nivelUsuario', nivelUsuario);
res.render('web/index/reportes.jade',{
alarmas1: alarma1,
alarmas2: alarma2,
mensajes: mensaje1,
mensajeria: mensaje2,
usuarios: usuario,
passs: pass,
fechaCreacions: fechaCreacion
});
}else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
} else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
}else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje no encontrado');
});
} else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje1 no encontrado');
});
}else{
mensaje.retriveCount(function (mensaje1) {
console.log('mensaje1', mensaje1);
if (mensaje1) {
mensaje.retrieveAll(function (mensaje2) {
console.log('mensaje2', mensaje2);
if (mensaje2) {
console.log(req.body);
alarma.retriveCount(function (alarma1) {
console.log('alarma1', alarma1);
if (alarma1) {
alarma.retrieveAll(function (alarma2) {
console.log('alarma2', alarma2);
if (alarma2) {
console.log(req.body);
var usuario = req.session.user.usuario;
var pass = req.session.user.pass;
var fechaCreacion = req.session.user.fechaCreacion;
res.render('web/index/errores.jade',{
alarmas1: alarma1,
alarmas2: alarma2,
mensajes: mensaje1,
mensajeria: mensaje2,
usuarios: usuario,
passs: pass,
fechaCreacions: fechaCreacion
});
}else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
} else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
}else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje no encontrado');
});
} else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje1 no encontrado');
});
}
});
/*ruta para redireccionar al comedero donde al renderizar la pagina le paso la
variable enviar a una variable de la vista llamada horas*/
router.get('/comedero', function(req, res) {
var mensaje = Model.Mensaje.build();
var alarma = Model.Alarma.build();
if(!req.session.user){
res.render('web/index/404.jade');
}
mensaje.retriveCount(function (mensaje1) {
console.log('mensaje1', mensaje1);
if (mensaje1) {
mensaje.retrieveAll(function (mensaje2) {
console.log('mensaje2', mensaje2);
if (mensaje2) {
alarma.retriveCount(function (alarma1) {
console.log('alarma1', alarma1);
if (alarma1) {
alarma.retrieveAll(function (alarma2) {
console.log('alarma2', alarma2);
if (alarma2) {
var usuario = req.session.user.usuario;
var pass = req.session.user.pass;
var fechaCreacion = req.session.user.fechaCreacion;
res.render('web/index/Comedero.jade',{
alarmas1: alarma1,
alarmas2: alarma2,
mensajes: mensaje1,
mensajeria: mensaje2,
niveles: nivelC,
horas: horasC,
pesoRacion: 2,
usuarios: usuario,
passs: pass,
fechaCreacions: fechaCreacion
});
}else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
} else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
}else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensajes no encontrado');
});
} else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje no encontrado');
});
});
//página principal del admin, panel de administración
router.get('/principal', function (req, res) {
var mensaje = Model.Mensaje.build();
var stock = Model.Stock.build();
var consumo = Model.Consumo.build();
var pesaje = Model.Pesaje.build();
var muerte = Model.Muertes.build();
var extraviado = Model.Extraviado.build();
var sanitacion = Model.Sanitacion.build();
var vacunacion = Model.Vacunacion.build();
var ventas = Model.FacturaVenta.build();
//************************************
var alarma = Model.Alarma.build();
if(!req.session.user){
console.log('dentro');
res.render('web/index/404.jade');
}
leerCantidadMinima();
leerHerramienta();
if(niv <= "5"){
leerComederoMinima();
}
mensaje.retriveCount(function (mensaje1) {
console.log('mensaje1', mensaje1);
if (mensaje1) {
mensaje.retrieveAll(function (mensaje2) {
console.log('mensaje2', mensaje2);
if (mensaje2) {
stock.retrieveAll(function (stockQ) {
console.log('stockQ', stockQ);
if (stockQ) {
consumo.retrieveBar(function (consumobar) {
console.log('consumobar', consumobar);
if (consumobar) {
pesaje.retrieveLine2(function (pesaje2) {
console.log('pesaje2', pesaje2);
if (pesaje2) {
consumo.retrieveBar2(function (consumobar2) {
console.log('consumobar2', consumobar2);
if (consumobar2) {
consumo.retrieveBar3(function (consumobar3) {
console.log('consumobar3', consumobar3);
if (consumobar3) {
consumo.retrieveBar4(function (consumobar4) {
console.log('consumobar4', consumobar4);
if (consumobar4) {
consumo.retrieveBar5(function (consumobar5) {
console.log('consumobar5', consumobar5);
if (consumobar5) {
consumo.retrieveBar6(function (consumobar6) {
console.log('consumobar6', consumobar6);
if (consumobar6) {
consumo.retrieveBar7(function (consumobar7) {
console.log('consumobar7', consumobar7);
if (consumobar7) {
pesaje.retrieveLine3(function (pesaje3) {
console.log('pesaje3', pesaje3);
if (pesaje3) {
pesaje.retrieveLine4(function (pesaje4) {
console.log('pesaje4', pesaje4);
if (pesaje4) {
pesaje.retrieveLine5(function (pesaje5) {
console.log('pesaje5', pesaje5);
if (pesaje5) {
pesaje.retrieveLine6(function (pesaje6) {
console.log('pesaje6', pesaje6);
if (pesaje6) {
pesaje.retrieveLine7(function (pesaje7) {
console.log('pesaje7', pesaje7);
if (pesaje7) {
stock.retrieveAll2(function (stockN) {
console.log('stockN', stockN);
if (stockN) {
stock.retrieveAll3(function (stockL) {
console.log('stockL', stockL);
if (stockL) {
stock.retrieveAll4(function (stockO) {
console.log('stockO', stockO);
if (stockO) {
consumo.retrievePie(function (consumir) {
console.log('consumir', consumir);
if (consumir) {
consumo.retrievePie2(function (consumir2) {
console.log('consumir2', consumir2);
if (consumir2) {
stock.retrieveSAnimal2(function (animal2) {
console.log('animal2', animal2);
if (animal2) {
pesaje.retrieveLine(function (pesaje) {
console.log('pesaje', pesaje);
if (pesaje) {
muerte.retrieveSMuerte2(function (muertes) {
console.log('muertes', muertes);
if (muertes) {
extraviado.retrieveExtraviado(function (extraviado) {
console.log('extraviado', extraviado);
if (extraviado) {
sanitacion.retrieveSanitacion(function (sanitacion) {
console.log('sanitacion', sanitacion);
if (sanitacion) {
vacunacion.retrieveVacunacion(function (vacunacion) {
console.log('vacunacion', vacunacion);
if (vacunacion) {
ventas.retrieveVenta(function (ventas) {
console.log('ventas', ventas);
if (ventas) {
alarma.retriveCount(function (alarma1) {
console.log('alarma1', alarma1);
if (alarma1) {
alarma.retrieveAll(function (alarma2) {
console.log('alarma2', alarma2);
if (alarma2) {
console.log(req.body);
console.log(req.session.user);
var usuario = req.session.user.usuario;
var pass = req.session.user.pass;
var fechaCreacion = req.session.user.fechaCreacion;
res.render('web/index/PaginaPrincipal',{
usuarios: usuario,
passs: pass,
fechaCreacions: fechaCreacion,
mensajes: mensaje1,
mensajeria: mensaje2,
peso2: pesaje2,
peso3: pesaje3,
peso4: pesaje4,
peso5: pesaje5,
peso6: pesaje6,
peso7: pesaje7,
consumoBar: consumobar,
consumoBar2: consumobar2,
consumoBar3: consumobar3,
consumoBar4: consumobar4,
consumoBar5: consumobar5,
consumoBar6: consumobar6,
consumoBar7: consumobar7,
stock: stockQ,
Stock2: stockN,
Vtock3: stockL,
consumiendo: consumir,
Otock4: stockO,
consusal: consumir2,
animal2: animal2,
peso: pesaje,
muerted: muertes,
extraviados: extraviado,
sanitaciones: sanitacion,
vacunaciones: vacunacion,
alarmas1: alarma1,
alarmas2: alarma2,
ventass: ventas
});
}else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
} else {
res.send(401, 'No se encontraron Alarmas');
}
}, function (error) {
res.send('Alarma no encontrado');
});
} else {
res.send(401, 'No se Encontraron Ventas de Animales');
}
}, function (error) {
res.send('Ventas no encontrado');
});
} else {
res.send(401, 'No se Encontraron Vacunacion de Animales');
}
}, function (error) {
res.send('Vacunacion no encontrado');
});
} else {
res.send(401, 'No se Encontraron Sanitacion de Animales');
}
}, function (error) {
res.send('Sanitacion no encontrado');
});
} else {
res.send(401, 'No se Encontraron Extraviados de Animales');
}
}, function (error) {
res.send('Extraviados no encontrado');
});
} else {
res.send(401, 'No se Encontraron Muertes de Animales');
}
}, function (error) {
res.send('Muerte no encontrado');
});
} else {
res.send(401, 'No se Encontraron Pesajes de Animales');
}
}, function (error) {
res.send('Pesaje no encontrado');
});
} else {
res.send(401, 'No se Encontraron Stock de Animales');
}
}, function (error) {
res.send('Stock no encontrado');
});
} else {
res.send(401, 'No se Encontraron Consumos de Sal Mineral');
}
}, function (error) {
res.send('Consumo de sal no encontrado');
});
} else {
res.send(401, 'No se Encontraron Consumos de Balanceados');
}
}, function (error) {
res.send('Consumo no encontrado');
});
} else {
res.send(401, 'No se Encontraron Insumos de Medicamento');
}
}, function (error) {
res.send('Insumo de Medicamento no encontrado');
});
} else {
res.send(401, 'No se Encontraron Insumos de Medicamento');
}
}, function (error) {
res.send('Insumo de Medicamento no encontrado');
});
} else {
res.send(401, 'No se Encontraron Insumos de Sal');
}
}, function (error) {
res.send('Insumo de Sal no encontrado');
});
} else {
res.send(401, 'No se Encontraron Pesajes7');
}
}, function (error) {
res.send('Pesaje7 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Pesajes6');
}
}, function (error) {
res.send('Pesaje6 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Pesajes 5');
}
}, function (error) {
res.send('Pesaje5 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Pesajes4');
}
}, function (error) {
res.send('Pesaje4 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Pesajes3');
}
}, function (error) {
res.send('Pesaje3 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Consumos7');
}
}, function (error) {
res.send('ConsumoBar7 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Consumos6');
}
}, function (error) {
res.send('ConsumoBar6 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Consumos5');
}
}, function (error) {
res.send('ConsumoBar5 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Consumos4');
}
}, function (error) {
res.send('ConsumoBar4 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Consumos3');
}
}, function (error) {
res.send('ConsumoBar3 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Consumos2');
}
}, function (error) {
res.send('ConsumoBar2 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Pesajes');
}
}, function (error) {
res.send('Pesaje2 no encontrado');
});
} else {
res.send(401, 'No se Encontraron Consumos');
}
}, function (error) {
res.send('ConsumoBar no encontrado');
});
}else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje no encontrado');
});
} else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje no encontrado');
});
} else {
res.send(401, 'No se encontraron Mensajes');
}
}, function (error) {
res.send('Mensaje no encontrado');
});
});
//---------------------------alarmas
function leerCantidadMinima(){
var stockA = Model.Stock.build();
var alarmaA = Model.Alarma.build();
stockA.retrieveAlarma(function (stock) {
if (stock) {
console.log("soy stock*********", stock[0].Insumo.nombreInsumo);
alarmaA.retrieveByAlarma(stock[0].Insumo.nombreInsumo, function (alarma1) {
if (alarma1) {
console.log("ya existe la alarma");
}else {
console.log("no existe la alarma, guardando...", stock[0].Insumo.nombreInsumo);
var alarma2 = Model.Alarma.build({
nombre: "Cantidad Minima Alcanzada",
alarma: stock[0].Insumo.nombreInsumo
});
alarma2.add(function (success) {
console.log("Se guardo alarma");
},
function (err) {
console.log(err);
});
}
}, function (error) {
console.log('Alarma no encontrado');
});
}else {
console.log(401, 'No se encontraron Alarmas');
}
}, function (error) {
console.log('Cantidad Minima no encontrado');
});
}
function leerHerramienta(){
var herramienta = Model.Herramienta.build();
var alarmaA = Model.Alarma.build();
var mantenimiento = new Date().toJSON().slice(0,10);
console.log("soy mantenimiento*********", mantenimiento);
herramienta.retrieveByAlarma(mantenimiento, function (herramientasq) {
if (herramientasq) {
console.log("soy herramienta*********", herramientasq.nombre);
alarmaA.retrieveByAlarma(herramientasq.nombre, function (alarma1) {
if (alarma1) {
console.log("ya existe la alarma");
}else {
console.log("no existe la alarma, guardando...", herramientasq.nombre);
var alarma2 = Model.Alarma.build({
nombre: "Realizar Mantenimiento",
alarma: herramientasq.nombre
});
alarma2.add(function (success) {
console.log("Se guardo la alarma");
},
function (err) {
console.log(err);
});
}
}, function (error) {
console.log('Alarma no encontrado');
});
}else {
console.log(401, 'No se encontraron Herramientas');
}
}, function (error) {
console.log('Herramienta no encontrado');
});
}
function leerComederoMinima(){
var stockA = Model.Stock.build();
var alarmaA = Model.Alarma.build();
stockA.retrieveAlarma(function (stock) {
if (stock) {
var comedero = 'Comedero Vacio'
alarmaA.retrieveByAlarma(comedero, function (alarma1) {
if (alarma1) {
console.log("ya existe la alarma");
}else {
console.log("no existe la alarma, guardando...", comedero);
var alarma2 = Model.Alarma.build({
nombre: "Nivel Mínima Alcanzado",
alarma: comedero
});
alarma2.add(function (success) {
console.log("Se guardo alarma");
},
function (err) {
console.log(err);
});
}
}, function (error) {
console.log('Alarma no encontrado');
});
}else {
console.log(401, 'No se encontraron Alarmas');
}
}, function (error) {
console.log('Cantidad Minima no encontrado');
});
}
module.exports = router;
|
/* eslint no-console: [0] */
'use strict'
const Email = require('trailpack-proxy-email').Email
module.exports = class Customer extends Email {
/**
*
* @param customer
* @param data
* @param options
* @returns {Promise.<{type: string, subject: string, text: string, html:string, send_email:boolean}>}
*/
invite(customer, data, options) {
const Customer = this.app.orm['Customer']
let resCustomer
return Customer.resolve(customer, options)
.then(_customer => {
if (!_customer) {
throw new Error('Customer did not resolve')
}
resCustomer = _customer
const subject = data.subject || `${ resCustomer.name } Invitation`
const sendEmail = typeof data.send_email !== 'undefined' ? data.send_email : true
return this.compose('invite', subject, resCustomer, sendEmail)
})
}
/**
*
* @param customer
* @param data
* @param options
* @returns {Promise.<{type: string, subject: string, text: string, html:string, send_email:boolean}>}
*/
inviteAccepted(customer, data, options) {
const Customer = this.app.orm['Customer']
let resCustomer
return Customer.resolve(customer, options)
.then(_customer => {
if (!_customer) {
throw new Error('Customer did not resolve')
}
resCustomer = _customer
const subject = data.subject || `${ resCustomer.name } Invite Accepted`
const sendEmail = typeof data.send_email !== 'undefined' ? data.send_email : true
return this.compose('inviteAccepted', subject, resCustomer, sendEmail)
})
}
/**
*
* @param customer
* @param data
* @param options
* @returns {Promise.<{type: string, subject: string, text: string, html:string, send_email:boolean}>}
*/
accountBalanceUpdated(customer, data, options) {
const Customer = this.app.orm['Customer']
let resCustomer
return Customer.resolve(customer, options)
.then(_customer => {
if (!_customer) {
throw new Error('Customer did not resolve')
}
resCustomer = _customer
const subject = data.subject || `${ resCustomer.name } Account Balance Updated`
const sendEmail = typeof data.send_email !== 'undefined' ? data.send_email : true
return this.compose('accountBalanceUpdated', subject, resCustomer, sendEmail)
})
}
/**
*
* @param customer
* @param data
* @param options
*/
accountBalanceDeducted(customer, data, options) {
const Customer = this.app.orm['Customer']
let resCustomer
return Customer.resolve(customer, options)
.then(_customer => {
if (!_customer) {
throw new Error('Customer did not resolve')
}
resCustomer = _customer
const subject = data.subject || `${ resCustomer.name } Account Balance Deducted`
const sendEmail = typeof data.send_email !== 'undefined' ? data.send_email : true
return this.compose('accountBalanceDeducted', subject, resCustomer, sendEmail)
})
}
/**
*
* @param customer
* @param data
* @param options
*/
retarget(customer, data, options) {
const Customer = this.app.orm['Customer']
let resCustomer
return Customer.resolve(customer, options)
.then(_customer => {
if (!_customer) {
throw new Error('Customer did not resolve')
}
resCustomer = _customer
const subject = data.subject || `${ resCustomer.name } you have items in your cart!`
const sendEmail = typeof data.send_email !== 'undefined' ? data.send_email : true
return this.compose('retarget', subject, resCustomer, sendEmail)
})
}
}
|
/* eslint-disable global-require */
import React from 'react';
import { Router, Route, IndexRoute } from 'react-router';
import App from './modules/App/App';
import Landing from './modules/App/Landing';
import TalentInput from './modules/App/TalentInput';
import Performer from './modules/App/Performer';
// require.ensure polyfill for node
if (typeof require.ensure !== 'function') {
require.ensure = function requireModule(deps, callback) {
callback(require);
};
}
/* Workaround for async react routes to work with react-hot-reloader till
https://github.com/reactjs/react-router/issues/2182 and
https://github.com/gaearon/react-hot-loader/issues/288 is fixed.
*/
if (process.env.NODE_ENV !== 'production') {
// Require async routes only in development for react-hot-reloader to work.
// require('./modules/Post/pages/PostListPage/PostListPage');
// require('./modules/Post/pages/PostDetailPage/PostDetailPage');
}
// react-router setup with code-splitting
// More info: http://blog.mxstbr.com/2016/01/react-apps-with-pages/
export default (
<Router>
<Route path="/" component={Landing} />
{/*} <IndexRoute
getComponent={(nextState, cb) => {
require.ensure([], require => {
cb(null, require('./modules/Post/pages/PostDetailPage/PostDetailPage').default);
});
}}
/>*/}
<Route path="/room" component={Performer} />
{/* <Route
path="/index"
getComponent={(nextState, cb) => {
require.ensure([], require => {
cb(null, require('./modules/Post/pages/PostDetailPage/PostDetailPage').default);
});
}}
/>*/}
{/*</Route>*/}
<Route path="/talent" component={TalentInput} />
</Router>
);
|
var async = require('async');
var rp = require('request-promise');
var Promise = require('bluebird');
/*
LoL API object that deals with everything.
*/
var LoLAPI = {
init: function(inputObj) {
/*
SET UP LOGGER
*/
if(typeof inputObj.logger !== 'undefined') {
this.logger = inputObj.logger;
}
else {
this.logger = console;
}
/*
END SET UP LOGGER
*/
/*
SET UP ERROR HANDLER
*/
if(typeof inputObj.errorHandler !== 'undefined') {
this.errorHandler = inputObj.errorHandler;
}
else {
this.errorHandler = this.logger.error;
}
/*
END ERROR HANDLER
*/
/*
SET UP CACHE TODO: replace with CHECK that global redis exists
*/
if(!inputObj.cache) {
var redis = require('redis');
Promise.promisifyAll(redis.RedisClient.prototype);
Promise.promisifyAll(redis.Multi.prototype);
this.cache = redis.createClient('redis://' + inputObj.cacheServer + ':' + (inputObj.cachePort || '6379'));
}
else {
this.cache = inputObj.cache;
this.cache.on("error", function (err) {
this.errorHandle(err);
}.bind(this));
}
this.cache.on('connect', function() {
this.logger.log('LoL API Connected to Redis');
this.getOneHourCount().then(count => {
this.logger.log(inputObj.limit_one_hour - count + ' API requests available in the hour.');
return this.timeToHourExpiry();
})
.then(ttl => {
this.logger.log(ttl + ' seconds left until hour cache expiry');
});
}.bind(this));
/*
END CACHE SETUP
*/
this.setApiKey(inputObj.api_key);
this.failCount = inputObj.fail_count || 5;
//Load all the handlers in the handlers dir.
require('fs').readdirSync(__dirname + '/lib/handlers').forEach(function(file) {
if (file.match(/\.js$/) !== null && file !== 'index.js') {
var r = require('./lib/handlers/' + file);
this.request[r.name] = r.handler.bind(this);
}
}.bind(this));
//Load all the helpers in the helpers dir.
this.helper = {};
require('fs').readdirSync(__dirname + '/lib/helpers').forEach(function(file) {
if (file.match(/\.js$/) !== null && file !== 'index.js') {
var r = require('./lib/helpers/' + file);
this.helper[file.replace(/\.js$/, '')] = r;
}
}.bind(this));
//Load all the route builders in the route builders dir.
this.routeStem = {};
require('fs').readdirSync(__dirname + '/lib/route-stem').forEach(function(file) {
if (file.match(/\.js$/) !== null && file !== 'index.js') {
var r = require('./lib/route-stem/' + file);
this.routeStem[file.replace(/\.js$/, '')] = r;
}
}.bind(this));
//TODO: do we definitely want -1?
this.setRateLimit(inputObj.limit_ten_seconds-1, inputObj.limit_one_hour);
//Set the timeouts for the queue master
this.beginQueueInterval();
return this;
},
beginQueueInterval: function() {
this.queueInterval = setInterval(function() {
return this.checkRateLimit()
.then((spaces)=> {
if(spaces && (this.queue.length > 0)) {
return this.execQueue(spaces);
}
else {
return;
}
}).bind(this);
}.bind(this), 10);
this.logger.log('Created LoL API Request Handler');
return;
},
setApiKey: function(key) {
return this.apiKey = key;
},
timeToHourExpiry: function() {
return this.cache.ttlAsync('lolapi_onehour');
},
refreshCache: function() {
return this.cache.delAsync('lolapi_tenseconds', 'lolapi_onehour');
},
incrementTenSecondsCount: function() {
//If not set then set
return this.cache.multi().incr('lolapi_tenseconds').expire('lolapi_tenseconds', 11).execAsync()
.then((value)=> {
if(!value) {
return this.logger("Couldn't set the 10 second rate key");
}
return value;
}).bind(this);
},
incrementOneHourCount: function() {
//If not set then set
return this.cache.multi().incr('lolapi_onehour').expire('lolapi_onehour', 3601).execAsync()
.then((value)=> {
if(!value) {
return this.logger("Couldn't set one hour key.");
}
return value;
}).bind(this);
},
getTenSecondsCount: function() {
return this.cache.getAsync('lolapi_tenseconds')
.then((key)=> {
if(key) {
return key;
}
else {
return 0;
}
});
},
getOneHourCount: function() {
return this.cache.getAsync('lolapi_onehour')
.then((key)=> {
if(key) {
return key;
}
else {
return 0;
}
});
},
rateLimit: {
tenSeconds: null,
oneHour: null,
},
requestCount: {
tenSeconds: 0,
oneHour: 0,
outstandingRequests: 0
},
failCount: 5,
setRateLimit: function(ten_seconds, one_hour) {
this.rateLimit.tenSeconds = ten_seconds;
this.rateLimit.oneHour = one_hour;
},
// If a 429 is discovered then it sends a retry-after seconds count, test if it greater than remaining time
retryRateLimitOverride: function(retry_after) {
//TODO: do I need to parse int here?
var r = parseInt(retry_after) * 1000;
//Always clear the 10s timeout just to be certain.
//Clear interval and reset after retry after is cleared
clearInterval(this.tenSecondsTimeout);
this.logger.log(this.tenSecondsTimeout);
},
checkRateLimit: function() {
return this.getOneHourCount() //Get this first because we care about it less
.then((oneHour)=> {
return this.getTenSecondsCount()
.then((tenSeconds)=> { //NESTED SO WE CAN ACCESS UPPER VARS IN SCOPE
//TODO: there is a wierd type error here........ for some reason it outputs number for tenseconds and a string for hour
if((parseInt(tenSeconds) + this.requestCount.outstandingRequests) >= this.rateLimit.tenSeconds) {
return 0;
}
else if((parseInt(oneHour) + this.requestCount.outstandingRequests) >= this.rateLimit.oneHour) {
return this.timeToHourExpiry()
.then(ttl => {
this.logger.log('Hit hour limit: ' + oneHour + '. ' + ttl + ' seconds to go until cache reset.');
return 0; // 0 Spaces
})
}
else {
//return the smaller of the requests available
var requests_left_hour = this.rateLimit.oneHour - parseInt(oneHour) - this.requestCount.outstandingRequests;
var requests_left_ten_seconds = this.rateLimit.tenSeconds - parseInt(tenSeconds) - this.requestCount.outstandingRequests;
//As we dont' need to worry about race conditions we don't have to recheck if positive
if(requests_left_hour > requests_left_ten_seconds) {
if(requests_left_ten_seconds > 0) {
return requests_left_ten_seconds;
}
else {
return 0;
}
}
else {
if(requests_left_hour > 0) {
return requests_left_hour;
}
else {
return 0;
}
}
}
});
});
},
initRequest: function(endpoint, returnVars) {
//Add the request and set up as a promise
var cb = function(endpoint, returnVars, times_failed) {
return this.incrementOneHourCount()
.then((oneHour)=> {
return this.incrementTenSecondsCount()
.then((tenSeconds)=> {
this.requestCount.outstandingRequests += 1;
var options = {
uri: encodeURI(endpoint + '&api_key=' + this.apiKey), //Assume the ? has already been added by our endpoint
json: true,
resolveWithFullResponse: true
}
this.logger.log('Using ' + options.uri);
this.logger.log(this.requestCount.outstandingRequests);
this.logger.log(tenSeconds + ' ' + oneHour);
return rp(options)
.then(
function(response) {
this.requestCount.outstandingRequests -= 1;
if(returnVars) {
if(typeof returnVars === 'string') {
if(response.body[returnVars]) {
return response.body[returnVars]; //Resolve promise
}
else {
this.infoHandle("Couldn't locate the requested returnVar " + returnVars + '. Returning full response.');
}
}
else {
var tmp = {};
returnVars.forEach(function(item, i) {
if(response[item]) {
tmp[item] = response.body[item];
}
else {
var bFailedReturnVar = true;
}
}.bind(this));
if(!bFailedReturnVar) {
return tmp; //Resolve promise
}
else {
this.infoHandle("Couldn't locate the requested returnVar " + item + '. Returning full response.');
return response.body; //Resolve Promise
}
}
}
else {
this.logger.log('SUCCESSFUL RESPONSE FROM: ' + endpoint);
return response.body; //Resolve promise
}
}.bind(this),
//REJECTION
function(reason) {
this.requestCount.outstandingRequests -= 1;
if(reason.statusCode === 429) {
this.logger.log('Rate limit reached!')
//NOTE: Riot have been known to remove the header so including this to avoid breaking.
if(typeof reason.response['headers']['retry-after'] !== 'undefined') {
this.logger.log('Retrying after ' + reason.response['headers']['retry-after'] + 's');
// this.retryRateLimitOverride(reason.response['headers']['retry-after']);
}
else {
this.logger.log('No Retry-After header');
this.logger.log(reason.response['headers']);
}
}
if(reason.error.code == 'ENOTFOUND') {
throw 'Request ' + endpoint + ' did not access a valid endpoint, please check the parameter structure of your request realm and/or platform names. NOT adding back to queue.';
}
if(reason.statusCode === 404) {
//404 isn't an error per se, so we don't throw this.
return this.notFoundHandle('Request ' + endpoint + ' REJECTED with reason: ' + reason + '. NOT adding back to queue');
}
if(typeof times_failed !== 'number') {
times_failed = 1;
}
else {
times_failed++;
}
this.infoHandle('Request ' + endpoint + ' REJECTED with reason: ' + reason + '. Adding back to queue. Failed ' + times_failed + ' times.');
return this.addToQueue(cb.bind(this, endpoint, returnVars, times_failed), times_failed, endpoint);
}.bind(this))
.catch(err => {
return this.errorHandle(err);
});
}); //NOTE: I'm not sure why we can't bind here but if we do it causes times_failed to not increment
});
}
return this.addToQueue(cb.bind(this, endpoint, returnVars), 0, endpoint);
},
infoHandle: function(str) {
return this.logger.info(str);
},
notFoundHandle: function(str) {
return this.logger.info(str);
},
addToQueue: function(fn, times_failed, endpoint) {
if(times_failed >= this.failCount) {
this.infoHandle('Request from endpoint "' + endpoint + '" exceeded fail count!');
throw 'Request from endpoint "' + endpoint + '" exceeded fail count!';
}
else {
//Turns function to deferred promise and adds to queue.
this.logger.log('Adding ' + endpoint + ' to queue.');
var resolve, reject;
var promise = new Promise(function(reso, reje) {
resolve = reso;
reject = reje;
})
.then(function(times_failed) {
this.logger.log('Executing queue item!');
return fn(); //NOTE: fn is prebound with arguments
}.bind(this));
this.queue.push({
resolve: resolve,
reject: reject,
promise: promise
});
return promise;
}
},
execQueue: function(end_index) {
while(this.queue.length > 0 && end_index > 0 && this.cache.connected === true) {
bUnloaded = true;
var w = this.queue.shift();
w.resolve();
end_index--;
}
if(this.cache.connected === false) {
this.logger.errorHandle('Attempted to execute queue but cache disconnected');
}
if(bUnloaded) {
this.logger.log(this.queue.length + ' in queue after unloading.');
}
return;
},
queue: [],
request: {}, //contains all the handlers. Created in the INIT function above.
helper: {}, // All the helpers
replaceEndpointVariables: function(realm, endpoint, platform) { //Replaces $r and $p with platform and realm
//Realm matches $r
endpoint = endpoint.replace(/\$r/g, realm);
if(platform) {
endpoint = endpoint.replace(/\$p/g, platform);
}
return endpoint;
},
errorHandle: function(str) {
return this.errorHandler(str);
},
shutdown: function(now) {
return new Promise((resolve, reject) => {
this.logger.log('LoL API shutting down...');
clearInterval(this.queueInterval);
if(now) {
this.cache.end(true);
}
else {
this.cache.quit();
}
this.cache.on('end', function() {
this.logger.log('Redis connected severed.');
resolve(true);
}.bind(this));
}).bind(this)
}
}
module.exports = LoLAPI;
|
function solve(params) {
var N = parseInt(params[0]),
K = parseInt(params[1]),
numbersAsString = params[2];
var numbers = numbersAsString.split(' ').map(Number);
var result = [];
for (var i = 0; i < N; i += 1) {
if(i+K-1 === N) {
break;
}
var min = 1000000000,
max = -1000000000;
for (var j = 0; j < K; j += 1) {
if(numbers[i+j] > max) {
max = numbers[j+i];
}
if(numbers[i+j] < min) {
min = numbers[j+i];
}
}
var sum = min + max;
result.push(sum);
}
console.log(result.join(','));
//print answer
}
var test1 = ['4', '2', '1 3 1 8'],
test2 = ['5', '3', '7 7 8 9 10'];
console.log(solve(test1));
console.log(solve(test2)); |
/**
* Created by dima on 06.12.16.
*/
import React from 'react';
import ViButton from './ViButton';
import './ViFileDownload.css'
const ViFileDownloadButton = function ({ onClick, assetUri, type, loading }) {
return (
<div className="ViFileDownload">
{onClick && <ViButton onClick={() => {
onClick(type)
}} label={`Export ${type}`}/>}
{assetUri && <div className="ViFileDownload-assetDownloadButtonWr">
<a className="ViFileDownload-assetDownloadButton" href={assetUri}>Download {type}</a>
</div>}
{loading && <div className="ViFileDownload-assetDownloadButtonWr">Loading...</div>}
</div>
)
}
export default ViFileDownloadButton; |
'use strict';
exports.BattleFormatsData = {
bulbasaur: {
randomBattleMoves: ["sleeppowder", "gigadrain", "hiddenpowerfire", "hiddenpowerice", "sludgebomb", "powerwhip", "leechseed", "synthesis"],
randomDoubleBattleMoves: ["sleeppowder", "gigadrain", "hiddenpowerfire", "hiddenpowerice", "sludgebomb", "powerwhip", "protect"],
eventPokemon: [
{"generation": 3, "level": 70, "moves":["sweetscent", "growth", "solarbeam", "synthesis"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "growl", "leechseed", "vinewhip"]},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tackle", "growl", "leechseed", "vinewhip"]},
{"generation": 5, "level": 1, "shiny": 1, "ivs": {"def": 31}, "isHidden": false, "moves":["falseswipe", "block", "frenzyplant", "weatherball"]},
{"generation": 6, "level": 5, "isHidden": false, "moves":["growl", "leechseed", "vinewhip", "poisonpowder"], "pokeball": "cherishball"},
{"generation": 6, "level": 5, "isHidden": true, "moves":["tackle", "growl", "celebrate"], "pokeball": "cherishball"},
],
tier: "LC",
},
ivysaur: {
randomBattleMoves: ["sleeppowder", "gigadrain", "hiddenpowerfire", "hiddenpowerice", "sludgebomb", "powerwhip", "leechseed", "synthesis"],
randomDoubleBattleMoves: ["sleeppowder", "gigadrain", "hiddenpowerfire", "hiddenpowerice", "sludgebomb", "powerwhip", "protect"],
tier: "NFE",
},
venusaur: {
randomBattleMoves: ["sunnyday", "sleeppowder", "gigadrain", "hiddenpowerfire", "sludgebomb", "leechseed", "substitute"],
randomDoubleBattleMoves: ["sleeppowder", "gigadrain", "hiddenpowerfire", "hiddenpowerice", "sludgebomb", "powerwhip", "protect"],
eventPokemon: [
{"generation": 6, "level": 100, "isHidden": true, "moves":["solarbeam", "frenzyplant", "synthesis", "grasspledge"], "pokeball": "cherishball"},
],
tier: "RU",
},
venusaurmega: {
randomBattleMoves: ["sleeppowder", "gigadrain", "hiddenpowerfire", "sludgebomb", "leechseed", "synthesis", "earthquake", "knockoff"],
randomDoubleBattleMoves: ["sleeppowder", "gigadrain", "hiddenpowerfire", "hiddenpowerice", "sludgebomb", "powerwhip", "protect"],
requiredItem: "Venusaurite",
tier: "OU",
},
charmander: {
randomBattleMoves: ["flamethrower", "overheat", "dragonpulse", "hiddenpowergrass", "fireblast"],
randomDoubleBattleMoves: ["heatwave", "dragonpulse", "hiddenpowergrass", "fireblast", "protect"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["scratch", "growl", "ember"]},
{"generation": 4, "level": 40, "gender": "M", "nature": "Mild", "moves":["return", "hiddenpower", "quickattack", "howl"], "pokeball": "cherishball"},
{"generation": 4, "level": 40, "gender": "M", "nature": "Naive", "moves":["return", "hiddenpower", "quickattack", "howl"], "pokeball": "cherishball"},
{"generation": 4, "level": 40, "gender": "M", "nature": "Naughty", "moves":["return", "hiddenpower", "quickattack", "howl"], "pokeball": "cherishball"},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["scratch", "growl", "ember", "smokescreen"]},
{"generation": 4, "level": 40, "gender": "M", "nature": "Hardy", "moves":["return", "hiddenpower", "quickattack", "howl"], "pokeball": "cherishball"},
{"generation": 5, "level": 1, "shiny": 1, "ivs": {"spe": 31}, "isHidden": false, "moves":["falseswipe", "block", "blastburn", "acrobatics"]},
{"generation": 6, "level": 5, "isHidden": false, "moves":["growl", "ember", "smokescreen", "dragonrage"], "pokeball": "cherishball"},
{"generation": 6, "level": 5, "isHidden": true, "moves":["scratch", "growl", "celebrate"], "pokeball": "cherishball"},
],
tier: "LC",
},
charmeleon: {
randomBattleMoves: ["flamethrower", "overheat", "dragonpulse", "hiddenpowergrass", "fireblast", "dragondance", "flareblitz", "shadowclaw", "dragonclaw"],
randomDoubleBattleMoves: ["heatwave", "dragonpulse", "hiddenpowergrass", "fireblast", "protect"],
tier: "NFE",
},
charizard: {
randomBattleMoves: ["fireblast", "airslash", "focusblast", "roost", "swordsdance", "flamecharge", "acrobatics", "earthquake", "willowisp"],
randomDoubleBattleMoves: ["heatwave", "fireblast", "airslash", "overheat", "dragonpulse", "roost", "tailwind", "protect"],
eventPokemon: [
{"generation": 3, "level": 70, "moves":["wingattack", "slash", "dragonrage", "firespin"]},
{"generation": 6, "level": 36, "gender": "M", "isHidden": false, "moves":["firefang", "flameburst", "airslash", "inferno"], "pokeball": "cherishball"},
{"generation": 6, "level": 36, "gender": "M", "isHidden": false, "moves":["firefang", "airslash", "dragonclaw", "dragonrage"], "pokeball": "cherishball"},
{"generation": 6, "level": 36, "shiny": true, "gender": "M", "isHidden": false, "moves":["overheat", "solarbeam", "focusblast", "holdhands"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "isHidden": true, "moves":["flareblitz", "blastburn", "scaryface", "firepledge"], "pokeball": "cherishball"},
{"generation": 7, "level": 40, "gender": "M", "nature": "Jolly", "isHidden": false, "moves":["flareblitz", "dragonclaw", "fly", "dragonrage"], "pokeball": "cherishball"},
{"generation": 7, "level": 40, "gender": "M", "nature": "Adamant", "isHidden": false, "moves":["flamethrower", "dragonrage", "slash", "seismictoss"], "pokeball": "pokeball"},
],
tier: "BL4",
},
charizardmegax: {
randomBattleMoves: ["dragondance", "flareblitz", "dragonclaw", "earthquake", "roost", "willowisp"],
randomDoubleBattleMoves: ["dragondance", "flareblitz", "dragonclaw", "earthquake", "rockslide", "roost", "substitute"],
requiredItem: "Charizardite X",
tier: "OU",
},
charizardmegay: {
randomBattleMoves: ["fireblast", "airslash", "roost", "solarbeam", "focusblast", "dragonpulse"],
randomDoubleBattleMoves: ["heatwave", "fireblast", "airslash", "roost", "solarbeam", "focusblast", "protect"],
requiredItem: "Charizardite Y",
tier: "OU",
},
squirtle: {
randomBattleMoves: ["icebeam", "hydropump", "rapidspin", "scald", "aquajet", "toxic"],
randomDoubleBattleMoves: ["muddywater", "icebeam", "hydropump", "fakeout", "scald", "followme", "icywind", "protect"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "tailwhip", "bubble", "withdraw"]},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tackle", "tailwhip", "bubble", "withdraw"]},
{"generation": 5, "level": 1, "shiny": 1, "ivs": {"hp": 31}, "isHidden": false, "moves":["falseswipe", "block", "hydrocannon", "followme"]},
{"generation": 6, "level": 5, "isHidden": false, "moves":["tailwhip", "watergun", "withdraw", "bubble"], "pokeball": "cherishball"},
{"generation": 6, "level": 5, "isHidden": true, "moves":["tackle", "tailwhip", "celebrate"], "pokeball": "cherishball"},
],
tier: "LC",
},
wartortle: {
randomBattleMoves: ["icebeam", "hydropump", "rapidspin", "scald", "aquajet", "toxic"],
randomDoubleBattleMoves: ["muddywater", "icebeam", "hydropump", "fakeout", "scald", "followme", "icywind", "protect"],
tier: "NFE",
},
blastoise: {
randomBattleMoves: ["icebeam", "rapidspin", "scald", "toxic", "dragontail", "roar"],
randomDoubleBattleMoves: ["muddywater", "icebeam", "hydropump", "fakeout", "scald", "followme", "icywind", "protect", "waterspout"],
eventPokemon: [
{"generation": 3, "level": 70, "moves":["protect", "raindance", "skullbash", "hydropump"]},
{"generation": 6, "level": 100, "isHidden": true, "moves":["hydropump", "hydrocannon", "irondefense", "waterpledge"], "pokeball": "cherishball"},
],
tier: "RU",
},
blastoisemega: {
randomBattleMoves: ["icebeam", "hydropump", "rapidspin", "scald", "dragontail", "darkpulse", "aurasphere"],
randomDoubleBattleMoves: ["muddywater", "icebeam", "hydropump", "fakeout", "scald", "darkpulse", "aurasphere", "followme", "icywind", "protect"],
requiredItem: "Blastoisinite",
tier: "UU",
},
caterpie: {
randomBattleMoves: ["bugbite", "snore", "tackle", "electroweb"],
tier: "LC",
},
metapod: {
randomBattleMoves: ["snore", "bugbite", "tackle", "electroweb"],
tier: "NFE",
},
butterfree: {
randomBattleMoves: ["sleeppowder", "quiverdance", "bugbuzz", "airslash", "gigadrain", "substitute"],
randomDoubleBattleMoves: ["quiverdance", "bugbuzz", "substitute", "sleeppowder", "airslash", "shadowball", "protect"],
eventPokemon: [
{"generation": 3, "level": 30, "moves":["morningsun", "psychic", "sleeppowder", "aerialace"]},
],
tier: "PU",
},
weedle: {
randomBattleMoves: ["bugbite", "stringshot", "poisonsting", "electroweb"],
tier: "LC",
},
kakuna: {
randomBattleMoves: ["electroweb", "bugbite", "irondefense", "poisonsting"],
tier: "NFE",
},
beedrill: {
randomBattleMoves: ["toxicspikes", "tailwind", "uturn", "endeavor", "poisonjab", "knockoff"],
randomDoubleBattleMoves: ["xscissor", "uturn", "poisonjab", "drillrun", "brickbreak", "knockoff", "protect", "stringshot"],
eventPokemon: [
{"generation": 3, "level": 30, "moves":["batonpass", "sludgebomb", "twineedle", "swordsdance"]},
],
tier: "PU",
},
beedrillmega: {
randomBattleMoves: ["xscissor", "swordsdance", "uturn", "poisonjab", "drillrun", "knockoff"],
randomDoubleBattleMoves: ["xscissor", "uturn", "substitute", "poisonjab", "drillrun", "knockoff", "protect"],
requiredItem: "Beedrillite",
tier: "UU",
},
pidgey: {
randomBattleMoves: ["roost", "bravebird", "heatwave", "return", "workup", "uturn", "thief"],
randomDoubleBattleMoves: ["bravebird", "heatwave", "return", "uturn", "tailwind", "protect"],
tier: "LC",
},
pidgeotto: {
randomBattleMoves: ["roost", "bravebird", "heatwave", "return", "workup", "uturn", "thief"],
randomDoubleBattleMoves: ["bravebird", "heatwave", "return", "uturn", "tailwind", "protect"],
eventPokemon: [
{"generation": 3, "level": 30, "abilities":["keeneye"], "moves":["refresh", "wingattack", "steelwing", "featherdance"]},
],
tier: "NFE",
},
pidgeot: {
randomBattleMoves: ["roost", "bravebird", "heatwave", "return", "doubleedge", "uturn", "hurricane"],
randomDoubleBattleMoves: ["bravebird", "heatwave", "return", "doubleedge", "uturn", "tailwind", "protect"],
eventPokemon: [
{"generation": 5, "level": 61, "gender": "M", "nature": "Naughty", "ivs": {"hp": 30, "atk": 30, "def": 30, "spa": 30, "spd": 30, "spe": 30}, "isHidden": false, "abilities":["keeneye"], "moves":["whirlwind", "wingattack", "skyattack", "mirrormove"], "pokeball": "cherishball"},
],
tier: "PU",
},
pidgeotmega: {
randomBattleMoves: ["roost", "heatwave", "uturn", "hurricane", "defog"],
randomDoubleBattleMoves: ["tailwind", "heatwave", "uturn", "hurricane", "protect"],
requiredItem: "Pidgeotite",
tier: "UU",
},
rattata: {
randomBattleMoves: ["facade", "flamewheel", "suckerpunch", "uturn", "wildcharge", "thunderwave", "crunch", "revenge"],
randomDoubleBattleMoves: ["facade", "flamewheel", "suckerpunch", "uturn", "wildcharge", "superfang", "crunch", "protect"],
tier: "LC",
},
rattataalola: {
tier: "LC",
},
raticate: {
randomBattleMoves: ["protect", "facade", "flamewheel", "suckerpunch", "uturn", "swordsdance"],
randomDoubleBattleMoves: ["facade", "flamewheel", "suckerpunch", "uturn", "crunch", "protect"],
eventPokemon: [
{"generation": 3, "level": 34, "moves":["refresh", "superfang", "scaryface", "hyperfang"]},
],
tier: "PU",
},
raticatealola: {
randomBattleMoves: ["swordsdance", "return", "suckerpunch", "crunch", "doubleedge"],
randomDoubleBattleMoves: ["doubleedge", "suckerpunch", "protect", "crunch", "uturn"],
tier: "PU",
},
spearow: {
randomBattleMoves: ["return", "drillpeck", "doubleedge", "uturn", "quickattack", "pursuit", "drillrun", "featherdance"],
randomDoubleBattleMoves: ["return", "drillpeck", "doubleedge", "uturn", "quickattack", "drillrun", "protect"],
eventPokemon: [
{"generation": 3, "level": 22, "moves":["batonpass", "falseswipe", "leer", "aerialace"]},
],
tier: "LC",
},
fearow: {
randomBattleMoves: ["return", "drillpeck", "doubleedge", "uturn", "pursuit", "drillrun"],
randomDoubleBattleMoves: ["return", "drillpeck", "doubleedge", "uturn", "quickattack", "drillrun", "protect"],
tier: "PU",
},
ekans: {
randomBattleMoves: ["coil", "gunkshot", "glare", "suckerpunch", "earthquake", "rest"],
randomDoubleBattleMoves: ["gunkshot", "seedbomb", "suckerpunch", "aquatail", "earthquake", "rest", "rockslide", "protect"],
eventPokemon: [
{"generation": 3, "level": 14, "gender": "F", "nature": "Docile", "ivs": {"hp": 26, "atk": 28, "def": 6, "spa": 14, "spd": 30, "spe": 11}, "abilities":["shedskin"], "moves":["leer", "wrap", "poisonsting", "bite"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["wrap", "leer", "poisonsting"]},
],
tier: "LC",
},
arbok: {
randomBattleMoves: ["coil", "gunkshot", "suckerpunch", "aquatail", "earthquake", "rest"],
randomDoubleBattleMoves: ["gunkshot", "suckerpunch", "aquatail", "crunch", "earthquake", "rest", "rockslide", "protect"],
eventPokemon: [
{"generation": 3, "level": 33, "moves":["refresh", "sludgebomb", "glare", "bite"]},
],
tier: "PU",
},
pichu: {
randomBattleMoves: ["fakeout", "volttackle", "encore", "irontail", "toxic", "thunderbolt"],
randomDoubleBattleMoves: ["fakeout", "volttackle", "encore", "irontail", "protect", "thunderbolt"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["thundershock", "charm", "surf"]},
{"generation": 3, "level": 5, "shiny": 1, "moves":["thundershock", "charm", "wish"]},
{"generation": 3, "level": 5, "shiny": 1, "moves":["thundershock", "charm", "teeterdance"]},
{"generation": 3, "level": 5, "shiny": 1, "moves":["thundershock", "charm", "followme"]},
{"generation": 4, "level": 1, "moves":["volttackle", "thunderbolt", "grassknot", "return"]},
{"generation": 4, "level": 30, "shiny": true, "gender": "M", "nature": "Jolly", "moves":["charge", "volttackle", "endeavor", "endure"], "pokeball": "cherishball"},
],
tier: "LC",
},
pichuspikyeared: {
eventPokemon: [
{"generation": 4, "level": 30, "gender": "F", "nature": "Naughty", "moves":["helpinghand", "volttackle", "swagger", "painsplit"]},
],
eventOnly: true,
gen: 4,
tier: "Illegal",
},
pikachu: {
randomBattleMoves: ["thunderbolt", "volttackle", "voltswitch", "grassknot", "hiddenpowerice", "brickbreak", "extremespeed", "encore", "substitute", "knockoff"],
randomDoubleBattleMoves: ["fakeout", "thunderbolt", "volttackle", "voltswitch", "grassknot", "hiddenpowerice", "brickbreak", "extremespeed", "encore", "substitute", "knockoff", "protect", "discharge"],
eventPokemon: [
{"generation": 3, "level": 50, "moves":["thunderbolt", "agility", "thunder", "lightscreen"]},
{"generation": 3, "level": 10, "moves":["thundershock", "growl", "tailwhip", "thunderwave"]},
{"generation": 3, "level": 10, "moves":["fly", "tailwhip", "growl", "thunderwave"]},
{"generation": 3, "level": 5, "moves":["surf", "growl", "tailwhip", "thunderwave"]},
{"generation": 3, "level": 10, "moves":["fly", "growl", "tailwhip", "thunderwave"]},
{"generation": 3, "level": 10, "moves":["thundershock", "growl", "thunderwave", "surf"]},
{"generation": 3, "level": 70, "moves":["thunderbolt", "thunder", "lightscreen", "fly"]},
{"generation": 3, "level": 70, "moves":["thunderbolt", "thunder", "lightscreen", "surf"]},
{"generation": 3, "level": 70, "moves":["thunderbolt", "thunder", "lightscreen", "agility"]},
{"generation": 4, "level": 10, "gender": "F", "nature": "Hardy", "moves":["surf", "volttackle", "tailwhip", "thunderwave"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["thundershock", "growl", "tailwhip", "thunderwave"]},
{"generation": 4, "level": 50, "gender": "M", "nature": "Hardy", "moves":["surf", "thunderbolt", "lightscreen", "quickattack"], "pokeball": "cherishball"},
{"generation": 4, "level": 20, "gender": "F", "nature": "Bashful", "moves":["present", "quickattack", "thundershock", "tailwhip"], "pokeball": "cherishball"},
{"generation": 4, "level": 20, "gender": "M", "nature": "Jolly", "moves":["grassknot", "thunderbolt", "flash", "doubleteam"], "pokeball": "cherishball"},
{"generation": 4, "level": 40, "gender": "M", "nature": "Modest", "moves":["surf", "thunder", "protect"], "pokeball": "cherishball"},
{"generation": 4, "level": 20, "gender": "F", "nature": "Bashful", "moves":["quickattack", "thundershock", "tailwhip", "present"], "pokeball": "cherishball"},
{"generation": 4, "level": 40, "gender": "M", "nature": "Mild", "moves":["surf", "thunder", "protect"], "pokeball": "cherishball"},
{"generation": 4, "level": 20, "gender": "F", "nature": "Bashful", "moves":["present", "quickattack", "thunderwave", "tailwhip"], "pokeball": "cherishball"},
{"generation": 4, "level": 30, "gender": "M", "nature": "Naughty", "moves":["lastresort", "present", "thunderbolt", "quickattack"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "gender": "M", "nature": "Relaxed", "moves":["rest", "sleeptalk", "yawn", "snore"], "pokeball": "cherishball"},
{"generation": 4, "level": 20, "gender": "M", "nature": "Docile", "moves":["present", "quickattack", "thundershock", "tailwhip"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "gender": "M", "nature": "Naughty", "moves":["volttackle", "irontail", "quickattack", "thunderbolt"], "pokeball": "cherishball"},
{"generation": 4, "level": 20, "gender": "M", "nature": "Bashful", "moves":["present", "quickattack", "thundershock", "tailwhip"], "pokeball": "cherishball"},
{"generation": 5, "level": 30, "gender": "F", "isHidden": true, "moves":["sing", "teeterdance", "encore", "electroball"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "isHidden": false, "moves":["fly", "irontail", "electroball", "quickattack"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "shiny": 1, "gender": "F", "isHidden": false, "moves":["thunder", "volttackle", "grassknot", "quickattack"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "shiny": 1, "gender": "F", "isHidden": false, "moves":["extremespeed", "thunderbolt", "grassknot", "brickbreak"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "gender": "F", "nature": "Timid", "isHidden": true, "moves":["fly", "thunderbolt", "grassknot", "protect"], "pokeball": "cherishball"},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["thundershock", "tailwhip", "thunderwave", "headbutt"]},
{"generation": 5, "level": 100, "gender": "M", "isHidden": true, "moves":["volttackle", "quickattack", "feint", "voltswitch"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "gender": "M", "nature": "Brave", "isHidden": false, "moves":["thunderbolt", "quickattack", "irontail", "electroball"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "isHidden": false, "moves":["celebrate", "growl", "playnice", "quickattack"], "pokeball": "cherishball"},
{"generation": 6, "level": 22, "isHidden": false, "moves":["quickattack", "electroball", "doubleteam", "megakick"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "isHidden": false, "moves":["thunderbolt", "quickattack", "surf", "holdhands"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "gender": "F", "isHidden": false, "moves":["thunderbolt", "quickattack", "heartstamp", "holdhands"], "pokeball": "healball"},
{"generation": 6, "level": 36, "shiny": true, "isHidden": true, "moves":["thunder", "substitute", "playnice", "holdhands"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "gender": "F", "isHidden": false, "moves":["playnice", "charm", "nuzzle", "sweetkiss"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "gender": "M", "nature": "Naughty", "isHidden": false, "moves":["thunderbolt", "quickattack", "irontail", "electroball"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "shiny": true, "isHidden": false, "moves":["teeterdance", "playnice", "tailwhip", "nuzzle"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "perfectIVs": 2, "isHidden": true, "moves":["fakeout", "encore", "volttackle", "endeavor"], "pokeball": "cherishball"},
{"generation": 6, "level": 99, "isHidden": false, "moves":["happyhour", "playnice", "holdhands", "flash"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "isHidden": false, "moves":["fly", "surf", "agility", "celebrate"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "isHidden": false, "moves":["bestow", "holdhands", "return", "playnice"], "pokeball": "healball"},
{"generation": 7, "level": 10, "nature": "Jolly", "isHidden": false, "moves":["celebrate", "growl", "playnice", "quickattack"], "pokeball": "cherishball"},
{"generation": 7, "level": 10, "isHidden": false, "moves":["bestow", "holdhands", "return", "playnice"], "pokeball": "cherishball"},
{"generation": 7, "level": 10, "isHidden": false, "moves":["holdhands", "playnice", "teeterdance", "happyhour"], "pokeball": "cherishball"},
{"generation": 7, "level": 10, "isHidden": false, "moves":["growl", "quickattack", "thundershock", "happyhour"], "pokeball": "cherishball"},
],
tier: "NFE",
},
pikachucosplay: {
eventPokemon: [
{"generation": 6, "level": 20, "moves":["quickattack", "electroball", "thunderwave", "thundershock"]},
],
eventOnly: true,
gen: 6,
tier: "Illegal",
},
pikachurockstar: {
eventPokemon: [
{"generation": 6, "level": 20, "moves":["quickattack", "electroball", "thunderwave", "meteormash"]},
],
eventOnly: true,
gen: 6,
tier: "Illegal",
},
pikachubelle: {
eventPokemon: [
{"generation": 6, "level": 20, "moves":["quickattack", "electroball", "thunderwave", "iciclecrash"]},
],
eventOnly: true,
gen: 6,
tier: "Illegal",
},
pikachupopstar: {
eventPokemon: [
{"generation": 6, "level": 20, "moves":["quickattack", "electroball", "thunderwave", "drainingkiss"]},
],
eventOnly: true,
gen: 6,
tier: "Illegal",
},
pikachuphd: {
eventPokemon: [
{"generation": 6, "level": 20, "moves":["quickattack", "electroball", "thunderwave", "electricterrain"]},
],
eventOnly: true,
gen: 6,
tier: "Illegal",
},
pikachulibre: {
eventPokemon: [
{"generation": 6, "level": 20, "moves":["quickattack", "electroball", "thunderwave", "flyingpress"]},
],
eventOnly: true,
gen: 6,
tier: "Illegal",
},
pikachuoriginal: {
eventPokemon: [
{"generation": 7, "level": 1, "nature": "Hardy", "moves":["thunderbolt", "quickattack", "thunder", "agility"]},
],
eventOnly: true,
gen: 7,
tier: "PU",
},
pikachuhoenn: {
eventPokemon: [
{"generation": 7, "level": 6, "nature": "Hardy", "moves":["thunderbolt", "quickattack", "thunder", "irontail"]},
],
eventOnly: true,
gen: 7,
tier: "PU",
},
pikachusinnoh: {
eventPokemon: [
{"generation": 7, "level": 10, "nature": "Hardy", "moves":["thunderbolt", "quickattack", "irontail", "volttackle"]},
],
eventOnly: true,
gen: 7,
tier: "PU",
},
pikachuunova: {
eventPokemon: [
{"generation": 7, "level": 14, "nature": "Hardy", "moves":["thunderbolt", "quickattack", "irontail", "volttackle"]},
],
eventOnly: true,
gen: 7,
tier: "PU",
},
pikachukalos: {
eventPokemon: [
{"generation": 7, "level": 17, "nature": "Hardy", "moves":["thunderbolt", "quickattack", "irontail", "electroball"]},
],
eventOnly: true,
gen: 7,
tier: "PU",
},
pikachualola: {
eventPokemon: [
{"generation": 7, "level": 20, "nature": "Hardy", "moves":["thunderbolt", "quickattack", "irontail", "electroball"]},
],
eventOnly: true,
gen: 7,
tier: "PU",
},
raichu: {
randomBattleMoves: ["nastyplot", "encore", "thunderbolt", "grassknot", "hiddenpowerice", "focusblast", "voltswitch"],
randomDoubleBattleMoves: ["fakeout", "encore", "thunderbolt", "grassknot", "hiddenpowerice", "focusblast", "voltswitch", "protect"],
tier: "PU",
},
raichualola: {
randomBattleMoves: ["nastyplot", "thunderbolt", "psyshock", "focusblast", "voltswitch", "surf"],
randomDoubleBattleMoves: ["thunderbolt", "fakeout", "encore", "psychic", "protect", "voltswitch"],
tier: "PU",
},
sandshrew: {
randomBattleMoves: ["earthquake", "rockslide", "swordsdance", "rapidspin", "xscissor", "stealthrock", "toxic", "knockoff"],
randomDoubleBattleMoves: ["earthquake", "rockslide", "swordsdance", "xscissor", "knockoff", "protect"],
eventPokemon: [
{"generation": 3, "level": 12, "gender": "M", "nature": "Docile", "ivs": {"hp": 4, "atk": 23, "def": 8, "spa": 31, "spd": 1, "spe": 25}, "moves":["scratch", "defensecurl", "sandattack", "poisonsting"]},
],
tier: "LC",
},
sandshrewalola: {
eventPokemon: [
{"generation": 7, "level": 10, "isHidden": false, "moves":["rapidspin", "iceball", "powdersnow", "bide"], "pokeball": "cherishball"},
],
tier: "LC",
},
sandslash: {
randomBattleMoves: ["earthquake", "swordsdance", "rapidspin", "toxic", "stealthrock", "knockoff"],
randomDoubleBattleMoves: ["earthquake", "rockslide", "stoneedge", "swordsdance", "xscissor", "knockoff", "protect"],
tier: "PU",
},
sandslashalola: {
randomBattleMoves: ["substitute", "swordsdance", "iciclecrash", "ironhead", "earthquake", "rapidspin"],
randomDoubleBattleMoves: ["protect", "swordsdance", "iciclecrash", "ironhead", "earthquake", "rockslide"],
tier: "NU",
},
nidoranf: {
randomBattleMoves: ["toxicspikes", "crunch", "poisonjab", "honeclaws"],
randomDoubleBattleMoves: ["helpinghand", "crunch", "poisonjab", "protect"],
tier: "LC",
},
nidorina: {
randomBattleMoves: ["toxicspikes", "crunch", "poisonjab", "honeclaws", "icebeam", "thunderbolt", "shadowclaw"],
randomDoubleBattleMoves: ["helpinghand", "crunch", "poisonjab", "protect", "icebeam", "thunderbolt", "shadowclaw"],
tier: "NFE",
},
nidoqueen: {
randomBattleMoves: ["toxicspikes", "stealthrock", "fireblast", "icebeam", "earthpower", "sludgewave"],
randomDoubleBattleMoves: ["protect", "fireblast", "icebeam", "earthpower", "sludgebomb", "thunderbolt"],
eventPokemon: [
{"generation": 6, "level": 41, "perfectIVs": 2, "isHidden": false, "abilities":["poisonpoint"], "moves":["tailwhip", "doublekick", "poisonsting", "bodyslam"], "pokeball": "cherishball"},
],
tier: "RU",
},
nidoranm: {
randomBattleMoves: ["suckerpunch", "poisonjab", "headsmash", "honeclaws", "shadowclaw"],
randomDoubleBattleMoves: ["suckerpunch", "poisonjab", "shadowclaw", "helpinghand", "protect"],
tier: "LC",
},
nidorino: {
randomBattleMoves: ["suckerpunch", "poisonjab", "headsmash", "honeclaws", "shadowclaw"],
randomDoubleBattleMoves: ["suckerpunch", "poisonjab", "shadowclaw", "helpinghand", "protect"],
tier: "NFE",
},
nidoking: {
randomBattleMoves: ["substitute", "fireblast", "icebeam", "earthpower", "sludgewave", "superpower"],
randomDoubleBattleMoves: ["protect", "fireblast", "thunderbolt", "icebeam", "earthpower", "sludgebomb", "focusblast"],
tier: "UU",
},
cleffa: {
randomBattleMoves: ["reflect", "thunderwave", "lightscreen", "toxic", "fireblast", "encore", "wish", "protect", "aromatherapy"],
randomDoubleBattleMoves: ["reflect", "thunderwave", "lightscreen", "safeguard", "fireblast", "protect"],
tier: "LC",
},
clefairy: {
randomBattleMoves: ["healingwish", "reflect", "thunderwave", "lightscreen", "toxic", "fireblast", "encore", "wish", "protect", "aromatherapy", "stealthrock", "moonblast", "knockoff", "moonlight"],
randomDoubleBattleMoves: ["reflect", "thunderwave", "lightscreen", "safeguard", "fireblast", "followme", "protect", "moonblast"],
tier: "NFE",
},
clefable: {
randomBattleMoves: ["calmmind", "softboiled", "fireblast", "moonblast", "stealthrock", "thunderwave"],
randomDoubleBattleMoves: ["reflect", "thunderwave", "lightscreen", "safeguard", "fireblast", "followme", "protect", "moonblast", "dazzlinggleam", "softboiled"],
tier: "OU",
},
vulpix: {
randomBattleMoves: ["flamethrower", "fireblast", "willowisp", "energyball", "substitute", "toxic", "hypnosis", "painsplit"],
randomDoubleBattleMoves: ["heatwave", "fireblast", "willowisp", "energyball", "substitute", "protect"],
eventPokemon: [
{"generation": 3, "level": 18, "gender": "F", "nature": "Quirky", "ivs": {"hp": 15, "atk": 6, "def": 3, "spa": 25, "spd": 13, "spe": 22}, "moves":["tailwhip", "roar", "quickattack", "willowisp"]},
{"generation": 3, "level": 18, "moves":["charm", "heatwave", "ember", "dig"]},
],
tier: "LC Uber",
},
vulpixalola: {
eventPokemon: [
{"generation": 7, "level": 10, "isHidden": false, "moves":["celebrate", "tailwhip", "babydolleyes", "iceshard"], "pokeball": "cherishball"},
{"generation": 7, "level": 10, "gender": "F", "nature": "Modest", "isHidden": false, "moves":["powdersnow"], "pokeball": "cherishball"},
],
tier: "LC",
},
ninetales: {
randomBattleMoves: ["fireblast", "willowisp", "solarbeam", "nastyplot", "substitute", "hiddenpowerice"],
randomDoubleBattleMoves: ["heatwave", "fireblast", "willowisp", "solarbeam", "substitute", "protect"],
eventPokemon: [
{"generation": 5, "level": 50, "gender": "M", "nature": "Bold", "ivs": {"def": 31}, "isHidden": true, "moves":["heatwave", "solarbeam", "psyshock", "willowisp"], "pokeball": "cherishball"},
],
tier: "PU",
},
ninetalesalola: {
randomBattleMoves: ["nastyplot", "blizzard", "moonblast", "substitute", "hiddenpowerfire", "freezedry", "auroraveil"],
randomDoubleBattleMoves: ["blizzard", "moonblast", "protect", "hiddenpowerfire", "freezedry", "auroraveil", "encore"],
tier: "OU",
},
igglybuff: {
randomBattleMoves: ["wish", "thunderwave", "reflect", "lightscreen", "healbell", "seismictoss", "counter", "protect"],
randomDoubleBattleMoves: ["wish", "thunderwave", "reflect", "lightscreen", "seismictoss", "protect"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "abilities":["cutecharm"], "moves":["sing", "charm", "defensecurl", "tickle"]},
],
tier: "LC",
},
jigglypuff: {
randomBattleMoves: ["wish", "thunderwave", "reflect", "lightscreen", "healbell", "seismictoss", "counter", "stealthrock", "protect", "knockoff", "dazzlinggleam"],
randomDoubleBattleMoves: ["wish", "thunderwave", "reflect", "lightscreen", "seismictoss", "protect", "knockoff", "dazzlinggleam"],
tier: "NFE",
},
wigglytuff: {
randomBattleMoves: ["wish", "protect", "fireblast", "stealthrock", "dazzlinggleam", "hypervoice"],
randomDoubleBattleMoves: ["thunderwave", "reflect", "lightscreen", "protect", "dazzlinggleam", "fireblast", "icebeam", "hypervoice"],
tier: "PU",
},
zubat: {
randomBattleMoves: ["bravebird", "roost", "toxic", "taunt", "nastyplot", "gigadrain", "sludgebomb", "airslash", "uturn", "whirlwind", "heatwave", "superfang"],
randomDoubleBattleMoves: ["bravebird", "taunt", "nastyplot", "gigadrain", "sludgebomb", "airslash", "uturn", "protect", "heatwave", "superfang"],
tier: "LC",
},
golbat: {
randomBattleMoves: ["bravebird", "roost", "toxic", "taunt", "defog", "superfang", "uturn"],
randomDoubleBattleMoves: ["bravebird", "taunt", "nastyplot", "gigadrain", "sludgebomb", "airslash", "uturn", "protect", "heatwave", "superfang"],
tier: "NU",
},
crobat: {
randomBattleMoves: ["bravebird", "roost", "toxic", "taunt", "defog", "uturn", "superfang"],
randomDoubleBattleMoves: ["bravebird", "taunt", "tailwind", "crosspoison", "uturn", "protect", "superfang"],
eventPokemon: [
{"generation": 4, "level": 30, "gender": "M", "nature": "Timid", "moves":["heatwave", "airslash", "sludgebomb", "superfang"], "pokeball": "cherishball"},
],
tier: "UU",
},
oddish: {
randomBattleMoves: ["gigadrain", "sludgebomb", "synthesis", "sleeppowder", "stunspore", "toxic", "hiddenpowerfire", "leechseed", "dazzlinggleam", "sunnyday"],
randomDoubleBattleMoves: ["gigadrain", "sludgebomb", "sleeppowder", "stunspore", "protect", "hiddenpowerfire", "leechseed", "dazzlinggleam", "sunnyday"],
eventPokemon: [
{"generation": 3, "level": 26, "gender": "M", "nature": "Quirky", "ivs": {"hp": 23, "atk": 24, "def": 20, "spa": 21, "spd": 9, "spe": 16}, "moves":["poisonpowder", "stunspore", "sleeppowder", "acid"]},
{"generation": 3, "level": 5, "shiny": 1, "moves":["absorb", "leechseed"]},
],
tier: "LC",
},
gloom: {
randomBattleMoves: ["gigadrain", "sludgebomb", "synthesis", "sleeppowder", "stunspore", "toxic", "hiddenpowerfire", "leechseed", "dazzlinggleam", "sunnyday"],
randomDoubleBattleMoves: ["gigadrain", "sludgebomb", "sleeppowder", "stunspore", "protect", "hiddenpowerfire", "leechseed", "dazzlinggleam", "sunnyday"],
eventPokemon: [
{"generation": 3, "level": 50, "moves":["sleeppowder", "acid", "moonlight", "petaldance"]},
],
tier: "NFE",
},
vileplume: {
randomBattleMoves: ["gigadrain", "sludgebomb", "synthesis", "sleeppowder", "hiddenpowerfire", "aromatherapy"],
randomDoubleBattleMoves: ["gigadrain", "sludgebomb", "sleeppowder", "stunspore", "protect", "hiddenpowerfire", "moonblast"],
tier: "NU",
},
bellossom: {
randomBattleMoves: ["gigadrain", "sleeppowder", "hiddenpowerfire", "hiddenpowerrock", "quiverdance", "moonblast"],
randomDoubleBattleMoves: ["gigadrain", "sludgebomb", "sleeppowder", "stunspore", "protect", "hiddenpowerfire", "moonblast", "sunnyday", "solarbeam"],
tier: "PU",
},
paras: {
randomBattleMoves: ["spore", "stunspore", "xscissor", "seedbomb", "synthesis", "leechseed", "aromatherapy", "knockoff"],
randomDoubleBattleMoves: ["spore", "stunspore", "xscissor", "seedbomb", "ragepowder", "leechseed", "protect", "knockoff", "wideguard"],
eventPokemon: [
{"generation": 3, "level": 28, "abilities":["effectspore"], "moves":["refresh", "spore", "slash", "falseswipe"]},
],
tier: "LC",
},
parasect: {
randomBattleMoves: ["spore", "substitute", "leechlife", "seedbomb", "leechseed", "knockoff"],
randomDoubleBattleMoves: ["spore", "stunspore", "leechlife", "seedbomb", "ragepowder", "leechseed", "protect", "knockoff", "wideguard"],
tier: "PU",
},
venonat: {
randomBattleMoves: ["sleeppowder", "morningsun", "toxicspikes", "sludgebomb", "signalbeam", "stunspore", "psychic"],
randomDoubleBattleMoves: ["sleeppowder", "morningsun", "ragepowder", "sludgebomb", "signalbeam", "stunspore", "psychic", "protect"],
tier: "LC",
},
venomoth: {
randomBattleMoves: ["sleeppowder", "quiverdance", "batonpass", "bugbuzz", "sludgebomb", "substitute"],
randomDoubleBattleMoves: ["sleeppowder", "roost", "ragepowder", "quiverdance", "protect", "bugbuzz", "sludgebomb", "gigadrain", "substitute", "psychic"],
eventPokemon: [
{"generation": 3, "level": 32, "abilities":["shielddust"], "moves":["refresh", "silverwind", "substitute", "psychic"]},
],
tier: "BL2",
},
diglett: {
randomBattleMoves: ["earthquake", "rockslide", "stealthrock", "suckerpunch", "reversal", "substitute", "shadowclaw"],
randomDoubleBattleMoves: ["earthquake", "rockslide", "protect", "suckerpunch", "shadowclaw"],
tier: "LC",
},
diglettalola: {
eventPokemon: [
{"generation": 7, "level": 10, "isHidden": false, "abilities":["tanglinghair"], "moves":["mudslap", "astonish", "growl", "metalclaw"], "pokeball": "cherishball"},
],
tier: "LC",
},
dugtrio: {
randomBattleMoves: ["earthquake", "stoneedge", "stealthrock", "suckerpunch", "reversal", "substitute"],
randomDoubleBattleMoves: ["earthquake", "rockslide", "protect", "suckerpunch", "stoneedge"],
eventPokemon: [
{"generation": 3, "level": 40, "moves":["charm", "earthquake", "sandstorm", "triattack"]},
],
tier: "OU",
},
dugtrioalola: {
randomBattleMoves: ["earthquake", "ironhead", "substitute", "reversal", "stoneedge", "suckerpunch"],
randomDoubleBattleMoves: ["earthquake", "ironhead", "protect", "rockslide", "stoneedge", "suckerpunch"],
tier: "PU",
},
meowth: {
randomBattleMoves: ["fakeout", "uturn", "thief", "taunt", "return", "hypnosis"],
randomDoubleBattleMoves: ["fakeout", "uturn", "nightslash", "taunt", "return", "hypnosis", "feint", "protect"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["scratch", "growl", "petaldance"]},
{"generation": 3, "level": 5, "moves":["scratch", "growl"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["scratch", "growl", "bite"]},
{"generation": 3, "level": 22, "moves":["sing", "slash", "payday", "bite"]},
{"generation": 4, "level": 21, "gender": "F", "nature": "Jolly", "abilities":["pickup"], "moves":["bite", "fakeout", "furyswipes", "screech"], "pokeball": "cherishball"},
{"generation": 4, "level": 10, "gender": "M", "nature": "Jolly", "abilities":["pickup"], "moves":["fakeout", "payday", "assist", "scratch"], "pokeball": "cherishball"},
{"generation": 5, "level": 15, "gender": "M", "isHidden": false, "abilities":["pickup"], "moves":["furyswipes", "sing", "nastyplot", "snatch"], "pokeball": "cherishball"},
{"generation": 6, "level": 20, "isHidden": false, "abilities":["pickup"], "moves":["happyhour", "screech", "bite", "fakeout"], "pokeball": "cherishball"},
],
tier: "LC",
},
meowthalola: {
tier: "LC",
},
persian: {
randomBattleMoves: ["fakeout", "uturn", "taunt", "return", "knockoff"],
randomDoubleBattleMoves: ["fakeout", "uturn", "knockoff", "taunt", "return", "hypnosis", "feint", "protect"],
tier: "PU",
},
persianalola: {
randomBattleMoves: ["nastyplot", "darkpulse", "powergem", "hypnosis", "hiddenpowerfighting"],
randomDoubleBattleMoves: ["fakeout", "foulplay", "darkpulse", "powergem", "snarl", "hiddenpowerfighting", "partingshot", "protect"],
tier: "PU",
},
psyduck: {
randomBattleMoves: ["hydropump", "scald", "icebeam", "hiddenpowergrass", "crosschop", "encore", "psychic", "signalbeam"],
randomDoubleBattleMoves: ["hydropump", "scald", "icebeam", "hiddenpowergrass", "crosschop", "encore", "psychic", "signalbeam", "surf", "icywind", "protect"],
eventPokemon: [
{"generation": 3, "level": 27, "gender": "M", "nature": "Lax", "ivs": {"hp": 31, "atk": 16, "def": 12, "spa": 29, "spd": 31, "spe": 14}, "abilities":["damp"], "moves":["tailwhip", "confusion", "disable", "screech"]},
{"generation": 3, "level": 5, "shiny": 1, "moves":["watersport", "scratch", "tailwhip", "mudsport"]},
],
tier: "LC",
},
golduck: {
randomBattleMoves: ["hydropump", "scald", "icebeam", "psyshock", "encore", "calmmind", "substitute"],
randomDoubleBattleMoves: ["hydropump", "scald", "icebeam", "hiddenpowergrass", "focusblast", "encore", "psychic", "icywind", "protect"],
eventPokemon: [
{"generation": 3, "level": 33, "moves":["charm", "waterfall", "psychup", "brickbreak"]},
],
tier: "PU",
},
mankey: {
randomBattleMoves: ["closecombat", "uturn", "icepunch", "rockslide", "punishment", "earthquake", "poisonjab"],
randomDoubleBattleMoves: ["closecombat", "uturn", "icepunch", "rockslide", "punishment", "earthquake", "poisonjab", "protect"],
tier: "LC",
},
primeape: {
randomBattleMoves: ["closecombat", "uturn", "icepunch", "stoneedge", "encore", "earthquake", "gunkshot"],
randomDoubleBattleMoves: ["closecombat", "uturn", "icepunch", "rockslide", "punishment", "earthquake", "poisonjab", "protect", "taunt", "stoneedge"],
eventPokemon: [
{"generation": 3, "level": 34, "abilities":["vitalspirit"], "moves":["helpinghand", "crosschop", "focusenergy", "reversal"]},
],
tier: "PU",
},
growlithe: {
randomBattleMoves: ["flareblitz", "wildcharge", "hiddenpowergrass", "closecombat", "morningsun", "willowisp", "toxic", "flamethrower"],
randomDoubleBattleMoves: ["flareblitz", "wildcharge", "hiddenpowergrass", "closecombat", "willowisp", "snarl", "heatwave", "helpinghand", "protect"],
eventPokemon: [
{"generation": 3, "level": 32, "gender": "F", "nature": "Quiet", "ivs": {"hp": 11, "atk": 24, "def": 28, "spa": 1, "spd": 20, "spe": 2}, "abilities":["intimidate"], "moves":["leer", "odorsleuth", "takedown", "flamewheel"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["bite", "roar", "ember"]},
{"generation": 3, "level": 28, "moves":["charm", "flamethrower", "bite", "takedown"]},
],
tier: "LC",
},
arcanine: {
randomBattleMoves: ["flareblitz", "wildcharge", "extremespeed", "closecombat", "morningsun", "willowisp", "toxic", "crunch", "roar"],
randomDoubleBattleMoves: ["flareblitz", "wildcharge", "closecombat", "willowisp", "snarl", "protect", "extremespeed"],
eventPokemon: [
{"generation": 4, "level": 50, "abilities":["intimidate"], "moves":["flareblitz", "thunderfang", "crunch", "extremespeed"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "isHidden": false, "abilities":["intimidate"], "moves":["flareblitz", "extremespeed", "willowisp", "protect"], "pokeball": "cherishball"},
],
tier: "UU",
},
poliwag: {
randomBattleMoves: ["hydropump", "icebeam", "encore", "bellydrum", "hypnosis", "waterfall", "return"],
randomDoubleBattleMoves: ["hydropump", "icebeam", "encore", "icywind", "hypnosis", "waterfall", "return", "protect", "helpinghand"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["bubble", "sweetkiss"]},
],
tier: "LC",
},
poliwhirl: {
randomBattleMoves: ["hydropump", "icebeam", "encore", "bellydrum", "hypnosis", "waterfall", "return", "earthquake"],
randomDoubleBattleMoves: ["hydropump", "icebeam", "encore", "icywind", "hypnosis", "waterfall", "return", "protect", "helpinghand", "earthquake"],
tier: "NFE",
},
poliwrath: {
randomBattleMoves: ["hydropump", "focusblast", "icebeam", "rest", "sleeptalk", "scald", "circlethrow", "raindance"],
randomDoubleBattleMoves: ["bellydrum", "encore", "waterfall", "protect", "icepunch", "earthquake", "brickbreak", "rockslide"],
eventPokemon: [
{"generation": 3, "level": 42, "moves":["helpinghand", "hydropump", "raindance", "brickbreak"]},
],
tier: "PU",
},
politoed: {
randomBattleMoves: ["scald", "toxic", "encore", "perishsong", "protect", "hypnosis", "rest"],
randomDoubleBattleMoves: ["scald", "hypnosis", "icywind", "encore", "helpinghand", "protect", "icebeam", "focusblast", "hydropump", "hiddenpowergrass"],
eventPokemon: [
{"generation": 5, "level": 50, "gender": "M", "nature": "Calm", "ivs": {"hp": 31, "atk": 13, "def": 31, "spa": 5, "spd": 31, "spe": 5}, "isHidden": true, "moves":["scald", "icebeam", "perishsong", "protect"], "pokeball": "cherishball"},
],
tier: "PU",
},
abra: {
randomBattleMoves: ["calmmind", "psychic", "psyshock", "hiddenpowerfighting", "shadowball", "encore", "substitute"],
randomDoubleBattleMoves: ["protect", "psychic", "psyshock", "hiddenpowerfighting", "shadowball", "encore", "substitute"],
tier: "LC",
},
kadabra: {
randomBattleMoves: ["calmmind", "psychic", "psyshock", "hiddenpowerfighting", "shadowball", "encore", "substitute"],
randomDoubleBattleMoves: ["protect", "psychic", "psyshock", "hiddenpowerfighting", "shadowball", "encore", "substitute"],
tier: "NFE",
},
alakazam: {
randomBattleMoves: ["psyshock", "psychic", "focusblast", "shadowball", "hiddenpowerice", "hiddenpowerfire"],
randomDoubleBattleMoves: ["protect", "psychic", "psyshock", "focusblast", "shadowball", "encore", "substitute", "dazzlinggleam"],
eventPokemon: [
{"generation": 3, "level": 70, "moves":["futuresight", "calmmind", "psychic", "trick"]},
],
tier: "BL",
},
alakazammega: {
randomBattleMoves: ["calmmind", "psyshock", "focusblast", "shadowball", "encore", "substitute"],
randomDoubleBattleMoves: ["protect", "psychic", "psyshock", "focusblast", "shadowball", "encore", "substitute", "dazzlinggleam"],
requiredItem: "Alakazite",
tier: "OU",
},
machop: {
randomBattleMoves: ["dynamicpunch", "bulkup", "icepunch", "rockslide", "bulletpunch", "knockoff"],
randomDoubleBattleMoves: ["dynamicpunch", "protect", "icepunch", "rockslide", "bulletpunch", "knockoff"],
tier: "LC",
},
machoke: {
randomBattleMoves: ["dynamicpunch", "bulkup", "icepunch", "rockslide", "bulletpunch", "poweruppunch", "knockoff"],
randomDoubleBattleMoves: ["dynamicpunch", "protect", "icepunch", "rockslide", "bulletpunch", "knockoff"],
eventPokemon: [
{"generation": 5, "level": 30, "isHidden": false, "moves":["lowsweep", "foresight", "seismictoss", "revenge"], "pokeball": "cherishball"},
],
tier: "NFE",
},
machamp: {
randomBattleMoves: ["dynamicpunch", "icepunch", "stoneedge", "bulletpunch", "knockoff", "substitute"],
randomDoubleBattleMoves: ["dynamicpunch", "protect", "icepunch", "stoneedge", "rockslide", "bulletpunch", "knockoff", "wideguard"],
eventPokemon: [
{"generation": 3, "level": 38, "gender": "M", "nature": "Quiet", "ivs": {"hp": 9, "atk": 23, "def": 25, "spa": 20, "spd": 15, "spe": 10}, "abilities":["guts"], "moves":["seismictoss", "foresight", "revenge", "vitalthrow"]},
{"generation": 6, "level": 50, "shiny": true, "gender": "M", "nature": "Adamant", "ivs": {"hp": 31, "atk": 31, "def": 31, "spa": 31, "spd": 31, "spe": 31}, "isHidden": false, "abilities":["noguard"], "moves":["dynamicpunch", "stoneedge", "wideguard", "knockoff"], "pokeball": "cherishball"},
{"generation": 7, "level": 34, "gender": "F", "nature": "Brave", "ivs": {"atk": 31}, "isHidden": false, "abilities":["guts"], "moves":["strength", "bulkup", "quickguard", "doubleedge"], "pokeball": "cherishball"},
],
tier: "RU",
},
bellsprout: {
randomBattleMoves: ["swordsdance", "sleeppowder", "sunnyday", "growth", "solarbeam", "gigadrain", "sludgebomb", "weatherball", "suckerpunch", "seedbomb"],
randomDoubleBattleMoves: ["swordsdance", "sleeppowder", "sunnyday", "growth", "solarbeam", "gigadrain", "sludgebomb", "weatherball", "suckerpunch", "seedbomb", "protect"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["vinewhip", "teeterdance"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["vinewhip", "growth"]},
],
tier: "LC",
},
weepinbell: {
randomBattleMoves: ["swordsdance", "sleeppowder", "sunnyday", "growth", "solarbeam", "gigadrain", "sludgebomb", "weatherball", "suckerpunch", "seedbomb", "knockoff"],
randomDoubleBattleMoves: ["swordsdance", "sleeppowder", "sunnyday", "growth", "solarbeam", "gigadrain", "sludgebomb", "weatherball", "suckerpunch", "seedbomb", "protect", "knockoff"],
eventPokemon: [
{"generation": 3, "level": 32, "moves":["morningsun", "magicalleaf", "sludgebomb", "sweetscent"]},
],
tier: "NFE",
},
victreebel: {
randomBattleMoves: ["sleeppowder", "sunnyday", "growth", "solarbeam", "gigadrain", "sludgebomb", "weatherball", "suckerpunch", "powerwhip", "knockoff", "swordsdance"],
randomDoubleBattleMoves: ["swordsdance", "sleeppowder", "sunnyday", "growth", "solarbeam", "gigadrain", "sludgebomb", "weatherball", "suckerpunch", "powerwhip", "protect", "knockoff"],
tier: "PU",
},
tentacool: {
randomBattleMoves: ["toxicspikes", "rapidspin", "scald", "sludgebomb", "icebeam", "knockoff", "gigadrain", "toxic", "dazzlinggleam"],
randomDoubleBattleMoves: ["muddywater", "scald", "sludgebomb", "icebeam", "knockoff", "gigadrain", "protect", "dazzlinggleam"],
tier: "LC",
},
tentacruel: {
randomBattleMoves: ["toxicspikes", "rapidspin", "scald", "sludgebomb", "acidspray", "knockoff"],
randomDoubleBattleMoves: ["muddywater", "scald", "sludgebomb", "acidspray", "icebeam", "knockoff", "gigadrain", "protect", "dazzlinggleam"],
tier: "UU",
},
geodude: {
randomBattleMoves: ["stealthrock", "earthquake", "stoneedge", "suckerpunch", "hammerarm", "firepunch", "rockblast"],
randomDoubleBattleMoves: ["rockslide", "earthquake", "stoneedge", "suckerpunch", "hammerarm", "firepunch", "protect"],
tier: "LC",
},
geodudealola: {
tier: "LC",
},
graveler: {
randomBattleMoves: ["stealthrock", "earthquake", "stoneedge", "suckerpunch", "hammerarm", "firepunch", "rockblast"],
randomDoubleBattleMoves: ["rockslide", "earthquake", "stoneedge", "suckerpunch", "hammerarm", "firepunch", "protect"],
tier: "NFE",
},
graveleralola: {
tier: "NFE",
},
golem: {
randomBattleMoves: ["stealthrock", "earthquake", "explosion", "suckerpunch", "toxic", "rockblast"],
randomDoubleBattleMoves: ["rockslide", "earthquake", "stoneedge", "suckerpunch", "hammerarm", "firepunch", "protect"],
tier: "PU",
},
golemalola: {
randomBattleMoves: ["stealthrock", "stoneedge", "return", "thunderpunch", "earthquake", "toxic"],
randomDoubleBattleMoves: ["doubleedge", "stoneedge", "rockslide", "earthquake", "protect"],
tier: "PU",
},
ponyta: {
randomBattleMoves: ["flareblitz", "wildcharge", "morningsun", "hypnosis", "flamecharge"],
randomDoubleBattleMoves: ["flareblitz", "wildcharge", "protect", "hypnosis", "flamecharge"],
tier: "LC",
},
rapidash: {
randomBattleMoves: ["flareblitz", "wildcharge", "morningsun", "drillrun", "willowisp"],
randomDoubleBattleMoves: ["flareblitz", "wildcharge", "protect", "hypnosis", "flamecharge", "megahorn", "drillrun", "willowisp"],
eventPokemon: [
{"generation": 3, "level": 40, "moves":["batonpass", "solarbeam", "sunnyday", "flamethrower"]},
],
tier: "PU",
},
slowpoke: {
randomBattleMoves: ["scald", "aquatail", "zenheadbutt", "thunderwave", "toxic", "slackoff", "trickroom"],
randomDoubleBattleMoves: ["scald", "aquatail", "zenheadbutt", "thunderwave", "slackoff", "trickroom", "protect"],
eventPokemon: [
{"generation": 3, "level": 31, "gender": "F", "nature": "Naive", "ivs": {"hp": 17, "atk": 11, "def": 19, "spa": 20, "spd": 5, "spe": 10}, "abilities":["oblivious"], "moves":["watergun", "confusion", "disable", "headbutt"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["curse", "yawn", "tackle", "growl"]},
{"generation": 5, "level": 30, "isHidden": false, "moves":["confusion", "disable", "headbutt", "waterpulse"], "pokeball": "cherishball"},
],
tier: "LC",
},
slowbro: {
randomBattleMoves: ["scald", "toxic", "thunderwave", "psyshock", "fireblast", "icebeam", "slackoff"],
randomDoubleBattleMoves: ["scald", "fireblast", "icebeam", "psychic", "grassknot", "thunderwave", "slackoff", "trickroom", "protect", "psyshock"],
eventPokemon: [
{"generation": 6, "level": 100, "nature": "Quiet", "isHidden": false, "abilities":["oblivious"], "moves":["scald", "trickroom", "slackoff", "irontail"], "pokeball": "cherishball"},
],
tier: "NU",
},
slowbromega: {
randomBattleMoves: ["calmmind", "scald", "psyshock", "slackoff", "fireblast", "psychic", "icebeam"],
randomDoubleBattleMoves: ["scald", "fireblast", "icebeam", "psychic", "thunderwave", "slackoff", "trickroom", "protect", "psyshock"],
requiredItem: "Slowbronite",
tier: "BL",
},
slowking: {
randomBattleMoves: ["scald", "fireblast", "icebeam", "psychic", "grassknot", "thunderwave", "toxic", "slackoff", "trickroom", "nastyplot", "dragontail", "psyshock"],
randomDoubleBattleMoves: ["scald", "fireblast", "icebeam", "psychic", "grassknot", "thunderwave", "slackoff", "trickroom", "protect", "psyshock"],
tier: "NU",
},
magnemite: {
randomBattleMoves: ["thunderbolt", "thunderwave", "magnetrise", "substitute", "flashcannon", "hiddenpowerice", "voltswitch"],
randomDoubleBattleMoves: ["thunderbolt", "thunderwave", "magnetrise", "substitute", "flashcannon", "hiddenpowerice", "voltswitch", "protect", "electroweb", "discharge"],
tier: "LC",
},
magneton: {
randomBattleMoves: ["thunderbolt", "substitute", "flashcannon", "hiddenpowerice", "voltswitch", "chargebeam", "hiddenpowerfire"],
randomDoubleBattleMoves: ["thunderbolt", "thunderwave", "magnetrise", "substitute", "flashcannon", "hiddenpowerice", "voltswitch", "protect", "electroweb", "discharge", "hiddenpowerfire"],
eventPokemon: [
{"generation": 3, "level": 30, "moves":["refresh", "doubleedge", "raindance", "thunder"]},
],
tier: "UU",
},
magnezone: {
randomBattleMoves: ["thunderbolt", "substitute", "flashcannon", "hiddenpowerice", "voltswitch", "hiddenpowerfire"],
randomDoubleBattleMoves: ["thunderbolt", "substitute", "flashcannon", "hiddenpowerice", "voltswitch", "protect", "electroweb", "discharge", "hiddenpowerfire"],
tier: "OU",
},
farfetchd: {
randomBattleMoves: ["bravebird", "swordsdance", "return", "leafblade", "roost", "nightslash"],
randomDoubleBattleMoves: ["bravebird", "swordsdance", "return", "leafblade", "protect", "nightslash"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["yawn", "wish"]},
{"generation": 3, "level": 36, "moves":["batonpass", "slash", "swordsdance", "aerialace"]},
],
tier: "PU",
},
doduo: {
randomBattleMoves: ["bravebird", "return", "doubleedge", "roost", "quickattack", "pursuit"],
randomDoubleBattleMoves: ["bravebird", "return", "doubleedge", "quickattack", "protect"],
tier: "LC",
},
dodrio: {
randomBattleMoves: ["bravebird", "return", "swordsdance", "roost", "quickattack", "knockoff", "jumpkick"],
randomDoubleBattleMoves: ["bravebird", "return", "doubleedge", "quickattack", "knockoff", "protect"],
eventPokemon: [
{"generation": 3, "level": 34, "moves":["batonpass", "drillpeck", "agility", "triattack"]},
],
tier: "NU",
},
seel: {
randomBattleMoves: ["surf", "icebeam", "aquajet", "protect", "rest", "toxic", "drillrun"],
randomDoubleBattleMoves: ["surf", "icebeam", "aquajet", "protect", "rest", "toxic", "fakeout", "drillrun", "icywind"],
eventPokemon: [
{"generation": 3, "level": 23, "abilities":["thickfat"], "moves":["helpinghand", "surf", "safeguard", "icebeam"]},
],
tier: "LC",
},
dewgong: {
randomBattleMoves: ["surf", "icebeam", "perishsong", "encore", "toxic", "protect"],
randomDoubleBattleMoves: ["surf", "icebeam", "protect", "perishsong", "fakeout", "encore", "toxic"],
tier: "PU",
},
grimer: {
randomBattleMoves: ["curse", "gunkshot", "poisonjab", "shadowsneak", "painsplit", "icepunch", "firepunch", "memento"],
randomDoubleBattleMoves: ["gunkshot", "poisonjab", "shadowsneak", "protect", "icepunch", "firepunch"],
eventPokemon: [
{"generation": 3, "level": 23, "moves":["helpinghand", "sludgebomb", "shadowpunch", "minimize"]},
],
tier: "LC",
},
grimeralola: {
eventPokemon: [
{"generation": 7, "level": 10, "isHidden": false, "abilities":["poisontouch"], "moves":["bite", "harden", "poisongas", "pound"], "pokeball": "cherishball"},
],
tier: "LC",
},
muk: {
randomBattleMoves: ["curse", "gunkshot", "poisonjab", "shadowsneak", "icepunch", "firepunch", "memento"],
randomDoubleBattleMoves: ["gunkshot", "poisonjab", "shadowsneak", "protect", "icepunch", "firepunch", "brickbreak"],
tier: "PU",
},
mukalola: {
randomBattleMoves: ["curse", "gunkshot", "knockoff", "poisonjab", "shadowsneak", "stoneedge", "pursuit"],
randomDoubleBattleMoves: ["gunkshot", "knockoff", "stoneedge", "snarl", "protect", "poisonjab", "shadowsneak"],
tier: "UU",
},
shellder: {
randomBattleMoves: ["shellsmash", "hydropump", "razorshell", "rockblast", "iciclespear", "rapidspin"],
randomDoubleBattleMoves: ["shellsmash", "hydropump", "razorshell", "rockblast", "iciclespear", "protect"],
eventPokemon: [
{"generation": 3, "level": 24, "gender": "F", "nature": "Brave", "ivs": {"hp": 5, "atk": 19, "def": 18, "spa": 5, "spd": 11, "spe": 13}, "abilities":["shellarmor"], "moves":["withdraw", "iciclespear", "supersonic", "aurorabeam"]},
{"generation": 3, "level": 10, "gender": "M", "abilities":["shellarmor"], "moves":["tackle", "withdraw", "iciclespear"]},
{"generation": 3, "level": 29, "abilities":["shellarmor"], "moves":["refresh", "takedown", "surf", "aurorabeam"]},
],
tier: "LC",
},
cloyster: {
randomBattleMoves: ["shellsmash", "hydropump", "rockblast", "iciclespear", "iceshard", "rapidspin", "spikes", "toxicspikes"],
randomDoubleBattleMoves: ["shellsmash", "hydropump", "razorshell", "rockblast", "iciclespear", "protect"],
eventPokemon: [
{"generation": 5, "level": 30, "gender": "M", "nature": "Naughty", "isHidden": false, "abilities":["skilllink"], "moves":["iciclespear", "rockblast", "hiddenpower", "razorshell"]},
],
tier: "RU",
},
gastly: {
randomBattleMoves: ["shadowball", "sludgebomb", "hiddenpowerfighting", "thunderbolt", "substitute", "disable", "painsplit", "hypnosis", "gigadrain", "trick", "dazzlinggleam"],
randomDoubleBattleMoves: ["shadowball", "sludgebomb", "hiddenpowerfighting", "thunderbolt", "substitute", "disable", "taunt", "hypnosis", "gigadrain", "trick", "dazzlinggleam", "protect"],
tier: "LC",
},
haunter: {
randomBattleMoves: ["shadowball", "sludgebomb", "dazzlinggleam", "substitute", "destinybond"],
randomDoubleBattleMoves: ["shadowball", "sludgebomb", "hiddenpowerfighting", "thunderbolt", "substitute", "disable", "taunt", "hypnosis", "gigadrain", "trick", "dazzlinggleam", "protect"],
eventPokemon: [
{"generation": 5, "level": 30, "moves":["confuseray", "suckerpunch", "shadowpunch", "payback"], "pokeball": "cherishball"},
],
tier: "NFE",
},
gengar: {
randomBattleMoves: ["shadowball", "sludgewave", "focusblast", "substitute", "disable", "painsplit", "willowisp"],
randomDoubleBattleMoves: ["shadowball", "sludgebomb", "focusblast", "substitute", "disable", "taunt", "hypnosis", "willowisp", "dazzlinggleam", "protect"],
eventPokemon: [
{"generation": 3, "level": 23, "gender": "F", "nature": "Hardy", "ivs": {"hp": 19, "atk": 14, "def": 0, "spa": 14, "spd": 17, "spe": 27}, "moves":["spite", "curse", "nightshade", "confuseray"]},
{"generation": 6, "level": 25, "nature": "Timid", "moves":["psychic", "confuseray", "suckerpunch", "shadowpunch"], "pokeball": "cherishball"},
{"generation": 6, "level": 25, "moves":["nightshade", "confuseray", "suckerpunch", "shadowpunch"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "moves":["shadowball", "sludgebomb", "willowisp", "destinybond"], "pokeball": "cherishball"},
{"generation": 6, "level": 25, "shiny": true, "moves":["shadowball", "sludgewave", "confuseray", "astonish"], "pokeball": "duskball"},
{"generation": 6, "level": 50, "shiny": true, "gender": "M", "moves":["meanlook", "hypnosis", "psychic", "hyperbeam"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["meanlook", "hypnosis", "psychic", "hyperbeam"], "pokeball": "cherishball"},
],
tier: "OU",
},
gengarmega: {
randomBattleMoves: ["shadowball", "sludgewave", "focusblast", "taunt", "destinybond", "disable", "perishsong", "protect"],
randomDoubleBattleMoves: ["shadowball", "sludgebomb", "focusblast", "substitute", "disable", "taunt", "hypnosis", "willowisp", "dazzlinggleam", "protect"],
requiredItem: "Gengarite",
tier: "Uber",
},
onix: {
randomBattleMoves: ["stealthrock", "earthquake", "stoneedge", "dragontail", "curse"],
randomDoubleBattleMoves: ["stealthrock", "earthquake", "stoneedge", "rockslide", "protect", "explosion"],
tier: "LC",
},
steelix: {
randomBattleMoves: ["stealthrock", "earthquake", "ironhead", "roar", "toxic", "rockslide"],
randomDoubleBattleMoves: ["stealthrock", "earthquake", "ironhead", "rockslide", "protect", "explosion"],
tier: "NU",
},
steelixmega: {
randomBattleMoves: ["stealthrock", "earthquake", "heavyslam", "roar", "toxic", "dragontail"],
randomDoubleBattleMoves: ["stealthrock", "earthquake", "heavyslam", "rockslide", "protect", "explosion"],
requiredItem: "Steelixite",
tier: "UU",
},
drowzee: {
randomBattleMoves: ["psychic", "seismictoss", "thunderwave", "wish", "protect", "toxic", "shadowball", "trickroom", "calmmind", "dazzlinggleam"],
randomDoubleBattleMoves: ["psychic", "seismictoss", "thunderwave", "wish", "protect", "hypnosis", "shadowball", "trickroom", "calmmind", "dazzlinggleam", "toxic"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "abilities":["insomnia"], "moves":["bellydrum", "wish"]},
],
tier: "LC",
},
hypno: {
randomBattleMoves: ["psychic", "seismictoss", "foulplay", "wish", "protect", "thunderwave", "toxic"],
randomDoubleBattleMoves: ["psychic", "seismictoss", "thunderwave", "wish", "protect", "hypnosis", "trickroom", "dazzlinggleam", "foulplay"],
eventPokemon: [
{"generation": 3, "level": 34, "abilities":["insomnia"], "moves":["batonpass", "psychic", "meditate", "shadowball"]},
],
tier: "PU",
},
krabby: {
randomBattleMoves: ["crabhammer", "swordsdance", "agility", "rockslide", "substitute", "xscissor", "superpower", "knockoff"],
randomDoubleBattleMoves: ["crabhammer", "swordsdance", "rockslide", "substitute", "xscissor", "superpower", "knockoff", "protect"],
tier: "LC",
},
kingler: {
randomBattleMoves: ["crabhammer", "xscissor", "rockslide", "swordsdance", "agility", "superpower", "knockoff"],
randomDoubleBattleMoves: ["crabhammer", "xscissor", "rockslide", "substitute", "superpower", "knockoff", "protect", "wideguard"],
tier: "PU",
},
voltorb: {
randomBattleMoves: ["voltswitch", "thunderbolt", "taunt", "foulplay", "hiddenpowerice"],
randomDoubleBattleMoves: ["voltswitch", "thunderbolt", "taunt", "foulplay", "hiddenpowerice", "protect", "thunderwave"],
eventPokemon: [
{"generation": 3, "level": 19, "moves":["refresh", "mirrorcoat", "spark", "swift"]},
],
tier: "LC",
},
electrode: {
randomBattleMoves: ["voltswitch", "thunderbolt", "taunt", "foulplay", "hiddenpowergrass", "signalbeam"],
randomDoubleBattleMoves: ["voltswitch", "discharge", "taunt", "foulplay", "hiddenpowerice", "protect", "thunderwave"],
tier: "PU",
},
exeggcute: {
randomBattleMoves: ["substitute", "leechseed", "gigadrain", "psychic", "sleeppowder", "stunspore", "hiddenpowerfire", "synthesis"],
randomDoubleBattleMoves: ["substitute", "leechseed", "gigadrain", "psychic", "sleeppowder", "stunspore", "hiddenpowerfire", "protect", "trickroom"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["sweetscent", "wish"]},
],
tier: "LC",
},
exeggutor: {
randomBattleMoves: ["substitute", "leechseed", "gigadrain", "psychic", "sleeppowder", "hiddenpowerfire"],
randomDoubleBattleMoves: ["substitute", "leechseed", "gigadrain", "psychic", "sleeppowder", "hiddenpowerfire", "protect", "trickroom", "psyshock"],
eventPokemon: [
{"generation": 3, "level": 46, "moves":["refresh", "psychic", "hypnosis", "ancientpower"]},
],
tier: "PU",
},
exeggutoralola: {
randomBattleMoves: ["dracometeor", "leafstorm", "flamethrower", "earthquake", "woodhammer", "gigadrain", "dragonhammer"],
randomDoubleBattleMoves: ["dracometeor", "leafstorm", "protect", "flamethrower", "trickroom", "woodhammer", "dragonhammer"],
eventPokemon: [
{"generation": 7, "level": 50, "gender": "M", "nature": "Modest", "isHidden": true, "moves":["powerswap", "celebrate", "leafstorm", "dracometeor"], "pokeball": "cherishball"},
],
tier: "PU",
},
cubone: {
randomBattleMoves: ["substitute", "bonemerang", "doubleedge", "rockslide", "firepunch", "earthquake"],
randomDoubleBattleMoves: ["substitute", "bonemerang", "doubleedge", "rockslide", "firepunch", "earthquake", "protect"],
tier: "LC",
},
marowak: {
randomBattleMoves: ["bonemerang", "earthquake", "knockoff", "doubleedge", "stoneedge", "stealthrock", "substitute"],
randomDoubleBattleMoves: ["substitute", "bonemerang", "doubleedge", "rockslide", "firepunch", "earthquake", "protect", "swordsdance"],
eventPokemon: [
{"generation": 3, "level": 44, "moves":["sing", "earthquake", "swordsdance", "rockslide"]},
],
tier: "PU",
},
marowakalola: {
randomBattleMoves: ["flamecharge", "shadowbone", "bonemerang", "willowisp", "stoneedge", "flareblitz", "substitute"],
randomDoubleBattleMoves: ["shadowbone", "bonemerang", "willowisp", "stoneedge", "flareblitz", "protect"],
tier: "OU",
},
tyrogue: {
randomBattleMoves: ["highjumpkick", "rapidspin", "fakeout", "bulletpunch", "machpunch", "toxic", "counter"],
randomDoubleBattleMoves: ["highjumpkick", "fakeout", "bulletpunch", "machpunch", "helpinghand", "protect"],
tier: "LC",
},
hitmonlee: {
randomBattleMoves: ["highjumpkick", "knockoff", "stoneedge", "rapidspin", "machpunch", "poisonjab", "fakeout"],
randomDoubleBattleMoves: ["knockoff", "rockslide", "machpunch", "fakeout", "highjumpkick", "earthquake", "blazekick", "wideguard", "protect"],
eventPokemon: [
{"generation": 3, "level": 38, "abilities":["limber"], "moves":["refresh", "highjumpkick", "mindreader", "megakick"]},
],
tier: "NU",
},
hitmonchan: {
randomBattleMoves: ["bulkup", "drainpunch", "icepunch", "firepunch", "machpunch", "rapidspin"],
randomDoubleBattleMoves: ["fakeout", "drainpunch", "icepunch", "firepunch", "machpunch", "earthquake", "rockslide", "protect", "thunderpunch"],
eventPokemon: [
{"generation": 3, "level": 38, "abilities":["keeneye"], "moves":["helpinghand", "skyuppercut", "mindreader", "megapunch"]},
],
tier: "PU",
},
hitmontop: {
randomBattleMoves: ["suckerpunch", "machpunch", "rapidspin", "closecombat", "toxic"],
randomDoubleBattleMoves: ["fakeout", "feint", "suckerpunch", "closecombat", "helpinghand", "machpunch", "wideguard"],
eventPokemon: [
{"generation": 5, "level": 55, "gender": "M", "nature": "Adamant", "isHidden": false, "abilities":["intimidate"], "moves":["fakeout", "closecombat", "suckerpunch", "helpinghand"]},
],
tier: "NU",
},
lickitung: {
randomBattleMoves: ["wish", "protect", "dragontail", "curse", "bodyslam", "return", "powerwhip", "swordsdance", "earthquake", "toxic", "healbell"],
randomDoubleBattleMoves: ["wish", "protect", "dragontail", "knockoff", "bodyslam", "return", "powerwhip", "swordsdance", "earthquake"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["healbell", "wish"]},
{"generation": 3, "level": 38, "moves":["helpinghand", "doubleedge", "defensecurl", "rollout"]},
],
tier: "LC",
},
lickilicky: {
randomBattleMoves: ["wish", "protect", "bodyslam", "knockoff", "dragontail", "healbell", "swordsdance", "explosion", "earthquake", "powerwhip"],
randomDoubleBattleMoves: ["wish", "protect", "dragontail", "knockoff", "bodyslam", "rockslide", "powerwhip", "earthquake", "explosion"],
tier: "PU",
},
koffing: {
randomBattleMoves: ["painsplit", "sludgebomb", "willowisp", "fireblast", "toxic", "clearsmog", "rest", "sleeptalk", "thunderbolt"],
randomDoubleBattleMoves: ["protect", "sludgebomb", "willowisp", "fireblast", "toxic", "rest", "sleeptalk", "thunderbolt"],
tier: "LC",
},
weezing: {
randomBattleMoves: ["painsplit", "sludgebomb", "willowisp", "fireblast", "protect", "toxicspikes"],
randomDoubleBattleMoves: ["protect", "sludgebomb", "willowisp", "fireblast", "toxic", "painsplit", "thunderbolt", "explosion"],
tier: "PU",
},
rhyhorn: {
randomBattleMoves: ["stoneedge", "earthquake", "aquatail", "megahorn", "stealthrock", "rockblast", "rockpolish"],
randomDoubleBattleMoves: ["stoneedge", "earthquake", "aquatail", "megahorn", "stealthrock", "rockslide", "protect"],
tier: "LC",
},
rhydon: {
randomBattleMoves: ["stealthrock", "earthquake", "rockblast", "roar", "swordsdance", "stoneedge", "megahorn", "rockpolish"],
randomDoubleBattleMoves: ["stoneedge", "earthquake", "aquatail", "megahorn", "stealthrock", "rockslide", "protect"],
eventPokemon: [
{"generation": 3, "level": 46, "moves":["helpinghand", "megahorn", "scaryface", "earthquake"]},
],
tier: "NU",
},
rhyperior: {
randomBattleMoves: ["stoneedge", "earthquake", "aquatail", "megahorn", "stealthrock", "rockblast", "rockpolish", "dragontail"],
randomDoubleBattleMoves: ["stoneedge", "earthquake", "hammerarm", "megahorn", "stealthrock", "rockslide", "aquatail", "protect"],
tier: "RU",
},
happiny: {
randomBattleMoves: ["aromatherapy", "toxic", "thunderwave", "counter", "endeavor", "lightscreen", "fireblast"],
randomDoubleBattleMoves: ["aromatherapy", "toxic", "thunderwave", "helpinghand", "swagger", "lightscreen", "fireblast", "protect"],
tier: "LC",
},
chansey: {
randomBattleMoves: ["softboiled", "healbell", "stealthrock", "thunderwave", "toxic", "seismictoss", "wish", "protect", "counter"],
randomDoubleBattleMoves: ["aromatherapy", "toxic", "thunderwave", "helpinghand", "softboiled", "lightscreen", "seismictoss", "protect", "wish"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["sweetscent", "wish"]},
{"generation": 3, "level": 10, "moves":["pound", "growl", "tailwhip", "refresh"]},
{"generation": 3, "level": 39, "moves":["sweetkiss", "thunderbolt", "softboiled", "skillswap"]},
],
tier: "OU",
},
blissey: {
randomBattleMoves: ["toxic", "flamethrower", "seismictoss", "softboiled", "wish", "healbell", "protect", "thunderwave", "stealthrock"],
randomDoubleBattleMoves: ["wish", "softboiled", "protect", "toxic", "aromatherapy", "seismictoss", "helpinghand", "thunderwave", "flamethrower", "icebeam"],
eventPokemon: [
{"generation": 5, "level": 10, "isHidden": true, "moves":["pound", "growl", "tailwhip", "refresh"]},
],
tier: "UU",
},
tangela: {
randomBattleMoves: ["gigadrain", "sleeppowder", "hiddenpowerfire", "hiddenpowerice", "leechseed", "knockoff", "leafstorm", "sludgebomb", "synthesis"],
randomDoubleBattleMoves: ["gigadrain", "sleeppowder", "hiddenpowerrock", "hiddenpowerice", "leechseed", "knockoff", "leafstorm", "stunspore", "protect", "hiddenpowerfire"],
eventPokemon: [
{"generation": 3, "level": 30, "abilities":["chlorophyll"], "moves":["morningsun", "solarbeam", "sunnyday", "ingrain"]},
],
tier: "LC Uber",
},
tangrowth: {
randomBattleMoves: ["gigadrain", "leafstorm", "knockoff", "earthquake", "hiddenpowerfire", "rockslide", "sleeppowder", "leechseed", "synthesis"],
randomDoubleBattleMoves: ["gigadrain", "sleeppowder", "hiddenpowerice", "leechseed", "knockoff", "ragepowder", "focusblast", "protect", "powerwhip", "earthquake"],
eventPokemon: [
{"generation": 4, "level": 50, "gender": "M", "nature": "Brave", "moves":["sunnyday", "morningsun", "ancientpower", "naturalgift"], "pokeball": "cherishball"},
],
tier: "OU",
},
kangaskhan: {
randomBattleMoves: ["return", "suckerpunch", "earthquake", "drainpunch", "crunch", "fakeout"],
randomDoubleBattleMoves: ["fakeout", "return", "suckerpunch", "earthquake", "doubleedge", "drainpunch", "crunch", "protect"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "abilities":["earlybird"], "moves":["yawn", "wish"]},
{"generation": 3, "level": 10, "abilities":["earlybird"], "moves":["cometpunch", "leer", "bite"]},
{"generation": 3, "level": 35, "abilities":["earlybird"], "moves":["sing", "earthquake", "tailwhip", "dizzypunch"]},
{"generation": 6, "level": 50, "isHidden": false, "abilities":["scrappy"], "moves":["fakeout", "return", "earthquake", "suckerpunch"], "pokeball": "cherishball"},
],
tier: "PU",
},
kangaskhanmega: {
randomBattleMoves: ["fakeout", "return", "suckerpunch", "earthquake", "poweruppunch", "crunch"],
randomDoubleBattleMoves: ["fakeout", "return", "suckerpunch", "earthquake", "doubleedge", "poweruppunch", "drainpunch", "crunch", "protect"],
requiredItem: "Kangaskhanite",
tier: "Uber",
},
horsea: {
randomBattleMoves: ["hydropump", "icebeam", "substitute", "hiddenpowergrass", "raindance"],
randomDoubleBattleMoves: ["hydropump", "icebeam", "substitute", "hiddenpowergrass", "raindance", "muddywater", "protect"],
eventPokemon: [
{"generation": 5, "level": 1, "shiny": true, "isHidden": false, "moves":["bubble"]},
],
tier: "LC",
},
seadra: {
randomBattleMoves: ["hydropump", "icebeam", "agility", "substitute", "hiddenpowergrass"],
randomDoubleBattleMoves: ["hydropump", "icebeam", "substitute", "hiddenpowergrass", "agility", "muddywater", "protect"],
eventPokemon: [
{"generation": 3, "level": 45, "abilities":["poisonpoint"], "moves":["leer", "watergun", "twister", "agility"]},
],
tier: "NFE",
},
kingdra: {
randomBattleMoves: ["dragondance", "waterfall", "outrage", "ironhead", "substitute", "raindance", "hydropump", "dracometeor"],
randomDoubleBattleMoves: ["hydropump", "icebeam", "raindance", "dracometeor", "dragonpulse", "muddywater", "protect"],
eventPokemon: [
{"generation": 3, "level": 50, "abilities":["swiftswim"], "moves":["leer", "watergun", "twister", "agility"]},
{"generation": 5, "level": 50, "gender": "M", "nature": "Timid", "ivs": {"hp": 31, "atk": 17, "def": 8, "spa": 31, "spd": 11, "spe": 31}, "isHidden": false, "abilities":["swiftswim"], "moves":["dracometeor", "muddywater", "dragonpulse", "protect"], "pokeball": "cherishball"},
],
tier: "OU",
},
goldeen: {
randomBattleMoves: ["waterfall", "megahorn", "knockoff", "drillrun", "icebeam"],
randomDoubleBattleMoves: ["waterfall", "megahorn", "knockoff", "drillrun", "icebeam", "protect"],
tier: "LC",
},
seaking: {
randomBattleMoves: ["waterfall", "megahorn", "knockoff", "drillrun", "scald", "icebeam"],
randomDoubleBattleMoves: ["waterfall", "surf", "megahorn", "knockoff", "drillrun", "icebeam", "icywind", "protect"],
tier: "PU",
},
staryu: {
randomBattleMoves: ["scald", "thunderbolt", "icebeam", "rapidspin", "recover", "dazzlinggleam", "hydropump"],
randomDoubleBattleMoves: ["scald", "thunderbolt", "icebeam", "protect", "recover", "dazzlinggleam", "hydropump"],
eventPokemon: [
{"generation": 3, "level": 50, "moves":["minimize", "lightscreen", "cosmicpower", "hydropump"]},
{"generation": 3, "level": 18, "nature": "Timid", "ivs": {"hp": 10, "atk": 3, "def": 22, "spa": 24, "spd": 3, "spe": 18}, "abilities":["illuminate"], "moves":["harden", "watergun", "rapidspin", "recover"]},
],
tier: "LC",
},
starmie: {
randomBattleMoves: ["thunderbolt", "icebeam", "rapidspin", "recover", "psyshock", "scald", "hydropump"],
randomDoubleBattleMoves: ["surf", "thunderbolt", "icebeam", "protect", "recover", "psychic", "psyshock", "scald", "hydropump"],
eventPokemon: [
{"generation": 3, "level": 41, "moves":["refresh", "waterfall", "icebeam", "recover"]},
],
tier: "UU",
},
mimejr: {
randomBattleMoves: ["batonpass", "psychic", "thunderwave", "hiddenpowerfighting", "healingwish", "nastyplot", "thunderbolt", "encore"],
randomDoubleBattleMoves: ["fakeout", "psychic", "thunderwave", "hiddenpowerfighting", "healingwish", "nastyplot", "thunderbolt", "encore", "icywind", "protect"],
tier: "LC",
},
mrmime: {
randomBattleMoves: ["nastyplot", "psychic", "psyshock", "dazzlinggleam", "shadowball", "batonpass", "focusblast", "healingwish", "encore"],
randomDoubleBattleMoves: ["fakeout", "thunderwave", "hiddenpowerfighting", "psychic", "thunderbolt", "encore", "icywind", "protect", "wideguard", "dazzlinggleam", "followme"],
eventPokemon: [
{"generation": 3, "level": 42, "abilities":["soundproof"], "moves":["followme", "psychic", "encore", "thunderpunch"]},
],
tier: "PU",
},
scyther: {
randomBattleMoves: ["swordsdance", "roost", "bugbite", "quickattack", "brickbreak", "aerialace", "batonpass", "uturn", "knockoff"],
randomDoubleBattleMoves: ["swordsdance", "protect", "bugbite", "quickattack", "brickbreak", "aerialace", "feint", "uturn", "knockoff"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "abilities":["swarm"], "moves":["quickattack", "leer", "focusenergy"]},
{"generation": 3, "level": 40, "abilities":["swarm"], "moves":["morningsun", "razorwind", "silverwind", "slash"]},
{"generation": 5, "level": 30, "isHidden": false, "moves":["agility", "wingattack", "furycutter", "slash"], "pokeball": "cherishball"},
],
tier: "NU",
},
scizor: {
randomBattleMoves: ["swordsdance", "bulletpunch", "bugbite", "superpower", "uturn", "pursuit", "knockoff"],
randomDoubleBattleMoves: ["swordsdance", "roost", "bulletpunch", "bugbite", "superpower", "uturn", "protect", "feint", "knockoff"],
eventPokemon: [
{"generation": 3, "level": 50, "gender": "M", "abilities":["swarm"], "moves":["furycutter", "metalclaw", "swordsdance", "slash"]},
{"generation": 4, "level": 50, "gender": "M", "nature": "Adamant", "abilities":["swarm"], "moves":["xscissor", "swordsdance", "irondefense", "agility"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "gender": "M", "isHidden": false, "abilities":["technician"], "moves":["bulletpunch", "bugbite", "roost", "swordsdance"], "pokeball": "cherishball"},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["leer", "focusenergy", "pursuit", "steelwing"]},
{"generation": 6, "level": 50, "gender": "M", "isHidden": false, "moves":["xscissor", "nightslash", "doublehit", "ironhead"], "pokeball": "cherishball"},
{"generation": 6, "level": 25, "nature": "Adamant", "isHidden": false, "abilities":["technician"], "moves":["aerialace", "falseswipe", "agility", "furycutter"], "pokeball": "cherishball"},
{"generation": 6, "level": 25, "isHidden": false, "moves":["metalclaw", "falseswipe", "agility", "furycutter"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "isHidden": false, "abilities":["technician"], "moves":["bulletpunch", "swordsdance", "roost", "uturn"], "pokeball": "cherishball"},
],
tier: "UU",
},
scizormega: {
randomBattleMoves: ["swordsdance", "roost", "bulletpunch", "bugbite", "superpower", "uturn", "defog", "knockoff"],
randomDoubleBattleMoves: ["swordsdance", "roost", "bulletpunch", "bugbite", "superpower", "uturn", "protect", "feint", "knockoff"],
requiredItem: "Scizorite",
tier: "OU",
},
smoochum: {
randomBattleMoves: ["icebeam", "psychic", "hiddenpowerfighting", "trick", "shadowball", "grassknot"],
randomDoubleBattleMoves: ["icebeam", "psychic", "hiddenpowerfighting", "trick", "shadowball", "grassknot", "fakeout", "protect"],
tier: "LC",
},
jynx: {
randomBattleMoves: ["icebeam", "psychic", "focusblast", "trick", "nastyplot", "lovelykiss", "substitute", "psyshock"],
randomDoubleBattleMoves: ["icebeam", "psychic", "hiddenpowerfighting", "shadowball", "protect", "lovelykiss", "substitute", "psyshock"],
tier: "PU",
},
elekid: {
randomBattleMoves: ["thunderbolt", "crosschop", "voltswitch", "substitute", "icepunch", "psychic", "hiddenpowergrass"],
randomDoubleBattleMoves: ["thunderbolt", "crosschop", "voltswitch", "substitute", "icepunch", "psychic", "hiddenpowergrass", "protect"],
eventPokemon: [
{"generation": 3, "level": 20, "moves":["icepunch", "firepunch", "thunderpunch", "crosschop"]},
],
tier: "LC",
},
electabuzz: {
randomBattleMoves: ["thunderbolt", "voltswitch", "substitute", "hiddenpowerice", "hiddenpowergrass", "focusblast", "psychic"],
randomDoubleBattleMoves: ["thunderbolt", "crosschop", "voltswitch", "substitute", "icepunch", "psychic", "hiddenpowergrass", "protect", "focusblast", "discharge"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["quickattack", "leer", "thunderpunch"]},
{"generation": 3, "level": 43, "moves":["followme", "crosschop", "thunderwave", "thunderbolt"]},
{"generation": 4, "level": 30, "gender": "M", "nature": "Naughty", "moves":["lowkick", "shockwave", "lightscreen", "thunderpunch"]},
{"generation": 5, "level": 30, "isHidden": false, "moves":["lowkick", "swift", "shockwave", "lightscreen"], "pokeball": "cherishball"},
{"generation": 6, "level": 30, "gender": "M", "isHidden": true, "moves":["lowkick", "shockwave", "lightscreen", "thunderpunch"], "pokeball": "cherishball"},
],
tier: "NFE",
},
electivire: {
randomBattleMoves: ["wildcharge", "crosschop", "icepunch", "flamethrower", "earthquake", "voltswitch"],
randomDoubleBattleMoves: ["wildcharge", "crosschop", "icepunch", "substitute", "flamethrower", "earthquake", "protect", "followme"],
eventPokemon: [
{"generation": 4, "level": 50, "gender": "M", "nature": "Adamant", "moves":["thunderpunch", "icepunch", "crosschop", "earthquake"]},
{"generation": 4, "level": 50, "gender": "M", "nature": "Serious", "moves":["lightscreen", "thunderpunch", "discharge", "thunderbolt"], "pokeball": "cherishball"},
],
tier: "PU",
},
magby: {
randomBattleMoves: ["flareblitz", "substitute", "fireblast", "hiddenpowergrass", "hiddenpowerice", "crosschop", "thunderpunch", "overheat"],
tier: "LC",
},
magmar: {
randomBattleMoves: ["flareblitz", "substitute", "fireblast", "hiddenpowergrass", "hiddenpowerice", "crosschop", "thunderpunch", "focusblast"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["leer", "smog", "firepunch", "leer"]},
{"generation": 3, "level": 36, "moves":["followme", "fireblast", "crosschop", "thunderpunch"]},
{"generation": 4, "level": 30, "gender": "M", "nature": "Quiet", "moves":["smokescreen", "firespin", "confuseray", "firepunch"]},
{"generation": 5, "level": 30, "isHidden": false, "moves":["smokescreen", "feintattack", "firespin", "confuseray"], "pokeball": "cherishball"},
{"generation": 6, "level": 30, "gender": "M", "isHidden": true, "moves":["smokescreen", "firespin", "confuseray", "firepunch"], "pokeball": "cherishball"},
],
tier: "NFE",
},
magmortar: {
randomBattleMoves: ["fireblast", "focusblast", "hiddenpowergrass", "hiddenpowerice", "thunderbolt", "earthquake", "substitute"],
randomDoubleBattleMoves: ["fireblast", "taunt", "focusblast", "hiddenpowergrass", "hiddenpowerice", "thunderbolt", "heatwave", "willowisp", "protect", "followme"],
eventPokemon: [
{"generation": 4, "level": 50, "gender": "F", "nature": "Modest", "moves":["flamethrower", "psychic", "hyperbeam", "solarbeam"]},
{"generation": 4, "level": 50, "gender": "M", "nature": "Hardy", "moves":["confuseray", "firepunch", "lavaplume", "flamethrower"], "pokeball": "cherishball"},
],
tier: "PU",
},
pinsir: {
randomBattleMoves: ["earthquake", "xscissor", "closecombat", "stoneedge", "stealthrock", "knockoff"],
randomDoubleBattleMoves: ["protect", "swordsdance", "xscissor", "earthquake", "closecombat", "substitute", "rockslide"],
eventPokemon: [
{"generation": 3, "level": 35, "abilities":["hypercutter"], "moves":["helpinghand", "guillotine", "falseswipe", "submission"]},
{"generation": 6, "level": 50, "gender": "F", "nature": "Adamant", "isHidden": false, "moves":["xscissor", "earthquake", "stoneedge", "return"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "nature": "Jolly", "isHidden": true, "moves":["earthquake", "swordsdance", "feint", "quickattack"], "pokeball": "cherishball"},
],
tier: "PU",
},
pinsirmega: {
randomBattleMoves: ["swordsdance", "earthquake", "closecombat", "quickattack", "return"],
randomDoubleBattleMoves: ["feint", "protect", "swordsdance", "xscissor", "earthquake", "closecombat", "substitute", "quickattack", "return", "rockslide"],
requiredItem: "Pinsirite",
tier: "OU",
},
tauros: {
randomBattleMoves: ["rockclimb", "earthquake", "zenheadbutt", "rockslide", "doubleedge"],
randomDoubleBattleMoves: ["return", "earthquake", "zenheadbutt", "rockslide", "stoneedge", "protect", "doubleedge"],
eventPokemon: [
{"generation": 3, "level": 25, "nature": "Docile", "ivs": {"hp": 14, "atk": 19, "def": 12, "spa": 17, "spd": 5, "spe": 26}, "abilities":["intimidate"], "moves":["rage", "hornattack", "scaryface", "pursuit"], "pokeball": "safariball"},
{"generation": 3, "level": 10, "abilities":["intimidate"], "moves":["tackle", "tailwhip", "rage", "hornattack"]},
{"generation": 3, "level": 46, "abilities":["intimidate"], "moves":["refresh", "earthquake", "tailwhip", "bodyslam"]},
],
tier: "BL4",
},
magikarp: {
randomBattleMoves: ["bounce", "flail", "tackle", "hydropump"],
eventPokemon: [
{"generation": 4, "level": 5, "gender": "M", "nature": "Relaxed", "moves":["splash"]},
{"generation": 4, "level": 6, "gender": "F", "nature": "Rash", "moves":["splash"]},
{"generation": 4, "level": 7, "gender": "F", "nature": "Hardy", "moves":["splash"]},
{"generation": 4, "level": 5, "gender": "F", "nature": "Lonely", "moves":["splash"]},
{"generation": 4, "level": 4, "gender": "M", "nature": "Modest", "moves":["splash"]},
{"generation": 5, "level": 99, "shiny": true, "gender": "M", "isHidden": false, "moves":["flail", "hydropump", "bounce", "splash"], "pokeball": "cherishball"},
{"generation": 6, "level": 1, "shiny": 1, "isHidden": false, "moves":["splash", "celebrate", "happyhour"], "pokeball": "cherishball"},
{"generation": 7, "level": 19, "shiny": true, "isHidden": false, "moves":["splash", "bounce"], "pokeball": "cherishball"},
],
tier: "LC",
},
gyarados: {
randomBattleMoves: ["dragondance", "waterfall", "earthquake", "bounce", "rest", "sleeptalk", "dragontail", "stoneedge", "substitute"],
randomDoubleBattleMoves: ["dragondance", "waterfall", "earthquake", "bounce", "taunt", "protect", "thunderwave", "stoneedge", "substitute", "icefang"],
eventPokemon: [
{"generation": 6, "level": 50, "isHidden": false, "moves":["waterfall", "earthquake", "icefang", "dragondance"], "pokeball": "cherishball"},
{"generation": 6, "level": 20, "shiny": true, "isHidden": false, "moves":["waterfall", "bite", "icefang", "ironhead"], "pokeball": "cherishball"},
],
tier: "BL",
},
gyaradosmega: {
randomBattleMoves: ["dragondance", "waterfall", "earthquake", "substitute", "icefang", "crunch"],
randomDoubleBattleMoves: ["dragondance", "waterfall", "earthquake", "bounce", "taunt", "protect", "thunderwave", "stoneedge", "substitute", "icefang", "crunch"],
requiredItem: "Gyaradosite",
tier: "OU",
},
lapras: {
randomBattleMoves: ["icebeam", "thunderbolt", "healbell", "toxic", "hydropump", "substitute"],
randomDoubleBattleMoves: ["icebeam", "thunderbolt", "hydropump", "surf", "substitute", "protect", "iceshard", "icywind"],
eventPokemon: [
{"generation": 3, "level": 44, "moves":["hydropump", "raindance", "blizzard", "healbell"]},
],
tier: "PU",
},
ditto: {
randomBattleMoves: ["transform"],
eventPokemon: [
{"generation": 7, "level": 10, "isHidden": false, "moves":["transform"], "pokeball": "cherishball"},
],
tier: "PU",
},
eevee: {
randomBattleMoves: ["quickattack", "return", "bite", "batonpass", "irontail", "yawn", "protect", "wish"],
randomDoubleBattleMoves: ["quickattack", "return", "bite", "helpinghand", "irontail", "yawn", "protect", "wish"],
eventPokemon: [
{"generation": 4, "level": 10, "gender": "F", "nature": "Lonely", "abilities":["adaptability"], "moves":["covet", "bite", "helpinghand", "attract"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "shiny": true, "gender": "M", "nature": "Hardy", "abilities":["adaptability"], "moves":["irontail", "trumpcard", "flail", "quickattack"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "gender": "F", "nature": "Hardy", "isHidden": false, "abilities":["adaptability"], "moves":["sing", "return", "echoedvoice", "attract"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "isHidden": false, "moves":["celebrate", "sandattack", "babydolleyes", "swift"], "pokeball": "cherishball"},
{"generation": 6, "level": 15, "shiny": true, "isHidden": true, "moves":["swift", "quickattack", "babydolleyes", "helpinghand"], "pokeball": "cherishball"},
{"generation": 7, "level": 10, "nature": "Jolly", "isHidden": false, "moves":["celebrate", "sandattack", "babydolleyes"], "pokeball": "cherishball"},
],
tier: "LC",
},
vaporeon: {
randomBattleMoves: ["wish", "protect", "scald", "roar", "icebeam", "healbell", "batonpass"],
randomDoubleBattleMoves: ["helpinghand", "wish", "protect", "scald", "muddywater", "icebeam", "toxic", "hydropump"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tailwhip", "tackle", "helpinghand", "sandattack"]},
{"generation": 6, "level": 10, "isHidden": false, "moves":["celebrate", "tailwhip", "sandattack", "watergun"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "gender": "F", "isHidden": true, "moves":["scald", "icebeam", "raindance", "rest"], "pokeball": "cherishball"},
],
tier: "NU",
},
jolteon: {
randomBattleMoves: ["thunderbolt", "voltswitch", "hiddenpowerice", "batonpass", "substitute", "signalbeam"],
randomDoubleBattleMoves: ["thunderbolt", "voltswitch", "hiddenpowergrass", "hiddenpowerice", "helpinghand", "protect", "substitute", "signalbeam"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tailwhip", "tackle", "helpinghand", "sandattack"]},
{"generation": 6, "level": 10, "isHidden": false, "moves":["celebrate", "tailwhip", "sandattack", "thundershock"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "gender": "F", "isHidden": false, "moves":["thunderbolt", "shadowball", "lightscreen", "voltswitch"], "pokeball": "cherishball"},
],
tier: "RU",
},
flareon: {
randomBattleMoves: ["flamecharge", "facade", "flareblitz", "superpower", "quickattack", "batonpass"],
randomDoubleBattleMoves: ["flamecharge", "facade", "flareblitz", "superpower", "wish", "protect", "helpinghand"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tailwhip", "tackle", "helpinghand", "sandattack"]},
{"generation": 6, "level": 10, "isHidden": false, "moves":["celebrate", "tailwhip", "sandattack", "ember"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "gender": "F", "isHidden": true, "moves":["flareblitz", "facade", "willowisp", "quickattack"], "pokeball": "cherishball"},
],
tier: "PU",
},
espeon: {
randomBattleMoves: ["psychic", "psyshock", "substitute", "shadowball", "calmmind", "morningsun", "batonpass", "dazzlinggleam"],
randomDoubleBattleMoves: ["psychic", "psyshock", "substitute", "wish", "shadowball", "hiddenpowerfighting", "helpinghand", "protect", "dazzlinggleam"],
eventPokemon: [
{"generation": 3, "level": 70, "moves":["psybeam", "psychup", "psychic", "morningsun"]},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tailwhip", "tackle", "helpinghand", "sandattack"]},
{"generation": 6, "level": 10, "isHidden": false, "moves":["celebrate", "tailwhip", "sandattack", "confusion"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "gender": "F", "isHidden": true, "moves":["psychic", "dazzlinggleam", "shadowball", "reflect"], "pokeball": "cherishball"},
],
tier: "RU",
},
umbreon: {
randomBattleMoves: ["wish", "protect", "healbell", "toxic", "foulplay"],
randomDoubleBattleMoves: ["moonlight", "wish", "protect", "healbell", "snarl", "foulplay", "helpinghand"],
eventPokemon: [
{"generation": 3, "level": 70, "moves":["feintattack", "meanlook", "screech", "moonlight"]},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tailwhip", "tackle", "helpinghand", "sandattack"]},
{"generation": 6, "level": 10, "isHidden": false, "moves":["celebrate", "tailwhip", "sandattack", "pursuit"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "gender": "F", "isHidden": false, "moves":["snarl", "toxic", "protect", "moonlight"], "pokeball": "cherishball"},
],
tier: "RU",
},
leafeon: {
randomBattleMoves: ["swordsdance", "leafblade", "substitute", "xscissor", "synthesis", "batonpass", "knockoff"],
randomDoubleBattleMoves: ["swordsdance", "leafblade", "substitute", "xscissor", "protect", "helpinghand", "knockoff"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tailwhip", "tackle", "helpinghand", "sandattack"]},
{"generation": 6, "level": 10, "isHidden": false, "moves":["celebrate", "tailwhip", "sandattack", "razorleaf"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "gender": "F", "isHidden": true, "moves":["leafblade", "swordsdance", "sunnyday", "synthesis"], "pokeball": "cherishball"},
],
tier: "PU",
},
glaceon: {
randomBattleMoves: ["icebeam", "hiddenpowerground", "shadowball", "healbell", "wish", "protect", "toxic"],
randomDoubleBattleMoves: ["icebeam", "hiddenpowerground", "shadowball", "wish", "protect", "healbell", "helpinghand"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tailwhip", "tackle", "helpinghand", "sandattack"]},
{"generation": 6, "level": 10, "isHidden": false, "moves":["celebrate", "tailwhip", "sandattack", "icywind"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "gender": "F", "isHidden": false, "moves":["blizzard", "shadowball", "hail", "auroraveil"], "pokeball": "cherishball"},
],
tier: "PU",
},
porygon: {
randomBattleMoves: ["triattack", "icebeam", "recover", "toxic", "thunderwave", "discharge", "trick"],
eventPokemon: [
{"generation": 5, "level": 10, "isHidden": true, "moves":["tackle", "conversion", "sharpen", "psybeam"]},
],
tier: "LC Uber",
},
porygon2: {
randomBattleMoves: ["triattack", "icebeam", "recover", "toxic", "thunderwave", "thunderbolt"],
randomDoubleBattleMoves: ["triattack", "icebeam", "discharge", "shadowball", "thunderbolt", "protect", "recover"],
tier: "RU",
},
porygonz: {
randomBattleMoves: ["triattack", "shadowball", "icebeam", "thunderbolt", "conversion", "trick", "nastyplot"],
randomDoubleBattleMoves: ["protect", "triattack", "darkpulse", "hiddenpowerfighting", "icebeam", "thunderbolt", "agility", "trick", "nastyplot"],
tier: "BL",
},
omanyte: {
randomBattleMoves: ["shellsmash", "surf", "icebeam", "earthpower", "hiddenpowerelectric", "spikes", "toxicspikes", "stealthrock", "hydropump"],
eventPokemon: [
{"generation": 5, "level": 15, "gender": "M", "isHidden": false, "abilities":["swiftswim"], "moves":["bubblebeam", "supersonic", "withdraw", "bite"], "pokeball": "cherishball"},
],
tier: "LC",
},
omastar: {
randomBattleMoves: ["shellsmash", "scald", "icebeam", "earthpower", "spikes", "stealthrock", "hydropump"],
randomDoubleBattleMoves: ["shellsmash", "muddywater", "icebeam", "earthpower", "hiddenpowerelectric", "protect", "hydropump"],
tier: "NU",
},
kabuto: {
randomBattleMoves: ["aquajet", "rockslide", "rapidspin", "stealthrock", "honeclaws", "waterfall", "toxic"],
eventPokemon: [
{"generation": 5, "level": 15, "gender": "M", "isHidden": false, "abilities":["battlearmor"], "moves":["confuseray", "dig", "scratch", "harden"], "pokeball": "cherishball"},
],
tier: "LC",
},
kabutops: {
randomBattleMoves: ["aquajet", "stoneedge", "rapidspin", "swordsdance", "waterfall", "knockoff"],
randomDoubleBattleMoves: ["aquajet", "stoneedge", "protect", "rockslide", "swordsdance", "waterfall", "superpower", "knockoff"],
tier: "PU",
},
aerodactyl: {
randomBattleMoves: ["stealthrock", "taunt", "stoneedge", "earthquake", "defog", "roost", "doubleedge"],
randomDoubleBattleMoves: ["wideguard", "taunt", "stoneedge", "rockslide", "earthquake", "aquatail", "protect", "icefang", "skydrop", "tailwind"],
eventPokemon: [
{"generation": 5, "level": 15, "gender": "M", "isHidden": false, "abilities":["pressure"], "moves":["steelwing", "icefang", "firefang", "thunderfang"], "pokeball": "cherishball"},
],
tier: "RU",
},
aerodactylmega: {
randomBattleMoves: ["aquatail", "pursuit", "honeclaws", "stoneedge", "firefang", "aerialace", "roost"],
randomDoubleBattleMoves: ["wideguard", "taunt", "stoneedge", "rockslide", "earthquake", "ironhead", "aerialace", "protect", "icefang", "skydrop", "tailwind"],
requiredItem: "Aerodactylite",
tier: "UU",
},
munchlax: {
randomBattleMoves: ["rest", "curse", "sleeptalk", "bodyslam", "earthquake", "return", "firepunch", "icepunch", "whirlwind", "toxic"],
eventPokemon: [
{"generation": 4, "level": 5, "moves":["metronome", "tackle", "defensecurl", "selfdestruct"]},
{"generation": 4, "level": 5, "gender": "F", "nature": "Relaxed", "abilities":["thickfat"], "moves":["metronome", "odorsleuth", "tackle", "curse"], "pokeball": "cherishball"},
{"generation": 7, "level": 5, "isHidden": false, "abilities":["thickfat"], "moves":["tackle", "metronome", "holdback", "happyhour"], "pokeball": "cherishball"},
],
tier: "LC",
},
snorlax: {
randomBattleMoves: ["rest", "curse", "sleeptalk", "bodyslam", "earthquake", "return", "firepunch", "crunch", "pursuit", "whirlwind"],
randomDoubleBattleMoves: ["curse", "protect", "bodyslam", "earthquake", "return", "firepunch", "icepunch", "crunch", "selfdestruct"],
eventPokemon: [
{"generation": 3, "level": 43, "moves":["refresh", "fissure", "curse", "bodyslam"]},
],
tier: "RU",
},
articuno: {
randomBattleMoves: ["icebeam", "roost", "freezedry", "toxic", "substitute", "hurricane"],
randomDoubleBattleMoves: ["freezedry", "roost", "protect", "substitute", "hurricane", "tailwind"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves":["mist", "agility", "mindreader", "icebeam"]},
{"generation": 3, "level": 70, "moves":["agility", "mindreader", "icebeam", "reflect"]},
{"generation": 3, "level": 50, "moves":["icebeam", "healbell", "extrasensory", "haze"]},
{"generation": 4, "level": 60, "shiny": 1, "moves":["agility", "icebeam", "reflect", "roost"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["mist", "agility", "mindreader", "icebeam"]},
{"generation": 6, "level": 70, "isHidden": false, "moves":["icebeam", "reflect", "hail", "tailwind"]},
{"generation": 6, "level": 70, "isHidden": true, "moves":["freezedry", "icebeam", "hail", "reflect"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "PU",
},
zapdos: {
randomBattleMoves: ["thunderbolt", "heatwave", "hiddenpowerice", "roost", "toxic", "uturn", "defog"],
randomDoubleBattleMoves: ["thunderbolt", "heatwave", "hiddenpowergrass", "hiddenpowerice", "tailwind", "protect", "discharge"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves":["thunderwave", "agility", "detect", "drillpeck"]},
{"generation": 3, "level": 70, "moves":["agility", "detect", "drillpeck", "charge"]},
{"generation": 3, "level": 50, "moves":["thunderbolt", "extrasensory", "batonpass", "metalsound"]},
{"generation": 4, "level": 60, "shiny": 1, "moves":["charge", "agility", "discharge", "roost"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["thunderwave", "agility", "detect", "drillpeck"]},
{"generation": 6, "level": 70, "isHidden": false, "moves":["agility", "discharge", "raindance", "lightscreen"]},
{"generation": 6, "level": 70, "isHidden": true, "moves":["discharge", "thundershock", "raindance", "agility"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "OU",
},
moltres: {
randomBattleMoves: ["fireblast", "hiddenpowergrass", "roost", "substitute", "toxic", "willowisp", "hurricane"],
randomDoubleBattleMoves: ["fireblast", "hiddenpowergrass", "airslash", "roost", "substitute", "protect", "uturn", "willowisp", "hurricane", "heatwave", "tailwind"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves":["firespin", "agility", "endure", "flamethrower"]},
{"generation": 3, "level": 70, "moves":["agility", "endure", "flamethrower", "safeguard"]},
{"generation": 3, "level": 50, "moves":["extrasensory", "morningsun", "willowisp", "flamethrower"]},
{"generation": 4, "level": 60, "shiny": 1, "moves":["flamethrower", "safeguard", "airslash", "roost"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["firespin", "agility", "endure", "flamethrower"]},
{"generation": 6, "level": 70, "isHidden": false, "moves":["safeguard", "airslash", "sunnyday", "heatwave"]},
{"generation": 6, "level": 70, "isHidden": true, "moves":["skyattack", "heatwave", "sunnyday", "safeguard"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "RU",
},
dratini: {
randomBattleMoves: ["dragondance", "outrage", "waterfall", "fireblast", "extremespeed", "dracometeor", "substitute"],
tier: "LC",
},
dragonair: {
randomBattleMoves: ["dragondance", "outrage", "waterfall", "fireblast", "extremespeed", "dracometeor", "substitute"],
tier: "NFE",
},
dragonite: {
randomBattleMoves: ["dragondance", "outrage", "firepunch", "extremespeed", "earthquake", "roost"],
randomDoubleBattleMoves: ["dragondance", "firepunch", "extremespeed", "dragonclaw", "earthquake", "roost", "substitute", "superpower", "dracometeor", "protect", "skydrop"],
eventPokemon: [
{"generation": 3, "level": 70, "moves":["agility", "safeguard", "wingattack", "outrage"]},
{"generation": 3, "level": 55, "moves":["healbell", "hyperbeam", "dragondance", "earthquake"]},
{"generation": 4, "level": 50, "gender": "M", "nature": "Mild", "moves":["dracometeor", "thunderbolt", "outrage", "dragondance"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "gender": "M", "isHidden": true, "moves":["extremespeed", "firepunch", "dragondance", "outrage"], "pokeball": "cherishball"},
{"generation": 5, "level": 55, "gender": "M", "isHidden": true, "moves":["dragonrush", "safeguard", "wingattack", "thunderpunch"]},
{"generation": 5, "level": 55, "gender": "M", "isHidden": true, "moves":["dragonrush", "safeguard", "wingattack", "extremespeed"]},
{"generation": 5, "level": 50, "gender": "M", "nature": "Brave", "ivs": {"hp": 30, "atk": 30, "def": 30, "spa": 30, "spd": 30, "spe": 30}, "isHidden": false, "moves":["fireblast", "safeguard", "outrage", "hyperbeam"], "pokeball": "cherishball"},
{"generation": 6, "level": 55, "gender": "M", "isHidden": true, "moves":["dragondance", "outrage", "hurricane", "extremespeed"], "pokeball": "cherishball"},
{"generation": 6, "level": 62, "gender": "M", "ivs": {"hp": 31, "def": 31, "spa": 31, "spd": 31}, "isHidden": false, "moves":["agility", "slam", "barrier", "hyperbeam"], "pokeball": "cherishball"},
],
tier: "OU",
},
mewtwo: {
randomBattleMoves: ["psystrike", "aurasphere", "fireblast", "icebeam", "calmmind", "recover"],
randomDoubleBattleMoves: ["psystrike", "aurasphere", "fireblast", "icebeam", "calmmind", "substitute", "recover", "thunderbolt", "willowisp", "taunt", "protect"],
eventPokemon: [
{"generation": 3, "level": 70, "shiny": 1, "moves":["swift", "recover", "safeguard", "psychic"]},
{"generation": 4, "level": 70, "shiny": 1, "moves":["psychocut", "amnesia", "powerswap", "guardswap"]},
{"generation": 5, "level": 70, "isHidden": false, "moves":["psystrike", "shadowball", "aurasphere", "electroball"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "nature": "Timid", "ivs": {"spa": 31, "spe": 31}, "isHidden": true, "moves":["psystrike", "icebeam", "healpulse", "hurricane"], "pokeball": "cherishball"},
{"generation": 6, "level": 70, "isHidden": false, "moves":["recover", "psychic", "barrier", "aurasphere"]},
{"generation": 6, "level": 100, "shiny": true, "isHidden": true, "moves":["psystrike", "psychic", "recover", "aurasphere"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
mewtwomegax: {
randomBattleMoves: ["bulkup", "drainpunch", "earthquake", "taunt", "stoneedge", "zenheadbutt", "icebeam"],
randomDoubleBattleMoves: ["bulkup", "drainpunch", "earthquake", "taunt", "stoneedge", "zenheadbutt", "icebeam"],
requiredItem: "Mewtwonite X",
tier: "Uber",
},
mewtwomegay: {
randomBattleMoves: ["psystrike", "aurasphere", "shadowball", "fireblast", "icebeam", "calmmind", "recover", "willowisp", "taunt"],
randomDoubleBattleMoves: ["psystrike", "aurasphere", "shadowball", "fireblast", "icebeam", "calmmind", "recover", "willowisp", "taunt"],
requiredItem: "Mewtwonite Y",
tier: "Uber",
},
mew: {
randomBattleMoves: ["defog", "roost", "willowisp", "knockoff", "taunt", "icebeam", "earthpower", "aurasphere", "stealthrock", "nastyplot", "psyshock", "batonpass"],
randomDoubleBattleMoves: ["taunt", "willowisp", "transform", "roost", "psyshock", "nastyplot", "aurasphere", "fireblast", "icebeam", "thunderbolt", "protect", "fakeout", "helpinghand", "tailwind"],
eventPokemon: [
{"generation": 3, "level": 30, "shiny": 1, "moves":["pound", "transform", "megapunch", "metronome"]},
{"generation": 3, "level": 10, "moves":["pound", "transform"]},
{"generation": 3, "level": 30, "shiny": 1, "moves":["fakeout"]},
{"generation": 3, "level": 10, "moves":["fakeout"]},
{"generation": 3, "level": 30, "shiny": 1, "moves":["feintattack"]},
{"generation": 3, "level": 10, "moves":["feintattack"]},
{"generation": 3, "level": 30, "shiny": 1, "moves":["hypnosis"]},
{"generation": 3, "level": 10, "moves":["hypnosis"]},
{"generation": 3, "level": 30, "shiny": 1, "moves":["nightshade"]},
{"generation": 3, "level": 10, "moves":["nightshade"]},
{"generation": 3, "level": 30, "shiny": 1, "moves":["roleplay"]},
{"generation": 3, "level": 10, "moves":["roleplay"]},
{"generation": 3, "level": 30, "shiny": 1, "moves":["zapcannon"]},
{"generation": 3, "level": 10, "moves":["zapcannon"]},
{"generation": 4, "level": 50, "moves":["ancientpower", "metronome", "teleport", "aurasphere"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "moves":["barrier", "metronome", "teleport", "aurasphere"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "moves":["megapunch", "metronome", "teleport", "aurasphere"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "moves":["amnesia", "metronome", "teleport", "aurasphere"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "moves":["transform", "metronome", "teleport", "aurasphere"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "moves":["psychic", "metronome", "teleport", "aurasphere"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "moves":["synthesis", "return", "hypnosis", "teleport"], "pokeball": "cherishball"},
{"generation": 4, "level": 5, "moves":["pound"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["pound"], "pokeball": "cherishball"},
{"generation": 7, "level": 5, "moves":["pound"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "moves":["psychic", "barrier", "metronome", "transform"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "OU",
},
chikorita: {
randomBattleMoves: ["reflect", "lightscreen", "aromatherapy", "grasswhistle", "leechseed", "toxic", "gigadrain", "synthesis"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "growl", "razorleaf"]},
{"generation": 3, "level": 5, "moves":["tackle", "growl", "ancientpower", "frenzyplant"]},
{"generation": 6, "level": 5, "isHidden": false, "moves":["tackle", "growl"], "pokeball": "cherishball"},
],
tier: "LC",
},
bayleef: {
randomBattleMoves: ["reflect", "lightscreen", "aromatherapy", "grasswhistle", "leechseed", "toxic", "gigadrain", "synthesis"],
tier: "NFE",
},
meganium: {
randomBattleMoves: ["reflect", "lightscreen", "aromatherapy", "leechseed", "toxic", "gigadrain", "synthesis", "dragontail"],
randomDoubleBattleMoves: ["reflect", "lightscreen", "leechseed", "leafstorm", "gigadrain", "synthesis", "dragontail", "healpulse", "toxic", "protect"],
eventPokemon: [
{"generation": 6, "level": 50, "isHidden": true, "moves":["solarbeam", "sunnyday", "synthesis", "bodyslam"]},
],
tier: "PU",
},
cyndaquil: {
randomBattleMoves: ["eruption", "fireblast", "flamethrower", "hiddenpowergrass", "hiddenpowerice"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "leer", "smokescreen"]},
{"generation": 3, "level": 5, "moves":["tackle", "leer", "reversal", "blastburn"]},
{"generation": 6, "level": 5, "isHidden": false, "moves":["tackle", "leer"], "pokeball": "cherishball"},
],
tier: "LC",
},
quilava: {
randomBattleMoves: ["eruption", "fireblast", "flamethrower", "hiddenpowergrass", "hiddenpowerice"],
tier: "NFE",
},
typhlosion: {
randomBattleMoves: ["eruption", "fireblast", "hiddenpowergrass", "extrasensory", "focusblast"],
randomDoubleBattleMoves: ["eruption", "fireblast", "hiddenpowergrass", "extrasensory", "focusblast", "heatwave", "protect"],
eventPokemon: [
{"generation": 3, "level": 70, "moves":["quickattack", "flamewheel", "swift", "flamethrower"]},
{"generation": 6, "level": 50, "isHidden": true, "moves":["overheat", "flamewheel", "flamecharge", "swift"]},
],
tier: "NU",
},
totodile: {
randomBattleMoves: ["aquajet", "waterfall", "crunch", "icepunch", "superpower", "dragondance", "swordsdance"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["scratch", "leer", "rage"]},
{"generation": 3, "level": 5, "moves":["scratch", "leer", "crunch", "hydrocannon"]},
{"generation": 6, "level": 5, "isHidden": false, "moves":["scratch", "leer"], "pokeball": "cherishball"},
],
tier: "LC",
},
croconaw: {
randomBattleMoves: ["aquajet", "waterfall", "crunch", "icepunch", "superpower", "dragondance", "swordsdance"],
tier: "NFE",
},
feraligatr: {
randomBattleMoves: ["aquajet", "waterfall", "crunch", "icepunch", "dragondance", "swordsdance", "earthquake"],
randomDoubleBattleMoves: ["aquajet", "waterfall", "crunch", "icepunch", "dragondance", "swordsdance", "earthquake", "protect"],
eventPokemon: [
{"generation": 6, "level": 50, "isHidden": true, "moves":["icepunch", "crunch", "waterfall", "screech"]},
],
tier: "RU",
},
sentret: {
randomBattleMoves: ["superfang", "trick", "toxic", "uturn", "knockoff"],
tier: "LC",
},
furret: {
randomBattleMoves: ["uturn", "trick", "aquatail", "firepunch", "knockoff", "doubleedge"],
randomDoubleBattleMoves: ["uturn", "suckerpunch", "icepunch", "firepunch", "knockoff", "doubleedge", "superfang", "followme", "helpinghand", "protect"],
tier: "PU",
},
hoothoot: {
randomBattleMoves: ["reflect", "toxic", "roost", "whirlwind", "nightshade", "magiccoat"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "growl", "foresight"]},
],
tier: "LC",
},
noctowl: {
randomBattleMoves: ["roost", "whirlwind", "airslash", "nightshade", "toxic", "defog"],
randomDoubleBattleMoves: ["roost", "tailwind", "airslash", "hypervoice", "heatwave", "protect", "hypnosis"],
tier: "PU",
},
ledyba: {
randomBattleMoves: ["roost", "agility", "lightscreen", "encore", "reflect", "knockoff", "swordsdance", "batonpass", "toxic"],
eventPokemon: [
{"generation": 3, "level": 10, "moves":["refresh", "psybeam", "aerialace", "supersonic"]},
],
tier: "LC",
},
ledian: {
randomBattleMoves: ["roost", "lightscreen", "encore", "reflect", "knockoff", "toxic", "uturn"],
randomDoubleBattleMoves: ["protect", "lightscreen", "encore", "reflect", "knockoff", "bugbuzz", "uturn", "tailwind"],
tier: "PU",
},
spinarak: {
randomBattleMoves: ["agility", "toxic", "xscissor", "toxicspikes", "poisonjab", "batonpass", "stickyweb"],
eventPokemon: [
{"generation": 3, "level": 14, "moves":["refresh", "dig", "signalbeam", "nightshade"]},
],
tier: "LC",
},
ariados: {
randomBattleMoves: ["megahorn", "toxicspikes", "poisonjab", "suckerpunch", "stickyweb"],
randomDoubleBattleMoves: ["protect", "megahorn", "stringshot", "poisonjab", "stickyweb", "ragepowder"],
tier: "PU",
},
chinchou: {
randomBattleMoves: ["voltswitch", "thunderbolt", "hiddenpowergrass", "hydropump", "icebeam", "surf", "thunderwave", "scald", "discharge", "healbell"],
tier: "LC",
},
lanturn: {
randomBattleMoves: ["voltswitch", "hiddenpowergrass", "hydropump", "icebeam", "thunderwave", "scald", "thunderbolt", "healbell", "toxic"],
randomDoubleBattleMoves: ["thunderbolt", "hiddenpowergrass", "hydropump", "icebeam", "thunderwave", "scald", "discharge", "protect", "surf"],
tier: "PU",
},
togepi: {
randomBattleMoves: ["protect", "fireblast", "toxic", "thunderwave", "softboiled", "dazzlinggleam"],
eventPokemon: [
{"generation": 3, "level": 20, "gender": "F", "abilities":["serenegrace"], "moves":["metronome", "charm", "sweetkiss", "yawn"]},
{"generation": 3, "level": 25, "moves":["triattack", "followme", "ancientpower", "helpinghand"]},
],
tier: "LC",
},
togetic: {
randomBattleMoves: ["nastyplot", "dazzlinggleam", "fireblast", "batonpass", "roost", "defog", "toxic", "thunderwave", "healbell"],
tier: "NFE",
},
togekiss: {
randomBattleMoves: ["roost", "thunderwave", "nastyplot", "airslash", "aurasphere", "batonpass", "healbell", "defog"],
randomDoubleBattleMoves: ["roost", "thunderwave", "nastyplot", "airslash", "followme", "dazzlinggleam", "tailwind", "protect"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["extremespeed", "aurasphere", "airslash", "present"]},
],
tier: "UU",
},
natu: {
randomBattleMoves: ["thunderwave", "roost", "toxic", "reflect", "lightscreen", "uturn", "wish", "psychic", "nightshade"],
eventPokemon: [
{"generation": 3, "level": 22, "moves":["batonpass", "futuresight", "nightshade", "aerialace"]},
],
tier: "LC",
},
xatu: {
randomBattleMoves: ["thunderwave", "toxic", "roost", "psychic", "uturn", "reflect", "calmmind", "nightshade", "heatwave"],
randomDoubleBattleMoves: ["thunderwave", "tailwind", "roost", "psychic", "uturn", "reflect", "lightscreen", "grassknot", "heatwave", "protect"],
tier: "NU",
},
mareep: {
randomBattleMoves: ["reflect", "lightscreen", "thunderbolt", "discharge", "thunderwave", "toxic", "hiddenpowerice", "cottonguard", "powergem"],
eventPokemon: [
{"generation": 3, "level": 37, "gender": "F", "moves":["thunder", "thundershock", "thunderwave", "cottonspore"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "growl", "thundershock"]},
{"generation": 3, "level": 17, "moves":["healbell", "thundershock", "thunderwave", "bodyslam"]},
{"generation": 6, "level": 10, "isHidden": false, "moves":["holdback", "tackle", "thunderwave", "thundershock"], "pokeball": "cherishball"},
],
tier: "LC",
},
flaaffy: {
randomBattleMoves: ["reflect", "lightscreen", "thunderbolt", "discharge", "thunderwave", "toxic", "hiddenpowerice", "cottonguard", "powergem"],
tier: "NFE",
},
ampharos: {
randomBattleMoves: ["voltswitch", "reflect", "lightscreen", "focusblast", "thunderbolt", "toxic", "healbell", "hiddenpowerice"],
randomDoubleBattleMoves: ["focusblast", "hiddenpowerice", "hiddenpowergrass", "thunderbolt", "discharge", "dragonpulse", "protect"],
tier: "PU",
},
ampharosmega: {
randomBattleMoves: ["voltswitch", "focusblast", "agility", "thunderbolt", "healbell", "dragonpulse"],
randomDoubleBattleMoves: ["focusblast", "hiddenpowerice", "hiddenpowergrass", "thunderbolt", "discharge", "dragonpulse", "protect"],
requiredItem: "Ampharosite",
tier: "UU",
},
azurill: {
randomBattleMoves: ["scald", "return", "bodyslam", "encore", "toxic", "protect", "knockoff"],
tier: "LC",
},
marill: {
randomBattleMoves: ["waterfall", "knockoff", "encore", "toxic", "aquajet", "superpower", "icepunch", "protect", "playrough", "poweruppunch"],
tier: "NFE",
},
azumarill: {
randomBattleMoves: ["waterfall", "aquajet", "playrough", "superpower", "bellydrum", "knockoff"],
randomDoubleBattleMoves: ["waterfall", "aquajet", "playrough", "superpower", "bellydrum", "knockoff", "protect"],
tier: "BL",
},
bonsly: {
randomBattleMoves: ["rockslide", "brickbreak", "doubleedge", "toxic", "stealthrock", "suckerpunch", "explosion"],
tier: "LC",
},
sudowoodo: {
randomBattleMoves: ["headsmash", "earthquake", "suckerpunch", "woodhammer", "toxic", "stealthrock"],
randomDoubleBattleMoves: ["headsmash", "earthquake", "suckerpunch", "woodhammer", "explosion", "stealthrock", "rockslide", "helpinghand", "protect"],
tier: "PU",
},
hoppip: {
randomBattleMoves: ["encore", "sleeppowder", "uturn", "toxic", "leechseed", "substitute", "protect"],
tier: "LC",
},
skiploom: {
randomBattleMoves: ["encore", "sleeppowder", "uturn", "toxic", "leechseed", "substitute", "protect"],
tier: "NFE",
},
jumpluff: {
randomBattleMoves: ["swordsdance", "sleeppowder", "uturn", "encore", "toxic", "acrobatics", "leechseed", "seedbomb", "substitute"],
randomDoubleBattleMoves: ["encore", "sleeppowder", "uturn", "helpinghand", "leechseed", "gigadrain", "ragepowder", "protect"],
eventPokemon: [
{"generation": 5, "level": 27, "gender": "M", "isHidden": true, "moves":["falseswipe", "sleeppowder", "bulletseed", "leechseed"]},
],
tier: "PU",
},
aipom: {
randomBattleMoves: ["fakeout", "return", "brickbreak", "seedbomb", "knockoff", "uturn", "icepunch", "irontail"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["scratch", "tailwhip", "sandattack"]},
],
tier: "LC",
},
ambipom: {
randomBattleMoves: ["fakeout", "return", "knockoff", "uturn", "switcheroo", "seedbomb", "lowkick"],
randomDoubleBattleMoves: ["fakeout", "return", "knockoff", "uturn", "doublehit", "icepunch", "lowkick", "protect"],
tier: "NU",
},
sunkern: {
randomBattleMoves: ["sunnyday", "gigadrain", "solarbeam", "hiddenpowerfire", "toxic", "earthpower", "leechseed"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "abilities":["chlorophyll"], "moves":["absorb", "growth"]},
],
tier: "LC",
},
sunflora: {
randomBattleMoves: ["sunnyday", "gigadrain", "solarbeam", "hiddenpowerfire", "earthpower"],
randomDoubleBattleMoves: ["sunnyday", "gigadrain", "solarbeam", "hiddenpowerfire", "hiddenpowerice", "earthpower", "protect", "encore"],
tier: "PU",
},
yanma: {
randomBattleMoves: ["bugbuzz", "airslash", "hiddenpowerground", "uturn", "protect", "gigadrain", "ancientpower"],
tier: "LC Uber",
},
yanmega: {
randomBattleMoves: ["bugbuzz", "airslash", "ancientpower", "uturn", "protect", "gigadrain"],
tier: "BL3",
},
wooper: {
randomBattleMoves: ["recover", "earthquake", "scald", "toxic", "stockpile", "yawn", "protect"],
tier: "LC",
},
quagsire: {
randomBattleMoves: ["recover", "earthquake", "scald", "toxic", "encore", "icebeam"],
randomDoubleBattleMoves: ["icywind", "earthquake", "waterfall", "scald", "rockslide", "curse", "yawn", "icepunch", "protect"],
tier: "RU",
},
murkrow: {
randomBattleMoves: ["substitute", "suckerpunch", "bravebird", "heatwave", "roost", "darkpulse", "thunderwave"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "abilities":["insomnia"], "moves":["peck", "astonish"]},
],
tier: "LC Uber",
},
honchkrow: {
randomBattleMoves: ["substitute", "superpower", "suckerpunch", "bravebird", "roost", "heatwave", "pursuit"],
randomDoubleBattleMoves: ["substitute", "superpower", "suckerpunch", "bravebird", "roost", "heatwave", "protect"],
tier: "RU",
},
misdreavus: {
randomBattleMoves: ["nastyplot", "thunderbolt", "dazzlinggleam", "willowisp", "shadowball", "taunt", "painsplit"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["growl", "psywave", "spite"]},
],
tier: "LC Uber",
},
mismagius: {
randomBattleMoves: ["nastyplot", "substitute", "willowisp", "shadowball", "thunderbolt", "dazzlinggleam", "taunt", "painsplit", "destinybond"],
randomDoubleBattleMoves: ["nastyplot", "substitute", "willowisp", "shadowball", "thunderbolt", "dazzlinggleam", "taunt", "protect"],
tier: "NU",
},
unown: {
randomBattleMoves: ["hiddenpowerpsychic"],
tier: "PU",
},
wynaut: {
randomBattleMoves: ["destinybond", "counter", "mirrorcoat", "encore"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["splash", "charm", "encore", "tickle"]},
],
tier: "LC",
},
wobbuffet: {
randomBattleMoves: ["counter", "mirrorcoat", "encore", "destinybond", "safeguard"],
randomDoubleBattleMoves: ["counter", "mirrorcoat", "encore", "destinybond", "safeguard"],
eventPokemon: [
{"generation": 3, "level": 5, "moves":["counter", "mirrorcoat", "safeguard", "destinybond"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["counter", "mirrorcoat", "safeguard", "destinybond"]},
{"generation": 6, "level": 10, "gender": "M", "isHidden": false, "moves":["counter"], "pokeball": "cherishball"},
{"generation": 6, "level": 15, "gender": "M", "isHidden": false, "moves":["counter", "mirrorcoat"], "pokeball": "cherishball"},
],
tier: "PU",
},
girafarig: {
randomBattleMoves: ["psychic", "psyshock", "thunderbolt", "nastyplot", "batonpass", "substitute", "hypervoice"],
randomDoubleBattleMoves: ["psychic", "psyshock", "thunderbolt", "nastyplot", "protect", "agility", "hypervoice"],
tier: "PU",
},
pineco: {
randomBattleMoves: ["rapidspin", "toxicspikes", "spikes", "bugbite", "stealthrock"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "protect", "selfdestruct"]},
{"generation": 3, "level": 20, "moves":["refresh", "pinmissile", "spikes", "counter"]},
],
tier: "LC",
},
forretress: {
randomBattleMoves: ["rapidspin", "toxic", "spikes", "voltswitch", "stealthrock", "gyroball"],
randomDoubleBattleMoves: ["rockslide", "drillrun", "toxic", "voltswitch", "stealthrock", "gyroball", "protect"],
tier: "UU",
},
dunsparce: {
randomBattleMoves: ["coil", "rockslide", "bite", "headbutt", "glare", "bodyslam", "roost"],
randomDoubleBattleMoves: ["coil", "rockslide", "bite", "headbutt", "glare", "bodyslam", "protect"],
tier: "PU",
},
gligar: {
randomBattleMoves: ["stealthrock", "toxic", "roost", "defog", "earthquake", "uturn", "knockoff"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["poisonsting", "sandattack"]},
],
tier: "RU",
},
gliscor: {
randomBattleMoves: ["roost", "substitute", "taunt", "earthquake", "protect", "toxic", "stealthrock", "knockoff"],
randomDoubleBattleMoves: ["tailwind", "substitute", "taunt", "earthquake", "protect", "stoneedge", "knockoff"],
tier: "UU",
},
snubbull: {
randomBattleMoves: ["thunderwave", "firepunch", "crunch", "closecombat", "icepunch", "earthquake", "playrough"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "scaryface", "tailwhip", "charm"]},
],
tier: "LC",
},
granbull: {
randomBattleMoves: ["thunderwave", "playrough", "crunch", "earthquake", "healbell"],
randomDoubleBattleMoves: ["thunderwave", "playrough", "crunch", "earthquake", "snarl", "rockslide", "protect"],
tier: "PU",
},
qwilfish: {
randomBattleMoves: ["toxicspikes", "waterfall", "spikes", "painsplit", "thunderwave", "taunt", "destinybond"],
randomDoubleBattleMoves: ["poisonjab", "waterfall", "swordsdance", "protect", "thunderwave", "taunt", "destinybond"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "poisonsting", "harden", "minimize"]},
],
tier: "PU",
},
shuckle: {
randomBattleMoves: ["toxic", "encore", "stealthrock", "knockoff", "stickyweb", "infestation"],
randomDoubleBattleMoves: ["encore", "stealthrock", "knockoff", "stickyweb", "guardsplit", "powersplit", "toxic", "helpinghand"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "abilities":["sturdy"], "moves":["constrict", "withdraw", "wrap"]},
{"generation": 3, "level": 20, "abilities":["sturdy"], "moves":["substitute", "toxic", "sludgebomb", "encore"]},
],
tier: "NU",
},
heracross: {
randomBattleMoves: ["closecombat", "megahorn", "stoneedge", "swordsdance", "knockoff", "earthquake"],
randomDoubleBattleMoves: ["closecombat", "megahorn", "stoneedge", "swordsdance", "knockoff", "earthquake", "protect"],
eventPokemon: [
{"generation": 6, "level": 50, "gender": "F", "nature": "Adamant", "isHidden": false, "moves":["bulletseed", "pinmissile", "closecombat", "megahorn"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "nature": "Adamant", "isHidden": false, "abilities":["guts"], "moves":["pinmissile", "bulletseed", "earthquake", "rockblast"], "pokeball": "cherishball"},
],
tier: "UU",
},
heracrossmega: {
randomBattleMoves: ["closecombat", "pinmissile", "rockblast", "swordsdance", "bulletseed", "substitute"],
randomDoubleBattleMoves: ["closecombat", "pinmissile", "rockblast", "swordsdance", "bulletseed", "knockoff", "earthquake", "protect"],
requiredItem: "Heracronite",
tier: "BL",
},
sneasel: {
randomBattleMoves: ["iceshard", "iciclecrash", "lowkick", "pursuit", "swordsdance", "knockoff"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["scratch", "leer", "taunt", "quickattack"]},
],
tier: "NU",
},
weavile: {
randomBattleMoves: ["iceshard", "iciclecrash", "knockoff", "pursuit", "swordsdance", "lowkick"],
randomDoubleBattleMoves: ["iceshard", "iciclecrash", "knockoff", "fakeout", "swordsdance", "lowkick", "taunt", "protect", "feint"],
eventPokemon: [
{"generation": 4, "level": 30, "gender": "M", "nature": "Jolly", "moves":["fakeout", "iceshard", "nightslash", "brickbreak"], "pokeball": "cherishball"},
{"generation": 6, "level": 48, "gender": "M", "perfectIVs": 2, "isHidden": false, "moves":["nightslash", "icepunch", "brickbreak", "xscissor"], "pokeball": "cherishball"},
],
tier: "UU",
},
teddiursa: {
randomBattleMoves: ["swordsdance", "protect", "facade", "closecombat", "firepunch", "crunch", "playrough", "gunkshot"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "abilities":["pickup"], "moves":["scratch", "leer", "lick"]},
{"generation": 3, "level": 11, "abilities":["pickup"], "moves":["refresh", "metalclaw", "lick", "return"]},
],
tier: "LC",
},
ursaring: {
randomBattleMoves: ["swordsdance", "facade", "closecombat", "crunch", "protect"],
randomDoubleBattleMoves: ["swordsdance", "facade", "closecombat", "earthquake", "crunch", "protect"],
tier: "PU",
},
slugma: {
randomBattleMoves: ["stockpile", "recover", "lavaplume", "willowisp", "toxic", "hiddenpowergrass", "earthpower", "memento"],
tier: "LC",
},
magcargo: {
randomBattleMoves: ["recover", "lavaplume", "toxic", "hiddenpowergrass", "stealthrock", "fireblast", "earthpower", "shellsmash", "ancientpower"],
randomDoubleBattleMoves: ["protect", "heatwave", "willowisp", "shellsmash", "hiddenpowergrass", "ancientpower", "stealthrock", "fireblast", "earthpower"],
eventPokemon: [
{"generation": 3, "level": 38, "moves":["refresh", "heatwave", "earthquake", "flamethrower"]},
],
tier: "PU",
},
swinub: {
randomBattleMoves: ["earthquake", "iciclecrash", "iceshard", "superpower", "endeavor", "stealthrock"],
eventPokemon: [
{"generation": 3, "level": 22, "abilities":["oblivious"], "moves":["charm", "ancientpower", "mist", "mudshot"]},
],
tier: "LC",
},
piloswine: {
randomBattleMoves: ["earthquake", "iciclecrash", "iceshard", "endeavor", "stealthrock"],
tier: "NFE",
},
mamoswine: {
randomBattleMoves: ["iceshard", "earthquake", "endeavor", "iciclecrash", "stealthrock", "superpower", "knockoff"],
randomDoubleBattleMoves: ["iceshard", "earthquake", "rockslide", "iciclecrash", "protect", "superpower", "knockoff"],
eventPokemon: [
{"generation": 5, "level": 34, "gender": "M", "isHidden": true, "moves":["hail", "icefang", "takedown", "doublehit"]},
{"generation": 6, "level": 50, "shiny": true, "gender": "M", "nature": "Adamant", "isHidden": true, "moves":["iciclespear", "earthquake", "iciclecrash", "rockslide"]},
],
tier: "UU",
},
corsola: {
randomBattleMoves: ["recover", "toxic", "powergem", "scald", "stealthrock"],
randomDoubleBattleMoves: ["protect", "icywind", "powergem", "scald", "stealthrock", "earthpower", "icebeam"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["tackle", "mudsport"]},
],
tier: "PU",
},
remoraid: {
randomBattleMoves: ["waterspout", "hydropump", "fireblast", "hiddenpowerground", "icebeam", "seedbomb", "rockblast"],
tier: "LC",
},
octillery: {
randomBattleMoves: ["hydropump", "fireblast", "icebeam", "energyball", "rockblast", "gunkshot", "scald"],
randomDoubleBattleMoves: ["hydropump", "surf", "fireblast", "icebeam", "energyball", "chargebeam", "protect"],
eventPokemon: [
{"generation": 4, "level": 50, "gender": "F", "nature": "Serious", "abilities":["suctioncups"], "moves":["octazooka", "icebeam", "signalbeam", "hyperbeam"], "pokeball": "cherishball"},
],
tier: "PU",
},
delibird: {
randomBattleMoves: ["rapidspin", "iceshard", "icepunch", "aerialace", "spikes", "destinybond"],
randomDoubleBattleMoves: ["fakeout", "iceshard", "icepunch", "aerialace", "brickbreak", "protect"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["present"]},
{"generation": 6, "level": 10, "isHidden": false, "abilities":["vitalspirit"], "moves":["present", "happyhour"], "pokeball": "cherishball"},
],
tier: "PU",
},
mantyke: {
randomBattleMoves: ["raindance", "hydropump", "scald", "airslash", "icebeam", "rest", "sleeptalk", "toxic"],
tier: "LC",
},
mantine: {
randomBattleMoves: ["scald", "airslash", "roost", "toxic", "defog"],
randomDoubleBattleMoves: ["raindance", "scald", "airslash", "icebeam", "tailwind", "wideguard", "helpinghand", "protect", "surf"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "bubble", "supersonic"]},
],
tier: "UU",
},
skarmory: {
randomBattleMoves: ["whirlwind", "bravebird", "roost", "spikes", "stealthrock", "defog"],
randomDoubleBattleMoves: ["skydrop", "bravebird", "tailwind", "taunt", "feint", "protect", "ironhead"],
tier: "OU",
},
houndour: {
randomBattleMoves: ["pursuit", "suckerpunch", "fireblast", "darkpulse", "hiddenpowerfighting", "nastyplot"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["leer", "ember", "howl"]},
{"generation": 3, "level": 17, "moves":["charm", "feintattack", "ember", "roar"]},
],
tier: "LC",
},
houndoom: {
randomBattleMoves: ["nastyplot", "darkpulse", "suckerpunch", "fireblast", "hiddenpowergrass"],
randomDoubleBattleMoves: ["nastyplot", "darkpulse", "suckerpunch", "heatwave", "hiddenpowerfighting", "protect"],
eventPokemon: [
{"generation": 6, "level": 50, "nature": "Timid", "isHidden": false, "abilities":["flashfire"], "moves":["flamethrower", "darkpulse", "solarbeam", "sludgebomb"], "pokeball": "cherishball"},
],
tier: "NU",
},
houndoommega: {
randomBattleMoves: ["nastyplot", "darkpulse", "taunt", "fireblast", "hiddenpowergrass"],
randomDoubleBattleMoves: ["nastyplot", "darkpulse", "taunt", "heatwave", "hiddenpowergrass", "protect"],
requiredItem: "Houndoominite",
tier: "BL",
},
phanpy: {
randomBattleMoves: ["stealthrock", "earthquake", "iceshard", "headsmash", "knockoff", "seedbomb", "superpower", "playrough"],
tier: "LC",
},
donphan: {
randomBattleMoves: ["stealthrock", "rapidspin", "iceshard", "earthquake", "knockoff", "stoneedge"],
randomDoubleBattleMoves: ["stealthrock", "knockoff", "iceshard", "earthquake", "rockslide", "protect"],
tier: "RU",
},
stantler: {
randomBattleMoves: ["doubleedge", "megahorn", "jumpkick", "earthquake", "suckerpunch"],
randomDoubleBattleMoves: ["return", "megahorn", "jumpkick", "earthquake", "suckerpunch", "protect"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "abilities":["intimidate"], "moves":["tackle", "leer"]},
],
tier: "PU",
},
smeargle: {
randomBattleMoves: ["spore", "spikes", "stealthrock", "destinybond", "whirlwind", "stickyweb"],
randomDoubleBattleMoves: ["spore", "fakeout", "wideguard", "helpinghand", "followme", "tailwind", "kingsshield", "transform"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "abilities":["owntempo"], "moves":["sketch"]},
{"generation": 5, "level": 50, "gender": "F", "nature": "Jolly", "ivs": {"atk": 31, "spe": 31}, "isHidden": false, "abilities":["technician"], "moves":["falseswipe", "spore", "odorsleuth", "meanlook"], "pokeball": "cherishball"},
],
tier: "UU",
},
pokestarsmeargle: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 60, "gender": "M", "abilities":["owntempo"], "moves":["mindreader", "guillotine", "tailwhip", "gastroacid"]},
{"generation": 5, "level": 30, "gender": "M", "abilities":["owntempo"], "moves":["outrage", "magiccoat"]},
{"generation": 5, "level": 99, "gender": "M", "abilities":["owntempo"], "moves":["nastyplot", "sheercold", "attract", "shadowball"]},
],
gen: 5,
tier: "Illegal",
},
miltank: {
randomBattleMoves: ["milkdrink", "stealthrock", "bodyslam", "healbell", "curse", "earthquake", "toxic"],
randomDoubleBattleMoves: ["protect", "helpinghand", "bodyslam", "milkdrink", "curse", "earthquake", "thunderwave"],
eventPokemon: [
{"generation": 6, "level": 20, "perfectIVs": 3, "isHidden": false, "abilities":["scrappy"], "moves":["rollout", "attract", "stomp", "milkdrink"], "pokeball": "cherishball"},
],
tier: "PU",
},
raikou: {
randomBattleMoves: ["thunderbolt", "hiddenpowerice", "aurasphere", "calmmind", "substitute", "voltswitch", "extrasensory"],
randomDoubleBattleMoves: ["thunderbolt", "hiddenpowerice", "extrasensory", "calmmind", "substitute", "snarl", "protect"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves":["thundershock", "roar", "quickattack", "spark"]},
{"generation": 3, "level": 70, "moves":["quickattack", "spark", "reflect", "crunch"]},
{"generation": 4, "level": 40, "shiny": 1, "moves":["roar", "quickattack", "spark", "reflect"]},
{"generation": 4, "level": 30, "shiny": true, "nature": "Rash", "moves":["zapcannon", "aurasphere", "extremespeed", "weatherball"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": 1, "moves":["spark", "reflect", "crunch", "thunderfang"]},
],
eventOnly: true,
unreleasedHidden: true,
tier: "UU",
},
entei: {
randomBattleMoves: ["extremespeed", "flareblitz", "bulldoze", "stoneedge", "sacredfire"],
randomDoubleBattleMoves: ["extremespeed", "flareblitz", "ironhead", "bulldoze", "stoneedge", "sacredfire", "protect"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves":["ember", "roar", "firespin", "stomp"]},
{"generation": 3, "level": 70, "moves":["firespin", "stomp", "flamethrower", "swagger"]},
{"generation": 4, "level": 40, "shiny": 1, "moves":["roar", "firespin", "stomp", "flamethrower"]},
{"generation": 4, "level": 30, "shiny": true, "nature": "Adamant", "moves":["flareblitz", "howl", "extremespeed", "crushclaw"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": 1, "moves":["stomp", "flamethrower", "swagger", "firefang"]},
],
eventOnly: true,
unreleasedHidden: true,
tier: "UU",
},
suicune: {
randomBattleMoves: ["hydropump", "icebeam", "scald", "hiddenpowergrass", "rest", "sleeptalk", "calmmind"],
randomDoubleBattleMoves: ["hydropump", "icebeam", "scald", "hiddenpowergrass", "snarl", "tailwind", "protect", "calmmind"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves":["bubblebeam", "raindance", "gust", "aurorabeam"]},
{"generation": 3, "level": 70, "moves":["gust", "aurorabeam", "mist", "mirrorcoat"]},
{"generation": 4, "level": 40, "shiny": 1, "moves":["raindance", "gust", "aurorabeam", "mist"]},
{"generation": 4, "level": 30, "shiny": true, "nature": "Relaxed", "moves":["sheercold", "airslash", "extremespeed", "aquaring"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": 1, "moves":["aurorabeam", "mist", "mirrorcoat", "icefang"]},
],
eventOnly: true,
unreleasedHidden: true,
tier: "UU",
},
larvitar: {
randomBattleMoves: ["earthquake", "stoneedge", "facade", "dragondance", "superpower", "crunch"],
eventPokemon: [
{"generation": 3, "level": 20, "moves":["sandstorm", "dragondance", "bite", "outrage"]},
{"generation": 5, "level": 5, "shiny": true, "gender": "M", "isHidden": false, "moves":["bite", "leer", "sandstorm", "superpower"], "pokeball": "cherishball"},
],
tier: "LC",
},
pupitar: {
randomBattleMoves: ["earthquake", "stoneedge", "crunch", "dragondance", "superpower", "stealthrock"],
tier: "NFE",
},
tyranitar: {
randomBattleMoves: ["crunch", "stoneedge", "pursuit", "earthquake", "fireblast", "icebeam", "stealthrock"],
randomDoubleBattleMoves: ["crunch", "stoneedge", "rockslide", "earthquake", "firepunch", "icepunch", "stealthrock", "protect"],
eventPokemon: [
{"generation": 3, "level": 70, "moves":["thrash", "scaryface", "crunch", "earthquake"]},
{"generation": 5, "level": 100, "gender": "M", "isHidden": false, "moves":["fireblast", "icebeam", "stoneedge", "crunch"], "pokeball": "cherishball"},
{"generation": 5, "level": 55, "gender": "M", "isHidden": true, "moves":["payback", "crunch", "earthquake", "seismictoss"]},
{"generation": 6, "level": 50, "isHidden": false, "moves":["stoneedge", "crunch", "earthquake", "icepunch"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "nature": "Jolly", "isHidden": false, "moves":["rockslide", "earthquake", "crunch", "stoneedge"], "pokeball": "cherishball"},
{"generation": 6, "level": 55, "shiny": true, "nature": "Adamant", "ivs": {"hp": 31, "atk": 31, "def": 31, "spa": 14, "spd": 31, "spe": 0}, "isHidden": false, "moves":["crunch", "rockslide", "lowkick", "protect"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "isHidden": false, "moves":["rockslide", "crunch", "icepunch", "lowkick"], "pokeball": "cherishball"},
],
tier: "OU",
},
tyranitarmega: {
randomBattleMoves: ["crunch", "stoneedge", "earthquake", "icepunch", "dragondance"],
randomDoubleBattleMoves: ["crunch", "stoneedge", "earthquake", "icepunch", "dragondance", "rockslide", "protect"],
requiredItem: "Tyranitarite",
tier: "OU",
},
lugia: {
randomBattleMoves: ["toxic", "roost", "substitute", "whirlwind", "thunderwave", "dragontail", "aeroblast"],
randomDoubleBattleMoves: ["aeroblast", "roost", "substitute", "tailwind", "icebeam", "psychic", "calmmind", "skydrop", "protect"],
eventPokemon: [
{"generation": 3, "level": 70, "shiny": 1, "moves":["recover", "hydropump", "raindance", "swift"]},
{"generation": 3, "level": 50, "moves":["psychoboost", "earthquake", "hydropump", "featherdance"]},
{"generation": 4, "level": 45, "shiny": 1, "moves":["extrasensory", "raindance", "hydropump", "aeroblast"]},
{"generation": 4, "level": 70, "shiny": 1, "moves":["aeroblast", "punishment", "ancientpower", "safeguard"]},
{"generation": 5, "level": 5, "isHidden": true, "moves":["whirlwind", "weatherball"], "pokeball": "dreamball"},
{"generation": 6, "level": 50, "shiny": 1, "isHidden": false, "moves":["raindance", "hydropump", "aeroblast", "punishment"]},
{"generation": 6, "level": 50, "nature": "Timid", "isHidden": false, "moves":["aeroblast", "hydropump", "dragonrush", "icebeam"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
hooh: {
randomBattleMoves: ["substitute", "sacredfire", "bravebird", "earthquake", "roost", "toxic", "flamecharge"],
randomDoubleBattleMoves: ["substitute", "sacredfire", "bravebird", "earthquake", "roost", "toxic", "tailwind", "skydrop", "protect"],
eventPokemon: [
{"generation": 3, "level": 70, "shiny": 1, "moves":["recover", "fireblast", "sunnyday", "swift"]},
{"generation": 4, "level": 45, "shiny": 1, "moves":["extrasensory", "sunnyday", "fireblast", "sacredfire"]},
{"generation": 4, "level": 70, "shiny": 1, "moves":["sacredfire", "punishment", "ancientpower", "safeguard"]},
{"generation": 5, "level": 5, "isHidden": true, "moves":["whirlwind", "weatherball"], "pokeball": "dreamball"},
{"generation": 6, "level": 50, "shiny": 1, "isHidden": false, "moves":["sunnyday", "fireblast", "sacredfire", "punishment"]},
{"generation": 6, "level": 50, "shiny": true, "isHidden": false, "moves":["sacredfire", "bravebird", "recover", "celebrate"], "pokeball": "cherishball"},
{"generation": 7, "level": 100, "isHidden": false, "moves":["sacredfire", "bravebird", "recover", "safeguard"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
celebi: {
randomBattleMoves: ["nastyplot", "psychic", "gigadrain", "recover", "healbell", "batonpass", "earthpower", "hiddenpowerfire", "leafstorm", "uturn", "thunderwave"],
randomDoubleBattleMoves: ["protect", "psychic", "gigadrain", "leechseed", "recover", "earthpower", "hiddenpowerfire", "nastyplot", "leafstorm", "uturn", "thunderwave"],
eventPokemon: [
{"generation": 3, "level": 10, "moves":["confusion", "recover", "healbell", "safeguard"]},
{"generation": 3, "level": 70, "moves":["ancientpower", "futuresight", "batonpass", "perishsong"]},
{"generation": 3, "level": 10, "moves":["leechseed", "recover", "healbell", "safeguard"]},
{"generation": 3, "level": 30, "moves":["healbell", "safeguard", "ancientpower", "futuresight"]},
{"generation": 4, "level": 50, "moves":["leafstorm", "recover", "nastyplot", "healingwish"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "moves":["recover", "healbell", "safeguard", "holdback"], "pokeball": "luxuryball"},
{"generation": 6, "level": 100, "moves":["confusion", "recover", "healbell", "safeguard"], "pokeball": "cherishball"},
{"generation": 7, "level": 30, "moves":["healbell", "safeguard", "ancientpower", "futuresight"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "UU",
},
treecko: {
randomBattleMoves: ["substitute", "leechseed", "leafstorm", "hiddenpowerice", "hiddenpowerrock", "endeavor"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["pound", "leer", "absorb"]},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["pound", "leer", "absorb"]},
],
tier: "LC",
},
grovyle: {
randomBattleMoves: ["substitute", "leechseed", "gigadrain", "leafstorm", "hiddenpowerice", "hiddenpowerrock", "endeavor"],
tier: "NFE",
},
sceptile: {
randomBattleMoves: ["gigadrain", "leafstorm", "hiddenpowerice", "focusblast", "hiddenpowerflying"],
randomDoubleBattleMoves: ["gigadrain", "leafstorm", "hiddenpowerice", "focusblast", "hiddenpowerfire", "protect"],
eventPokemon: [
{"generation": 5, "level": 50, "shiny": 1, "isHidden": false, "moves":["leafstorm", "dragonpulse", "focusblast", "rockslide"], "pokeball": "cherishball"},
],
tier: "NU",
},
sceptilemega: {
randomBattleMoves: ["substitute", "gigadrain", "dragonpulse", "focusblast", "swordsdance", "outrage", "leafblade", "earthquake", "hiddenpowerfire"],
randomDoubleBattleMoves: ["substitute", "gigadrain", "leafstorm", "hiddenpowerice", "focusblast", "dragonpulse", "hiddenpowerfire", "protect"],
requiredItem: "Sceptilite",
tier: "UU",
},
torchic: {
randomBattleMoves: ["protect", "batonpass", "substitute", "hiddenpowergrass", "swordsdance", "firepledge"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["scratch", "growl", "focusenergy", "ember"]},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["scratch", "growl", "focusenergy", "ember"]},
{"generation": 6, "level": 10, "gender": "M", "isHidden": true, "moves":["scratch", "growl", "focusenergy", "ember"], "pokeball": "cherishball"},
],
tier: "LC",
},
combusken: {
randomBattleMoves: ["flareblitz", "skyuppercut", "protect", "swordsdance", "substitute", "batonpass", "shadowclaw"],
tier: "NFE",
},
blaziken: {
randomBattleMoves: ["flareblitz", "highjumpkick", "protect", "swordsdance", "substitute", "batonpass", "stoneedge", "knockoff"],
eventPokemon: [
{"generation": 3, "level": 70, "moves":["blazekick", "slash", "mirrormove", "skyuppercut"]},
{"generation": 5, "level": 50, "shiny": 1, "isHidden": false, "moves":["flareblitz", "highjumpkick", "thunderpunch", "stoneedge"], "pokeball": "cherishball"},
],
tier: "Uber",
},
blazikenmega: {
randomBattleMoves: ["flareblitz", "highjumpkick", "protect", "swordsdance", "substitute", "batonpass", "stoneedge", "knockoff"],
requiredItem: "Blazikenite",
tier: "Uber",
},
mudkip: {
randomBattleMoves: ["hydropump", "earthpower", "hiddenpowerelectric", "icebeam", "sludgewave"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["tackle", "growl", "mudslap", "watergun"]},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tackle", "growl", "mudslap", "watergun"]},
],
tier: "LC",
},
marshtomp: {
randomBattleMoves: ["waterfall", "earthquake", "superpower", "icepunch", "rockslide", "stealthrock"],
tier: "NFE",
},
swampert: {
randomBattleMoves: ["stealthrock", "earthquake", "scald", "icebeam", "roar", "toxic", "protect"],
randomDoubleBattleMoves: ["waterfall", "earthquake", "icebeam", "stealthrock", "wideguard", "scald", "rockslide", "muddywater", "protect", "icywind"],
eventPokemon: [
{"generation": 5, "level": 50, "shiny": 1, "isHidden": false, "moves":["earthquake", "icebeam", "hydropump", "hammerarm"], "pokeball": "cherishball"},
],
tier: "UU",
},
swampertmega: {
randomBattleMoves: ["raindance", "waterfall", "earthquake", "icepunch", "superpower"],
randomDoubleBattleMoves: ["waterfall", "earthquake", "raindance", "icepunch", "superpower", "protect"],
requiredItem: "Swampertite",
tier: "OU",
},
poochyena: {
randomBattleMoves: ["superfang", "foulplay", "suckerpunch", "toxic", "crunch", "firefang", "icefang", "poisonfang"],
eventPokemon: [
{"generation": 3, "level": 10, "abilities":["runaway"], "moves":["healbell", "dig", "poisonfang", "howl"]},
],
tier: "LC",
},
mightyena: {
randomBattleMoves: ["crunch", "suckerpunch", "playrough", "firefang", "irontail"],
randomDoubleBattleMoves: ["suckerpunch", "crunch", "playrough", "firefang", "taunt", "protect"],
tier: "PU",
},
zigzagoon: {
randomBattleMoves: ["trick", "thunderwave", "icebeam", "thunderbolt", "gunkshot", "lastresort"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": true, "abilities":["pickup"], "moves":["tackle", "growl", "tailwhip"]},
{"generation": 3, "level": 5, "shiny": 1, "abilities":["pickup"], "moves":["tackle", "growl", "tailwhip", "extremespeed"]},
],
tier: "LC",
},
linoone: {
randomBattleMoves: ["bellydrum", "extremespeed", "seedbomb", "shadowclaw"],
randomDoubleBattleMoves: ["bellydrum", "extremespeed", "seedbomb", "protect", "shadowclaw"],
eventPokemon: [
{"generation": 6, "level": 50, "isHidden": false, "moves":["extremespeed", "helpinghand", "babydolleyes", "protect"], "pokeball": "cherishball"},
],
tier: "RU",
},
wurmple: {
randomBattleMoves: ["bugbite", "poisonsting", "tackle", "electroweb"],
tier: "LC",
},
silcoon: {
randomBattleMoves: ["bugbite", "poisonsting", "tackle", "electroweb"],
tier: "NFE",
},
beautifly: {
randomBattleMoves: ["quiverdance", "bugbuzz", "aircutter", "psychic", "gigadrain", "hiddenpowerrock"],
randomDoubleBattleMoves: ["quiverdance", "bugbuzz", "gigadrain", "hiddenpowerrock", "aircutter", "tailwind", "stringshot", "protect"],
tier: "PU",
},
cascoon: {
randomBattleMoves: ["bugbite", "poisonsting", "tackle", "electroweb"],
tier: "NFE",
},
dustox: {
randomBattleMoves: ["roost", "defog", "bugbuzz", "sludgebomb", "quiverdance", "uturn", "shadowball"],
randomDoubleBattleMoves: ["tailwind", "stringshot", "strugglebug", "bugbuzz", "protect", "sludgebomb", "quiverdance", "shadowball"],
tier: "PU",
},
lotad: {
randomBattleMoves: ["gigadrain", "icebeam", "scald", "naturepower", "raindance"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["astonish", "growl", "absorb"]},
],
tier: "LC",
},
lombre: {
randomBattleMoves: ["fakeout", "swordsdance", "waterfall", "seedbomb", "icepunch", "firepunch", "thunderpunch", "poweruppunch", "gigadrain", "icebeam"],
tier: "NFE",
},
ludicolo: {
randomBattleMoves: ["raindance", "hydropump", "scald", "gigadrain", "icebeam", "focusblast"],
randomDoubleBattleMoves: ["raindance", "hydropump", "surf", "gigadrain", "icebeam", "fakeout", "protect"],
eventPokemon: [
{"generation": 5, "level": 50, "shiny": 1, "isHidden": false, "abilities":["swiftswim"], "moves":["fakeout", "hydropump", "icebeam", "gigadrain"], "pokeball": "cherishball"},
{"generation": 5, "level": 30, "gender": "M", "nature": "Calm", "isHidden": false, "abilities":["swiftswim"], "moves":["scald", "gigadrain", "icebeam", "sunnyday"]},
],
tier: "PU",
},
seedot: {
randomBattleMoves: ["defog", "naturepower", "seedbomb", "explosion", "foulplay"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["bide", "harden", "growth"]},
{"generation": 3, "level": 17, "moves":["refresh", "gigadrain", "bulletseed", "secretpower"]},
],
tier: "LC",
},
nuzleaf: {
randomBattleMoves: ["naturepower", "seedbomb", "explosion", "swordsdance", "rockslide", "lowsweep"],
tier: "NFE",
},
shiftry: {
randomBattleMoves: ["leafstorm", "swordsdance", "leafblade", "suckerpunch", "defog", "lowkick", "knockoff"],
randomDoubleBattleMoves: ["leafstorm", "swordsdance", "leafblade", "suckerpunch", "knockoff", "lowkick", "fakeout", "protect"],
tier: "PU",
},
taillow: {
randomBattleMoves: ["bravebird", "facade", "quickattack", "uturn", "protect"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["peck", "growl", "focusenergy", "featherdance"]},
],
tier: "LC",
},
swellow: {
randomBattleMoves: ["protect", "facade", "bravebird", "uturn", "quickattack"],
randomDoubleBattleMoves: ["bravebird", "facade", "quickattack", "uturn", "protect"],
eventPokemon: [
{"generation": 3, "level": 43, "moves":["batonpass", "skyattack", "agility", "facade"]},
],
tier: "RU",
},
wingull: {
randomBattleMoves: ["scald", "icebeam", "tailwind", "uturn", "airslash", "knockoff", "defog"],
tier: "LC",
},
pelipper: {
randomBattleMoves: ["scald", "uturn", "hurricane", "toxic", "roost", "defog", "knockoff"],
randomDoubleBattleMoves: ["scald", "surf", "hurricane", "wideguard", "protect", "tailwind", "knockoff"],
tier: "OU",
},
ralts: {
randomBattleMoves: ["trickroom", "destinybond", "psychic", "willowisp", "hypnosis", "dazzlinggleam", "substitute", "trick"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["growl", "wish"]},
{"generation": 3, "level": 5, "shiny": 1, "moves":["growl", "charm"]},
{"generation": 3, "level": 20, "moves":["sing", "shockwave", "reflect", "confusion"]},
{"generation": 6, "level": 1, "isHidden": true, "moves":["growl", "encore"]},
],
tier: "LC",
},
kirlia: {
randomBattleMoves: ["trick", "dazzlinggleam", "psychic", "willowisp", "signalbeam", "thunderbolt", "destinybond", "substitute"],
tier: "NFE",
},
gardevoir: {
randomBattleMoves: ["psychic", "thunderbolt", "focusblast", "shadowball", "moonblast", "calmmind", "substitute", "willowisp"],
randomDoubleBattleMoves: ["psyshock", "focusblast", "shadowball", "moonblast", "taunt", "willowisp", "thunderbolt", "trickroom", "helpinghand", "protect", "dazzlinggleam"],
eventPokemon: [
{"generation": 5, "level": 50, "shiny": 1, "isHidden": false, "abilities":["trace"], "moves":["hypnosis", "thunderbolt", "focusblast", "psychic"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": true, "gender": "F", "isHidden": false, "abilities":["synchronize"], "moves":["dazzlinggleam", "moonblast", "storedpower", "calmmind"], "pokeball": "cherishball"},
],
tier: "RU",
},
gardevoirmega: {
randomBattleMoves: ["calmmind", "hypervoice", "psyshock", "focusblast", "substitute", "taunt", "willowisp"],
randomDoubleBattleMoves: ["psyshock", "focusblast", "shadowball", "calmmind", "thunderbolt", "hypervoice", "protect"],
requiredItem: "Gardevoirite",
tier: "UU",
},
gallade: {
randomBattleMoves: ["bulkup", "drainpunch", "icepunch", "shadowsneak", "closecombat", "zenheadbutt", "knockoff", "trick"],
randomDoubleBattleMoves: ["closecombat", "trick", "stoneedge", "shadowsneak", "drainpunch", "icepunch", "zenheadbutt", "knockoff", "trickroom", "protect", "helpinghand"],
tier: "BL4",
},
gallademega: {
randomBattleMoves: ["swordsdance", "closecombat", "drainpunch", "knockoff", "zenheadbutt", "substitute"],
randomDoubleBattleMoves: ["closecombat", "stoneedge", "drainpunch", "icepunch", "zenheadbutt", "swordsdance", "knockoff", "protect"],
requiredItem: "Galladite",
tier: "BL",
},
surskit: {
randomBattleMoves: ["hydropump", "signalbeam", "hiddenpowerfire", "stickyweb", "gigadrain", "powersplit"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["bubble", "mudsport"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["bubble", "quickattack"]},
],
tier: "LC",
},
masquerain: {
randomBattleMoves: ["quiverdance", "bugbuzz", "airslash", "hydropump", "roost", "batonpass", "stickyweb"],
randomDoubleBattleMoves: ["hydropump", "bugbuzz", "airslash", "quiverdance", "tailwind", "roost", "strugglebug", "protect"],
tier: "PU",
},
shroomish: {
randomBattleMoves: ["spore", "substitute", "leechseed", "gigadrain", "protect", "toxic", "stunspore"],
eventPokemon: [
{"generation": 3, "level": 15, "abilities":["effectspore"], "moves":["refresh", "falseswipe", "megadrain", "stunspore"]},
],
tier: "LC",
},
breloom: {
randomBattleMoves: ["spore", "machpunch", "bulletseed", "rocktomb", "swordsdance"],
randomDoubleBattleMoves: ["spore", "helpinghand", "machpunch", "bulletseed", "rocktomb", "protect", "drainpunch"],
tier: "BL",
},
slakoth: {
randomBattleMoves: ["doubleedge", "hammerarm", "firepunch", "counter", "retaliate", "toxic"],
tier: "LC",
},
vigoroth: {
randomBattleMoves: ["bulkup", "return", "earthquake", "firepunch", "suckerpunch", "slackoff", "icepunch", "lowkick"],
tier: "NFE",
},
slaking: {
randomBattleMoves: ["earthquake", "pursuit", "nightslash", "doubleedge", "retaliate"],
randomDoubleBattleMoves: ["earthquake", "nightslash", "doubleedge", "retaliate", "hammerarm", "rockslide"],
eventPokemon: [
{"generation": 4, "level": 50, "gender": "M", "nature": "Adamant", "moves":["gigaimpact", "return", "shadowclaw", "aerialace"], "pokeball": "cherishball"},
],
tier: "PU",
},
nincada: {
randomBattleMoves: ["xscissor", "dig", "aerialace", "nightslash"],
tier: "LC",
},
ninjask: {
randomBattleMoves: ["batonpass", "swordsdance", "substitute", "protect", "leechlife"],
randomDoubleBattleMoves: ["batonpass", "swordsdance", "substitute", "protect", "leechlife", "aerialace"],
tier: "PU",
},
shedinja: {
randomBattleMoves: ["swordsdance", "willowisp", "xscissor", "shadowsneak", "shadowclaw", "batonpass"],
randomDoubleBattleMoves: ["swordsdance", "willowisp", "xscissor", "shadowsneak", "shadowclaw", "protect"],
eventPokemon: [
{"generation": 3, "level": 50, "moves":["spite", "confuseray", "shadowball", "grudge"]},
{"generation": 3, "level": 20, "shiny": 1, "moves":["doubleteam", "furycutter", "screech"]},
{"generation": 3, "level": 25, "shiny": 1, "moves":["swordsdance"]},
{"generation": 3, "level": 31, "shiny": 1, "moves":["slash"]},
{"generation": 3, "level": 38, "shiny": 1, "moves":["agility"]},
{"generation": 3, "level": 45, "shiny": 1, "moves":["batonpass"]},
{"generation": 4, "level": 52, "shiny": 1, "moves":["xscissor"]},
],
tier: "PU",
},
whismur: {
randomBattleMoves: ["hypervoice", "fireblast", "shadowball", "icebeam", "extrasensory"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["pound", "uproar", "teeterdance"]},
],
tier: "LC",
},
loudred: {
randomBattleMoves: ["hypervoice", "fireblast", "shadowball", "icebeam", "circlethrow", "bodyslam"],
tier: "NFE",
},
exploud: {
randomBattleMoves: ["boomburst", "fireblast", "icebeam", "surf", "focusblast"],
randomDoubleBattleMoves: ["boomburst", "fireblast", "icebeam", "surf", "focusblast", "protect", "hypervoice"],
eventPokemon: [
{"generation": 3, "level": 100, "moves":["roar", "rest", "sleeptalk", "hypervoice"]},
{"generation": 3, "level": 50, "moves":["stomp", "screech", "hyperbeam", "roar"]},
],
tier: "BL3",
},
makuhita: {
randomBattleMoves: ["crosschop", "bulletpunch", "closecombat", "icepunch", "bulkup", "fakeout", "earthquake"],
eventPokemon: [
{"generation": 3, "level": 18, "moves":["refresh", "brickbreak", "armthrust", "rocktomb"]},
],
tier: "LC",
},
hariyama: {
randomBattleMoves: ["bulletpunch", "closecombat", "icepunch", "stoneedge", "bulkup", "knockoff"],
randomDoubleBattleMoves: ["bulletpunch", "closecombat", "icepunch", "stoneedge", "fakeout", "knockoff", "helpinghand", "wideguard", "protect"],
tier: "BL4",
},
nosepass: {
randomBattleMoves: ["powergem", "thunderwave", "stealthrock", "painsplit", "explosion", "voltswitch"],
eventPokemon: [
{"generation": 3, "level": 26, "moves":["helpinghand", "thunderbolt", "thunderwave", "rockslide"]},
],
tier: "LC",
},
probopass: {
randomBattleMoves: ["stealthrock", "thunderwave", "toxic", "flashcannon", "powergem", "voltswitch", "painsplit"],
randomDoubleBattleMoves: ["stealthrock", "thunderwave", "helpinghand", "earthpower", "powergem", "wideguard", "protect", "flashcannon"],
tier: "PU",
},
skitty: {
randomBattleMoves: ["doubleedge", "zenheadbutt", "thunderwave", "fakeout", "playrough", "healbell"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "abilities":["cutecharm"], "moves":["tackle", "growl", "tailwhip", "payday"]},
{"generation": 3, "level": 5, "shiny": 1, "abilities":["cutecharm"], "moves":["growl", "tackle", "tailwhip", "rollout"]},
{"generation": 3, "level": 10, "gender": "M", "abilities":["cutecharm"], "moves":["growl", "tackle", "tailwhip", "attract"]},
],
tier: "LC",
},
delcatty: {
randomBattleMoves: ["doubleedge", "suckerpunch", "wildcharge", "fakeout", "thunderwave", "healbell"],
randomDoubleBattleMoves: ["doubleedge", "suckerpunch", "playrough", "wildcharge", "fakeout", "thunderwave", "protect", "helpinghand"],
eventPokemon: [
{"generation": 3, "level": 18, "abilities":["cutecharm"], "moves":["sweetkiss", "secretpower", "attract", "shockwave"]},
],
tier: "PU",
},
sableye: {
randomBattleMoves: ["recover", "willowisp", "taunt", "toxic", "knockoff", "foulplay"],
randomDoubleBattleMoves: ["recover", "willowisp", "taunt", "fakeout", "knockoff", "foulplay", "helpinghand", "snarl", "protect"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "abilities":["keeneye"], "moves":["leer", "scratch", "foresight", "nightshade"]},
{"generation": 3, "level": 33, "abilities":["keeneye"], "moves":["helpinghand", "shadowball", "feintattack", "recover"]},
{"generation": 5, "level": 50, "gender": "M", "isHidden": true, "moves":["foulplay", "octazooka", "tickle", "trick"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "nature": "Relaxed", "ivs": {"hp": 31, "spa": 31}, "isHidden": true, "moves":["calmmind", "willowisp", "recover", "shadowball"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "nature": "Bold", "isHidden": true, "moves":["willowisp", "recover", "taunt", "shockwave"], "pokeball": "cherishball"},
],
tier: "PU",
},
sableyemega: {
randomBattleMoves: ["recover", "willowisp", "darkpulse", "calmmind", "shadowball"],
randomDoubleBattleMoves: ["fakeout", "knockoff", "darkpulse", "shadowball", "willowisp", "protect"],
requiredItem: "Sablenite",
tier: "OU",
},
mawile: {
randomBattleMoves: ["swordsdance", "ironhead", "substitute", "playrough", "suckerpunch", "batonpass"],
randomDoubleBattleMoves: ["swordsdance", "ironhead", "firefang", "substitute", "playrough", "suckerpunch", "knockoff", "protect"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["astonish", "faketears"]},
{"generation": 3, "level": 22, "moves":["sing", "falseswipe", "vicegrip", "irondefense"]},
{"generation": 6, "level": 50, "isHidden": false, "abilities":["intimidate"], "moves":["ironhead", "playrough", "firefang", "suckerpunch"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "isHidden": false, "abilities":["intimidate"], "moves":["suckerpunch", "protect", "playrough", "ironhead"], "pokeball": "cherishball"},
],
tier: "PU",
},
mawilemega: {
randomBattleMoves: ["swordsdance", "ironhead", "firefang", "substitute", "playrough", "suckerpunch", "knockoff", "focuspunch"],
randomDoubleBattleMoves: ["swordsdance", "ironhead", "firefang", "substitute", "playrough", "suckerpunch", "knockoff", "protect"],
requiredItem: "Mawilite",
tier: "OU",
},
aron: {
randomBattleMoves: ["headsmash", "ironhead", "earthquake", "superpower", "stealthrock", "endeavor"],
tier: "LC",
},
lairon: {
randomBattleMoves: ["headsmash", "ironhead", "earthquake", "superpower", "stealthrock"],
tier: "NFE",
},
aggron: {
randomBattleMoves: ["autotomize", "headsmash", "earthquake", "lowkick", "heavyslam", "aquatail", "stealthrock"],
randomDoubleBattleMoves: ["rockslide", "headsmash", "earthquake", "lowkick", "heavyslam", "aquatail", "stealthrock", "protect"],
eventPokemon: [
{"generation": 3, "level": 100, "moves":["irontail", "protect", "metalsound", "doubleedge"]},
{"generation": 3, "level": 50, "moves":["takedown", "irontail", "protect", "metalsound"]},
{"generation": 6, "level": 50, "nature": "Brave", "isHidden": false, "abilities":["rockhead"], "moves":["ironhead", "earthquake", "headsmash", "rockslide"], "pokeball": "cherishball"},
],
tier: "PU",
},
aggronmega: {
randomBattleMoves: ["earthquake", "heavyslam", "icepunch", "stealthrock", "thunderwave", "roar", "toxic"],
randomDoubleBattleMoves: ["rockslide", "earthquake", "lowkick", "heavyslam", "aquatail", "protect"],
requiredItem: "Aggronite",
tier: "UU",
},
meditite: {
randomBattleMoves: ["highjumpkick", "psychocut", "icepunch", "thunderpunch", "trick", "fakeout", "bulletpunch", "drainpunch", "zenheadbutt"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["bide", "meditate", "confusion"]},
{"generation": 3, "level": 20, "moves":["dynamicpunch", "confusion", "shadowball", "detect"]},
],
tier: "LC Uber",
},
medicham: {
randomBattleMoves: ["highjumpkick", "drainpunch", "zenheadbutt", "icepunch", "bulletpunch"],
randomDoubleBattleMoves: ["highjumpkick", "drainpunch", "zenheadbutt", "icepunch", "bulletpunch", "protect", "fakeout"],
tier: "BL4",
},
medichammega: {
randomBattleMoves: ["highjumpkick", "drainpunch", "icepunch", "fakeout", "zenheadbutt"],
randomDoubleBattleMoves: ["highjumpkick", "drainpunch", "zenheadbutt", "icepunch", "bulletpunch", "protect", "fakeout"],
requiredItem: "Medichamite",
tier: "OU",
},
electrike: {
randomBattleMoves: ["voltswitch", "thunderbolt", "hiddenpowerice", "switcheroo", "flamethrower", "hiddenpowergrass"],
tier: "LC",
},
manectric: {
randomBattleMoves: ["voltswitch", "thunderbolt", "hiddenpowerice", "hiddenpowergrass", "overheat", "flamethrower"],
randomDoubleBattleMoves: ["voltswitch", "thunderbolt", "hiddenpowerice", "hiddenpowergrass", "overheat", "flamethrower", "snarl", "protect"],
eventPokemon: [
{"generation": 3, "level": 44, "moves":["refresh", "thunder", "raindance", "bite"]},
{"generation": 6, "level": 50, "nature": "Timid", "isHidden": false, "abilities":["lightningrod"], "moves":["overheat", "thunderbolt", "voltswitch", "protect"], "pokeball": "cherishball"},
],
tier: "PU",
},
manectricmega: {
randomBattleMoves: ["voltswitch", "thunderbolt", "hiddenpowerice", "hiddenpowergrass", "overheat"],
randomDoubleBattleMoves: ["voltswitch", "thunderbolt", "hiddenpowerice", "hiddenpowergrass", "overheat", "flamethrower", "snarl", "protect"],
requiredItem: "Manectite",
tier: "UU",
},
plusle: {
randomBattleMoves: ["nastyplot", "thunderbolt", "substitute", "batonpass", "hiddenpowerice", "encore"],
randomDoubleBattleMoves: ["nastyplot", "thunderbolt", "substitute", "protect", "hiddenpowerice", "encore", "helpinghand"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["growl", "thunderwave", "mudsport"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["growl", "thunderwave", "quickattack"]},
],
tier: "PU",
},
minun: {
randomBattleMoves: ["nastyplot", "thunderbolt", "substitute", "batonpass", "hiddenpowerice", "encore"],
randomDoubleBattleMoves: ["nastyplot", "thunderbolt", "substitute", "protect", "hiddenpowerice", "encore", "helpinghand"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["growl", "thunderwave", "watersport"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["growl", "thunderwave", "quickattack"]},
],
tier: "PU",
},
volbeat: {
randomBattleMoves: ["tailglow", "batonpass", "substitute", "bugbuzz", "thunderwave", "encore", "tailwind"],
randomDoubleBattleMoves: ["stringshot", "strugglebug", "helpinghand", "bugbuzz", "thunderwave", "encore", "tailwind", "protect"],
tier: "PU",
},
illumise: {
randomBattleMoves: ["substitute", "batonpass", "bugbuzz", "encore", "thunderbolt", "tailwind", "uturn", "thunderwave"],
randomDoubleBattleMoves: ["protect", "helpinghand", "bugbuzz", "encore", "thunderbolt", "tailwind", "uturn"],
tier: "PU",
},
budew: {
randomBattleMoves: ["spikes", "sludgebomb", "sleeppowder", "gigadrain", "stunspore", "rest"],
tier: "LC",
},
roselia: {
randomBattleMoves: ["spikes", "toxicspikes", "sleeppowder", "gigadrain", "stunspore", "rest", "sludgebomb", "synthesis"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["absorb", "growth", "poisonsting"]},
{"generation": 3, "level": 22, "moves":["sweetkiss", "magicalleaf", "leechseed", "grasswhistle"]},
],
tier: "NFE",
},
roserade: {
randomBattleMoves: ["sludgebomb", "gigadrain", "sleeppowder", "leafstorm", "spikes", "toxicspikes", "rest", "synthesis", "hiddenpowerfire"],
randomDoubleBattleMoves: ["sludgebomb", "gigadrain", "sleeppowder", "leafstorm", "protect", "hiddenpowerfire"],
tier: "RU",
},
gulpin: {
randomBattleMoves: ["stockpile", "sludgebomb", "sludgewave", "icebeam", "toxic", "painsplit", "yawn", "encore"],
eventPokemon: [
{"generation": 3, "level": 17, "moves":["sing", "shockwave", "sludge", "toxic"]},
],
tier: "LC",
},
swalot: {
randomBattleMoves: ["sludgebomb", "icebeam", "toxic", "yawn", "encore", "painsplit", "earthquake"],
randomDoubleBattleMoves: ["sludgebomb", "icebeam", "protect", "yawn", "encore", "gunkshot", "earthquake"],
tier: "PU",
},
carvanha: {
randomBattleMoves: ["protect", "hydropump", "icebeam", "waterfall", "crunch", "aquajet", "destinybond"],
eventPokemon: [
{"generation": 3, "level": 15, "moves":["refresh", "waterpulse", "bite", "scaryface"]},
{"generation": 6, "level": 1, "isHidden": true, "moves":["leer", "bite", "hydropump"]},
],
tier: "LC",
},
sharpedo: {
randomBattleMoves: ["protect", "icebeam", "crunch", "earthquake", "waterfall"],
randomDoubleBattleMoves: ["protect", "icebeam", "crunch", "earthquake", "waterfall"],
eventPokemon: [
{"generation": 6, "level": 50, "nature": "Adamant", "isHidden": true, "moves":["aquajet", "crunch", "icefang", "destinybond"], "pokeball": "cherishball"},
{"generation": 6, "level": 43, "gender": "M", "perfectIVs": 2, "isHidden": false, "moves":["scaryface", "slash", "poisonfang", "crunch"], "pokeball": "cherishball"},
],
tier: "BL2",
},
sharpedomega: {
randomBattleMoves: ["protect", "crunch", "waterfall", "icefang", "psychicfangs", "destinybond"],
randomDoubleBattleMoves: ["protect", "icefang", "crunch", "waterfall", "psychicfangs"],
requiredItem: "Sharpedonite",
tier: "UU",
},
wailmer: {
randomBattleMoves: ["waterspout", "surf", "hydropump", "icebeam", "hiddenpowergrass", "hiddenpowerelectric"],
tier: "LC",
},
wailord: {
randomBattleMoves: ["waterspout", "hydropump", "icebeam", "hiddenpowergrass", "hiddenpowerfire"],
randomDoubleBattleMoves: ["waterspout", "hydropump", "icebeam", "hiddenpowergrass", "hiddenpowerfire", "protect"],
eventPokemon: [
{"generation": 3, "level": 100, "moves":["rest", "waterspout", "amnesia", "hydropump"]},
{"generation": 3, "level": 50, "moves":["waterpulse", "mist", "rest", "waterspout"]},
],
tier: "PU",
},
numel: {
randomBattleMoves: ["curse", "earthquake", "rockslide", "fireblast", "flamecharge", "rest", "sleeptalk", "stockpile", "hiddenpowerelectric", "earthpower", "lavaplume"],
eventPokemon: [
{"generation": 3, "level": 14, "abilities":["oblivious"], "moves":["charm", "takedown", "dig", "ember"]},
{"generation": 6, "level": 1, "isHidden": false, "moves":["growl", "tackle", "ironhead"]},
],
tier: "LC",
},
camerupt: {
randomBattleMoves: ["rockpolish", "fireblast", "earthpower", "lavaplume", "stealthrock", "hiddenpowergrass", "roar", "stoneedge"],
randomDoubleBattleMoves: ["rockpolish", "fireblast", "earthpower", "heatwave", "eruption", "hiddenpowergrass", "protect"],
eventPokemon: [
{"generation": 6, "level": 43, "gender": "M", "perfectIVs": 2, "isHidden": false, "abilities":["solidrock"], "moves":["curse", "takedown", "rockslide", "yawn"], "pokeball": "cherishball"},
],
tier: "PU",
},
cameruptmega: {
randomBattleMoves: ["stealthrock", "fireblast", "earthpower", "ancientpower", "willowisp", "toxic"],
randomDoubleBattleMoves: ["fireblast", "earthpower", "heatwave", "eruption", "rockslide", "protect"],
requiredItem: "Cameruptite",
tier: "RU",
},
torkoal: {
randomBattleMoves: ["shellsmash", "fireblast", "earthpower", "solarbeam", "stealthrock", "rapidspin", "yawn", "lavaplume"],
randomDoubleBattleMoves: ["protect", "heatwave", "earthpower", "willowisp", "shellsmash", "fireblast", "solarbeam"],
tier: "RU",
},
spoink: {
randomBattleMoves: ["psychic", "reflect", "lightscreen", "thunderwave", "trick", "healbell", "calmmind", "hiddenpowerfighting", "shadowball"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "abilities":["owntempo"], "moves":["splash", "uproar"]},
],
tier: "LC",
},
grumpig: {
randomBattleMoves: ["psychic", "thunderwave", "healbell", "whirlwind", "toxic", "focusblast", "reflect", "lightscreen"],
randomDoubleBattleMoves: ["psychic", "psyshock", "thunderwave", "trickroom", "taunt", "protect", "focusblast", "reflect", "lightscreen"],
tier: "PU",
},
spinda: {
randomBattleMoves: ["return", "superpower", "suckerpunch", "trickroom"],
randomDoubleBattleMoves: ["doubleedge", "return", "superpower", "suckerpunch", "trickroom", "fakeout", "protect"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["tackle", "uproar", "sing"]},
],
tier: "PU",
},
trapinch: {
randomBattleMoves: ["earthquake", "rockslide", "crunch", "quickattack", "superpower"],
eventPokemon: [
{"generation": 5, "level": 1, "shiny": true, "isHidden": false, "moves":["bite"]},
],
tier: "LC",
},
vibrava: {
randomBattleMoves: ["substitute", "earthquake", "outrage", "roost", "uturn", "superpower", "defog"],
tier: "NFE",
},
flygon: {
randomBattleMoves: ["earthquake", "outrage", "uturn", "roost", "defog", "firepunch", "dragondance"],
randomDoubleBattleMoves: ["earthquake", "protect", "dragonclaw", "uturn", "rockslide", "firepunch", "fireblast", "tailwind", "dragondance"],
eventPokemon: [
{"generation": 3, "level": 45, "moves":["sandtomb", "crunch", "dragonbreath", "screech"]},
{"generation": 4, "level": 50, "gender": "M", "nature": "Naive", "moves":["dracometeor", "uturn", "earthquake", "dragonclaw"], "pokeball": "cherishball"},
],
tier: "RU",
},
cacnea: {
randomBattleMoves: ["swordsdance", "spikes", "suckerpunch", "seedbomb", "drainpunch"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["poisonsting", "leer", "absorb", "encore"]},
],
tier: "LC",
},
cacturne: {
randomBattleMoves: ["swordsdance", "spikes", "suckerpunch", "seedbomb", "drainpunch", "substitute"],
randomDoubleBattleMoves: ["swordsdance", "spikyshield", "suckerpunch", "seedbomb", "drainpunch", "substitute"],
eventPokemon: [
{"generation": 3, "level": 45, "moves":["ingrain", "feintattack", "spikes", "needlearm"]},
],
tier: "PU",
},
swablu: {
randomBattleMoves: ["roost", "toxic", "cottonguard", "pluck", "hypervoice", "return"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["peck", "growl", "falseswipe"]},
{"generation": 5, "level": 1, "shiny": true, "isHidden": false, "moves":["peck", "growl"]},
{"generation": 6, "level": 1, "isHidden": true, "moves":["peck", "growl", "hypervoice"]},
],
tier: "LC",
},
altaria: {
randomBattleMoves: ["dragondance", "dracometeor", "outrage", "dragonclaw", "earthquake", "roost", "fireblast", "healbell"],
randomDoubleBattleMoves: ["dragondance", "dracometeor", "protect", "dragonclaw", "earthquake", "fireblast", "tailwind"],
eventPokemon: [
{"generation": 3, "level": 45, "moves":["takedown", "dragonbreath", "dragondance", "refresh"]},
{"generation": 3, "level": 36, "moves":["healbell", "dragonbreath", "solarbeam", "aerialace"]},
{"generation": 5, "level": 35, "gender": "M", "isHidden": true, "moves":["takedown", "naturalgift", "dragonbreath", "falseswipe"]},
{"generation": 6, "level": 100, "nature": "Modest", "isHidden": true, "moves":["hypervoice", "fireblast", "protect", "agility"], "pokeball": "cherishball"},
],
tier: "PU",
},
altariamega: {
randomBattleMoves: ["dragondance", "return", "hypervoice", "healbell", "earthquake", "roost", "dracometeor", "fireblast"],
randomDoubleBattleMoves: ["dragondance", "return", "doubleedge", "dragonclaw", "earthquake", "protect", "fireblast"],
requiredItem: "Altarianite",
tier: "UU",
},
zangoose: {
randomBattleMoves: ["swordsdance", "closecombat", "knockoff", "quickattack", "facade"],
randomDoubleBattleMoves: ["protect", "closecombat", "knockoff", "quickattack", "facade"],
eventPokemon: [
{"generation": 3, "level": 18, "moves":["leer", "quickattack", "swordsdance", "furycutter"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["scratch", "leer", "quickattack", "swordsdance"]},
{"generation": 3, "level": 28, "moves":["refresh", "brickbreak", "counter", "crushclaw"]},
],
tier: "PU",
},
seviper: {
randomBattleMoves: ["flamethrower", "sludgewave", "gigadrain", "darkpulse", "switcheroo", "coil", "earthquake", "poisonjab", "suckerpunch"],
randomDoubleBattleMoves: ["flamethrower", "gigadrain", "earthquake", "suckerpunch", "aquatail", "protect", "glare", "poisonjab", "sludgebomb"],
eventPokemon: [
{"generation": 3, "level": 18, "moves":["wrap", "lick", "bite", "poisontail"]},
{"generation": 3, "level": 30, "moves":["poisontail", "screech", "glare", "crunch"]},
{"generation": 3, "level": 10, "gender": "M", "moves":["wrap", "lick", "bite"]},
],
tier: "PU",
},
lunatone: {
randomBattleMoves: ["psychic", "earthpower", "stealthrock", "rockpolish", "batonpass", "calmmind", "icebeam", "powergem", "moonlight", "toxic"],
randomDoubleBattleMoves: ["psychic", "earthpower", "rockpolish", "calmmind", "helpinghand", "icebeam", "powergem", "moonlight", "trickroom", "protect"],
eventPokemon: [
{"generation": 3, "level": 10, "moves":["tackle", "harden", "confusion"]},
{"generation": 3, "level": 25, "moves":["batonpass", "psychic", "raindance", "rocktomb"]},
{"generation": 7, "level": 30, "moves":["cosmicpower", "hiddenpower", "moonblast", "powergem"], "pokeball": "cherishball"},
],
tier: "PU",
},
solrock: {
randomBattleMoves: ["stealthrock", "explosion", "rockslide", "reflect", "lightscreen", "willowisp", "morningsun"],
randomDoubleBattleMoves: ["protect", "helpinghand", "stoneedge", "zenheadbutt", "willowisp", "trickroom", "rockslide"],
eventPokemon: [
{"generation": 3, "level": 10, "moves":["tackle", "harden", "confusion"]},
{"generation": 3, "level": 41, "moves":["batonpass", "psychic", "sunnyday", "cosmicpower"]},
{"generation": 7, "level": 30, "moves":["cosmicpower", "hiddenpower", "solarbeam", "stoneedge"], "pokeball": "cherishball"},
],
tier: "PU",
},
barboach: {
randomBattleMoves: ["dragondance", "waterfall", "earthquake", "return", "bounce"],
tier: "LC",
},
whiscash: {
randomBattleMoves: ["dragondance", "waterfall", "earthquake", "stoneedge", "zenheadbutt"],
randomDoubleBattleMoves: ["dragondance", "waterfall", "earthquake", "stoneedge", "zenheadbutt", "protect"],
eventPokemon: [
{"generation": 4, "level": 51, "gender": "F", "nature": "Gentle", "abilities":["oblivious"], "moves":["earthquake", "aquatail", "zenheadbutt", "gigaimpact"], "pokeball": "cherishball"},
],
tier: "PU",
},
corphish: {
randomBattleMoves: ["dragondance", "waterfall", "crunch", "superpower", "swordsdance", "knockoff", "aquajet"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["bubble", "watersport"]},
],
tier: "LC",
},
crawdaunt: {
randomBattleMoves: ["dragondance", "crabhammer", "superpower", "swordsdance", "knockoff", "aquajet"],
randomDoubleBattleMoves: ["dragondance", "crabhammer", "crunch", "superpower", "swordsdance", "knockoff", "aquajet", "protect"],
eventPokemon: [
{"generation": 3, "level": 100, "moves":["taunt", "crabhammer", "swordsdance", "guillotine"]},
{"generation": 3, "level": 50, "moves":["knockoff", "taunt", "crabhammer", "swordsdance"]},
],
tier: "UU",
},
baltoy: {
randomBattleMoves: ["stealthrock", "earthquake", "toxic", "psychic", "reflect", "lightscreen", "icebeam", "rapidspin"],
eventPokemon: [
{"generation": 3, "level": 17, "moves":["refresh", "rocktomb", "mudslap", "psybeam"]},
],
tier: "LC",
},
claydol: {
randomBattleMoves: ["stealthrock", "toxic", "psychic", "icebeam", "earthquake", "rapidspin"],
randomDoubleBattleMoves: ["earthpower", "trickroom", "psychic", "icebeam", "earthquake", "protect"],
tier: "NU",
},
lileep: {
randomBattleMoves: ["stealthrock", "recover", "ancientpower", "hiddenpowerfire", "gigadrain", "stockpile"],
eventPokemon: [
{"generation": 5, "level": 15, "gender": "M", "isHidden": false, "moves":["recover", "rockslide", "constrict", "acid"], "pokeball": "cherishball"},
],
tier: "LC",
},
cradily: {
randomBattleMoves: ["stealthrock", "recover", "gigadrain", "toxic", "seedbomb", "rockslide", "curse"],
randomDoubleBattleMoves: ["protect", "recover", "seedbomb", "rockslide", "earthquake", "curse", "swordsdance"],
tier: "PU",
},
anorith: {
randomBattleMoves: ["stealthrock", "brickbreak", "toxic", "xscissor", "rockslide", "swordsdance", "rockpolish"],
eventPokemon: [
{"generation": 5, "level": 15, "gender": "M", "isHidden": false, "moves":["harden", "mudsport", "watergun", "crosspoison"], "pokeball": "cherishball"},
],
tier: "LC",
},
armaldo: {
randomBattleMoves: ["stealthrock", "stoneedge", "toxic", "xscissor", "knockoff", "rapidspin", "earthquake"],
randomDoubleBattleMoves: ["rockslide", "stoneedge", "stringshot", "xscissor", "swordsdance", "knockoff", "protect"],
tier: "PU",
},
feebas: {
randomBattleMoves: ["protect", "confuseray", "hypnosis", "scald", "toxic"],
eventPokemon: [
{"generation": 4, "level": 5, "gender": "F", "nature": "Calm", "moves":["splash", "mirrorcoat"], "pokeball": "cherishball"},
],
tier: "LC",
},
milotic: {
randomBattleMoves: ["recover", "scald", "toxic", "icebeam", "dragontail", "rest", "sleeptalk"],
randomDoubleBattleMoves: ["recover", "scald", "hydropump", "icebeam", "dragontail", "hypnosis", "protect", "hiddenpowergrass"],
eventPokemon: [
{"generation": 3, "level": 35, "moves":["waterpulse", "twister", "recover", "raindance"]},
{"generation": 4, "level": 50, "gender": "F", "nature": "Bold", "moves":["recover", "raindance", "icebeam", "hydropump"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "shiny": true, "gender": "M", "nature": "Timid", "moves":["raindance", "recover", "hydropump", "icywind"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "shiny": 1, "isHidden": false, "moves":["recover", "hydropump", "icebeam", "mirrorcoat"], "pokeball": "cherishball"},
{"generation": 5, "level": 58, "gender": "M", "nature": "Lax", "ivs": {"hp": 30, "atk": 30, "def": 30, "spa": 30, "spd": 30, "spe": 30}, "isHidden": false, "moves":["recover", "surf", "icebeam", "toxic"], "pokeball": "cherishball"},
],
tier: "RU",
},
castform: {
tier: "PU",
},
castformsunny: {
randomBattleMoves: ["sunnyday", "weatherball", "solarbeam", "icebeam"],
battleOnly: true,
},
castformrainy: {
randomBattleMoves: ["raindance", "weatherball", "thunder", "hurricane"],
battleOnly: true,
},
castformsnowy: {
battleOnly: true,
},
kecleon: {
randomBattleMoves: ["fakeout", "knockoff", "drainpunch", "suckerpunch", "shadowsneak", "stealthrock", "recover"],
randomDoubleBattleMoves: ["knockoff", "fakeout", "trickroom", "recover", "drainpunch", "suckerpunch", "shadowsneak", "protect"],
tier: "PU",
},
shuppet: {
randomBattleMoves: ["trickroom", "destinybond", "taunt", "shadowsneak", "suckerpunch", "willowisp"],
eventPokemon: [
{"generation": 3, "level": 45, "abilities":["insomnia"], "moves":["spite", "willowisp", "feintattack", "shadowball"]},
],
tier: "LC",
},
banette: {
randomBattleMoves: ["destinybond", "taunt", "shadowclaw", "suckerpunch", "willowisp", "shadowsneak", "knockoff"],
randomDoubleBattleMoves: ["shadowclaw", "suckerpunch", "willowisp", "shadowsneak", "knockoff", "protect"],
eventPokemon: [
{"generation": 3, "level": 37, "abilities":["insomnia"], "moves":["helpinghand", "feintattack", "shadowball", "curse"]},
{"generation": 5, "level": 37, "gender": "F", "isHidden": true, "moves":["feintattack", "hex", "shadowball", "cottonguard"]},
],
tier: "PU",
},
banettemega: {
randomBattleMoves: ["destinybond", "taunt", "shadowclaw", "suckerpunch", "willowisp", "knockoff"],
randomDoubleBattleMoves: ["destinybond", "taunt", "shadowclaw", "suckerpunch", "willowisp", "knockoff", "protect"],
requiredItem: "Banettite",
tier: "RU",
},
duskull: {
randomBattleMoves: ["willowisp", "shadowsneak", "painsplit", "substitute", "nightshade", "destinybond", "trickroom"],
eventPokemon: [
{"generation": 3, "level": 45, "moves":["pursuit", "curse", "willowisp", "meanlook"]},
{"generation": 3, "level": 19, "moves":["helpinghand", "shadowball", "astonish", "confuseray"]},
],
tier: "LC",
},
dusclops: {
randomBattleMoves: ["willowisp", "shadowsneak", "icebeam", "painsplit", "substitute", "seismictoss", "toxic", "trickroom"],
tier: "NFE",
},
dusknoir: {
randomBattleMoves: ["willowisp", "shadowsneak", "icepunch", "painsplit", "substitute", "earthquake", "focuspunch"],
randomDoubleBattleMoves: ["willowisp", "shadowsneak", "icepunch", "painsplit", "protect", "earthquake", "helpinghand", "trickroom"],
tier: "PU",
},
tropius: {
randomBattleMoves: ["leechseed", "substitute", "airslash", "gigadrain", "toxic", "protect"],
randomDoubleBattleMoves: ["leechseed", "protect", "airslash", "gigadrain", "earthquake", "hiddenpowerfire", "tailwind", "sunnyday", "roost"],
eventPokemon: [
{"generation": 4, "level": 53, "gender": "F", "nature": "Jolly", "abilities":["chlorophyll"], "moves":["airslash", "synthesis", "sunnyday", "solarbeam"], "pokeball": "cherishball"},
],
tier: "PU",
},
chingling: {
randomBattleMoves: ["hypnosis", "reflect", "lightscreen", "toxic", "recover", "psychic", "signalbeam", "healbell"],
tier: "LC",
},
chimecho: {
randomBattleMoves: ["psychic", "yawn", "recover", "calmmind", "shadowball", "healingwish", "healbell", "taunt"],
randomDoubleBattleMoves: ["protect", "psychic", "thunderwave", "recover", "shadowball", "dazzlinggleam", "trickroom", "helpinghand", "taunt"],
eventPokemon: [
{"generation": 3, "level": 10, "gender": "M", "moves":["wrap", "growl", "astonish"]},
],
tier: "PU",
},
absol: {
randomBattleMoves: ["swordsdance", "suckerpunch", "knockoff", "superpower", "pursuit", "playrough"],
randomDoubleBattleMoves: ["swordsdance", "suckerpunch", "knockoff", "fireblast", "superpower", "protect", "playrough"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "abilities":["pressure"], "moves":["scratch", "leer", "wish"]},
{"generation": 3, "level": 5, "shiny": 1, "abilities":["pressure"], "moves":["scratch", "leer", "spite"]},
{"generation": 3, "level": 35, "abilities":["pressure"], "moves":["razorwind", "bite", "swordsdance", "spite"]},
{"generation": 3, "level": 70, "abilities":["pressure"], "moves":["doubleteam", "slash", "futuresight", "perishsong"]},
],
tier: "PU",
},
absolmega: {
randomBattleMoves: ["swordsdance", "suckerpunch", "knockoff", "fireblast", "superpower", "pursuit", "playrough", "icebeam"],
randomDoubleBattleMoves: ["swordsdance", "suckerpunch", "knockoff", "fireblast", "superpower", "protect", "playrough"],
requiredItem: "Absolite",
tier: "BL2",
},
snorunt: {
randomBattleMoves: ["spikes", "icebeam", "iceshard", "shadowball", "toxic"],
eventPokemon: [
{"generation": 3, "level": 20, "abilities":["innerfocus"], "moves":["sing", "waterpulse", "bite", "icywind"]},
],
tier: "LC",
},
glalie: {
randomBattleMoves: ["spikes", "icebeam", "iceshard", "taunt", "earthquake", "explosion", "superfang"],
randomDoubleBattleMoves: ["icebeam", "iceshard", "taunt", "earthquake", "freezedry", "protect"],
tier: "PU",
},
glaliemega: {
randomBattleMoves: ["freezedry", "iceshard", "earthquake", "explosion", "return", "spikes"],
randomDoubleBattleMoves: ["crunch", "iceshard", "freezedry", "earthquake", "explosion", "protect", "return"],
requiredItem: "Glalitite",
tier: "RU",
},
froslass: {
randomBattleMoves: ["icebeam", "spikes", "destinybond", "shadowball", "taunt", "thunderwave"],
randomDoubleBattleMoves: ["icebeam", "protect", "destinybond", "shadowball", "taunt", "thunderwave"],
tier: "NU",
},
spheal: {
randomBattleMoves: ["substitute", "protect", "toxic", "surf", "icebeam", "yawn", "superfang"],
eventPokemon: [
{"generation": 3, "level": 17, "abilities":["thickfat"], "moves":["charm", "aurorabeam", "watergun", "mudslap"]},
],
tier: "LC",
},
sealeo: {
randomBattleMoves: ["substitute", "protect", "toxic", "surf", "icebeam", "yawn", "superfang"],
tier: "NFE",
},
walrein: {
randomBattleMoves: ["superfang", "protect", "toxic", "surf", "icebeam", "roar"],
randomDoubleBattleMoves: ["protect", "icywind", "surf", "icebeam", "superfang", "roar"],
eventPokemon: [
{"generation": 5, "level": 50, "isHidden": false, "abilities":["thickfat"], "moves":["icebeam", "brine", "hail", "sheercold"], "pokeball": "cherishball"},
],
tier: "PU",
},
clamperl: {
randomBattleMoves: ["shellsmash", "icebeam", "surf", "hiddenpowergrass", "hiddenpowerelectric", "substitute"],
tier: "LC",
},
huntail: {
randomBattleMoves: ["shellsmash", "waterfall", "icebeam", "batonpass", "suckerpunch"],
randomDoubleBattleMoves: ["shellsmash", "waterfall", "icefang", "batonpass", "suckerpunch", "protect"],
tier: "PU",
},
gorebyss: {
randomBattleMoves: ["shellsmash", "batonpass", "hydropump", "icebeam", "hiddenpowergrass", "substitute"],
randomDoubleBattleMoves: ["shellsmash", "batonpass", "surf", "icebeam", "hiddenpowergrass", "substitute", "protect"],
tier: "PU",
},
relicanth: {
randomBattleMoves: ["headsmash", "waterfall", "earthquake", "doubleedge", "stealthrock", "toxic"],
randomDoubleBattleMoves: ["headsmash", "waterfall", "earthquake", "doubleedge", "rockslide", "protect"],
tier: "PU",
},
luvdisc: {
randomBattleMoves: ["icebeam", "toxic", "sweetkiss", "protect", "scald"],
randomDoubleBattleMoves: ["icebeam", "toxic", "sweetkiss", "protect", "scald", "icywind", "healpulse"],
tier: "PU",
},
bagon: {
randomBattleMoves: ["outrage", "dragondance", "firefang", "rockslide", "dragonclaw"],
eventPokemon: [
{"generation": 3, "level": 5, "shiny": 1, "moves":["rage", "bite", "wish"]},
{"generation": 3, "level": 5, "shiny": 1, "moves":["rage", "bite", "irondefense"]},
{"generation": 5, "level": 1, "shiny": true, "isHidden": false, "moves":["rage"]},
{"generation": 6, "level": 1, "isHidden": false, "moves":["rage", "thrash"]},
],
tier: "LC",
},
shelgon: {
randomBattleMoves: ["outrage", "brickbreak", "dragonclaw", "dragondance", "crunch", "zenheadbutt"],
tier: "NFE",
},
salamence: {
randomBattleMoves: ["outrage", "fireblast", "earthquake", "dracometeor", "dragondance", "dragonclaw", "fly"],
randomDoubleBattleMoves: ["protect", "fireblast", "earthquake", "dracometeor", "tailwind", "dragondance", "dragonclaw", "hydropump", "rockslide"],
eventPokemon: [
{"generation": 3, "level": 50, "moves":["protect", "dragonbreath", "scaryface", "fly"]},
{"generation": 3, "level": 50, "moves":["refresh", "dragonclaw", "dragondance", "aerialace"]},
{"generation": 4, "level": 50, "gender": "M", "nature": "Naughty", "moves":["hydropump", "stoneedge", "fireblast", "dragonclaw"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "shiny": 1, "isHidden": false, "moves":["dragondance", "dragonclaw", "outrage", "aerialace"], "pokeball": "cherishball"},
],
tier: "BL",
},
salamencemega: {
randomBattleMoves: ["doubleedge", "return", "fireblast", "earthquake", "dracometeor", "roost", "dragondance"],
randomDoubleBattleMoves: ["doubleedge", "return", "fireblast", "earthquake", "dracometeor", "protect", "dragondance", "dragonclaw"],
requiredItem: "Salamencite",
tier: "Uber",
},
beldum: {
randomBattleMoves: ["ironhead", "zenheadbutt", "headbutt", "irondefense"],
eventPokemon: [
{"generation": 6, "level": 5, "shiny": true, "isHidden": false, "moves":["holdback", "ironhead", "zenheadbutt", "irondefense"], "pokeball": "cherishball"},
],
tier: "LC",
},
metang: {
randomBattleMoves: ["stealthrock", "meteormash", "toxic", "earthquake", "bulletpunch", "zenheadbutt"],
eventPokemon: [
{"generation": 3, "level": 30, "moves":["takedown", "confusion", "metalclaw", "refresh"]},
],
tier: "NFE",
},
metagross: {
randomBattleMoves: ["meteormash", "earthquake", "agility", "stealthrock", "zenheadbutt", "bulletpunch", "thunderpunch", "explosion", "icepunch"],
randomDoubleBattleMoves: ["meteormash", "earthquake", "protect", "zenheadbutt", "bulletpunch", "thunderpunch", "explosion", "icepunch", "hammerarm"],
eventPokemon: [
{"generation": 4, "level": 62, "nature": "Brave", "moves":["bulletpunch", "meteormash", "hammerarm", "zenheadbutt"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "shiny": 1, "isHidden": false, "moves":["meteormash", "earthquake", "bulletpunch", "hammerarm"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "isHidden": false, "moves":["bulletpunch", "zenheadbutt", "hammerarm", "icepunch"], "pokeball": "cherishball"},
{"generation": 5, "level": 45, "isHidden": false, "moves":["earthquake", "zenheadbutt", "protect", "meteormash"]},
{"generation": 5, "level": 45, "isHidden": true, "moves":["irondefense", "agility", "hammerarm", "doubleedge"]},
{"generation": 5, "level": 45, "isHidden": true, "moves":["psychic", "meteormash", "hammerarm", "doubleedge"]},
{"generation": 5, "level": 58, "nature": "Serious", "ivs": {"hp": 30, "atk": 30, "def": 30, "spa": 30, "spd": 30, "spe": 30}, "isHidden": false, "moves":["earthquake", "hyperbeam", "psychic", "meteormash"], "pokeball": "cherishball"},
],
tier: "UU",
},
metagrossmega: {
randomBattleMoves: ["meteormash", "earthquake", "agility", "zenheadbutt", "hammerarm", "icepunch"],
randomDoubleBattleMoves: ["meteormash", "earthquake", "protect", "zenheadbutt", "thunderpunch", "icepunch"],
requiredItem: "Metagrossite",
tier: "Uber",
},
regirock: {
randomBattleMoves: ["stealthrock", "thunderwave", "stoneedge", "drainpunch", "curse", "rest", "rockslide", "toxic"],
randomDoubleBattleMoves: ["stealthrock", "thunderwave", "stoneedge", "drainpunch", "curse", "rockslide", "protect"],
eventPokemon: [
{"generation": 3, "level": 40, "shiny": 1, "moves":["rockthrow", "curse", "superpower", "ancientpower"]},
{"generation": 3, "level": 40, "moves":["curse", "superpower", "ancientpower", "hyperbeam"]},
{"generation": 4, "level": 30, "shiny": 1, "moves":["stomp", "rockthrow", "curse", "superpower"]},
{"generation": 5, "level": 65, "shiny": 1, "moves":["irondefense", "chargebeam", "lockon", "zapcannon"]},
{"generation": 6, "level": 40, "shiny": 1, "isHidden": false, "moves":["bulldoze", "curse", "ancientpower", "irondefense"]},
{"generation": 6, "level": 50, "isHidden": true, "moves":["explosion", "icepunch", "stoneedge", "hammerarm"]},
],
eventOnly: true,
tier: "PU",
},
regice: {
randomBattleMoves: ["thunderwave", "icebeam", "thunderbolt", "rest", "sleeptalk", "focusblast", "rockpolish"],
randomDoubleBattleMoves: ["thunderwave", "icebeam", "thunderbolt", "icywind", "protect", "focusblast", "rockpolish"],
eventPokemon: [
{"generation": 3, "level": 40, "shiny": 1, "moves":["icywind", "curse", "superpower", "ancientpower"]},
{"generation": 3, "level": 40, "moves":["curse", "superpower", "ancientpower", "hyperbeam"]},
{"generation": 4, "level": 30, "shiny": 1, "moves":["stomp", "icywind", "curse", "superpower"]},
{"generation": 5, "level": 65, "shiny": 1, "moves":["amnesia", "chargebeam", "lockon", "zapcannon"]},
{"generation": 6, "level": 40, "shiny": 1, "isHidden": false, "moves":["bulldoze", "curse", "ancientpower", "amnesia"]},
{"generation": 6, "level": 50, "isHidden": true, "moves":["thunderbolt", "amnesia", "icebeam", "hail"]},
],
eventOnly: true,
tier: "PU",
},
registeel: {
randomBattleMoves: ["stealthrock", "thunderwave", "toxic", "protect", "seismictoss", "curse", "ironhead", "rest", "sleeptalk"],
randomDoubleBattleMoves: ["stealthrock", "ironhead", "curse", "rest", "thunderwave", "protect", "seismictoss"],
eventPokemon: [
{"generation": 3, "level": 40, "shiny": 1, "moves":["metalclaw", "curse", "superpower", "ancientpower"]},
{"generation": 3, "level": 40, "moves":["curse", "superpower", "ancientpower", "hyperbeam"]},
{"generation": 4, "level": 30, "shiny": 1, "moves":["stomp", "metalclaw", "curse", "superpower"]},
{"generation": 5, "level": 65, "shiny": 1, "moves":["amnesia", "chargebeam", "lockon", "zapcannon"]},
{"generation": 6, "level": 40, "shiny": 1, "isHidden": false, "moves":["curse", "ancientpower", "irondefense", "amnesia"]},
{"generation": 6, "level": 50, "isHidden": true, "moves":["ironhead", "rockslide", "gravity", "irondefense"]},
],
eventOnly: true,
tier: "RU",
},
latias: {
randomBattleMoves: ["dracometeor", "psyshock", "hiddenpowerfire", "roost", "thunderbolt", "healingwish", "defog"],
randomDoubleBattleMoves: ["dragonpulse", "psychic", "tailwind", "helpinghand", "healpulse", "lightscreen", "reflect", "protect"],
eventPokemon: [
{"generation": 3, "level": 40, "shiny": 1, "moves":["watersport", "refresh", "mistball", "psychic"]},
{"generation": 3, "level": 50, "shiny": 1, "moves":["mistball", "psychic", "recover", "charm"]},
{"generation": 3, "level": 70, "moves":["mistball", "psychic", "recover", "charm"]},
{"generation": 4, "level": 35, "shiny": 1, "moves":["dragonbreath", "watersport", "refresh", "mistball"]},
{"generation": 4, "level": 40, "shiny": 1, "moves":["watersport", "refresh", "mistball", "zenheadbutt"]},
{"generation": 5, "level": 68, "shiny": 1, "moves":["psychoshift", "charm", "psychic", "healpulse"]},
{"generation": 6, "level": 30, "shiny": 1, "moves":["healpulse", "dragonbreath", "mistball", "psychoshift"]},
],
eventOnly: true,
tier: "UU",
},
latiasmega: {
randomBattleMoves: ["calmmind", "dragonpulse", "surf", "dracometeor", "roost", "hiddenpowerfire", "substitute", "psyshock"],
randomDoubleBattleMoves: ["dragonpulse", "psychic", "tailwind", "helpinghand", "healpulse", "lightscreen", "reflect", "protect"],
requiredItem: "Latiasite",
tier: "UU",
},
latios: {
randomBattleMoves: ["dracometeor", "hiddenpowerfire", "surf", "thunderbolt", "psyshock", "roost", "trick", "defog"],
randomDoubleBattleMoves: ["dracometeor", "dragonpulse", "surf", "thunderbolt", "psyshock", "substitute", "trick", "tailwind", "protect", "hiddenpowerfire"],
eventPokemon: [
{"generation": 3, "level": 40, "shiny": 1, "moves":["protect", "refresh", "lusterpurge", "psychic"]},
{"generation": 3, "level": 50, "shiny": 1, "moves":["lusterpurge", "psychic", "recover", "dragondance"]},
{"generation": 3, "level": 70, "moves":["lusterpurge", "psychic", "recover", "dragondance"]},
{"generation": 4, "level": 35, "shiny": 1, "moves":["dragonbreath", "protect", "refresh", "lusterpurge"]},
{"generation": 4, "level": 40, "shiny": 1, "moves":["protect", "refresh", "lusterpurge", "zenheadbutt"]},
{"generation": 5, "level": 68, "shiny": 1, "moves":["psychoshift", "dragondance", "psychic", "healpulse"]},
{"generation": 6, "level": 30, "shiny": 1, "moves":["healpulse", "dragonbreath", "lusterpurge", "psychoshift"]},
{"generation": 6, "level": 50, "nature": "Modest", "moves":["dragonpulse", "lusterpurge", "psychic", "healpulse"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "OU",
},
latiosmega: {
randomBattleMoves: ["calmmind", "dracometeor", "hiddenpowerfire", "psyshock", "roost", "defog"],
randomDoubleBattleMoves: ["dracometeor", "dragonpulse", "surf", "thunderbolt", "psyshock", "substitute", "tailwind", "protect", "hiddenpowerfire"],
requiredItem: "Latiosite",
tier: "(OU)",
},
kyogre: {
randomBattleMoves: ["waterspout", "originpulse", "scald", "thunder", "icebeam"],
randomDoubleBattleMoves: ["waterspout", "muddywater", "originpulse", "thunder", "icebeam", "calmmind", "rest", "sleeptalk", "protect"],
eventPokemon: [
{"generation": 3, "level": 45, "shiny": 1, "moves":["bodyslam", "calmmind", "icebeam", "hydropump"]},
{"generation": 3, "level": 70, "shiny": 1, "moves":["hydropump", "rest", "sheercold", "doubleedge"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["aquaring", "icebeam", "ancientpower", "waterspout"]},
{"generation": 5, "level": 80, "shiny": 1, "moves":["icebeam", "ancientpower", "waterspout", "thunder"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "moves":["waterspout", "thunder", "icebeam", "sheercold"], "pokeball": "cherishball"},
{"generation": 6, "level": 45, "moves":["bodyslam", "aquaring", "icebeam", "originpulse"]},
{"generation": 6, "level": 100, "nature": "Timid", "moves":["waterspout", "thunder", "sheercold", "icebeam"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
kyogreprimal: {
randomBattleMoves: ["calmmind", "waterspout", "originpulse", "scald", "thunder", "icebeam", "rest", "sleeptalk"],
randomDoubleBattleMoves: ["waterspout", "originpulse", "muddywater", "thunder", "icebeam", "calmmind", "rest", "sleeptalk", "protect"],
requiredItem: "Blue Orb",
},
groudon: {
randomBattleMoves: ["earthquake", "stealthrock", "lavaplume", "stoneedge", "roar", "toxic", "thunderwave", "dragonclaw", "firepunch"],
randomDoubleBattleMoves: ["precipiceblades", "rockslide", "protect", "stoneedge", "swordsdance", "rockpolish", "dragonclaw", "firepunch"],
eventPokemon: [
{"generation": 3, "level": 45, "shiny": 1, "moves":["slash", "bulkup", "earthquake", "fireblast"]},
{"generation": 3, "level": 70, "shiny": 1, "moves":["fireblast", "rest", "fissure", "solarbeam"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["rest", "earthquake", "ancientpower", "eruption"]},
{"generation": 5, "level": 80, "shiny": 1, "moves":["earthquake", "ancientpower", "eruption", "solarbeam"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "moves":["eruption", "hammerarm", "earthpower", "solarbeam"], "pokeball": "cherishball"},
{"generation": 6, "level": 45, "moves":["lavaplume", "rest", "earthquake", "precipiceblades"]},
{"generation": 6, "level": 100, "nature": "Adamant", "moves":["firepunch", "solarbeam", "hammerarm", "rockslide"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
groudonprimal: {
randomBattleMoves: ["stealthrock", "precipiceblades", "lavaplume", "stoneedge", "dragontail", "rockpolish", "swordsdance", "firepunch"],
randomDoubleBattleMoves: ["precipiceblades", "lavaplume", "rockslide", "stoneedge", "swordsdance", "overheat", "rockpolish", "firepunch", "protect"],
requiredItem: "Red Orb",
},
rayquaza: {
randomBattleMoves: ["outrage", "vcreate", "extremespeed", "dragondance", "earthquake", "dracometeor", "dragonclaw"],
randomDoubleBattleMoves: ["tailwind", "vcreate", "extremespeed", "dragondance", "earthquake", "dracometeor", "dragonclaw", "protect"],
eventPokemon: [
{"generation": 3, "level": 70, "shiny": 1, "moves":["fly", "rest", "extremespeed", "outrage"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["rest", "airslash", "ancientpower", "outrage"]},
{"generation": 5, "level": 70, "shiny": true, "moves":["dragonpulse", "ancientpower", "outrage", "dragondance"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "moves":["extremespeed", "hyperbeam", "dragonpulse", "vcreate"], "pokeball": "cherishball"},
{"generation": 6, "level": 70, "moves":["extremespeed", "dragonpulse", "dragondance", "dragonascent"]},
{"generation": 6, "level": 70, "shiny": true, "moves":["dragonpulse", "thunder", "twister", "extremespeed"], "pokeball": "cherishball"},
{"generation": 6, "level": 70, "shiny": true, "moves":["dragonascent", "dragonclaw", "extremespeed", "dragondance"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "shiny": true, "moves":["dragonascent", "dracometeor", "fly", "celebrate"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
rayquazamega: {
// randomBattleMoves: ["vcreate", "extremespeed", "swordsdance", "earthquake", "dragonascent", "dragonclaw", "dragondance"],
randomDoubleBattleMoves: ["vcreate", "extremespeed", "swordsdance", "earthquake", "dragonascent", "dragonclaw", "dragondance", "protect"],
requiredMove: "Dragon Ascent",
tier: "AG",
},
jirachi: {
randomBattleMoves: ["ironhead", "uturn", "firepunch", "icepunch", "trick", "stealthrock", "bodyslam", "toxic", "wish", "substitute"],
randomDoubleBattleMoves: ["bodyslam", "ironhead", "icywind", "thunderwave", "helpinghand", "trickroom", "uturn", "followme", "zenheadbutt", "protect"],
eventPokemon: [
{"generation": 3, "level": 5, "moves":["wish", "confusion", "rest"]},
{"generation": 3, "level": 5, "shiny": true, "nature": "Bashful", "ivs": {"hp": 24, "atk": 3, "def": 30, "spa": 12, "spd": 16, "spe": 11}, "moves":["wish", "confusion", "rest"]},
{"generation": 3, "level": 5, "shiny": true, "nature": "Careful", "ivs": {"hp": 10, "atk": 0, "def": 10, "spa": 10, "spd": 26, "spe": 12}, "moves":["wish", "confusion", "rest"]},
{"generation": 3, "level": 5, "shiny": true, "nature": "Docile", "ivs": {"hp": 19, "atk": 7, "def": 10, "spa": 19, "spd": 10, "spe": 16}, "moves":["wish", "confusion", "rest"]},
{"generation": 3, "level": 5, "shiny": true, "nature": "Hasty", "ivs": {"hp": 3, "atk": 12, "def": 12, "spa": 7, "spd": 11, "spe": 9}, "moves":["wish", "confusion", "rest"]},
{"generation": 3, "level": 5, "shiny": true, "nature": "Jolly", "ivs": {"hp": 11, "atk": 8, "def": 6, "spa": 14, "spd": 5, "spe": 20}, "moves":["wish", "confusion", "rest"]},
{"generation": 3, "level": 5, "shiny": true, "nature": "Lonely", "ivs": {"hp": 31, "atk": 23, "def": 26, "spa": 29, "spd": 18, "spe": 5}, "moves":["wish", "confusion", "rest"]},
{"generation": 3, "level": 5, "shiny": true, "nature": "Naughty", "ivs": {"hp": 21, "atk": 31, "def": 31, "spa": 18, "spd": 24, "spe": 19}, "moves":["wish", "confusion", "rest"]},
{"generation": 3, "level": 5, "shiny": true, "nature": "Serious", "ivs": {"hp": 29, "atk": 10, "def": 31, "spa": 25, "spd": 23, "spe": 21}, "moves":["wish", "confusion", "rest"]},
{"generation": 3, "level": 5, "shiny": true, "nature": "Timid", "ivs": {"hp": 15, "atk": 28, "def": 29, "spa": 3, "spd": 0, "spe": 7}, "moves":["wish", "confusion", "rest"]},
{"generation": 3, "level": 30, "moves":["helpinghand", "psychic", "refresh", "rest"]},
{"generation": 4, "level": 5, "moves":["wish", "confusion", "rest"], "pokeball": "cherishball"},
{"generation": 4, "level": 5, "moves":["wish", "confusion", "rest", "dracometeor"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "moves":["healingwish", "psychic", "swift", "meteormash"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "moves":["dracometeor", "meteormash", "wish", "followme"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "moves":["wish", "healingwish", "cosmicpower", "meteormash"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "moves":["wish", "healingwish", "swift", "return"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "shiny": true, "moves":["wish", "swift", "healingwish", "moonblast"], "pokeball": "cherishball"},
{"generation": 6, "level": 15, "shiny": true, "moves":["wish", "confusion", "helpinghand", "return"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["heartstamp", "playrough", "wish", "cosmicpower"], "pokeball": "cherishball"},
{"generation": 6, "level": 25, "shiny": true, "moves":["wish", "confusion", "swift", "happyhour"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["wish", "confusion", "rest"], "pokeball": "cherishball"},
{"generation": 7, "level": 15, "moves":["swift", "wish", "healingwish", "rest"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "BL",
},
deoxys: {
randomBattleMoves: ["psychoboost", "stealthrock", "spikes", "firepunch", "superpower", "extremespeed", "knockoff", "taunt"],
randomDoubleBattleMoves: ["psychoboost", "superpower", "extremespeed", "icebeam", "thunderbolt", "firepunch", "protect", "knockoff", "psyshock"],
eventPokemon: [
{"generation": 3, "level": 30, "shiny": 1, "moves":["taunt", "pursuit", "psychic", "superpower"]},
{"generation": 3, "level": 30, "shiny": 1, "moves":["knockoff", "spikes", "psychic", "snatch"]},
{"generation": 3, "level": 30, "shiny": 1, "moves":["knockoff", "pursuit", "psychic", "swift"]},
{"generation": 3, "level": 70, "moves":["cosmicpower", "recover", "psychoboost", "hyperbeam"]},
{"generation": 4, "level": 50, "moves":["psychoboost", "zapcannon", "irondefense", "extremespeed"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "moves":["psychoboost", "swift", "doubleteam", "extremespeed"]},
{"generation": 4, "level": 50, "moves":["psychoboost", "detect", "counter", "mirrorcoat"]},
{"generation": 4, "level": 50, "moves":["psychoboost", "meteormash", "superpower", "hyperbeam"]},
{"generation": 4, "level": 50, "moves":["psychoboost", "leer", "wrap", "nightshade"]},
{"generation": 5, "level": 100, "moves":["nastyplot", "darkpulse", "recover", "psychoboost"], "pokeball": "duskball"},
{"generation": 6, "level": 80, "moves":["cosmicpower", "recover", "psychoboost", "hyperbeam"]},
],
eventOnly: true,
tier: "Uber",
},
deoxysattack: {
randomBattleMoves: ["psychoboost", "superpower", "icebeam", "knockoff", "extremespeed", "firepunch", "stealthrock"],
randomDoubleBattleMoves: ["psychoboost", "superpower", "extremespeed", "icebeam", "thunderbolt", "firepunch", "protect", "knockoff"],
eventOnly: true,
tier: "Uber",
},
deoxysdefense: {
randomBattleMoves: ["spikes", "stealthrock", "recover", "taunt", "toxic", "seismictoss", "knockoff"],
randomDoubleBattleMoves: ["protect", "stealthrock", "recover", "taunt", "reflect", "seismictoss", "lightscreen", "trickroom", "psychic"],
eventOnly: true,
tier: "Uber",
},
deoxysspeed: {
randomBattleMoves: ["spikes", "stealthrock", "superpower", "psychoboost", "taunt", "magiccoat", "knockoff"],
randomDoubleBattleMoves: ["superpower", "icebeam", "psychoboost", "taunt", "lightscreen", "reflect", "protect", "knockoff"],
eventOnly: true,
tier: "Uber",
},
turtwig: {
randomBattleMoves: ["reflect", "lightscreen", "stealthrock", "seedbomb", "substitute", "leechseed", "toxic"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tackle", "withdraw", "absorb"]},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["tackle", "withdraw", "absorb", "stockpile"]},
],
tier: "LC",
},
grotle: {
randomBattleMoves: ["reflect", "lightscreen", "stealthrock", "seedbomb", "substitute", "leechseed", "toxic"],
tier: "NFE",
},
torterra: {
randomBattleMoves: ["stealthrock", "earthquake", "woodhammer", "stoneedge", "synthesis", "rockpolish"],
randomDoubleBattleMoves: ["protect", "earthquake", "woodhammer", "stoneedge", "rockslide", "wideguard", "rockpolish"],
eventPokemon: [
{"generation": 5, "level": 100, "gender": "M", "isHidden": false, "moves":["woodhammer", "earthquake", "outrage", "stoneedge"], "pokeball": "cherishball"},
],
tier: "PU",
},
chimchar: {
randomBattleMoves: ["stealthrock", "overheat", "hiddenpowergrass", "fakeout", "uturn", "gunkshot"],
eventPokemon: [
{"generation": 4, "level": 40, "gender": "M", "nature": "Mild", "moves":["flamethrower", "thunderpunch", "grassknot", "helpinghand"], "pokeball": "cherishball"},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["scratch", "leer", "ember", "taunt"]},
{"generation": 4, "level": 40, "gender": "M", "nature": "Hardy", "moves":["flamethrower", "thunderpunch", "grassknot", "helpinghand"], "pokeball": "cherishball"},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["leer", "ember", "taunt", "fakeout"]},
],
tier: "LC",
},
monferno: {
randomBattleMoves: ["stealthrock", "overheat", "hiddenpowergrass", "fakeout", "vacuumwave", "uturn", "gunkshot"],
tier: "NFE",
},
infernape: {
randomBattleMoves: ["stealthrock", "uturn", "earthquake", "closecombat", "flareblitz", "stoneedge", "machpunch", "nastyplot", "fireblast", "vacuumwave", "grassknot", "hiddenpowerice"],
randomDoubleBattleMoves: ["fakeout", "heatwave", "closecombat", "uturn", "grassknot", "stoneedge", "machpunch", "feint", "taunt", "flareblitz", "hiddenpowerice", "thunderpunch", "protect"],
eventPokemon: [
{"generation": 5, "level": 100, "gender": "M", "isHidden": false, "moves":["fireblast", "closecombat", "uturn", "grassknot"], "pokeball": "cherishball"},
{"generation": 6, "level": 88, "isHidden": true, "moves":["fireblast", "closecombat", "firepunch", "focuspunch"], "pokeball": "cherishball"},
],
tier: "UU",
},
piplup: {
randomBattleMoves: ["stealthrock", "hydropump", "scald", "icebeam", "hiddenpowerelectric", "hiddenpowerfire", "yawn", "defog"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["pound", "growl", "bubble"]},
{"generation": 5, "level": 15, "shiny": 1, "isHidden": false, "moves":["hydropump", "featherdance", "watersport", "peck"], "pokeball": "cherishball"},
{"generation": 5, "level": 15, "gender": "M", "isHidden": false, "moves":["sing", "round", "featherdance", "peck"], "pokeball": "cherishball"},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["pound", "growl", "bubble", "featherdance"]},
{"generation": 6, "level": 7, "isHidden": false, "moves":["pound", "growl", "return"], "pokeball": "cherishball"},
{"generation": 7, "level": 30, "gender": "M", "nature": "Hardy", "isHidden": false, "moves":["hydropump", "bubblebeam", "whirlpool", "drillpeck"], "pokeball": "pokeball"},
],
tier: "LC",
},
prinplup: {
randomBattleMoves: ["stealthrock", "hydropump", "scald", "icebeam", "hiddenpowerelectric", "hiddenpowerfire", "yawn", "defog"],
tier: "NFE",
},
empoleon: {
randomBattleMoves: ["hydropump", "flashcannon", "grassknot", "hiddenpowerfire", "icebeam", "scald", "toxic", "roar", "stealthrock"],
randomDoubleBattleMoves: ["icywind", "scald", "surf", "icebeam", "hiddenpowerelectric", "protect", "grassknot", "flashcannon"],
eventPokemon: [
{"generation": 5, "level": 100, "gender": "M", "isHidden": false, "moves":["hydropump", "icebeam", "aquajet", "grassknot"], "pokeball": "cherishball"},
],
tier: "UU",
},
starly: {
randomBattleMoves: ["bravebird", "return", "uturn", "pursuit"],
eventPokemon: [
{"generation": 4, "level": 1, "gender": "M", "nature": "Mild", "moves":["tackle", "growl"]},
],
tier: "LC",
},
staravia: {
randomBattleMoves: ["bravebird", "return", "uturn", "pursuit", "defog"],
tier: "NFE",
},
staraptor: {
randomBattleMoves: ["bravebird", "closecombat", "uturn", "quickattack", "roost", "doubleedge"],
randomDoubleBattleMoves: ["bravebird", "closecombat", "uturn", "quickattack", "doubleedge", "tailwind", "protect"],
tier: "BL",
},
bidoof: {
randomBattleMoves: ["return", "aquatail", "curse", "quickattack", "stealthrock", "superfang"],
eventPokemon: [
{"generation": 4, "level": 1, "gender": "M", "nature": "Lonely", "abilities":["simple"], "moves":["tackle"]},
],
tier: "LC",
},
bibarel: {
randomBattleMoves: ["return", "waterfall", "swordsdance", "quickattack", "aquajet"],
randomDoubleBattleMoves: ["return", "waterfall", "curse", "aquajet", "quickattack", "protect", "rest"],
tier: "PU",
},
kricketot: {
randomBattleMoves: ["endeavor", "mudslap", "bugbite", "strugglebug"],
tier: "LC",
},
kricketune: {
randomBattleMoves: ["leechlife", "endeavor", "taunt", "toxic", "stickyweb", "knockoff"],
randomDoubleBattleMoves: ["leechlife", "protect", "taunt", "stickyweb", "knockoff"],
tier: "PU",
},
shinx: {
randomBattleMoves: ["wildcharge", "icefang", "firefang", "crunch"],
tier: "LC",
},
luxio: {
randomBattleMoves: ["wildcharge", "icefang", "firefang", "crunch"],
tier: "NFE",
},
luxray: {
randomBattleMoves: ["wildcharge", "icefang", "voltswitch", "crunch", "superpower", "facade"],
randomDoubleBattleMoves: ["wildcharge", "icefang", "voltswitch", "crunch", "superpower", "facade", "protect"],
tier: "PU",
},
cranidos: {
randomBattleMoves: ["headsmash", "rockslide", "earthquake", "zenheadbutt", "firepunch", "rockpolish", "crunch"],
eventPokemon: [
{"generation": 5, "level": 15, "gender": "M", "isHidden": false, "moves":["pursuit", "takedown", "crunch", "headbutt"], "pokeball": "cherishball"},
],
tier: "LC",
},
rampardos: {
randomBattleMoves: ["headsmash", "earthquake", "rockpolish", "crunch", "rockslide", "firepunch"],
randomDoubleBattleMoves: ["headsmash", "earthquake", "zenheadbutt", "rockslide", "crunch", "stoneedge", "protect"],
tier: "PU",
},
shieldon: {
randomBattleMoves: ["stealthrock", "metalburst", "fireblast", "icebeam", "protect", "toxic", "roar"],
eventPokemon: [
{"generation": 5, "level": 15, "gender": "M", "isHidden": false, "moves":["metalsound", "takedown", "bodyslam", "protect"], "pokeball": "cherishball"},
],
tier: "LC",
},
bastiodon: {
randomBattleMoves: ["stealthrock", "rockblast", "metalburst", "protect", "toxic", "roar"],
randomDoubleBattleMoves: ["stealthrock", "stoneedge", "metalburst", "protect", "wideguard", "guardsplit"],
tier: "PU",
},
burmy: {
randomBattleMoves: ["bugbite", "hiddenpowerice", "electroweb", "protect"],
tier: "LC",
},
wormadam: {
randomBattleMoves: ["gigadrain", "bugbuzz", "quiverdance", "hiddenpowerrock", "leafstorm"],
randomDoubleBattleMoves: ["leafstorm", "gigadrain", "bugbuzz", "hiddenpowerice", "hiddenpowerrock", "stringshot", "protect"],
tier: "PU",
},
wormadamsandy: {
randomBattleMoves: ["earthquake", "toxic", "protect", "stealthrock"],
randomDoubleBattleMoves: ["earthquake", "suckerpunch", "rockblast", "protect", "stringshot"],
tier: "PU",
},
wormadamtrash: {
randomBattleMoves: ["stealthrock", "toxic", "gyroball", "protect"],
randomDoubleBattleMoves: ["strugglebug", "stringshot", "gyroball", "bugbuzz", "flashcannon", "suckerpunch", "protect"],
tier: "PU",
},
mothim: {
randomBattleMoves: ["quiverdance", "bugbuzz", "airslash", "gigadrain", "hiddenpowerground", "uturn"],
randomDoubleBattleMoves: ["quiverdance", "bugbuzz", "airslash", "gigadrain", "roost", "protect"],
tier: "PU",
},
combee: {
randomBattleMoves: ["bugbuzz", "aircutter", "endeavor", "ominouswind", "tailwind"],
tier: "LC",
},
vespiquen: {
randomBattleMoves: ["substitute", "healorder", "toxic", "attackorder", "defendorder", "infestation"],
randomDoubleBattleMoves: ["tailwind", "healorder", "stringshot", "attackorder", "strugglebug", "protect"],
tier: "PU",
},
pachirisu: {
randomBattleMoves: ["nuzzle", "thunderbolt", "superfang", "toxic", "uturn"],
randomDoubleBattleMoves: ["nuzzle", "thunderbolt", "superfang", "followme", "uturn", "helpinghand", "protect"],
eventPokemon: [
{"generation": 6, "level": 50, "nature": "Impish", "ivs": {"hp": 31, "atk": 31, "def": 31, "spa": 14, "spd": 31, "spe": 31}, "isHidden": true, "moves":["nuzzle", "superfang", "followme", "protect"], "pokeball": "cherishball"},
],
tier: "PU",
},
buizel: {
randomBattleMoves: ["waterfall", "aquajet", "switcheroo", "brickbreak", "bulkup", "batonpass", "icepunch"],
tier: "LC",
},
floatzel: {
randomBattleMoves: ["bulkup", "batonpass", "waterfall", "icepunch", "substitute", "taunt", "aquajet", "brickbreak"],
randomDoubleBattleMoves: ["waterfall", "aquajet", "switcheroo", "raindance", "protect", "icepunch", "crunch", "taunt"],
tier: "PU",
},
cherubi: {
randomBattleMoves: ["sunnyday", "solarbeam", "weatherball", "hiddenpowerice", "aromatherapy", "dazzlinggleam"],
tier: "LC",
},
cherrim: {
randomBattleMoves: ["energyball", "dazzlinggleam", "hiddenpowerfire", "synthesis", "healingwish"],
randomDoubleBattleMoves: ["sunnyday", "solarbeam", "weatherball", "gigadrain", "protect"],
tier: "PU",
},
cherrimsunshine: {
randomBattleMoves: ["sunnyday", "solarbeam", "gigadrain", "weatherball", "hiddenpowerice"],
randomDoubleBattleMoves: ["sunnyday", "solarbeam", "gigadrain", "weatherball", "protect"],
battleOnly: true,
},
shellos: {
randomBattleMoves: ["scald", "clearsmog", "recover", "toxic", "icebeam", "stockpile"],
tier: "LC",
},
gastrodon: {
randomBattleMoves: ["earthquake", "icebeam", "scald", "toxic", "recover", "clearsmog"],
randomDoubleBattleMoves: ["earthpower", "icebeam", "scald", "muddywater", "recover", "icywind", "protect"],
tier: "PU",
},
drifloon: {
randomBattleMoves: ["shadowball", "substitute", "calmmind", "hypnosis", "hiddenpowerfighting", "thunderbolt", "destinybond", "willowisp"],
tier: "LC Uber",
},
drifblim: {
randomBattleMoves: ["acrobatics", "willowisp", "substitute", "destinybond", "shadowball", "hex"],
randomDoubleBattleMoves: ["shadowball", "substitute", "hypnosis", "hiddenpowerfighting", "thunderbolt", "destinybond", "willowisp", "protect"],
tier: "PU",
},
buneary: {
randomBattleMoves: ["fakeout", "return", "switcheroo", "thunderpunch", "jumpkick", "firepunch", "icepunch", "healingwish"],
tier: "LC",
},
lopunny: {
randomBattleMoves: ["return", "switcheroo", "highjumpkick", "icepunch", "healingwish"],
randomDoubleBattleMoves: ["return", "switcheroo", "highjumpkick", "firepunch", "icepunch", "fakeout", "protect", "encore"],
tier: "PU",
},
lopunnymega: {
randomBattleMoves: ["return", "highjumpkick", "substitute", "fakeout", "icepunch"],
randomDoubleBattleMoves: ["return", "highjumpkick", "protect", "fakeout", "icepunch", "encore"],
requiredItem: "Lopunnite",
tier: "OU",
},
glameow: {
randomBattleMoves: ["fakeout", "uturn", "suckerpunch", "hypnosis", "quickattack", "return", "foulplay"],
tier: "LC",
},
purugly: {
randomBattleMoves: ["fakeout", "uturn", "suckerpunch", "quickattack", "return", "knockoff"],
randomDoubleBattleMoves: ["fakeout", "uturn", "suckerpunch", "quickattack", "return", "knockoff", "protect"],
tier: "PU",
},
stunky: {
randomBattleMoves: ["pursuit", "suckerpunch", "crunch", "fireblast", "explosion", "taunt", "playrough", "defog"],
tier: "LC",
},
skuntank: {
randomBattleMoves: ["pursuit", "suckerpunch", "crunch", "fireblast", "taunt", "poisonjab", "defog"],
randomDoubleBattleMoves: ["protect", "suckerpunch", "crunch", "fireblast", "taunt", "poisonjab", "playrough", "snarl"],
tier: "PU",
},
bronzor: {
randomBattleMoves: ["stealthrock", "psychic", "toxic", "hypnosis", "reflect", "lightscreen", "trickroom", "trick"],
tier: "LC",
},
bronzong: {
randomBattleMoves: ["stealthrock", "earthquake", "toxic", "reflect", "lightscreen", "trickroom", "explosion", "gyroball"],
randomDoubleBattleMoves: ["earthquake", "protect", "reflect", "lightscreen", "trickroom", "explosion", "gyroball"],
tier: "RU",
},
chatot: {
randomBattleMoves: ["nastyplot", "boomburst", "heatwave", "hiddenpowerground", "substitute", "chatter", "uturn"],
randomDoubleBattleMoves: ["nastyplot", "heatwave", "encore", "substitute", "chatter", "uturn", "protect", "hypervoice", "boomburst"],
eventPokemon: [
{"generation": 4, "level": 25, "gender": "M", "nature": "Jolly", "abilities":["keeneye"], "moves":["mirrormove", "furyattack", "chatter", "taunt"]},
],
tier: "PU",
},
spiritomb: {
randomBattleMoves: ["shadowsneak", "suckerpunch", "pursuit", "willowisp", "darkpulse", "rest", "sleeptalk", "foulplay", "painsplit", "calmmind"],
randomDoubleBattleMoves: ["shadowsneak", "suckerpunch", "icywind", "willowisp", "snarl", "darkpulse", "protect", "foulplay", "painsplit"],
eventPokemon: [
{"generation": 5, "level": 61, "gender": "F", "nature": "Quiet", "ivs": {"hp": 30, "atk": 30, "def": 30, "spa": 30, "spd": 30, "spe": 30}, "isHidden": false, "moves":["darkpulse", "psychic", "silverwind", "embargo"], "pokeball": "cherishball"},
],
tier: "NU",
},
gible: {
randomBattleMoves: ["outrage", "dragonclaw", "earthquake", "fireblast", "stoneedge", "stealthrock"],
tier: "LC",
},
gabite: {
randomBattleMoves: ["outrage", "dragonclaw", "earthquake", "fireblast", "stoneedge", "stealthrock"],
tier: "NFE",
},
garchomp: {
randomBattleMoves: ["outrage", "dragonclaw", "earthquake", "stoneedge", "fireblast", "swordsdance", "stealthrock", "firefang"],
randomDoubleBattleMoves: ["substitute", "dragonclaw", "earthquake", "stoneedge", "rockslide", "swordsdance", "protect", "firefang"],
eventPokemon: [
{"generation": 5, "level": 100, "gender": "M", "isHidden": false, "moves":["outrage", "earthquake", "swordsdance", "stoneedge"], "pokeball": "cherishball"},
{"generation": 5, "level": 48, "gender": "M", "isHidden": true, "moves":["dragonclaw", "dig", "crunch", "outrage"]},
{"generation": 6, "level": 48, "gender": "M", "isHidden": false, "moves":["dracometeor", "dragonclaw", "dig", "crunch"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "gender": "M", "isHidden": false, "moves":["slash", "dragonclaw", "dig", "crunch"], "pokeball": "cherishball"},
{"generation": 6, "level": 66, "gender": "F", "perfectIVs": 3, "isHidden": false, "moves":["dragonrush", "earthquake", "brickbreak", "gigaimpact"], "pokeball": "cherishball"},
],
tier: "OU",
},
garchompmega: {
randomBattleMoves: ["outrage", "dracometeor", "earthquake", "stoneedge", "fireblast", "swordsdance"],
randomDoubleBattleMoves: ["substitute", "dragonclaw", "earthquake", "stoneedge", "rockslide", "swordsdance", "protect", "fireblast"],
requiredItem: "Garchompite",
tier: "(OU)",
},
riolu: {
randomBattleMoves: ["crunch", "rockslide", "copycat", "drainpunch", "highjumpkick", "icepunch", "swordsdance"],
eventPokemon: [
{"generation": 4, "level": 30, "gender": "M", "nature": "Serious", "abilities":["steadfast"], "moves":["aurasphere", "shadowclaw", "bulletpunch", "drainpunch"]},
],
tier: "LC",
},
lucario: {
randomBattleMoves: ["swordsdance", "closecombat", "crunch", "extremespeed", "icepunch", "nastyplot", "aurasphere", "darkpulse", "vacuumwave", "flashcannon"],
randomDoubleBattleMoves: ["followme", "closecombat", "crunch", "extremespeed", "icepunch", "bulletpunch", "aurasphere", "darkpulse", "vacuumwave", "flashcannon", "protect"],
eventPokemon: [
{"generation": 4, "level": 50, "gender": "M", "nature": "Modest", "abilities":["steadfast"], "moves":["aurasphere", "darkpulse", "dragonpulse", "waterpulse"], "pokeball": "cherishball"},
{"generation": 4, "level": 30, "gender": "M", "nature": "Adamant", "abilities":["innerfocus"], "moves":["forcepalm", "bonerush", "sunnyday", "blazekick"], "pokeball": "cherishball"},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["detect", "metalclaw", "counter", "bulletpunch"]},
{"generation": 5, "level": 50, "gender": "M", "nature": "Naughty", "ivs": {"atk": 31}, "isHidden": true, "moves":["bulletpunch", "closecombat", "stoneedge", "shadowclaw"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "nature": "Jolly", "isHidden": false, "abilities":["innerfocus"], "moves":["closecombat", "aurasphere", "flashcannon", "quickattack"], "pokeball": "cherishball"},
{"generation": 7, "level": 40, "gender": "M", "nature": "Serious", "isHidden": false, "abilities":["steadfast"], "moves":["aurasphere", "highjumpkick", "dragonpulse", "extremespeed"], "pokeball": "pokeball"},
],
tier: "BL2",
},
lucariomega: {
randomBattleMoves: ["swordsdance", "closecombat", "crunch", "icepunch", "bulletpunch", "nastyplot", "aurasphere", "darkpulse", "flashcannon"],
randomDoubleBattleMoves: ["followme", "closecombat", "crunch", "extremespeed", "icepunch", "bulletpunch", "aurasphere", "darkpulse", "vacuumwave", "flashcannon", "protect"],
requiredItem: "Lucarionite",
tier: "Uber",
},
hippopotas: {
randomBattleMoves: ["earthquake", "slackoff", "whirlwind", "stealthrock", "protect", "toxic", "stockpile"],
tier: "LC",
},
hippowdon: {
randomBattleMoves: ["earthquake", "slackoff", "whirlwind", "stealthrock", "toxic", "stoneedge"],
randomDoubleBattleMoves: ["earthquake", "slackoff", "rockslide", "stealthrock", "protect", "stoneedge", "whirlwind"],
tier: "UU",
},
skorupi: {
randomBattleMoves: ["toxicspikes", "xscissor", "poisonjab", "knockoff", "pinmissile", "whirlwind"],
tier: "LC",
},
drapion: {
randomBattleMoves: ["knockoff", "taunt", "toxicspikes", "poisonjab", "whirlwind", "swordsdance", "aquatail", "earthquake"],
randomDoubleBattleMoves: ["snarl", "taunt", "protect", "earthquake", "aquatail", "swordsdance", "poisonjab", "knockoff"],
tier: "RU",
},
croagunk: {
randomBattleMoves: ["fakeout", "vacuumwave", "suckerpunch", "drainpunch", "darkpulse", "knockoff", "gunkshot", "toxic"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["astonish", "mudslap", "poisonsting", "taunt"]},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["mudslap", "poisonsting", "taunt", "poisonjab"]},
],
tier: "LC",
},
toxicroak: {
randomBattleMoves: ["swordsdance", "gunkshot", "drainpunch", "suckerpunch", "icepunch", "substitute"],
randomDoubleBattleMoves: ["suckerpunch", "drainpunch", "substitute", "swordsdance", "knockoff", "icepunch", "gunkshot", "fakeout", "protect"],
tier: "NU",
},
carnivine: {
randomBattleMoves: ["swordsdance", "powerwhip", "return", "sleeppowder", "substitute", "knockoff"],
randomDoubleBattleMoves: ["swordsdance", "powerwhip", "return", "sleeppowder", "substitute", "leechseed", "knockoff", "ragepowder", "protect"],
tier: "PU",
},
finneon: {
randomBattleMoves: ["surf", "uturn", "icebeam", "hiddenpowerelectric", "hiddenpowergrass"],
tier: "LC",
},
lumineon: {
randomBattleMoves: ["scald", "icebeam", "uturn", "toxic", "defog"],
randomDoubleBattleMoves: ["surf", "uturn", "icebeam", "toxic", "raindance", "tailwind", "scald", "protect"],
tier: "PU",
},
snover: {
randomBattleMoves: ["blizzard", "iceshard", "gigadrain", "leechseed", "substitute", "woodhammer"],
tier: "LC",
},
abomasnow: {
randomBattleMoves: ["woodhammer", "iceshard", "blizzard", "gigadrain", "leechseed", "substitute", "focuspunch", "earthquake"],
randomDoubleBattleMoves: ["blizzard", "iceshard", "gigadrain", "protect", "focusblast", "woodhammer", "earthquake"],
tier: "PU",
},
abomasnowmega: {
randomBattleMoves: ["blizzard", "gigadrain", "woodhammer", "earthquake", "iceshard", "hiddenpowerfire"],
randomDoubleBattleMoves: ["blizzard", "iceshard", "gigadrain", "protect", "focusblast", "woodhammer", "earthquake"],
requiredItem: "Abomasite",
tier: "RU",
},
rotom: {
randomBattleMoves: ["thunderbolt", "voltswitch", "shadowball", "substitute", "painsplit", "hiddenpowerice", "trick", "willowisp"],
randomDoubleBattleMoves: ["thunderbolt", "voltswitch", "shadowball", "substitute", "painsplit", "hiddenpowerice", "trick", "willowisp", "electroweb", "protect"],
eventPokemon: [
{"generation": 5, "level": 10, "nature": "Naughty", "moves":["uproar", "astonish", "trick", "thundershock"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "nature": "Quirky", "moves":["shockwave", "astonish", "trick", "thunderwave"], "pokeball": "cherishball"},
],
tier: "NU",
},
rotomheat: {
randomBattleMoves: ["overheat", "thunderbolt", "voltswitch", "hiddenpowerice", "painsplit", "willowisp", "trick"],
randomDoubleBattleMoves: ["overheat", "thunderbolt", "voltswitch", "substitute", "painsplit", "hiddenpowerice", "willowisp", "trick", "electroweb", "protect"],
tier: "RU",
},
rotomwash: {
randomBattleMoves: ["hydropump", "thunderbolt", "voltswitch", "painsplit", "hiddenpowerice", "willowisp", "trick"],
randomDoubleBattleMoves: ["hydropump", "thunderbolt", "voltswitch", "substitute", "painsplit", "hiddenpowerice", "willowisp", "trick", "electroweb", "protect", "hiddenpowergrass"],
tier: "UU",
},
rotomfrost: {
randomBattleMoves: ["blizzard", "thunderbolt", "voltswitch", "substitute", "painsplit", "willowisp", "trick"],
randomDoubleBattleMoves: ["blizzard", "thunderbolt", "voltswitch", "substitute", "painsplit", "willowisp", "trick", "electroweb", "protect"],
tier: "PU",
},
rotomfan: {
randomBattleMoves: ["airslash", "thunderbolt", "voltswitch", "painsplit", "willowisp", "trick"],
randomDoubleBattleMoves: ["airslash", "thunderbolt", "voltswitch", "substitute", "painsplit", "hiddenpowerice", "willowisp", "electroweb", "discharge", "protect"],
tier: "PU",
},
rotommow: {
randomBattleMoves: ["leafstorm", "thunderbolt", "voltswitch", "painsplit", "hiddenpowerfire", "willowisp", "trick"],
randomDoubleBattleMoves: ["leafstorm", "thunderbolt", "voltswitch", "substitute", "painsplit", "hiddenpowerfire", "willowisp", "trick", "electroweb", "protect"],
tier: "NU",
},
uxie: {
randomBattleMoves: ["stealthrock", "thunderwave", "psychic", "uturn", "healbell", "knockoff", "yawn"],
randomDoubleBattleMoves: ["uturn", "psyshock", "yawn", "healbell", "stealthrock", "thunderbolt", "protect", "helpinghand", "thunderwave"],
eventPokemon: [
{"generation": 4, "level": 50, "shiny": 1, "moves":["confusion", "yawn", "futuresight", "amnesia"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["swift", "yawn", "futuresight", "amnesia"]},
{"generation": 5, "level": 65, "shiny": 1, "moves":["futuresight", "amnesia", "extrasensory", "flail"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["yawn", "futuresight", "amnesia", "extrasensory"]},
],
eventOnly: true,
tier: "NU",
},
mesprit: {
randomBattleMoves: ["calmmind", "psychic", "psyshock", "energyball", "signalbeam", "hiddenpowerfire", "icebeam", "healingwish", "stealthrock", "uturn"],
randomDoubleBattleMoves: ["calmmind", "psychic", "thunderbolt", "icebeam", "substitute", "uturn", "trick", "protect", "knockoff", "helpinghand"],
eventPokemon: [
{"generation": 4, "level": 50, "shiny": 1, "moves":["confusion", "luckychant", "futuresight", "charm"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["swift", "luckychant", "futuresight", "charm"]},
{"generation": 5, "level": 50, "shiny": 1, "moves":["futuresight", "charm", "extrasensory", "copycat"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["luckychant", "futuresight", "charm", "extrasensory"]},
],
eventOnly: true,
tier: "PU",
},
azelf: {
randomBattleMoves: ["nastyplot", "psyshock", "fireblast", "dazzlinggleam", "stealthrock", "knockoff", "taunt", "explosion"],
randomDoubleBattleMoves: ["nastyplot", "psychic", "fireblast", "thunderbolt", "icepunch", "knockoff", "zenheadbutt", "uturn", "trick", "taunt", "protect", "dazzlinggleam"],
eventPokemon: [
{"generation": 4, "level": 50, "shiny": 1, "moves":["confusion", "uproar", "futuresight", "nastyplot"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["swift", "uproar", "futuresight", "nastyplot"]},
{"generation": 5, "level": 50, "shiny": 1, "moves":["futuresight", "nastyplot", "extrasensory", "lastresort"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["uproar", "futuresight", "nastyplot", "extrasensory"]},
],
eventOnly: true,
tier: "UU",
},
dialga: {
randomBattleMoves: ["stealthrock", "toxic", "dracometeor", "fireblast", "flashcannon", "roar", "thunderbolt"],
randomDoubleBattleMoves: ["dracometeor", "dragonpulse", "protect", "thunderbolt", "flashcannon", "earthpower", "fireblast", "aurasphere"],
eventPokemon: [
{"generation": 4, "level": 47, "shiny": 1, "moves":["metalclaw", "ancientpower", "dragonclaw", "roaroftime"]},
{"generation": 4, "level": 70, "shiny": 1, "moves":["roaroftime", "healblock", "earthpower", "slash"]},
{"generation": 4, "level": 1, "shiny": 1, "moves":["dragonbreath", "scaryface"]},
{"generation": 5, "level": 5, "isHidden": true, "moves":["dragonbreath", "scaryface"], "pokeball": "dreamball"},
{"generation": 5, "level": 100, "shiny": true, "isHidden": false, "moves":["dragonpulse", "dracometeor", "aurasphere", "roaroftime"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": 1, "isHidden": false, "moves":["aurasphere", "irontail", "roaroftime", "flashcannon"]},
{"generation": 6, "level": 100, "nature": "Modest", "isHidden": true, "moves":["metalburst", "overheat", "roaroftime", "flashcannon"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
palkia: {
randomBattleMoves: ["spacialrend", "dracometeor", "hydropump", "thunderwave", "dragontail", "fireblast"],
randomDoubleBattleMoves: ["spacialrend", "dracometeor", "surf", "hydropump", "thunderbolt", "fireblast", "protect"],
eventPokemon: [
{"generation": 4, "level": 47, "shiny": 1, "moves":["waterpulse", "ancientpower", "dragonclaw", "spacialrend"]},
{"generation": 4, "level": 70, "shiny": 1, "moves":["spacialrend", "healblock", "earthpower", "slash"]},
{"generation": 4, "level": 1, "shiny": 1, "moves":["dragonbreath", "scaryface"]},
{"generation": 5, "level": 5, "isHidden": true, "moves":["dragonbreath", "scaryface"], "pokeball": "dreamball"},
{"generation": 5, "level": 100, "shiny": true, "isHidden": false, "moves":["hydropump", "dracometeor", "spacialrend", "aurasphere"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": 1, "isHidden": false, "moves":["earthpower", "aurasphere", "spacialrend", "hydropump"]},
{"generation": 6, "level": 100, "nature": "Timid", "isHidden": true, "moves":["earthpower", "aurasphere", "spacialrend", "hydropump"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
heatran: {
randomBattleMoves: ["fireblast", "lavaplume", "stealthrock", "earthpower", "flashcannon", "protect", "toxic", "roar"],
randomDoubleBattleMoves: ["heatwave", "substitute", "earthpower", "protect", "eruption", "willowisp"],
eventPokemon: [
{"generation": 4, "level": 70, "shiny": 1, "moves":["scaryface", "lavaplume", "firespin", "ironhead"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["metalsound", "crunch", "scaryface", "lavaplume"]},
{"generation": 4, "level": 50, "nature": "Quiet", "moves":["eruption", "magmastorm", "earthpower", "ancientpower"]},
{"generation": 5, "level": 68, "shiny": 1, "isHidden": false, "moves":["scaryface", "lavaplume", "firespin", "ironhead"]},
{"generation": 6, "level": 50, "shiny": 1, "isHidden": false, "moves":["metalsound", "crunch", "scaryface", "lavaplume"]},
],
eventOnly: true,
unreleasedHidden: true,
tier: "OU",
},
regigigas: {
randomBattleMoves: ["thunderwave", "confuseray", "substitute", "return", "knockoff", "drainpunch"],
randomDoubleBattleMoves: ["thunderwave", "substitute", "return", "icywind", "rockslide", "earthquake", "knockoff", "wideguard"],
eventPokemon: [
{"generation": 4, "level": 70, "shiny": 1, "moves":["confuseray", "stomp", "superpower", "zenheadbutt"]},
{"generation": 4, "level": 1, "shiny": 1, "moves":["dizzypunch", "knockoff", "foresight", "confuseray"]},
{"generation": 4, "level": 100, "moves":["ironhead", "rockslide", "icywind", "crushgrip"], "pokeball": "cherishball"},
{"generation": 5, "level": 68, "shiny": 1, "moves":["revenge", "wideguard", "zenheadbutt", "payback"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["foresight", "revenge", "wideguard", "zenheadbutt"]},
],
eventOnly: true,
tier: "PU",
},
giratina: {
randomBattleMoves: ["rest", "sleeptalk", "dragontail", "roar", "willowisp", "shadowball", "dragonpulse"],
randomDoubleBattleMoves: ["tailwind", "shadowsneak", "protect", "dragontail", "willowisp", "calmmind", "dragonpulse", "shadowball"],
eventPokemon: [
{"generation": 4, "level": 70, "shiny": 1, "moves":["shadowforce", "healblock", "earthpower", "slash"]},
{"generation": 4, "level": 47, "shiny": 1, "moves":["ominouswind", "ancientpower", "dragonclaw", "shadowforce"]},
{"generation": 4, "level": 1, "shiny": 1, "moves":["dragonbreath", "scaryface"]},
{"generation": 5, "level": 5, "isHidden": true, "moves":["dragonbreath", "scaryface"], "pokeball": "dreamball"},
{"generation": 5, "level": 100, "shiny": true, "isHidden": false, "moves":["dragonpulse", "dragonclaw", "aurasphere", "shadowforce"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": 1, "isHidden": false, "moves":["aurasphere", "shadowclaw", "shadowforce", "hex"]},
{"generation": 6, "level": 100, "nature": "Brave", "isHidden": true, "moves":["aurasphere", "dracometeor", "shadowforce", "ironhead"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
giratinaorigin: {
randomBattleMoves: ["dracometeor", "shadowsneak", "dragontail", "willowisp", "defog", "toxic", "shadowball", "earthquake"],
randomDoubleBattleMoves: ["dracometeor", "shadowsneak", "tailwind", "hiddenpowerfire", "willowisp", "calmmind", "substitute", "dragonpulse", "shadowball", "aurasphere", "protect", "earthquake"],
eventOnly: true,
requiredItem: "Griseous Orb",
tier: "Uber",
},
cresselia: {
randomBattleMoves: ["moonlight", "psychic", "icebeam", "thunderwave", "toxic", "substitute", "psyshock", "moonblast", "calmmind"],
randomDoubleBattleMoves: ["psyshock", "icywind", "thunderwave", "trickroom", "moonblast", "moonlight", "skillswap", "reflect", "lightscreen", "icebeam", "protect", "helpinghand"],
eventPokemon: [
{"generation": 4, "level": 50, "shiny": 1, "moves":["mist", "aurorabeam", "futuresight", "slash"]},
{"generation": 5, "level": 68, "shiny": 1, "moves":["futuresight", "slash", "moonlight", "psychocut"]},
{"generation": 5, "level": 68, "nature": "Modest", "moves":["icebeam", "psyshock", "energyball", "hiddenpower"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["mist", "aurorabeam", "futuresight", "slash"]},
],
eventOnly: true,
tier: "RU",
},
phione: {
randomBattleMoves: ["raindance", "scald", "uturn", "rest", "icebeam"],
randomDoubleBattleMoves: ["raindance", "scald", "uturn", "rest", "icebeam", "helpinghand", "icywind", "protect"],
eventPokemon: [
{"generation": 4, "level": 50, "moves":["grassknot", "raindance", "rest", "surf"], "pokeball": "cherishball"},
],
tier: "PU",
},
manaphy: {
randomBattleMoves: ["tailglow", "surf", "icebeam", "energyball", "psychic"],
randomDoubleBattleMoves: ["tailglow", "surf", "icebeam", "energyball", "protect", "scald", "icywind", "helpinghand"],
eventPokemon: [
{"generation": 4, "level": 5, "moves":["tailglow", "bubble", "watersport"]},
{"generation": 4, "level": 1, "shiny": 1, "moves":["tailglow", "bubble", "watersport"]},
{"generation": 4, "level": 50, "moves":["heartswap", "waterpulse", "whirlpool", "acidarmor"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "nature": "Impish", "moves":["aquaring", "waterpulse", "watersport", "heartswap"], "pokeball": "cherishball"},
{"generation": 6, "level": 1, "moves":["tailglow", "bubble", "watersport", "heartswap"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["tailglow", "bubble", "watersport"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "OU",
},
darkrai: {
randomBattleMoves: ["hypnosis", "darkpulse", "focusblast", "nastyplot", "substitute", "sludgebomb"],
randomDoubleBattleMoves: ["darkpulse", "focusblast", "nastyplot", "substitute", "snarl", "icebeam", "protect"],
eventPokemon: [
{"generation": 4, "level": 40, "shiny": 1, "moves":["quickattack", "hypnosis", "pursuit", "nightmare"]},
{"generation": 4, "level": 50, "moves":["roaroftime", "spacialrend", "nightmare", "hypnosis"], "pokeball": "cherishball"},
{"generation": 4, "level": 50, "moves":["darkvoid", "darkpulse", "shadowball", "doubleteam"]},
{"generation": 4, "level": 50, "shiny": 1, "moves":["hypnosis", "feintattack", "nightmare", "doubleteam"]},
{"generation": 5, "level": 50, "moves":["darkvoid", "ominouswind", "feintattack", "nightmare"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "moves":["darkvoid", "darkpulse", "phantomforce", "dreameater"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["darkvoid", "ominouswind", "nightmare", "feintattack"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
shaymin: {
randomBattleMoves: ["seedflare", "earthpower", "airslash", "psychic", "rest", "substitute", "leechseed"],
randomDoubleBattleMoves: ["seedflare", "earthpower", "airslash", "hiddenpowerfire", "rest", "substitute", "leechseed", "tailwind", "protect"],
eventPokemon: [
{"generation": 4, "level": 50, "moves":["seedflare", "aromatherapy", "substitute", "energyball"], "pokeball": "cherishball"},
{"generation": 4, "level": 30, "shiny": 1, "moves":["growth", "magicalleaf", "leechseed", "synthesis"]},
{"generation": 5, "level": 50, "moves":["seedflare", "leechseed", "synthesis", "sweetscent"], "pokeball": "cherishball"},
{"generation": 6, "level": 15, "moves":["growth", "magicalleaf", "seedflare", "airslash"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["seedflare", "aromatherapy", "substitute", "energyball"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "RU",
},
shayminsky: {
randomBattleMoves: ["seedflare", "earthpower", "airslash", "hiddenpowerfire", "substitute", "leechseed", "healingwish"],
randomDoubleBattleMoves: ["seedflare", "earthpower", "airslash", "hiddenpowerfire", "rest", "substitute", "leechseed", "tailwind", "protect", "hiddenpowerice"],
eventOnly: true,
tier: "Uber",
},
arceus: {
randomBattleMoves: ["swordsdance", "extremespeed", "shadowclaw", "earthquake", "recover"],
randomDoubleBattleMoves: ["swordsdance", "extremespeed", "shadowclaw", "earthquake", "recover", "protect"],
eventPokemon: [
{"generation": 4, "level": 100, "moves":["judgment", "roaroftime", "spacialrend", "shadowforce"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "moves":["recover", "hyperbeam", "perishsong", "judgment"]},
{"generation": 6, "level": 100, "shiny": 1, "moves":["judgment", "blastburn", "hydrocannon", "earthpower"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["judgment", "perishsong", "hyperbeam", "recover"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
arceusbug: {
randomBattleMoves: ["swordsdance", "xscissor", "stoneedge", "recover", "earthquake", "ironhead"],
randomDoubleBattleMoves: ["swordsdance", "xscissor", "stoneedge", "recover", "earthquake", "ironhead", "protect"],
eventOnly: true,
requiredItems: ["Insect Plate", "Buginium Z"],
},
arceusdark: {
randomBattleMoves: ["calmmind", "judgment", "recover", "fireblast", "thunderbolt"],
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "focusblast", "safeguard", "snarl", "willowisp", "protect"],
eventOnly: true,
requiredItems: ["Dread Plate", "Darkinium Z"],
},
arceusdragon: {
randomBattleMoves: ["swordsdance", "outrage", "extremespeed", "earthquake", "recover", "calmmind", "judgment", "fireblast", "earthpower"],
randomDoubleBattleMoves: ["swordsdance", "dragonclaw", "extremespeed", "earthquake", "recover", "protect"],
eventOnly: true,
requiredItems: ["Draco Plate", "Dragonium Z"],
},
arceuselectric: {
randomBattleMoves: ["calmmind", "judgment", "recover", "icebeam", "grassknot", "fireblast", "willowisp"],
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "icebeam", "protect"],
eventOnly: true,
requiredItems: ["Zap Plate", "Electrium Z"],
},
arceusfairy: {
randomBattleMoves: ["calmmind", "judgment", "recover", "willowisp", "defog", "thunderbolt", "toxic", "fireblast"],
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "willowisp", "protect", "earthpower", "thunderbolt"],
eventOnly: true,
requiredItems: ["Pixie Plate", "Fairium Z"],
},
arceusfighting: {
randomBattleMoves: ["calmmind", "judgment", "stoneedge", "shadowball", "recover", "toxic", "defog"],
randomDoubleBattleMoves: ["calmmind", "judgment", "icebeam", "shadowball", "recover", "willowisp", "protect"],
eventOnly: true,
requiredItems: ["Fist Plate", "Fightinium Z"],
},
arceusfire: {
randomBattleMoves: ["calmmind", "judgment", "grassknot", "thunderbolt", "icebeam", "recover"],
randomDoubleBattleMoves: ["calmmind", "judgment", "thunderbolt", "recover", "heatwave", "protect", "willowisp"],
eventOnly: true,
requiredItems: ["Flame Plate", "Firium Z"],
},
arceusflying: {
randomBattleMoves: ["calmmind", "judgment", "earthpower", "fireblast", "substitute", "recover"],
randomDoubleBattleMoves: ["calmmind", "judgment", "safeguard", "recover", "substitute", "tailwind", "protect"],
eventOnly: true,
requiredItems: ["Sky Plate", "Flyinium Z"],
},
arceusghost: {
randomBattleMoves: ["calmmind", "judgment", "focusblast", "recover", "swordsdance", "shadowforce", "brickbreak", "willowisp", "roar", "defog"],
randomDoubleBattleMoves: ["calmmind", "judgment", "focusblast", "recover", "swordsdance", "shadowforce", "brickbreak", "willowisp", "protect"],
eventOnly: true,
requiredItems: ["Spooky Plate", "Ghostium Z"],
},
arceusgrass: {
randomBattleMoves: ["judgment", "recover", "calmmind", "icebeam", "fireblast"],
randomDoubleBattleMoves: ["calmmind", "icebeam", "judgment", "earthpower", "recover", "safeguard", "thunderwave", "protect"],
eventOnly: true,
requiredItems: ["Meadow Plate", "Grassium Z"],
},
arceusground: {
randomBattleMoves: ["swordsdance", "earthquake", "stoneedge", "recover", "extremespeed", "icebeam"],
randomDoubleBattleMoves: ["swordsdance", "earthquake", "stoneedge", "recover", "calmmind", "judgment", "icebeam", "rockslide", "protect"],
eventOnly: true,
requiredItems: ["Earth Plate", "Groundium Z"],
},
arceusice: {
randomBattleMoves: ["calmmind", "judgment", "thunderbolt", "fireblast", "recover"],
randomDoubleBattleMoves: ["calmmind", "judgment", "thunderbolt", "focusblast", "recover", "protect", "icywind"],
eventOnly: true,
requiredItems: ["Icicle Plate", "Icium Z"],
},
arceuspoison: {
randomBattleMoves: ["calmmind", "sludgebomb", "fireblast", "recover", "willowisp", "defog", "thunderwave"],
randomDoubleBattleMoves: ["calmmind", "judgment", "sludgebomb", "heatwave", "recover", "willowisp", "protect", "earthpower"],
eventOnly: true,
requiredItems: ["Toxic Plate", "Poisonium Z"],
},
arceuspsychic: {
randomBattleMoves: ["judgment", "calmmind", "focusblast", "recover", "defog", "thunderbolt", "willowisp"],
randomDoubleBattleMoves: ["calmmind", "psyshock", "focusblast", "recover", "willowisp", "judgment", "protect"],
eventOnly: true,
requiredItems: ["Mind Plate", "Psychium Z"],
},
arceusrock: {
randomBattleMoves: ["recover", "swordsdance", "earthquake", "stoneedge", "extremespeed"],
randomDoubleBattleMoves: ["swordsdance", "stoneedge", "recover", "rockslide", "earthquake", "protect"],
eventOnly: true,
requiredItems: ["Stone Plate", "Rockium Z"],
},
arceussteel: {
randomBattleMoves: ["calmmind", "judgment", "recover", "willowisp", "thunderbolt", "swordsdance", "ironhead", "earthquake", "stoneedge"],
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "protect", "willowisp"],
eventOnly: true,
requiredItems: ["Iron Plate", "Steelium Z"],
},
arceuswater: {
randomBattleMoves: ["recover", "calmmind", "judgment", "substitute", "willowisp", "thunderbolt"],
randomDoubleBattleMoves: ["recover", "calmmind", "judgment", "icebeam", "fireblast", "icywind", "surf", "protect"],
eventOnly: true,
requiredItems: ["Splash Plate", "Waterium Z"],
},
victini: {
randomBattleMoves: ["vcreate", "boltstrike", "uturn", "zenheadbutt", "grassknot", "focusblast", "blueflare"],
randomDoubleBattleMoves: ["vcreate", "boltstrike", "uturn", "psychic", "focusblast", "blueflare", "protect"],
eventPokemon: [
{"generation": 5, "level": 15, "moves":["quickattack", "incinerate", "confusion", "endure"]},
{"generation": 5, "level": 50, "moves":["vcreate", "fusionflare", "fusionbolt", "searingshot"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "moves":["vcreate", "blueflare", "boltstrike", "glaciate"], "pokeball": "cherishball"},
{"generation": 6, "level": 15, "moves":["confusion", "quickattack", "vcreate", "searingshot"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["incinerate", "quickattack", "endure", "confusion"], "pokeball": "cherishball"},
{"generation": 6, "level": 15, "moves":["quickattack", "swagger", "vcreate"], "pokeball": "cherishball"},
{"generation": 7, "level": 15, "moves":["vcreate", "reversal", "storedpower", "celebrate"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "BL",
},
snivy: {
randomBattleMoves: ["leafstorm", "hiddenpowerfire", "substitute", "leechseed", "hiddenpowerice", "gigadrain"],
eventPokemon: [
{"generation": 5, "level": 5, "gender": "M", "nature": "Hardy", "isHidden": false, "moves":["growth", "synthesis", "energyball", "aromatherapy"], "pokeball": "cherishball"},
],
tier: "LC",
},
servine: {
randomBattleMoves: ["leafstorm", "hiddenpowerfire", "substitute", "leechseed", "hiddenpowerice", "gigadrain"],
tier: "NFE",
},
serperior: {
randomBattleMoves: ["leafstorm", "dragonpulse", "hiddenpowerfire", "substitute", "leechseed", "glare"],
randomDoubleBattleMoves: ["leafstorm", "hiddenpowerfire", "substitute", "taunt", "dragonpulse", "protect"],
eventPokemon: [
{"generation": 5, "level": 100, "gender": "M", "isHidden": false, "moves":["leafstorm", "substitute", "gigadrain", "leechseed"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "isHidden": true, "moves":["leafstorm", "holdback", "wringout", "gigadrain"], "pokeball": "cherishball"},
],
tier: "BL",
},
tepig: {
randomBattleMoves: ["flamecharge", "flareblitz", "wildcharge", "superpower", "headsmash"],
tier: "LC",
},
pignite: {
randomBattleMoves: ["flamecharge", "flareblitz", "wildcharge", "superpower", "headsmash"],
tier: "NFE",
},
emboar: {
randomBattleMoves: ["flareblitz", "superpower", "wildcharge", "stoneedge", "fireblast", "grassknot", "suckerpunch"],
randomDoubleBattleMoves: ["flareblitz", "superpower", "flamecharge", "wildcharge", "headsmash", "protect", "heatwave", "rockslide"],
eventPokemon: [
{"generation": 5, "level": 100, "gender": "M", "isHidden": false, "moves":["flareblitz", "hammerarm", "wildcharge", "headsmash"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "isHidden": true, "moves":["flareblitz", "holdback", "headsmash", "takedown"], "pokeball": "cherishball"},
],
tier: "NU",
},
oshawott: {
randomBattleMoves: ["swordsdance", "waterfall", "aquajet", "xscissor"],
tier: "LC",
},
dewott: {
randomBattleMoves: ["swordsdance", "waterfall", "aquajet", "xscissor"],
tier: "NFE",
},
samurott: {
randomBattleMoves: ["swordsdance", "waterfall", "aquajet", "megahorn", "superpower", "hydropump", "icebeam", "grassknot"],
randomDoubleBattleMoves: ["hydropump", "aquajet", "icebeam", "scald", "hiddenpowergrass", "taunt", "helpinghand", "protect"],
eventPokemon: [
{"generation": 5, "level": 100, "gender": "M", "isHidden": false, "moves":["hydropump", "icebeam", "megahorn", "superpower"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "isHidden": true, "moves":["razorshell", "holdback", "confide", "hydropump"], "pokeball": "cherishball"},
],
tier: "BL4",
},
patrat: {
randomBattleMoves: ["swordsdance", "batonpass", "substitute", "hypnosis", "return", "superfang"],
tier: "LC",
},
watchog: {
randomBattleMoves: ["hypnosis", "substitute", "batonpass", "superfang", "swordsdance", "return", "knockoff"],
randomDoubleBattleMoves: ["swordsdance", "knockoff", "substitute", "hypnosis", "return", "superfang", "protect"],
tier: "PU",
},
lillipup: {
randomBattleMoves: ["return", "wildcharge", "firefang", "crunch", "icefang"],
tier: "LC",
},
herdier: {
randomBattleMoves: ["return", "wildcharge", "firefang", "crunch", "icefang"],
tier: "NFE",
},
stoutland: {
randomBattleMoves: ["return", "crunch", "wildcharge", "superpower", "icefang"],
randomDoubleBattleMoves: ["return", "wildcharge", "superpower", "crunch", "icefang", "protect"],
tier: "PU",
},
purrloin: {
randomBattleMoves: ["encore", "taunt", "uturn", "knockoff", "thunderwave"],
tier: "LC",
},
liepard: {
randomBattleMoves: ["knockoff", "encore", "suckerpunch", "thunderwave", "uturn", "substitute", "nastyplot", "darkpulse", "copycat"],
randomDoubleBattleMoves: ["encore", "thunderwave", "substitute", "knockoff", "playrough", "uturn", "suckerpunch", "fakeout", "protect"],
eventPokemon: [
{"generation": 5, "level": 20, "gender": "F", "nature": "Jolly", "isHidden": true, "moves":["fakeout", "foulplay", "encore", "swagger"]},
],
tier: "PU",
},
pansage: {
randomBattleMoves: ["leafstorm", "hiddenpowerfire", "hiddenpowerice", "gigadrain", "nastyplot", "substitute", "leechseed"],
eventPokemon: [
{"generation": 5, "level": 1, "shiny": 1, "gender": "M", "nature": "Brave", "ivs": {"spa": 31}, "isHidden": false, "moves":["bulletseed", "bite", "solarbeam", "dig"]},
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["leer", "lick", "vinewhip", "leafstorm"]},
{"generation": 5, "level": 30, "gender": "M", "nature": "Serious", "isHidden": false, "moves":["seedbomb", "solarbeam", "rocktomb", "dig"], "pokeball": "cherishball"},
],
tier: "LC",
},
simisage: {
randomBattleMoves: ["nastyplot", "gigadrain", "focusblast", "hiddenpowerice", "substitute", "leafstorm", "knockoff", "superpower"],
randomDoubleBattleMoves: ["nastyplot", "leafstorm", "hiddenpowerfire", "hiddenpowerice", "gigadrain", "focusblast", "substitute", "taunt", "synthesis", "helpinghand", "protect"],
tier: "PU",
},
pansear: {
randomBattleMoves: ["nastyplot", "fireblast", "hiddenpowerelectric", "hiddenpowerground", "sunnyday", "solarbeam", "overheat"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["leer", "lick", "incinerate", "heatwave"]},
],
tier: "LC",
},
simisear: {
randomBattleMoves: ["substitute", "nastyplot", "fireblast", "focusblast", "grassknot", "hiddenpowerrock"],
randomDoubleBattleMoves: ["nastyplot", "fireblast", "focusblast", "grassknot", "hiddenpowerground", "substitute", "heatwave", "taunt", "protect"],
eventPokemon: [
{"generation": 6, "level": 5, "perfectIVs": 2, "isHidden": false, "moves":["workup", "honeclaws", "poweruppunch", "gigaimpact"], "pokeball": "cherishball"},
],
tier: "PU",
},
panpour: {
randomBattleMoves: ["nastyplot", "hydropump", "hiddenpowergrass", "substitute", "surf", "icebeam"],
eventPokemon: [
{"generation": 5, "level": 10, "gender": "M", "isHidden": true, "moves":["leer", "lick", "watergun", "hydropump"]},
],
tier: "LC",
},
simipour: {
randomBattleMoves: ["substitute", "nastyplot", "hydropump", "icebeam", "focusblast"],
randomDoubleBattleMoves: ["nastyplot", "hydropump", "icebeam", "substitute", "surf", "taunt", "helpinghand", "protect"],
tier: "PU",
},
munna: {
randomBattleMoves: ["psychic", "hiddenpowerfighting", "hypnosis", "calmmind", "moonlight", "thunderwave", "batonpass", "psyshock", "healbell", "signalbeam"],
tier: "LC",
},
musharna: {
randomBattleMoves: ["calmmind", "psychic", "psyshock", "signalbeam", "batonpass", "moonlight", "healbell", "thunderwave"],
randomDoubleBattleMoves: ["trickroom", "thunderwave", "moonlight", "psychic", "hiddenpowerfighting", "helpinghand", "psyshock", "hypnosis", "signalbeam", "protect"],
eventPokemon: [
{"generation": 5, "level": 50, "isHidden": true, "moves":["defensecurl", "luckychant", "psybeam", "hypnosis"]},
],
tier: "PU",
},
pidove: {
randomBattleMoves: ["pluck", "uturn", "return", "detect", "roost", "wish"],
eventPokemon: [
{"generation": 5, "level": 1, "shiny": 1, "gender": "F", "nature": "Hardy", "ivs": {"atk": 31}, "isHidden": false, "abilities":["superluck"], "moves":["gust", "quickattack", "aircutter"]},
],
tier: "LC",
},
tranquill: {
randomBattleMoves: ["pluck", "uturn", "return", "detect", "roost", "wish"],
tier: "NFE",
},
unfezant: {
randomBattleMoves: ["return", "pluck", "hypnosis", "tailwind", "uturn", "roost", "nightslash"],
randomDoubleBattleMoves: ["pluck", "uturn", "return", "protect", "tailwind", "taunt", "roost", "nightslash"],
tier: "PU",
},
blitzle: {
randomBattleMoves: ["voltswitch", "hiddenpowergrass", "wildcharge", "mefirst"],
tier: "LC",
},
zebstrika: {
randomBattleMoves: ["voltswitch", "hiddenpowergrass", "overheat", "wildcharge", "thunderbolt"],
randomDoubleBattleMoves: ["voltswitch", "hiddenpowergrass", "overheat", "wildcharge", "protect"],
tier: "PU",
},
roggenrola: {
randomBattleMoves: ["autotomize", "stoneedge", "stealthrock", "rockblast", "earthquake", "explosion"],
tier: "LC",
},
boldore: {
randomBattleMoves: ["autotomize", "stoneedge", "stealthrock", "rockblast", "earthquake", "explosion"],
tier: "NFE",
},
gigalith: {
randomBattleMoves: ["stealthrock", "rockblast", "earthquake", "explosion", "stoneedge", "superpower"],
randomDoubleBattleMoves: ["stealthrock", "rockslide", "earthquake", "explosion", "stoneedge", "autotomize", "superpower", "wideguard", "protect"],
tier: "RU",
},
woobat: {
randomBattleMoves: ["calmmind", "psychic", "airslash", "gigadrain", "roost", "heatwave", "storedpower"],
tier: "LC",
},
swoobat: {
randomBattleMoves: ["substitute", "calmmind", "storedpower", "heatwave", "psychic", "airslash", "roost"],
randomDoubleBattleMoves: ["calmmind", "psychic", "airslash", "gigadrain", "protect", "heatwave", "tailwind"],
tier: "PU",
},
drilbur: {
randomBattleMoves: ["swordsdance", "rapidspin", "earthquake", "rockslide", "shadowclaw", "return", "xscissor"],
tier: "LC",
},
excadrill: {
randomBattleMoves: ["swordsdance", "earthquake", "ironhead", "rockslide", "rapidspin"],
randomDoubleBattleMoves: ["swordsdance", "drillrun", "earthquake", "rockslide", "ironhead", "substitute", "protect"],
tier: "OU",
},
audino: {
randomBattleMoves: ["wish", "protect", "healbell", "toxic", "thunderwave", "reflect", "lightscreen", "doubleedge"],
randomDoubleBattleMoves: ["healpulse", "protect", "healbell", "trickroom", "thunderwave", "reflect", "lightscreen", "doubleedge", "helpinghand", "hypervoice"],
eventPokemon: [
{"generation": 5, "level": 30, "gender": "F", "nature": "Calm", "isHidden": false, "abilities":["healer"], "moves":["healpulse", "helpinghand", "refresh", "doubleslap"], "pokeball": "cherishball"},
{"generation": 5, "level": 30, "gender": "F", "nature": "Serious", "isHidden": false, "abilities":["healer"], "moves":["healpulse", "helpinghand", "refresh", "present"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "nature": "Relaxed", "isHidden": false, "abilities":["regenerator"], "moves":["trickroom", "healpulse", "simplebeam", "thunderbolt"], "pokeball": "cherishball"},
],
tier: "PU",
},
audinomega: {
randomBattleMoves: ["wish", "calmmind", "healbell", "dazzlinggleam", "hypervoice", "protect", "fireblast"],
randomDoubleBattleMoves: ["healpulse", "protect", "healbell", "trickroom", "thunderwave", "hypervoice", "helpinghand", "dazzlinggleam"],
requiredItem: "Audinite",
tier: "NU",
},
timburr: {
randomBattleMoves: ["machpunch", "bulkup", "drainpunch", "icepunch", "knockoff"],
tier: "LC",
},
gurdurr: {
randomBattleMoves: ["bulkup", "machpunch", "drainpunch", "icepunch", "knockoff"],
tier: "NFE",
},
conkeldurr: {
randomBattleMoves: ["bulkup", "drainpunch", "icepunch", "knockoff", "machpunch"],
randomDoubleBattleMoves: ["wideguard", "machpunch", "drainpunch", "icepunch", "knockoff", "protect"],
tier: "BL",
},
tympole: {
randomBattleMoves: ["hydropump", "surf", "sludgewave", "earthpower", "hiddenpowerelectric"],
tier: "LC",
},
palpitoad: {
randomBattleMoves: ["hydropump", "surf", "sludgewave", "earthpower", "hiddenpowerelectric", "stealthrock"],
tier: "NFE",
},
seismitoad: {
randomBattleMoves: ["hydropump", "scald", "sludgewave", "earthquake", "knockoff", "stealthrock", "toxic", "raindance"],
randomDoubleBattleMoves: ["hydropump", "muddywater", "sludgebomb", "earthquake", "hiddenpowerelectric", "icywind", "protect"],
tier: "NU",
},
throh: {
randomBattleMoves: ["bulkup", "circlethrow", "icepunch", "stormthrow", "rest", "sleeptalk", "knockoff"],
randomDoubleBattleMoves: ["helpinghand", "circlethrow", "icepunch", "stormthrow", "wideguard", "knockoff", "protect"],
tier: "PU",
},
sawk: {
randomBattleMoves: ["closecombat", "earthquake", "icepunch", "poisonjab", "bulkup", "knockoff"],
randomDoubleBattleMoves: ["closecombat", "knockoff", "icepunch", "rockslide", "protect"],
tier: "BL4",
},
sewaddle: {
randomBattleMoves: ["calmmind", "gigadrain", "bugbuzz", "hiddenpowerfire", "hiddenpowerice", "airslash"],
tier: "LC",
},
swadloon: {
randomBattleMoves: ["calmmind", "gigadrain", "bugbuzz", "hiddenpowerfire", "hiddenpowerice", "airslash", "stickyweb"],
tier: "NFE",
},
leavanny: {
randomBattleMoves: ["stickyweb", "swordsdance", "leafblade", "xscissor", "knockoff", "batonpass"],
randomDoubleBattleMoves: ["swordsdance", "leafblade", "xscissor", "protect", "stickyweb", "poisonjab"],
tier: "PU",
},
venipede: {
randomBattleMoves: ["toxicspikes", "infestation", "spikes", "endeavor", "protect"],
tier: "LC",
},
whirlipede: {
randomBattleMoves: ["toxicspikes", "infestation", "spikes", "endeavor", "protect"],
tier: "NFE",
},
scolipede: {
randomBattleMoves: ["substitute", "spikes", "toxicspikes", "megahorn", "rockslide", "earthquake", "swordsdance", "batonpass", "poisonjab"],
randomDoubleBattleMoves: ["substitute", "protect", "megahorn", "rockslide", "poisonjab", "swordsdance", "batonpass", "aquatail", "superpower"],
tier: "BL",
},
cottonee: {
randomBattleMoves: ["encore", "taunt", "substitute", "leechseed", "toxic", "stunspore"],
tier: "LC",
},
whimsicott: {
randomBattleMoves: ["encore", "taunt", "substitute", "leechseed", "uturn", "toxic", "stunspore", "memento", "tailwind", "moonblast"],
randomDoubleBattleMoves: ["encore", "taunt", "substitute", "leechseed", "uturn", "helpinghand", "stunspore", "moonblast", "tailwind", "dazzlinggleam", "gigadrain", "protect"],
eventPokemon: [
{"generation": 5, "level": 50, "gender": "F", "nature": "Timid", "ivs": {"spe": 31}, "isHidden": false, "abilities":["prankster"], "moves":["swagger", "gigadrain", "beatup", "helpinghand"], "pokeball": "cherishball"},
],
tier: "NU",
},
petilil: {
randomBattleMoves: ["sunnyday", "sleeppowder", "solarbeam", "hiddenpowerfire", "hiddenpowerice", "healingwish"],
tier: "LC",
},
lilligant: {
randomBattleMoves: ["sleeppowder", "quiverdance", "petaldance", "gigadrain", "hiddenpowerfire", "hiddenpowerrock"],
randomDoubleBattleMoves: ["quiverdance", "gigadrain", "sleeppowder", "hiddenpowerice", "hiddenpowerfire", "hiddenpowerrock", "petaldance", "helpinghand", "protect"],
tier: "PU",
},
basculin: {
randomBattleMoves: ["waterfall", "aquajet", "superpower", "crunch", "headsmash"],
randomDoubleBattleMoves: ["waterfall", "aquajet", "superpower", "crunch", "doubleedge", "protect"],
tier: "PU",
},
basculinbluestriped: {
randomBattleMoves: ["waterfall", "aquajet", "superpower", "crunch", "headsmash"],
randomDoubleBattleMoves: ["waterfall", "aquajet", "superpower", "crunch", "doubleedge", "protect"],
tier: "PU",
},
sandile: {
randomBattleMoves: ["earthquake", "stoneedge", "pursuit", "crunch"],
tier: "LC",
},
krokorok: {
randomBattleMoves: ["earthquake", "stoneedge", "pursuit", "crunch"],
tier: "NFE",
},
krookodile: {
randomBattleMoves: ["earthquake", "stoneedge", "pursuit", "knockoff", "stealthrock", "superpower"],
randomDoubleBattleMoves: ["earthquake", "stoneedge", "protect", "knockoff", "superpower"],
tier: "UU",
},
darumaka: {
randomBattleMoves: ["uturn", "flareblitz", "firepunch", "rockslide", "superpower"],
tier: "LC",
},
darmanitan: {
randomBattleMoves: ["uturn", "flareblitz", "rockslide", "earthquake", "superpower"],
randomDoubleBattleMoves: ["uturn", "flareblitz", "firepunch", "rockslide", "earthquake", "superpower", "protect"],
eventPokemon: [
{"generation": 5, "level": 35, "isHidden": true, "moves":["thrash", "bellydrum", "flareblitz", "hammerarm"]},
{"generation": 6, "level": 35, "gender": "M", "nature": "Calm", "ivs": {"hp": 30, "atk": 30, "def": 30, "spa": 30, "spd": 30, "spe": 30}, "isHidden": true, "moves":["thrash", "bellydrum", "flareblitz", "hammerarm"], "pokeball": "cherishball"},
],
tier: "UU",
},
darmanitanzen: {
requiredAbility: "Zen Mode",
battleOnly: true,
},
maractus: {
randomBattleMoves: ["spikes", "gigadrain", "leechseed", "hiddenpowerfire", "toxic", "suckerpunch", "spikyshield"],
randomDoubleBattleMoves: ["grassyterrain", "gigadrain", "leechseed", "hiddenpowerfire", "helpinghand", "suckerpunch", "spikyshield"],
tier: "PU",
},
dwebble: {
randomBattleMoves: ["stealthrock", "spikes", "shellsmash", "earthquake", "rockblast", "xscissor", "stoneedge"],
tier: "LC",
},
crustle: {
randomBattleMoves: ["stealthrock", "spikes", "shellsmash", "earthquake", "rockblast", "xscissor", "stoneedge"],
randomDoubleBattleMoves: ["protect", "shellsmash", "earthquake", "rockslide", "xscissor", "stoneedge"],
tier: "PU",
},
scraggy: {
randomBattleMoves: ["dragondance", "icepunch", "highjumpkick", "drainpunch", "rest", "bulkup", "crunch", "knockoff"],
eventPokemon: [
{"generation": 5, "level": 1, "gender": "M", "nature": "Adamant", "isHidden": false, "abilities":["moxie"], "moves":["headbutt", "leer", "highjumpkick", "lowkick"], "pokeball": "cherishball"},
],
tier: "LC",
},
scrafty: {
randomBattleMoves: ["dragondance", "icepunch", "highjumpkick", "drainpunch", "rest", "bulkup", "knockoff"],
randomDoubleBattleMoves: ["fakeout", "drainpunch", "knockoff", "icepunch", "stoneedge", "protect"],
eventPokemon: [
{"generation": 5, "level": 50, "gender": "M", "nature": "Brave", "isHidden": false, "abilities":["moxie"], "moves":["firepunch", "payback", "drainpunch", "substitute"], "pokeball": "cherishball"},
],
tier: "NU",
},
sigilyph: {
randomBattleMoves: ["cosmicpower", "roost", "storedpower", "psychoshift"],
randomDoubleBattleMoves: ["psyshock", "heatwave", "icebeam", "airslash", "energyball", "shadowball", "tailwind", "protect"],
tier: "NU",
},
yamask: {
randomBattleMoves: ["nastyplot", "trickroom", "shadowball", "hiddenpowerfighting", "willowisp", "haze", "rest", "sleeptalk", "painsplit"],
tier: "LC",
},
cofagrigus: {
randomBattleMoves: ["nastyplot", "trickroom", "shadowball", "hiddenpowerfighting", "willowisp", "haze", "painsplit"],
randomDoubleBattleMoves: ["nastyplot", "trickroom", "shadowball", "hiddenpowerfighting", "willowisp", "protect", "painsplit"],
tier: "BL3",
},
tirtouga: {
randomBattleMoves: ["shellsmash", "aquajet", "waterfall", "stoneedge", "earthquake", "stealthrock"],
eventPokemon: [
{"generation": 5, "level": 15, "gender": "M", "isHidden": false, "abilities":["sturdy"], "moves":["bite", "protect", "aquajet", "bodyslam"], "pokeball": "cherishball"},
],
tier: "LC",
},
carracosta: {
randomBattleMoves: ["shellsmash", "aquajet", "liquidation", "stoneedge", "earthquake", "stealthrock"],
randomDoubleBattleMoves: ["shellsmash", "aquajet", "waterfall", "stoneedge", "earthquake", "protect", "wideguard", "rockslide"],
tier: "PU",
},
archen: {
randomBattleMoves: ["stoneedge", "rockslide", "earthquake", "uturn", "pluck", "headsmash"],
eventPokemon: [
{"generation": 5, "level": 15, "gender": "M", "moves":["headsmash", "wingattack", "doubleteam", "scaryface"], "pokeball": "cherishball"},
],
tier: "LC",
},
archeops: {
randomBattleMoves: ["headsmash", "acrobatics", "stoneedge", "earthquake", "aquatail", "uturn", "tailwind"],
randomDoubleBattleMoves: ["stoneedge", "rockslide", "earthquake", "uturn", "acrobatics", "tailwind", "taunt", "protect"],
tier: "PU",
},
trubbish: {
randomBattleMoves: ["clearsmog", "toxicspikes", "spikes", "gunkshot", "painsplit", "toxic"],
tier: "LC",
},
garbodor: {
randomBattleMoves: ["spikes", "toxicspikes", "gunkshot", "haze", "painsplit", "toxic", "drainpunch"],
randomDoubleBattleMoves: ["protect", "painsplit", "gunkshot", "seedbomb", "drainpunch", "explosion", "rockblast"],
tier: "NU",
},
zorua: {
randomBattleMoves: ["suckerpunch", "extrasensory", "darkpulse", "hiddenpowerfighting", "uturn", "knockoff"],
tier: "LC",
},
zoroark: {
randomBattleMoves: ["suckerpunch", "darkpulse", "focusblast", "flamethrower", "uturn", "nastyplot", "knockoff", "trick", "sludgebomb"],
randomDoubleBattleMoves: ["suckerpunch", "darkpulse", "focusblast", "flamethrower", "uturn", "nastyplot", "knockoff", "protect"],
eventPokemon: [
{"generation": 5, "level": 50, "gender": "M", "nature": "Quirky", "moves":["agility", "embargo", "punishment", "snarl"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "moves":["sludgebomb", "darkpulse", "flamethrower", "suckerpunch"], "pokeball": "ultraball"},
],
tier: "RU",
},
minccino: {
randomBattleMoves: ["return", "tailslap", "wakeupslap", "uturn", "aquatail"],
tier: "LC",
},
cinccino: {
randomBattleMoves: ["tailslap", "aquatail", "uturn", "knockoff", "bulletseed", "rockblast"],
randomDoubleBattleMoves: ["tailslap", "aquatail", "uturn", "knockoff", "bulletseed", "rockblast", "protect"],
tier: "NU",
},
gothita: {
randomBattleMoves: ["psychic", "thunderbolt", "hiddenpowerfighting", "shadowball", "substitute", "calmmind", "trick", "grassknot"],
tier: "LC Uber",
},
gothorita: {
randomBattleMoves: ["psychic", "psyshock", "thunderbolt", "hiddenpowerfighting", "shadowball", "substitute", "calmmind", "trick", "grassknot"],
eventPokemon: [
{"generation": 5, "level": 32, "gender": "M", "isHidden": true, "moves":["psyshock", "flatter", "futuresight", "mirrorcoat"]},
{"generation": 5, "level": 32, "gender": "M", "isHidden": true, "moves":["psyshock", "flatter", "futuresight", "imprison"]},
],
tier: "NFE",
},
gothitelle: {
randomBattleMoves: ["psychic", "thunderbolt", "shadowball", "hiddenpowerfire", "hiddenpowerfighting", "substitute", "calmmind", "trick", "psyshock"],
randomDoubleBattleMoves: ["psychic", "thunderbolt", "shadowball", "hiddenpowerfighting", "reflect", "lightscreen", "psyshock", "energyball", "trickroom", "taunt", "healpulse", "protect"],
tier: "PU",
},
solosis: {
randomBattleMoves: ["calmmind", "recover", "psychic", "hiddenpowerfighting", "shadowball", "trickroom", "psyshock"],
tier: "LC",
},
duosion: {
randomBattleMoves: ["calmmind", "recover", "psychic", "hiddenpowerfighting", "shadowball", "trickroom", "psyshock"],
tier: "NFE",
},
reuniclus: {
randomBattleMoves: ["calmmind", "recover", "psychic", "focusblast", "shadowball", "trickroom", "psyshock"],
randomDoubleBattleMoves: ["energyball", "helpinghand", "psychic", "focusblast", "shadowball", "trickroom", "psyshock", "hiddenpowerfire", "protect"],
tier: "BL2",
},
ducklett: {
randomBattleMoves: ["scald", "airslash", "roost", "hurricane", "icebeam", "hiddenpowergrass", "bravebird", "defog"],
tier: "LC",
},
swanna: {
randomBattleMoves: ["airslash", "roost", "hurricane", "icebeam", "raindance", "defog", "scald"],
randomDoubleBattleMoves: ["airslash", "roost", "hurricane", "surf", "icebeam", "raindance", "tailwind", "scald", "protect"],
tier: "PU",
},
vanillite: {
randomBattleMoves: ["icebeam", "explosion", "hiddenpowerelectric", "hiddenpowerfighting", "autotomize"],
tier: "LC",
},
vanillish: {
randomBattleMoves: ["icebeam", "explosion", "hiddenpowerelectric", "hiddenpowerfighting", "autotomize"],
tier: "NFE",
},
vanilluxe: {
randomBattleMoves: ["blizzard", "explosion", "hiddenpowerground", "flashcannon", "autotomize", "freezedry"],
randomDoubleBattleMoves: ["blizzard", "taunt", "hiddenpowerground", "flashcannon", "autotomize", "protect", "freezedry"],
tier: "NU",
},
deerling: {
randomBattleMoves: ["agility", "batonpass", "seedbomb", "jumpkick", "synthesis", "return", "thunderwave"],
eventPokemon: [
{"generation": 5, "level": 30, "gender": "F", "isHidden": true, "moves":["feintattack", "takedown", "jumpkick", "aromatherapy"]},
],
tier: "LC",
},
sawsbuck: {
randomBattleMoves: ["swordsdance", "hornleech", "jumpkick", "return", "substitute", "batonpass"],
randomDoubleBattleMoves: ["swordsdance", "hornleech", "jumpkick", "return", "substitute", "synthesis", "protect"],
tier: "PU",
},
emolga: {
randomBattleMoves: ["encore", "chargebeam", "batonpass", "substitute", "thunderbolt", "airslash", "roost"],
randomDoubleBattleMoves: ["helpinghand", "tailwind", "encore", "substitute", "thunderbolt", "airslash", "roost", "protect"],
tier: "PU",
},
karrablast: {
randomBattleMoves: ["swordsdance", "megahorn", "return", "substitute"],
eventPokemon: [
{"generation": 5, "level": 30, "isHidden": false, "moves":["furyattack", "headbutt", "falseswipe", "bugbuzz"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "isHidden": false, "moves":["megahorn", "takedown", "xscissor", "flail"], "pokeball": "cherishball"},
],
tier: "LC",
},
escavalier: {
randomBattleMoves: ["megahorn", "pursuit", "ironhead", "knockoff", "swordsdance", "drillrun"],
randomDoubleBattleMoves: ["megahorn", "protect", "ironhead", "knockoff", "swordsdance", "drillrun"],
tier: "RU",
},
foongus: {
randomBattleMoves: ["spore", "stunspore", "gigadrain", "clearsmog", "hiddenpowerfire", "synthesis", "sludgebomb"],
tier: "LC",
},
amoonguss: {
randomBattleMoves: ["spore", "stunspore", "gigadrain", "clearsmog", "hiddenpowerfire", "synthesis", "sludgebomb", "foulplay"],
randomDoubleBattleMoves: ["spore", "stunspore", "gigadrain", "ragepowder", "hiddenpowerfire", "synthesis", "sludgebomb", "protect"],
tier: "UU",
},
frillish: {
randomBattleMoves: ["scald", "willowisp", "recover", "toxic", "shadowball", "taunt"],
tier: "LC",
},
jellicent: {
randomBattleMoves: ["scald", "willowisp", "recover", "toxic", "shadowball", "icebeam", "taunt"],
randomDoubleBattleMoves: ["scald", "willowisp", "recover", "trickroom", "shadowball", "icebeam", "waterspout", "icywind", "protect"],
eventPokemon: [
{"generation": 5, "level": 40, "isHidden": true, "moves":["waterpulse", "ominouswind", "brine", "raindance"]},
],
tier: "NU",
},
alomomola: {
randomBattleMoves: ["wish", "protect", "knockoff", "toxic", "scald"],
randomDoubleBattleMoves: ["wish", "protect", "knockoff", "icywind", "scald", "helpinghand", "wideguard"],
tier: "UU",
},
joltik: {
randomBattleMoves: ["thunderbolt", "bugbuzz", "hiddenpowerice", "gigadrain", "voltswitch"],
tier: "LC",
},
galvantula: {
randomBattleMoves: ["thunder", "hiddenpowerice", "gigadrain", "bugbuzz", "voltswitch", "stickyweb"],
randomDoubleBattleMoves: ["thunder", "hiddenpowerice", "gigadrain", "bugbuzz", "voltswitch", "stickyweb", "protect"],
tier: "RU",
},
ferroseed: {
randomBattleMoves: ["spikes", "stealthrock", "leechseed", "seedbomb", "protect", "thunderwave", "gyroball"],
tier: "LC",
},
ferrothorn: {
randomBattleMoves: ["spikes", "stealthrock", "leechseed", "powerwhip", "protect", "knockoff", "gyroball"],
randomDoubleBattleMoves: ["gyroball", "stealthrock", "leechseed", "powerwhip", "knockoff", "protect"],
tier: "OU",
},
klink: {
randomBattleMoves: ["shiftgear", "return", "geargrind", "wildcharge", "substitute"],
tier: "LC",
},
klang: {
randomBattleMoves: ["shiftgear", "return", "geargrind", "wildcharge", "substitute"],
tier: "NFE",
},
klinklang: {
randomBattleMoves: ["shiftgear", "return", "geargrind", "wildcharge", "substitute"],
randomDoubleBattleMoves: ["shiftgear", "return", "geargrind", "wildcharge", "protect"],
tier: "BL4",
},
tynamo: {
randomBattleMoves: ["spark", "chargebeam", "thunderwave", "tackle"],
tier: "LC",
},
eelektrik: {
randomBattleMoves: ["uturn", "voltswitch", "acidspray", "wildcharge", "thunderbolt", "gigadrain", "aquatail", "coil"],
tier: "NFE",
},
eelektross: {
randomBattleMoves: ["thunderbolt", "flamethrower", "uturn", "voltswitch", "acidspray", "gigadrain", "knockoff", "superpower", "aquatail"],
randomDoubleBattleMoves: ["thunderbolt", "flamethrower", "uturn", "voltswitch", "knockoff", "gigadrain", "protect"],
tier: "PU",
},
elgyem: {
randomBattleMoves: ["nastyplot", "psychic", "thunderbolt", "hiddenpowerfighting", "recover", "trickroom", "signalbeam"],
tier: "LC",
},
beheeyem: {
randomBattleMoves: ["nastyplot", "psychic", "psyshock", "thunderbolt", "hiddenpowerfighting", "trick", "trickroom", "signalbeam"],
randomDoubleBattleMoves: ["nastyplot", "psychic", "thunderbolt", "hiddenpowerfighting", "recover", "trick", "trickroom", "signalbeam", "protect"],
tier: "PU",
},
litwick: {
randomBattleMoves: ["shadowball", "energyball", "fireblast", "hiddenpowerground", "trickroom", "substitute", "painsplit"],
tier: "LC",
},
lampent: {
randomBattleMoves: ["calmmind", "shadowball", "energyball", "fireblast", "hiddenpowerground", "substitute", "painsplit"],
tier: "NFE",
},
chandelure: {
randomBattleMoves: ["calmmind", "shadowball", "energyball", "fireblast", "hiddenpowerground", "trick", "substitute", "painsplit"],
randomDoubleBattleMoves: ["shadowball", "energyball", "overheat", "heatwave", "hiddenpowerice", "trick", "protect"],
eventPokemon: [
{"generation": 5, "level": 50, "gender": "F", "nature": "Modest", "ivs": {"spa": 31}, "isHidden": false, "abilities":["flashfire"], "moves":["heatwave", "shadowball", "energyball", "psychic"], "pokeball": "cherishball"},
],
tier: "UU",
},
axew: {
randomBattleMoves: ["dragondance", "outrage", "dragonclaw", "swordsdance", "aquatail", "superpower", "poisonjab", "taunt", "substitute"],
eventPokemon: [
{"generation": 5, "level": 1, "shiny": 1, "gender": "M", "nature": "Naive", "ivs": {"spe": 31}, "isHidden": false, "abilities":["moldbreaker"], "moves":["scratch", "dragonrage"]},
{"generation": 5, "level": 10, "gender": "F", "isHidden": false, "abilities":["moldbreaker"], "moves":["dragonrage", "return", "endure", "dragonclaw"], "pokeball": "cherishball"},
{"generation": 5, "level": 30, "gender": "M", "nature": "Naive", "isHidden": false, "abilities":["rivalry"], "moves":["dragonrage", "scratch", "outrage", "gigaimpact"], "pokeball": "cherishball"},
],
tier: "LC",
},
fraxure: {
randomBattleMoves: ["dragondance", "swordsdance", "outrage", "dragonclaw", "aquatail", "superpower", "poisonjab", "taunt", "substitute"],
tier: "NFE",
},
haxorus: {
randomBattleMoves: ["dragondance", "swordsdance", "outrage", "dragonclaw", "earthquake", "poisonjab", "taunt", "substitute"],
randomDoubleBattleMoves: ["dragondance", "swordsdance", "protect", "dragonclaw", "earthquake", "poisonjab", "taunt", "substitute"],
eventPokemon: [
{"generation": 5, "level": 59, "gender": "F", "nature": "Naive", "ivs": {"hp": 30, "atk": 30, "def": 30, "spa": 30, "spd": 30, "spe": 30}, "isHidden": false, "abilities":["moldbreaker"], "moves":["earthquake", "dualchop", "xscissor", "dragondance"], "pokeball": "cherishball"},
],
tier: "UU",
},
cubchoo: {
randomBattleMoves: ["icebeam", "surf", "hiddenpowergrass", "superpower"],
eventPokemon: [
{"generation": 5, "level": 15, "isHidden": false, "moves":["powdersnow", "growl", "bide", "icywind"], "pokeball": "cherishball"},
],
tier: "LC",
},
beartic: {
randomBattleMoves: ["iciclecrash", "superpower", "nightslash", "stoneedge", "swordsdance", "aquajet"],
randomDoubleBattleMoves: ["iciclecrash", "superpower", "nightslash", "stoneedge", "swordsdance", "aquajet", "protect"],
tier: "PU",
},
cryogonal: {
randomBattleMoves: ["icebeam", "recover", "toxic", "rapidspin", "haze", "freezedry", "hiddenpowerground"],
randomDoubleBattleMoves: ["icebeam", "recover", "icywind", "protect", "reflect", "freezedry", "hiddenpowerground"],
tier: "NU",
},
shelmet: {
randomBattleMoves: ["spikes", "yawn", "substitute", "acidarmor", "batonpass", "recover", "toxic", "bugbuzz", "infestation"],
eventPokemon: [
{"generation": 5, "level": 30, "isHidden": false, "moves":["strugglebug", "megadrain", "yawn", "protect"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "isHidden": false, "moves":["encore", "gigadrain", "bodyslam", "bugbuzz"], "pokeball": "cherishball"},
],
tier: "LC",
},
accelgor: {
randomBattleMoves: ["spikes", "yawn", "bugbuzz", "focusblast", "gigadrain", "hiddenpowerrock", "encore"],
randomDoubleBattleMoves: ["protect", "yawn", "bugbuzz", "focusblast", "gigadrain", "hiddenpowerrock", "encore", "sludgebomb"],
tier: "NU",
},
stunfisk: {
randomBattleMoves: ["discharge", "earthpower", "scald", "toxic", "rest", "sleeptalk", "stealthrock"],
randomDoubleBattleMoves: ["discharge", "earthpower", "scald", "electroweb", "protect", "stealthrock"],
tier: "PU",
},
mienfoo: {
randomBattleMoves: ["uturn", "drainpunch", "stoneedge", "swordsdance", "batonpass", "highjumpkick", "fakeout", "knockoff"],
tier: "LC",
},
mienshao: {
randomBattleMoves: ["uturn", "fakeout", "highjumpkick", "stoneedge", "substitute", "swordsdance", "batonpass", "knockoff"],
randomDoubleBattleMoves: ["uturn", "fakeout", "highjumpkick", "stoneedge", "drainpunch", "swordsdance", "wideguard", "knockoff", "feint", "protect"],
tier: "UU",
},
druddigon: {
randomBattleMoves: ["outrage", "earthquake", "suckerpunch", "dragonclaw", "dragontail", "substitute", "glare", "stealthrock", "firepunch", "gunkshot"],
randomDoubleBattleMoves: ["superpower", "earthquake", "suckerpunch", "dragonclaw", "glare", "protect", "firepunch", "thunderpunch"],
eventPokemon: [
{"generation": 5, "level": 1, "shiny": true, "isHidden": false, "moves":["leer", "scratch"]},
],
tier: "NU",
},
golett: {
randomBattleMoves: ["earthquake", "shadowpunch", "dynamicpunch", "icepunch", "stealthrock", "rockpolish"],
tier: "LC",
},
golurk: {
randomBattleMoves: ["earthquake", "shadowpunch", "dynamicpunch", "icepunch", "stealthrock", "rockpolish"],
randomDoubleBattleMoves: ["earthquake", "shadowpunch", "dynamicpunch", "icepunch", "stoneedge", "protect", "rockpolish"],
eventPokemon: [
{"generation": 5, "level": 70, "shiny": true, "isHidden": false, "abilities":["ironfist"], "moves":["shadowpunch", "hyperbeam", "gyroball", "hammerarm"], "pokeball": "cherishball"},
],
tier: "PU",
},
pawniard: {
randomBattleMoves: ["swordsdance", "substitute", "suckerpunch", "ironhead", "brickbreak", "knockoff"],
tier: "LC",
},
bisharp: {
randomBattleMoves: ["swordsdance", "substitute", "suckerpunch", "ironhead", "brickbreak", "knockoff"],
randomDoubleBattleMoves: ["swordsdance", "substitute", "suckerpunch", "ironhead", "brickbreak", "knockoff", "protect"],
tier: "OU",
},
bouffalant: {
randomBattleMoves: ["headcharge", "earthquake", "stoneedge", "megahorn", "swordsdance", "superpower"],
randomDoubleBattleMoves: ["headcharge", "earthquake", "stoneedge", "megahorn", "swordsdance", "superpower", "protect"],
eventPokemon: [
{"generation": 6, "level": 50, "nature": "Adamant", "ivs": {"hp": 31, "atk": 31}, "isHidden": true, "moves":["headcharge", "facade", "earthquake", "rockslide"], "pokeball": "cherishball"},
],
tier: "PU",
},
rufflet: {
randomBattleMoves: ["bravebird", "rockslide", "return", "uturn", "substitute", "bulkup", "roost"],
tier: "LC",
},
braviary: {
randomBattleMoves: ["bravebird", "superpower", "return", "uturn", "substitute", "rockslide", "bulkup", "roost"],
randomDoubleBattleMoves: ["bravebird", "superpower", "return", "uturn", "tailwind", "rockslide", "bulkup", "roost", "skydrop", "protect"],
eventPokemon: [
{"generation": 5, "level": 25, "gender": "M", "isHidden": true, "moves":["wingattack", "honeclaws", "scaryface", "aerialace"]},
],
tier: "NU",
},
vullaby: {
randomBattleMoves: ["knockoff", "roost", "taunt", "whirlwind", "toxic", "defog", "uturn", "bravebird"],
tier: "LC",
},
mandibuzz: {
randomBattleMoves: ["foulplay", "knockoff", "roost", "taunt", "whirlwind", "toxic", "uturn", "bravebird", "defog"],
randomDoubleBattleMoves: ["knockoff", "roost", "taunt", "tailwind", "snarl", "uturn", "bravebird", "protect"],
eventPokemon: [
{"generation": 5, "level": 25, "gender": "F", "isHidden": true, "moves":["pluck", "nastyplot", "flatter", "feintattack"]},
],
tier: "UU",
},
heatmor: {
randomBattleMoves: ["fireblast", "suckerpunch", "focusblast", "gigadrain", "knockoff"],
randomDoubleBattleMoves: ["fireblast", "suckerpunch", "focusblast", "gigadrain", "heatwave", "protect"],
tier: "PU",
},
durant: {
randomBattleMoves: ["honeclaws", "ironhead", "xscissor", "stoneedge", "batonpass", "superpower"],
randomDoubleBattleMoves: ["honeclaws", "ironhead", "xscissor", "rockslide", "protect", "superpower"],
tier: "RU",
},
deino: {
randomBattleMoves: ["outrage", "crunch", "firefang", "dragontail", "thunderwave", "superpower"],
eventPokemon: [
{"generation": 5, "level": 1, "shiny": true, "moves":["tackle", "dragonrage"]},
],
tier: "LC",
},
zweilous: {
randomBattleMoves: ["outrage", "crunch", "headsmash", "dragontail", "superpower", "rest", "sleeptalk"],
tier: "NFE",
},
hydreigon: {
randomBattleMoves: ["uturn", "dracometeor", "dragonpulse", "earthpower", "fireblast", "darkpulse", "roost", "flashcannon", "superpower"],
randomDoubleBattleMoves: ["uturn", "dracometeor", "dragonpulse", "earthpower", "fireblast", "darkpulse", "roost", "flashcannon", "superpower", "tailwind", "protect"],
eventPokemon: [
{"generation": 5, "level": 70, "shiny": true, "gender": "M", "moves":["hypervoice", "dragonbreath", "flamethrower", "focusblast"], "pokeball": "cherishball"},
{"generation": 6, "level": 52, "gender": "M", "perfectIVs": 2, "moves":["dragonrush", "crunch", "rockslide", "frustration"], "pokeball": "cherishball"},
],
tier: "UU",
},
larvesta: {
randomBattleMoves: ["flareblitz", "uturn", "wildcharge", "zenheadbutt", "morningsun", "willowisp"],
tier: "LC",
},
volcarona: {
randomBattleMoves: ["quiverdance", "fierydance", "fireblast", "bugbuzz", "roost", "gigadrain", "hiddenpowerice", "hiddenpowerground"],
randomDoubleBattleMoves: ["quiverdance", "fierydance", "fireblast", "bugbuzz", "roost", "gigadrain", "hiddenpowerice", "heatwave", "willowisp", "ragepowder", "tailwind", "protect"],
eventPokemon: [
{"generation": 5, "level": 35, "isHidden": false, "moves":["stringshot", "leechlife", "gust", "firespin"]},
{"generation": 5, "level": 77, "gender": "M", "nature": "Calm", "ivs": {"hp": 30, "atk": 30, "def": 30, "spa": 30, "spd": 30, "spe": 30}, "isHidden": false, "moves":["bugbuzz", "overheat", "hyperbeam", "quiverdance"], "pokeball": "cherishball"},
],
tier: "OU",
},
cobalion: {
randomBattleMoves: ["closecombat", "ironhead", "swordsdance", "substitute", "stoneedge", "voltswitch", "hiddenpowerice", "taunt", "stealthrock"],
randomDoubleBattleMoves: ["closecombat", "ironhead", "swordsdance", "substitute", "stoneedge", "thunderwave", "protect"],
eventPokemon: [
{"generation": 5, "level": 42, "shiny": 1, "moves":["helpinghand", "retaliate", "ironhead", "sacredsword"]},
{"generation": 5, "level": 45, "shiny": 1, "moves":["helpinghand", "retaliate", "ironhead", "sacredsword"]},
{"generation": 5, "level": 65, "shiny": 1, "moves":["sacredsword", "swordsdance", "quickguard", "workup"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["retaliate", "ironhead", "sacredsword", "swordsdance"]},
],
eventOnly: true,
tier: "UU",
},
terrakion: {
randomBattleMoves: ["stoneedge", "closecombat", "swordsdance", "substitute", "stealthrock", "earthquake"],
randomDoubleBattleMoves: ["stoneedge", "closecombat", "substitute", "rockslide", "earthquake", "taunt", "protect"],
eventPokemon: [
{"generation": 5, "level": 42, "shiny": 1, "moves":["helpinghand", "retaliate", "rockslide", "sacredsword"]},
{"generation": 5, "level": 45, "shiny": 1, "moves":["helpinghand", "retaliate", "rockslide", "sacredsword"]},
{"generation": 5, "level": 65, "shiny": 1, "moves":["sacredsword", "swordsdance", "quickguard", "workup"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["retaliate", "rockslide", "sacredsword", "swordsdance"]},
],
eventOnly: true,
tier: "UU",
},
virizion: {
randomBattleMoves: ["swordsdance", "closecombat", "leafblade", "stoneedge", "calmmind", "focusblast", "gigadrain", "hiddenpowerice", "substitute"],
randomDoubleBattleMoves: ["taunt", "closecombat", "stoneedge", "leafblade", "swordsdance", "synthesis", "protect"],
eventPokemon: [
{"generation": 5, "level": 42, "shiny": 1, "moves":["helpinghand", "retaliate", "gigadrain", "sacredsword"]},
{"generation": 5, "level": 45, "shiny": 1, "moves":["helpinghand", "retaliate", "gigadrain", "sacredsword"]},
{"generation": 5, "level": 65, "shiny": 1, "moves":["sacredsword", "swordsdance", "quickguard", "workup"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["retaliate", "gigadrain", "sacredsword", "swordsdance"]},
],
eventOnly: true,
tier: "NU",
},
tornadus: {
randomBattleMoves: ["bulkup", "acrobatics", "knockoff", "substitute", "hurricane", "heatwave", "superpower", "uturn", "taunt", "tailwind"],
randomDoubleBattleMoves: ["hurricane", "airslash", "uturn", "superpower", "focusblast", "taunt", "substitute", "heatwave", "tailwind", "protect", "skydrop"],
eventPokemon: [
{"generation": 5, "level": 40, "shiny": 1, "isHidden": false, "moves":["revenge", "aircutter", "extrasensory", "agility"]},
{"generation": 5, "level": 5, "isHidden": true, "moves":["uproar", "astonish", "gust"], "pokeball": "dreamball"},
{"generation": 5, "level": 70, "isHidden": false, "moves":["hurricane", "hammerarm", "airslash", "hiddenpower"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": 1, "isHidden": false, "moves":["extrasensory", "agility", "airslash", "crunch"]},
],
eventOnly: true,
tier: "BL2",
},
tornadustherian: {
randomBattleMoves: ["hurricane", "airslash", "heatwave", "knockoff", "superpower", "uturn", "taunt"],
randomDoubleBattleMoves: ["hurricane", "airslash", "focusblast", "uturn", "heatwave", "skydrop", "tailwind", "taunt", "protect"],
eventOnly: true,
tier: "BL",
},
thundurus: {
randomBattleMoves: ["thunderwave", "nastyplot", "thunderbolt", "hiddenpowerice", "hiddenpowerflying", "focusblast", "substitute", "knockoff", "taunt"],
randomDoubleBattleMoves: ["thunderwave", "nastyplot", "thunderbolt", "hiddenpowerice", "hiddenpowerflying", "focusblast", "substitute", "knockoff", "taunt", "protect"],
eventPokemon: [
{"generation": 5, "level": 40, "shiny": 1, "isHidden": false, "moves":["revenge", "shockwave", "healblock", "agility"]},
{"generation": 5, "level": 5, "isHidden": true, "moves":["uproar", "astonish", "thundershock"], "pokeball": "dreamball"},
{"generation": 5, "level": 70, "isHidden": false, "moves":["thunder", "hammerarm", "focusblast", "wildcharge"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": 1, "isHidden": false, "moves":["healblock", "agility", "discharge", "crunch"]},
],
eventOnly: true,
tier: "BL",
},
thundurustherian: {
randomBattleMoves: ["nastyplot", "thunderbolt", "hiddenpowerflying", "hiddenpowerice", "focusblast", "voltswitch"],
randomDoubleBattleMoves: ["nastyplot", "thunderbolt", "hiddenpowerflying", "hiddenpowerice", "focusblast", "voltswitch", "protect"],
eventOnly: true,
tier: "BL",
},
reshiram: {
randomBattleMoves: ["blueflare", "dracometeor", "dragonpulse", "toxic", "flamecharge", "stoneedge", "roost"],
randomDoubleBattleMoves: ["blueflare", "dracometeor", "dragonpulse", "heatwave", "flamecharge", "roost", "protect", "tailwind"],
eventPokemon: [
{"generation": 5, "level": 50, "moves":["dragonbreath", "slash", "extrasensory", "fusionflare"]},
{"generation": 5, "level": 70, "moves":["extrasensory", "fusionflare", "dragonpulse", "imprison"]},
{"generation": 5, "level": 100, "moves":["blueflare", "fusionflare", "mist", "dracometeor"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": 1, "moves":["dragonbreath", "slash", "extrasensory", "fusionflare"]},
],
eventOnly: true,
tier: "Uber",
},
zekrom: {
randomBattleMoves: ["boltstrike", "outrage", "dragonclaw", "dracometeor", "voltswitch", "honeclaws", "substitute", "roost"],
randomDoubleBattleMoves: ["voltswitch", "protect", "dragonclaw", "boltstrike", "honeclaws", "substitute", "dracometeor", "fusionbolt", "roost", "tailwind"],
eventPokemon: [
{"generation": 5, "level": 50, "moves":["dragonbreath", "slash", "zenheadbutt", "fusionbolt"]},
{"generation": 5, "level": 70, "moves":["zenheadbutt", "fusionbolt", "dragonclaw", "imprison"]},
{"generation": 5, "level": 100, "moves":["boltstrike", "fusionbolt", "haze", "outrage"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": 1, "moves":["dragonbreath", "slash", "zenheadbutt", "fusionbolt"]},
],
eventOnly: true,
tier: "Uber",
},
landorus: {
randomBattleMoves: ["calmmind", "rockpolish", "earthpower", "focusblast", "psychic", "sludgewave", "stealthrock", "knockoff", "rockslide"],
randomDoubleBattleMoves: ["earthpower", "focusblast", "hiddenpowerice", "psychic", "sludgebomb", "rockslide", "protect"],
eventPokemon: [
{"generation": 5, "level": 70, "shiny": 1, "isHidden": false, "moves":["rockslide", "earthquake", "sandstorm", "fissure"]},
{"generation": 5, "level": 5, "isHidden": true, "moves":["block", "mudshot", "rocktomb"], "pokeball": "dreamball"},
{"generation": 6, "level": 65, "shiny": 1, "isHidden": false, "moves":["extrasensory", "swordsdance", "earthpower", "rockslide"]},
{"generation": 6, "level": 50, "nature": "Adamant", "ivs": {"hp": 31, "atk": 31, "def": 31, "spa": 1, "spd": 31, "spe": 24}, "isHidden": false, "moves":["earthquake", "knockoff", "uturn", "rocktomb"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
landorustherian: {
randomBattleMoves: ["swordsdance", "rockpolish", "earthquake", "stoneedge", "uturn", "superpower", "stealthrock", "fly"],
randomDoubleBattleMoves: ["rockslide", "earthquake", "stoneedge", "uturn", "superpower", "knockoff", "protect"],
eventOnly: true,
tier: "OU",
},
kyurem: {
randomBattleMoves: ["dracometeor", "icebeam", "earthpower", "outrage", "substitute", "dragonpulse", "focusblast", "roost"],
randomDoubleBattleMoves: ["substitute", "icebeam", "dracometeor", "dragonpulse", "focusblast", "glaciate", "earthpower", "roost", "protect"],
eventPokemon: [
{"generation": 5, "level": 75, "shiny": 1, "moves":["glaciate", "dragonpulse", "imprison", "endeavor"]},
{"generation": 5, "level": 70, "shiny": 1, "moves":["scaryface", "glaciate", "dragonpulse", "imprison"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["dragonbreath", "slash", "scaryface", "glaciate"]},
{"generation": 6, "level": 100, "moves":["glaciate", "scaryface", "dracometeor", "ironhead"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "BL2",
},
kyuremblack: {
randomBattleMoves: ["outrage", "fusionbolt", "icebeam", "roost", "substitute", "earthpower", "dragonclaw"],
randomDoubleBattleMoves: ["protect", "fusionbolt", "icebeam", "roost", "substitute", "honeclaws", "earthpower", "dragonclaw"],
eventPokemon: [
{"generation": 5, "level": 75, "shiny": 1, "moves":["freezeshock", "dragonpulse", "imprison", "endeavor"]},
{"generation": 5, "level": 70, "shiny": 1, "moves":["fusionbolt", "freezeshock", "dragonpulse", "imprison"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["dragonbreath", "slash", "fusionbolt", "freezeshock"]},
{"generation": 6, "level": 100, "moves":["freezeshock", "fusionbolt", "dracometeor", "ironhead"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "OU",
},
kyuremwhite: {
randomBattleMoves: ["dracometeor", "icebeam", "fusionflare", "earthpower", "focusblast", "dragonpulse", "substitute", "roost", "toxic"],
randomDoubleBattleMoves: ["dracometeor", "dragonpulse", "icebeam", "fusionflare", "earthpower", "focusblast", "roost", "protect"],
eventPokemon: [
{"generation": 5, "level": 75, "shiny": 1, "moves":["iceburn", "dragonpulse", "imprison", "endeavor"]},
{"generation": 5, "level": 70, "shiny": 1, "moves":["fusionflare", "iceburn", "dragonpulse", "imprison"]},
{"generation": 6, "level": 50, "shiny": 1, "moves":["dragonbreath", "slash", "fusionflare", "iceburn"]},
{"generation": 6, "level": 100, "moves":["iceburn", "fusionflare", "dracometeor", "ironhead"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
keldeo: {
randomBattleMoves: ["hydropump", "secretsword", "calmmind", "hiddenpowerflying", "hiddenpowerelectric", "substitute", "scald", "icywind"],
randomDoubleBattleMoves: ["hydropump", "secretsword", "protect", "hiddenpowerflying", "hiddenpowerelectric", "substitute", "surf", "icywind", "taunt"],
eventPokemon: [
{"generation": 5, "level": 15, "moves":["aquajet", "leer", "doublekick", "bubblebeam"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "moves":["sacredsword", "hydropump", "aquajet", "swordsdance"], "pokeball": "cherishball"},
{"generation": 6, "level": 15, "moves":["aquajet", "leer", "doublekick", "hydropump"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["aquajet", "leer", "doublekick", "bubblebeam"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "OU",
},
keldeoresolute: {
eventOnly: true,
requiredMove: "Secret Sword",
},
meloetta: {
randomBattleMoves: ["uturn", "calmmind", "psyshock", "hypervoice", "shadowball", "focusblast"],
randomDoubleBattleMoves: ["calmmind", "psyshock", "thunderbolt", "hypervoice", "shadowball", "focusblast", "protect"],
eventPokemon: [
{"generation": 5, "level": 15, "moves":["quickattack", "confusion", "round"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "moves":["round", "teeterdance", "psychic", "closecombat"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "RU",
},
meloettapirouette: {
randomBattleMoves: ["relicsong", "closecombat", "knockoff", "return"],
randomDoubleBattleMoves: ["relicsong", "closecombat", "knockoff", "return", "protect"],
requiredMove: "Relic Song",
battleOnly: true,
},
genesect: {
randomBattleMoves: ["uturn", "bugbuzz", "icebeam", "flamethrower", "thunderbolt", "ironhead", "shiftgear", "extremespeed", "blazekick"],
randomDoubleBattleMoves: ["uturn", "bugbuzz", "icebeam", "flamethrower", "thunderbolt", "ironhead", "shiftgear", "extremespeed", "blazekick", "protect"],
eventPokemon: [
{"generation": 5, "level": 50, "moves":["technoblast", "magnetbomb", "solarbeam", "signalbeam"], "pokeball": "cherishball"},
{"generation": 5, "level": 15, "moves":["technoblast", "magnetbomb", "solarbeam", "signalbeam"], "pokeball": "cherishball"},
{"generation": 5, "level": 100, "shiny": true, "nature": "Hasty", "ivs": {"atk": 31, "spe": 31}, "moves":["extremespeed", "technoblast", "blazekick", "shiftgear"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "moves":["technoblast", "magnetbomb", "solarbeam", "signalbeam"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
genesectburn: {
randomBattleMoves: ["uturn", "bugbuzz", "icebeam", "technoblast", "thunderbolt", "ironhead", "extremespeed"],
randomDoubleBattleMoves: ["uturn", "bugbuzz", "icebeam", "technoblast", "thunderbolt", "ironhead", "extremespeed", "protect"],
eventOnly: true,
requiredItem: "Burn Drive",
},
genesectchill: {
randomBattleMoves: ["uturn", "bugbuzz", "technoblast", "flamethrower", "thunderbolt", "ironhead", "extremespeed"],
randomDoubleBattleMoves: ["uturn", "bugbuzz", "technoblast", "flamethrower", "thunderbolt", "ironhead", "extremespeed", "protect"],
eventOnly: true,
requiredItem: "Chill Drive",
},
genesectdouse: {
randomBattleMoves: ["uturn", "bugbuzz", "icebeam", "flamethrower", "thunderbolt", "technoblast", "ironhead", "extremespeed"],
randomDoubleBattleMoves: ["uturn", "bugbuzz", "icebeam", "flamethrower", "thunderbolt", "technoblast", "ironhead", "extremespeed", "protect"],
eventOnly: true,
requiredItem: "Douse Drive",
},
genesectshock: {
randomBattleMoves: ["uturn", "bugbuzz", "icebeam", "flamethrower", "technoblast", "ironhead", "extremespeed"],
randomDoubleBattleMoves: ["uturn", "bugbuzz", "icebeam", "flamethrower", "technoblast", "ironhead", "extremespeed", "protect"],
eventOnly: true,
requiredItem: "Shock Drive",
},
chespin: {
randomBattleMoves: ["curse", "gyroball", "seedbomb", "stoneedge", "spikes", "synthesis"],
tier: "LC",
},
quilladin: {
randomBattleMoves: ["curse", "gyroball", "seedbomb", "stoneedge", "spikes", "synthesis"],
tier: "NFE",
},
chesnaught: {
randomBattleMoves: ["leechseed", "synthesis", "spikes", "drainpunch", "spikyshield", "woodhammer"],
randomDoubleBattleMoves: ["leechseed", "synthesis", "hammerarm", "spikyshield", "stoneedge", "woodhammer", "rockslide"],
tier: "RU",
},
fennekin: {
randomBattleMoves: ["fireblast", "psychic", "psyshock", "grassknot", "willowisp", "hypnosis", "hiddenpowerrock", "flamecharge"],
eventPokemon: [
{"generation": 6, "level": 15, "gender": "F", "nature": "Hardy", "isHidden": false, "moves":["scratch", "flamethrower", "hiddenpower"], "pokeball": "cherishball"},
],
tier: "LC",
},
braixen: {
randomBattleMoves: ["fireblast", "flamethrower", "psychic", "psyshock", "grassknot", "willowisp", "hiddenpowerrock"],
tier: "NFE",
},
delphox: {
randomBattleMoves: ["calmmind", "fireblast", "psyshock", "grassknot", "switcheroo", "shadowball"],
randomDoubleBattleMoves: ["calmmind", "fireblast", "psyshock", "grassknot", "switcheroo", "shadowball", "heatwave", "dazzlinggleam", "protect"],
tier: "NU",
},
froakie: {
randomBattleMoves: ["quickattack", "hydropump", "icebeam", "waterfall", "toxicspikes", "poweruppunch", "uturn"],
eventPokemon: [
{"generation": 6, "level": 7, "isHidden": false, "moves":["pound", "growl", "bubble", "return"], "pokeball": "cherishball"},
],
tier: "LC",
},
frogadier: {
randomBattleMoves: ["hydropump", "surf", "icebeam", "uturn", "taunt", "toxicspikes"],
tier: "NFE",
},
greninja: {
randomBattleMoves: ["hydropump", "icebeam", "darkpulse", "gunkshot", "uturn", "spikes", "toxicspikes", "taunt"],
randomDoubleBattleMoves: ["hydropump", "uturn", "surf", "icebeam", "matblock", "taunt", "darkpulse", "protect"],
eventPokemon: [
{"generation": 6, "level": 36, "ivs": {"spe": 31}, "isHidden": true, "moves":["watershuriken", "shadowsneak", "hydropump", "substitute"], "pokeball": "cherishball"},
{"generation": 6, "level": 100, "isHidden": true, "moves":["hydrocannon", "gunkshot", "matblock", "happyhour"], "pokeball": "cherishball"},
],
tier: "OU",
},
greninjaash: {
randomBattleMoves: ["hydropump", "icebeam", "darkpulse", "watershuriken", "uturn"],
eventPokemon: [
{"generation": 7, "level": 36, "ivs": {"hp": 20, "atk": 31, "def": 20, "spa": 31, "spd": 20, "spe": 31}, "moves":["watershuriken", "aerialace", "doubleteam", "nightslash"]},
],
eventOnly: true,
gen: 7,
requiredAbility: "Battle Bond",
battleOnly: true,
tier: "OU",
},
bunnelby: {
randomBattleMoves: ["agility", "earthquake", "return", "quickattack", "uturn", "stoneedge", "spikes", "bounce"],
tier: "LC",
},
diggersby: {
randomBattleMoves: ["earthquake", "return", "wildcharge", "uturn", "swordsdance", "quickattack", "knockoff", "agility"],
randomDoubleBattleMoves: ["earthquake", "uturn", "return", "wildcharge", "protect", "quickattack"],
tier: "BL",
},
fletchling: {
randomBattleMoves: ["roost", "swordsdance", "uturn", "return", "overheat", "flamecharge", "tailwind"],
tier: "LC",
},
fletchinder: {
randomBattleMoves: ["roost", "swordsdance", "uturn", "return", "overheat", "flamecharge", "tailwind", "acrobatics"],
tier: "NFE",
},
talonflame: {
randomBattleMoves: ["bravebird", "flareblitz", "roost", "swordsdance", "uturn", "willowisp", "tailwind"],
randomDoubleBattleMoves: ["bravebird", "flareblitz", "roost", "swordsdance", "uturn", "willowisp", "tailwind", "taunt", "protect"],
tier: "BL2",
},
scatterbug: {
randomBattleMoves: ["tackle", "stringshot", "stunspore", "bugbite", "poisonpowder"],
tier: "LC",
},
spewpa: {
randomBattleMoves: ["tackle", "stringshot", "stunspore", "bugbite", "poisonpowder"],
tier: "NFE",
},
vivillon: {
randomBattleMoves: ["sleeppowder", "quiverdance", "hurricane", "bugbuzz", "substitute"],
randomDoubleBattleMoves: ["sleeppowder", "quiverdance", "hurricane", "bugbuzz", "roost", "protect"],
tier: "NU",
},
vivillonfancy: {
eventPokemon: [
{"generation": 6, "level": 12, "isHidden": false, "moves":["gust", "lightscreen", "strugglebug", "holdhands"], "pokeball": "cherishball"},
],
eventOnly: true,
},
vivillonpokeball: {
eventPokemon: [
{"generation": 6, "level": 12, "isHidden": false, "moves":["stunspore", "gust", "lightscreen", "strugglebug"]},
],
eventOnly: true,
},
litleo: {
randomBattleMoves: ["hypervoice", "fireblast", "willowisp", "bulldoze", "yawn"],
tier: "LC",
},
pyroar: {
randomBattleMoves: ["sunnyday", "fireblast", "hypervoice", "solarbeam", "willowisp", "darkpulse"],
randomDoubleBattleMoves: ["hypervoice", "fireblast", "willowisp", "protect", "sunnyday", "solarbeam"],
eventPokemon: [
{"generation": 6, "level": 49, "gender": "M", "perfectIVs": 2, "isHidden": false, "abilities":["unnerve"], "moves":["hypervoice", "fireblast", "darkpulse"], "pokeball": "cherishball"},
],
tier: "PU",
},
flabebe: {
randomBattleMoves: ["moonblast", "toxic", "wish", "psychic", "aromatherapy", "protect", "calmmind"],
tier: "LC",
},
floette: {
randomBattleMoves: ["moonblast", "toxic", "wish", "psychic", "aromatherapy", "protect", "calmmind"],
tier: "NFE",
},
floetteeternal: {
randomBattleMoves: ["lightofruin", "psychic", "hiddenpowerfire", "hiddenpowerground", "moonblast"],
randomDoubleBattleMoves: ["lightofruin", "dazzlinggleam", "wish", "psychic", "aromatherapy", "protect", "calmmind"],
isUnreleased: true,
tier: "Unreleased",
},
florges: {
randomBattleMoves: ["calmmind", "moonblast", "synthesis", "aromatherapy", "wish", "toxic", "protect"],
randomDoubleBattleMoves: ["moonblast", "dazzlinggleam", "wish", "psychic", "aromatherapy", "protect", "calmmind"],
tier: "RU",
},
skiddo: {
randomBattleMoves: ["hornleech", "brickbreak", "bulkup", "leechseed", "milkdrink", "rockslide"],
tier: "LC",
},
gogoat: {
randomBattleMoves: ["bulkup", "hornleech", "earthquake", "rockslide", "substitute", "leechseed", "milkdrink"],
randomDoubleBattleMoves: ["hornleech", "earthquake", "brickbreak", "bulkup", "leechseed", "milkdrink", "rockslide", "protect"],
tier: "PU",
},
pancham: {
randomBattleMoves: ["partingshot", "skyuppercut", "crunch", "stoneedge", "bulldoze", "shadowclaw", "bulkup"],
eventPokemon: [
{"generation": 6, "level": 30, "gender": "M", "nature": "Adamant", "isHidden": false, "abilities":["moldbreaker"], "moves":["armthrust", "stoneedge", "darkpulse"], "pokeball": "cherishball"},
],
tier: "LC",
},
pangoro: {
randomBattleMoves: ["knockoff", "superpower", "gunkshot", "icepunch", "partingshot", "drainpunch"],
randomDoubleBattleMoves: ["partingshot", "hammerarm", "crunch", "circlethrow", "icepunch", "earthquake", "poisonjab", "protect"],
tier: "RU",
},
furfrou: {
randomBattleMoves: ["return", "cottonguard", "thunderwave", "substitute", "toxic", "suckerpunch", "uturn", "rest"],
randomDoubleBattleMoves: ["return", "cottonguard", "uturn", "thunderwave", "suckerpunch", "snarl", "wildcharge", "protect"],
tier: "PU",
},
espurr: {
randomBattleMoves: ["fakeout", "yawn", "thunderwave", "psychic", "trick", "darkpulse"],
tier: "LC",
},
meowstic: {
randomBattleMoves: ["toxic", "yawn", "thunderwave", "psychic", "reflect", "lightscreen", "healbell"],
randomDoubleBattleMoves: ["fakeout", "thunderwave", "psychic", "reflect", "lightscreen", "safeguard", "protect"],
tier: "PU",
},
meowsticf: {
randomBattleMoves: ["calmmind", "psychic", "psyshock", "shadowball", "energyball", "thunderbolt"],
randomDoubleBattleMoves: ["psyshock", "darkpulse", "fakeout", "energyball", "signalbeam", "thunderbolt", "protect", "helpinghand"],
tier: "PU",
},
honedge: {
randomBattleMoves: ["swordsdance", "shadowclaw", "shadowsneak", "ironhead", "rockslide", "aerialace", "destinybond"],
tier: "LC",
},
doublade: {
randomBattleMoves: ["swordsdance", "shadowclaw", "shadowsneak", "ironhead", "sacredsword"],
randomDoubleBattleMoves: ["swordsdance", "shadowclaw", "shadowsneak", "ironhead", "sacredsword", "rockslide", "protect"],
tier: "RU",
},
aegislash: {
randomBattleMoves: ["kingsshield", "swordsdance", "shadowclaw", "sacredsword", "ironhead", "shadowsneak", "hiddenpowerice", "shadowball", "flashcannon"],
randomDoubleBattleMoves: ["kingsshield", "swordsdance", "shadowclaw", "sacredsword", "ironhead", "shadowsneak", "wideguard", "hiddenpowerice", "shadowball", "flashcannon"],
eventPokemon: [
{"generation": 6, "level": 50, "gender": "F", "nature": "Quiet", "moves":["wideguard", "kingsshield", "shadowball", "flashcannon"], "pokeball": "cherishball"},
],
tier: "Uber",
},
aegislashblade: {
battleOnly: true,
},
spritzee: {
randomBattleMoves: ["calmmind", "drainingkiss", "moonblast", "psychic", "aromatherapy", "wish", "trickroom", "thunderbolt"],
tier: "LC",
},
aromatisse: {
randomBattleMoves: ["wish", "protect", "moonblast", "aromatherapy", "reflect", "lightscreen"],
randomDoubleBattleMoves: ["moonblast", "aromatherapy", "wish", "trickroom", "thunderbolt", "protect", "healpulse"],
eventPokemon: [
{"generation": 6, "level": 50, "nature": "Relaxed", "isHidden": true, "moves":["trickroom", "healpulse", "disable", "moonblast"], "pokeball": "cherishball"},
],
tier: "NU",
},
swirlix: {
randomBattleMoves: ["calmmind", "drainingkiss", "dazzlinggleam", "surf", "psychic", "flamethrower", "bellydrum", "thunderbolt", "return", "thief", "cottonguard"],
tier: "LC Uber",
},
slurpuff: {
randomBattleMoves: ["substitute", "bellydrum", "playrough", "return", "drainpunch", "calmmind", "drainingkiss", "dazzlinggleam", "flamethrower", "surf"],
randomDoubleBattleMoves: ["substitute", "bellydrum", "playrough", "return", "drainpunch", "dazzlinggleam", "surf", "psychic", "flamethrower", "protect"],
tier: "BL3",
},
inkay: {
randomBattleMoves: ["topsyturvy", "switcheroo", "superpower", "psychocut", "flamethrower", "rockslide", "trickroom"],
eventPokemon: [
{"generation": 6, "level": 10, "isHidden": false, "moves":["happyhour", "foulplay", "hypnosis", "topsyturvy"], "pokeball": "cherishball"},
],
tier: "LC",
},
malamar: {
randomBattleMoves: ["superpower", "knockoff", "psychocut", "rockslide", "substitute", "trickroom"],
randomDoubleBattleMoves: ["superpower", "psychocut", "rockslide", "trickroom", "knockoff", "protect"],
eventPokemon: [
{"generation": 6, "level": 50, "nature": "Adamant", "ivs": {"hp": 31, "atk": 31}, "isHidden": false, "abilities":["contrary"], "moves":["superpower", "knockoff", "facade", "rockslide"], "pokeball": "cherishball"},
],
tier: "NU",
},
binacle: {
randomBattleMoves: ["shellsmash", "razorshell", "stoneedge", "earthquake", "crosschop", "poisonjab", "xscissor", "rockslide"],
tier: "LC",
},
barbaracle: {
randomBattleMoves: ["shellsmash", "stoneedge", "razorshell", "earthquake", "crosschop", "stealthrock"],
randomDoubleBattleMoves: ["shellsmash", "razorshell", "earthquake", "crosschop", "rockslide", "protect"],
tier: "NU",
},
skrelp: {
randomBattleMoves: ["scald", "sludgebomb", "thunderbolt", "shadowball", "toxicspikes", "hydropump"],
tier: "LC",
},
dragalge: {
randomBattleMoves: ["dracometeor", "sludgewave", "focusblast", "scald", "hiddenpowerfire", "toxicspikes", "dragonpulse"],
randomDoubleBattleMoves: ["dracometeor", "sludgebomb", "focusblast", "scald", "hiddenpowerfire", "protect", "dragonpulse"],
tier: "RU",
},
clauncher: {
randomBattleMoves: ["waterpulse", "flashcannon", "uturn", "crabhammer", "aquajet", "sludgebomb"],
tier: "LC",
},
clawitzer: {
randomBattleMoves: ["scald", "waterpulse", "darkpulse", "aurasphere", "icebeam", "uturn"],
randomDoubleBattleMoves: ["waterpulse", "icebeam", "uturn", "darkpulse", "aurasphere", "muddywater", "helpinghand", "protect"],
tier: "NU",
},
helioptile: {
randomBattleMoves: ["surf", "voltswitch", "hiddenpowerice", "raindance", "thunder", "darkpulse", "thunderbolt"],
tier: "LC",
},
heliolisk: {
randomBattleMoves: ["raindance", "thunder", "hypervoice", "surf", "darkpulse", "hiddenpowerice", "voltswitch", "thunderbolt"],
randomDoubleBattleMoves: ["surf", "voltswitch", "hiddenpowerice", "raindance", "thunder", "darkpulse", "thunderbolt", "electricterrain", "protect"],
tier: "RU",
},
tyrunt: {
randomBattleMoves: ["stealthrock", "dragondance", "stoneedge", "dragonclaw", "earthquake", "icefang", "firefang"],
eventPokemon: [
{"generation": 6, "level": 10, "isHidden": true, "moves":["tailwhip", "tackle", "roar", "stomp"], "pokeball": "cherishball"},
],
tier: "LC",
},
tyrantrum: {
randomBattleMoves: ["stealthrock", "dragondance", "dragonclaw", "earthquake", "superpower", "outrage", "headsmash"],
randomDoubleBattleMoves: ["rockslide", "dragondance", "headsmash", "dragonclaw", "earthquake", "icefang", "firefang", "protect"],
tier: "BL3",
},
amaura: {
randomBattleMoves: ["naturepower", "hypervoice", "ancientpower", "thunderbolt", "darkpulse", "thunderwave", "dragontail", "flashcannon"],
eventPokemon: [
{"generation": 6, "level": 10, "isHidden": true, "moves":["growl", "powdersnow", "thunderwave", "rockthrow"], "pokeball": "cherishball"},
],
tier: "LC",
},
aurorus: {
randomBattleMoves: ["ancientpower", "blizzard", "thunderwave", "earthpower", "freezedry", "hypervoice", "stealthrock"],
randomDoubleBattleMoves: ["hypervoice", "ancientpower", "thunderwave", "flashcannon", "freezedry", "icywind", "protect"],
tier: "NU",
},
sylveon: {
randomBattleMoves: ["hypervoice", "calmmind", "wish", "protect", "psyshock", "batonpass", "shadowball"],
randomDoubleBattleMoves: ["hypervoice", "calmmind", "wish", "protect", "psyshock", "helpinghand", "shadowball", "hiddenpowerground"],
eventPokemon: [
{"generation": 6, "level": 10, "isHidden": false, "moves":["celebrate", "helpinghand", "sandattack", "fairywind"], "pokeball": "cherishball"},
{"generation": 6, "level": 10, "gender": "F", "isHidden": false, "moves":["disarmingvoice", "babydolleyes", "quickattack", "drainingkiss"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "gender": "F", "isHidden": true, "moves":["hyperbeam", "drainingkiss", "psyshock", "calmmind"], "pokeball": "cherishball"},
],
tier: "UU",
},
hawlucha: {
randomBattleMoves: ["substitute", "swordsdance", "highjumpkick", "acrobatics", "roost", "stoneedge"],
randomDoubleBattleMoves: ["swordsdance", "highjumpkick", "uturn", "stoneedge", "skydrop", "encore", "protect"],
tier: "OU",
},
dedenne: {
randomBattleMoves: ["substitute", "recycle", "thunderbolt", "nuzzle", "grassknot", "hiddenpowerice", "toxic"],
randomDoubleBattleMoves: ["voltswitch", "thunderbolt", "nuzzle", "grassknot", "hiddenpowerice", "uturn", "helpinghand", "protect"],
tier: "PU",
},
carbink: {
randomBattleMoves: ["stealthrock", "lightscreen", "reflect", "explosion", "powergem", "moonblast"],
randomDoubleBattleMoves: ["trickroom", "lightscreen", "reflect", "explosion", "powergem", "moonblast", "protect"],
tier: "PU",
},
goomy: {
randomBattleMoves: ["sludgebomb", "thunderbolt", "toxic", "protect", "infestation"],
eventPokemon: [
{"generation": 7, "level": 1, "shiny": 1, "isHidden": true, "moves":["bodyslam", "dragonpulse", "counter"], "pokeball": "cherishball"},
],
tier: "LC",
},
sliggoo: {
randomBattleMoves: ["sludgebomb", "thunderbolt", "toxic", "protect", "infestation", "icebeam"],
tier: "NFE",
},
goodra: {
randomBattleMoves: ["dracometeor", "dragonpulse", "fireblast", "sludgebomb", "thunderbolt", "earthquake", "dragontail"],
randomDoubleBattleMoves: ["thunderbolt", "icebeam", "dragonpulse", "fireblast", "muddywater", "dracometeor", "focusblast", "protect"],
tier: "RU",
},
klefki: {
randomBattleMoves: ["reflect", "lightscreen", "spikes", "magnetrise", "playrough", "thunderwave", "foulplay", "toxic"],
randomDoubleBattleMoves: ["reflect", "lightscreen", "safeguard", "playrough", "substitute", "thunderwave", "protect", "flashcannon", "dazzlinggleam"],
tier: "UU",
},
phantump: {
randomBattleMoves: ["hornleech", "leechseed", "phantomforce", "substitute", "willowisp", "rest"],
tier: "LC",
},
trevenant: {
randomBattleMoves: ["hornleech", "shadowclaw", "leechseed", "willowisp", "rest", "substitute", "phantomforce"],
randomDoubleBattleMoves: ["hornleech", "woodhammer", "leechseed", "shadowclaw", "willowisp", "trickroom", "earthquake", "rockslide", "protect"],
tier: "PU",
},
pumpkaboo: {
randomBattleMoves: ["willowisp", "shadowsneak", "destinybond", "synthesis", "seedbomb", "leechseed"],
tier: "LC",
},
pumpkaboosmall: {
randomBattleMoves: ["willowisp", "shadowsneak", "destinybond", "synthesis", "seedbomb"],
unreleasedHidden: true,
tier: "LC",
},
pumpkaboolarge: {
randomBattleMoves: ["willowisp", "shadowsneak", "leechseed", "synthesis", "seedbomb"],
unreleasedHidden: true,
tier: "LC",
},
pumpkaboosuper: {
randomBattleMoves: ["willowisp", "shadowsneak", "leechseed", "synthesis", "seedbomb"],
eventPokemon: [
{"generation": 6, "level": 50, "moves":["trickortreat", "astonish", "scaryface", "shadowsneak"], "pokeball": "cherishball"},
],
tier: "LC",
},
gourgeist: {
randomBattleMoves: ["willowisp", "seedbomb", "leechseed", "shadowsneak", "substitute", "synthesis"],
randomDoubleBattleMoves: ["willowisp", "shadowsneak", "painsplit", "seedbomb", "leechseed", "phantomforce", "explosion", "protect"],
tier: "PU",
},
gourgeistsmall: {
randomBattleMoves: ["willowisp", "seedbomb", "leechseed", "shadowsneak", "substitute", "synthesis"],
randomDoubleBattleMoves: ["willowisp", "shadowsneak", "painsplit", "seedbomb", "leechseed", "phantomforce", "explosion", "protect"],
unreleasedHidden: true,
tier: "PU",
},
gourgeistlarge: {
randomBattleMoves: ["willowisp", "seedbomb", "leechseed", "shadowsneak", "substitute", "synthesis"],
randomDoubleBattleMoves: ["willowisp", "shadowsneak", "painsplit", "seedbomb", "leechseed", "phantomforce", "explosion", "protect", "trickroom"],
unreleasedHidden: true,
tier: "PU",
},
gourgeistsuper: {
randomBattleMoves: ["willowisp", "seedbomb", "leechseed", "shadowsneak", "substitute", "synthesis"],
randomDoubleBattleMoves: ["willowisp", "shadowsneak", "painsplit", "seedbomb", "leechseed", "phantomforce", "explosion", "protect", "trickroom"],
tier: "PU",
},
bergmite: {
randomBattleMoves: ["avalanche", "recover", "stoneedge", "curse", "gyroball", "rapidspin"],
tier: "LC",
},
avalugg: {
randomBattleMoves: ["avalanche", "recover", "toxic", "rapidspin", "roar", "earthquake"],
randomDoubleBattleMoves: ["avalanche", "recover", "earthquake", "protect"],
tier: "PU",
},
noibat: {
randomBattleMoves: ["airslash", "hurricane", "dracometeor", "uturn", "roost", "switcheroo"],
tier: "LC",
},
noivern: {
randomBattleMoves: ["dracometeor", "hurricane", "airslash", "flamethrower", "boomburst", "switcheroo", "uturn", "roost", "taunt"],
randomDoubleBattleMoves: ["airslash", "hurricane", "dragonpulse", "dracometeor", "focusblast", "flamethrower", "uturn", "roost", "boomburst", "switcheroo", "tailwind", "taunt", "protect"],
tier: "BL3",
},
xerneas: {
randomBattleMoves: ["geomancy", "moonblast", "thunder", "focusblast", "thunderbolt", "hiddenpowerfire", "psyshock", "rockslide", "closecombat"],
randomDoubleBattleMoves: ["geomancy", "dazzlinggleam", "thunder", "focusblast", "thunderbolt", "hiddenpowerfire", "psyshock", "rockslide", "closecombat", "protect"],
eventPokemon: [
{"generation": 6, "level": 50, "moves":["gravity", "geomancy", "moonblast", "megahorn"]},
{"generation": 6, "level": 100, "shiny": true, "moves":["geomancy", "moonblast", "aromatherapy", "focusblast"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
yveltal: {
randomBattleMoves: ["darkpulse", "hurricane", "foulplay", "oblivionwing", "uturn", "suckerpunch", "taunt", "toxic", "roost"],
randomDoubleBattleMoves: ["darkpulse", "oblivionwing", "taunt", "focusblast", "hurricane", "roost", "suckerpunch", "snarl", "skydrop", "protect"],
eventPokemon: [
{"generation": 6, "level": 50, "moves":["snarl", "oblivionwing", "disable", "darkpulse"]},
{"generation": 6, "level": 100, "shiny": true, "moves":["oblivionwing", "suckerpunch", "darkpulse", "foulplay"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
zygarde: {
randomBattleMoves: ["dragondance", "thousandarrows", "outrage", "extremespeed", "irontail"],
randomDoubleBattleMoves: ["dragondance", "thousandarrows", "extremespeed", "rockslide", "coil", "stoneedge", "glare", "protect"],
eventPokemon: [
{"generation": 6, "level": 70, "moves":["crunch", "earthquake", "camouflage", "dragonpulse"]},
{"generation": 6, "level": 100, "moves":["landswrath", "extremespeed", "glare", "outrage"], "pokeball": "cherishball"},
{"generation": 7, "level": 50, "moves":["bind", "landswrath", "sandstorm", "haze"]},
{"generation": 7, "level": 50, "isHidden": true, "moves":["bind", "landswrath", "sandstorm", "haze"]},
],
eventOnly: true,
tier: "OU",
},
zygarde10: {
randomBattleMoves: ["dragondance", "thousandarrows", "outrage", "extremespeed", "irontail", "substitute"],
randomDoubleBattleMoves: ["dragondance", "thousandarrows", "extremespeed", "irontail", "protect"],
eventPokemon: [
{"generation": 7, "level": 30, "moves":["safeguard", "dig", "bind", "landswrath"]},
{"generation": 7, "level": 50, "isHidden": true, "moves":["safeguard", "dig", "bind", "landswrath"]},
],
eventOnly: true,
gen: 7,
tier: "RU",
},
zygardecomplete: {
gen: 7,
requiredAbility: "Power Construct",
battleOnly: true,
tier: "Uber",
},
diancie: {
randomBattleMoves: ["reflect", "lightscreen", "stealthrock", "diamondstorm", "moonblast", "hiddenpowerfire"],
randomDoubleBattleMoves: ["diamondstorm", "moonblast", "reflect", "lightscreen", "safeguard", "substitute", "calmmind", "psychic", "dazzlinggleam", "protect"],
eventPokemon: [
{"generation": 6, "level": 50, "perfectIVs": 0, "moves":["diamondstorm", "reflect", "return", "moonblast"], "pokeball": "cherishball"},
{"generation": 6, "level": 50, "shiny": true, "moves":["diamondstorm", "moonblast", "reflect", "return"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "RU",
},
dianciemega: {
randomBattleMoves: ["calmmind", "moonblast", "earthpower", "hiddenpowerfire", "psyshock", "diamondstorm"],
randomDoubleBattleMoves: ["diamondstorm", "moonblast", "calmmind", "psyshock", "earthpower", "hiddenpowerfire", "dazzlinggleam", "protect"],
requiredItem: "Diancite",
tier: "OU",
},
hoopa: {
randomBattleMoves: ["nastyplot", "psyshock", "shadowball", "focusblast", "trick"],
randomDoubleBattleMoves: ["hyperspacehole", "shadowball", "focusblast", "protect", "psychic", "trickroom"],
eventPokemon: [
{"generation": 6, "level": 50, "moves":["hyperspacehole", "nastyplot", "psychic", "astonish"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "RU",
},
hoopaunbound: {
randomBattleMoves: ["nastyplot", "substitute", "psyshock", "psychic", "darkpulse", "focusblast", "hyperspacefury", "zenheadbutt", "icepunch", "drainpunch", "gunkshot", "knockoff", "trick"],
randomDoubleBattleMoves: ["psychic", "darkpulse", "focusblast", "protect", "hyperspacefury", "zenheadbutt", "icepunch", "drainpunch", "gunkshot"],
eventOnly: true,
tier: "BL",
},
volcanion: {
randomBattleMoves: ["substitute", "steameruption", "fireblast", "sludgewave", "hiddenpowerice", "earthpower", "superpower"],
randomDoubleBattleMoves: ["substitute", "steameruption", "heatwave", "sludgebomb", "rockslide", "earthquake", "protect"],
eventPokemon: [
{"generation": 6, "level": 70, "moves":["steameruption", "overheat", "hydropump", "mist"], "pokeball": "cherishball"},
{"generation": 6, "level": 70, "moves":["steameruption", "flamethrower", "hydropump", "explosion"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "UU",
},
rowlet: {
unreleasedHidden: true,
tier: "LC",
},
dartrix: {
unreleasedHidden: true,
tier: "NFE",
},
decidueye: {
randomBattleMoves: ["spiritshackle", "uturn", "leafblade", "roost", "swordsdance", "suckerpunch"],
randomDoubleBattleMoves: ["spiritshackle", "leafblade", "bravebird", "protect", "suckerpunch"],
unreleasedHidden: true,
tier: "RU",
},
litten: {
unreleasedHidden: true,
tier: "LC",
},
torracat: {
unreleasedHidden: true,
tier: "NFE",
},
incineroar: {
randomBattleMoves: ["fakeout", "darkestlariat", "flareblitz", "uturn", "earthquake"],
randomDoubleBattleMoves: ["fakeout", "darkestlariat", "flareblitz", "crosschop", "willowisp", "taunt", "snarl"],
unreleasedHidden: true,
tier: "NU",
},
popplio: {
unreleasedHidden: true,
tier: "LC",
},
brionne: {
unreleasedHidden: true,
tier: "NFE",
},
primarina: {
randomBattleMoves: ["hydropump", "moonblast", "scald", "psychic", "hiddenpowerfire"],
randomDoubleBattleMoves: ["hypervoice", "moonblast", "substitute", "protect", "icebeam"],
unreleasedHidden: true,
tier: "UU",
},
pikipek: {
tier: "LC",
},
trumbeak: {
tier: "NFE",
},
toucannon: {
randomBattleMoves: ["substitute", "beakblast", "swordsdance", "roost", "brickbreak", "bulletseed", "rockblast"],
randomDoubleBattleMoves: ["bulletseed", "rockblast", "bravebird", "tailwind", "protect"],
tier: "PU",
},
yungoos: {
tier: "LC",
},
gumshoos: {
randomBattleMoves: ["uturn", "return", "crunch", "earthquake"],
randomDoubleBattleMoves: ["uturn", "return", "superfang", "protect", "crunch"],
tier: "PU",
},
grubbin: {
tier: "LC",
},
charjabug: {
tier: "NFE",
},
vikavolt: {
randomBattleMoves: ["agility", "bugbuzz", "thunderbolt", "voltswitch", "energyball", "hiddenpowerice"],
randomDoubleBattleMoves: ["thunderbolt", "bugbuzz", "stringshot", "protect", "voltswitch", "hiddenpowerice"],
tier: "NU",
},
crabrawler: {
tier: "LC",
},
crabominable: {
randomBattleMoves: ["icehammer", "closecombat", "earthquake", "stoneedge"],
randomDoubleBattleMoves: ["icehammer", "closecombat", "stoneedge", "protect", "wideguard", "earthquake"],
tier: "PU",
},
oricorio: {
randomBattleMoves: ["revelationdance", "hurricane", "toxic", "roost", "uturn"],
randomDoubleBattleMoves: ["revelationdance", "airslash", "hurricane", "tailwind", "protect"],
tier: "PU",
},
oricoriopompom: {
randomBattleMoves: ["revelationdance", "hurricane", "toxic", "roost", "uturn"],
randomDoubleBattleMoves: ["revelationdance", "airslash", "hurricane", "tailwind", "protect"],
tier: "PU",
},
oricoriopau: {
randomBattleMoves: ["revelationdance", "hurricane", "toxic", "roost", "uturn"],
randomDoubleBattleMoves: ["revelationdance", "airslash", "hurricane", "tailwind", "protect"],
tier: "PU",
},
oricoriosensu: {
randomBattleMoves: ["revelationdance", "hurricane", "toxic", "roost", "uturn"],
randomDoubleBattleMoves: ["revelationdance", "airslash", "hurricane", "tailwind", "protect"],
tier: "PU",
},
cutiefly: {
tier: "LC Uber",
},
ribombee: {
randomBattleMoves: ["quiverdance", "bugbuzz", "moonblast", "hiddenpowerfire", "roost", "batonpass"],
randomDoubleBattleMoves: ["quiverdance", "pollenpuff", "moonblast", "protect", "batonpass"],
tier: "BL3",
},
rockruff: {
tier: "LC",
},
lycanroc: {
randomBattleMoves: ["swordsdance", "accelerock", "stoneedge", "crunch", "firefang"],
randomDoubleBattleMoves: ["accelerock", "stoneedge", "crunch", "firefang", "protect", "taunt"],
tier: "PU",
},
lycanrocmidnight: {
randomBattleMoves: ["bulkup", "stoneedge", "stealthrock", "suckerpunch", "swordsdance", "firefang"],
randomDoubleBattleMoves: ["stoneedge", "suckerpunch", "swordsdance", "protect", "taunt"],
eventPokemon: [
{"generation": 7, "level": 50, "isHidden": true, "moves":["stoneedge", "firefang", "suckerpunch", "swordsdance"], "pokeball": "cherishball"},
],
tier: "PU",
},
wishiwashi: {
randomBattleMoves: ["scald", "hydropump", "icebeam", "hiddenpowergrass", "earthquake"],
randomDoubleBattleMoves: ["hydropump", "icebeam", "endeavor", "protect", "hiddenpowergrass", "earthquake", "helpinghand"],
tier: "PU",
},
wishiwashischool: {
battleOnly: true,
},
mareanie: {
eventPokemon: [
{"generation": 7, "level": 1, "shiny": 1, "isHidden": true, "moves":["toxic", "stockpile", "swallow"], "pokeball": "cherishball"},
],
tier: "LC",
},
toxapex: {
randomBattleMoves: ["toxicspikes", "banefulbunker", "recover", "scald", "haze"],
randomDoubleBattleMoves: ["scald", "banefulbunker", "haze", "wideguard", "lightscreen"],
tier: "OU",
},
mudbray: {
tier: "LC",
},
mudsdale: {
randomBattleMoves: ["earthquake", "closecombat", "payback", "rockslide", "heavyslam"],
randomDoubleBattleMoves: ["highhorsepower", "heavyslam", "closecombat", "rockslide", "protect", "earthquake", "rocktomb"],
tier: "PU",
},
dewpider: {
tier: "LC",
},
araquanid: {
randomBattleMoves: ["liquidation", "leechlife", "lunge", "toxic", "mirrorcoat", "crunch"],
randomDoubleBattleMoves: ["liquidation", "leechlife", "lunge", "poisonjab", "protect", "wideguard"],
tier: "RU",
},
fomantis: {
tier: "LC",
},
lurantis: {
randomBattleMoves: ["leafstorm", "hiddenpowerfire", "gigadrain", "substitute"],
randomDoubleBattleMoves: ["leafstorm", "gigadrain", "hiddenpowerice", "hiddenpowerfire", "protect"],
tier: "PU",
},
morelull: {
tier: "LC",
},
shiinotic: {
randomBattleMoves: ["spore", "strengthsap", "moonblast", "substitute", "leechseed"],
randomDoubleBattleMoves: ["spore", "gigadrain", "moonblast", "sludgebomb", "protect"],
tier: "PU",
},
salandit: {
tier: "LC",
},
salazzle: {
randomBattleMoves: ["nastyplot", "fireblast", "sludgewave", "hiddenpowerground"],
randomDoubleBattleMoves: ["protect", "flamethrower", "sludgebomb", "hiddenpowerground", "hiddenpowerice", "fakeout", "encore", "willowisp", "taunt"],
eventPokemon: [
{"generation": 7, "level": 50, "isHidden": false, "moves":["fakeout", "toxic", "sludgebomb", "flamethrower"], "pokeball": "cherishball"},
],
tier: "RU",
},
stufful: {
tier: "LC",
},
bewear: {
randomBattleMoves: ["hammerarm", "icepunch", "swordsdance", "return", "shadowclaw", "doubleedge"],
randomDoubleBattleMoves: ["hammerarm", "icepunch", "doubleedge", "protect", "wideguard"],
eventPokemon: [
{"generation": 7, "level": 50, "gender": "F", "isHidden": true, "moves":["babydolleyes", "brutalswing", "superpower", "bind"], "pokeball": "cherishball"},
],
tier: "RU",
},
bounsweet: {
tier: "LC",
},
steenee: {
eventPokemon: [
{"generation": 7, "level": 20, "nature": "Naive", "isHidden": false, "abilities":["leafguard"], "moves":["magicalleaf", "doubleslap", "sweetscent"], "pokeball": "cherishball"},
],
tier: "NFE",
},
tsareena: {
randomBattleMoves: ["highjumpkick", "tropkick", "playrough", "uturn"],
randomDoubleBattleMoves: ["highjumpkick", "playrough", "tropkick", "uturn", "feint", "protect"],
tier: "RU",
},
comfey: {
randomBattleMoves: ["aromatherapy", "drainingkiss", "toxic", "synthesis", "uturn"],
randomDoubleBattleMoves: ["floralhealing", "drainingkiss", "uturn", "lightscreen", "taunt"],
eventPokemon: [
{"generation": 7, "level": 10, "nature": "Jolly", "isHidden": false, "moves":["celebrate", "leechseed", "drainingkiss", "magicalleaf"], "pokeball": "cherishball"},
],
tier: "RU",
},
oranguru: {
randomBattleMoves: ["nastyplot", "psyshock", "focusblast", "thunderbolt"],
randomDoubleBattleMoves: ["trickroom", "foulplay", "instruct", "psychic", "protect", "lightscreen", "reflect"],
eventPokemon: [
{"generation": 7, "level": 1, "shiny": 1, "isHidden": false, "abilities":["telepathy"], "moves":["instruct", "psychic", "psychicterrain"], "pokeball": "cherishball"},
],
unreleasedHidden: true,
tier: "PU",
},
passimian: {
randomBattleMoves: ["rockslide", "closecombat", "earthquake", "ironhead", "uturn"],
randomDoubleBattleMoves: ["closecombat", "uturn", "rockslide", "protect", "ironhead", "taunt"],
eventPokemon: [
{"generation": 7, "level": 1, "shiny": 1, "isHidden": false, "moves":["bestow", "fling", "feint"], "pokeball": "cherishball"},
],
unreleasedHidden: true,
tier: "PU",
},
wimpod: {
tier: "LC",
},
golisopod: {
randomBattleMoves: ["spikes", "firstimpression", "liquidation", "suckerpunch", "aquajet", "toxic", "leechlife"],
randomDoubleBattleMoves: ["firstimpression", "aquajet", "liquidation", "leechlife", "protect", "suckerpunch", "wideguard"],
tier: "RU",
},
sandygast: {
tier: "LC",
},
palossand: {
randomBattleMoves: ["shoreup", "earthpower", "shadowball", "protect", "toxic"],
randomDoubleBattleMoves: ["shoreup", "protect", "shadowball", "earthpower"],
tier: "PU",
},
pyukumuku: {
randomBattleMoves: ["batonpass", "counter", "reflect", "lightscreen"],
randomDoubleBattleMoves: ["reflect", "lightscreen", "counter", "helpinghand", "safeguard", "memento"],
tier: "PU",
},
typenull: {
eventPokemon: [
{"generation": 7, "level": 40, "shiny": 1, "perfectIVs": 3, "moves":["crushclaw", "scaryface", "xscissor", "takedown"]},
],
eventOnly: true,
tier: "NFE",
},
silvally: {
randomBattleMoves: ["swordsdance", "return", "doubleedge", "crunch", "flamecharge", "flamethrower", "icebeam", "uturn", "ironhead"],
randomDoubleBattleMoves: ["protect", "doubleedge", "uturn", "crunch", "icebeam", "partingshot", "flamecharge", "swordsdance", "explosion"],
eventPokemon: [
{"generation": 7, "level": 100, "shiny": true, "moves":["multiattack", "partingshot", "punishment", "scaryface"], "pokeball": "cherishball"},
],
tier: "PU",
},
silvallybug: {
randomBattleMoves: ["flamethrower", "icebeam", "thunderbolt", "uturn"],
randomDoubleBattleMoves: ["protect", "uturn", "flamethrower", "icebeam", "thunderbolt", "thunderwave"],
requiredItem: "Bug Memory",
tier: "PU",
},
silvallydark: {
randomBattleMoves: ["multiattack", "swordsdance", "flamecharge", "ironhead"],
randomDoubleBattleMoves: ["protect", "multiattack", "icebeam", "partingshot", "uturn", "snarl", "thunderwave"],
requiredItem: "Dark Memory",
tier: "PU",
},
silvallydragon: {
randomBattleMoves: ["multiattack", "ironhead", "flamecharge", "flamethrower", "icebeam", "dracometeor", "swordsdance", "uturn"],
randomDoubleBattleMoves: ["protect", "dracometeor", "icebeam", "flamethrower", "partingshot", "uturn", "thunderwave"],
requiredItem: "Dragon Memory",
tier: "PU",
},
silvallyelectric: {
randomBattleMoves: ["multiattack", "flamethrower", "icebeam", "partingshot", "toxic"],
randomDoubleBattleMoves: ["protect", "thunderbolt", "icebeam", "uturn", "partingshot", "snarl", "thunderwave"],
requiredItem: "Electric Memory",
tier: "PU",
},
silvallyfairy: {
randomBattleMoves: ["multiattack", "flamethrower", "rockslide", "thunderwave", "partingshot"],
randomDoubleBattleMoves: ["protect", "multiattack", "uturn", "icebeam", "partingshot", "flamethrower", "thunderwave"],
requiredItem: "Fairy Memory",
tier: "PU",
},
silvallyfighting: {
randomBattleMoves: ["swordsdance", "multiattack", "shadowclaw", "flamecharge", "ironhead"],
randomDoubleBattleMoves: ["protect", "multiattack", "rockslide", "swordsdance", "flamecharge"],
requiredItem: "Fighting Memory",
tier: "PU",
},
silvallyfire: {
randomBattleMoves: ["multiattack", "icebeam", "thunderbolt", "uturn"],
randomDoubleBattleMoves: ["protect", "flamethrower", "snarl", "uturn", "thunderbolt", "icebeam", "thunderwave"],
requiredItem: "Fire Memory",
tier: "PU",
},
silvallyflying: {
randomBattleMoves: ["multiattack", "flamethrower", "ironhead", "partingshot", "thunderwave"],
randomDoubleBattleMoves: ["protect", "multiattack", "partingshot", "swordsdance", "flamecharge", "uturn", "ironhead", "thunderwave"],
requiredItem: "Flying Memory",
tier: "PU",
},
silvallyghost: {
randomBattleMoves: ["multiattack", "flamethrower", "icebeam", "partingshot", "toxic"],
randomDoubleBattleMoves: ["protect", "multiattack", "uturn", "icebeam", "partingshot"],
requiredItem: "Ghost Memory",
tier: "PU",
},
silvallygrass: {
randomBattleMoves: ["multiattack", "flamethrower", "icebeam", "partingshot", "toxic"],
randomDoubleBattleMoves: ["protect", "flamethrower", "multiattack", "icebeam", "uturn", "partingshot", "thunderwave"],
requiredItem: "Grass Memory",
tier: "PU",
},
silvallyground: {
randomBattleMoves: ["multiattack", "swordsdance", "flamecharge", "rockslide"],
randomDoubleBattleMoves: ["protect", "multiattack", "icebeam", "thunderbolt", "flamecharge", "rockslide", "swordsdance"],
requiredItem: "Ground Memory",
tier: "PU",
},
silvallyice: {
randomBattleMoves: ["multiattack", "thunderbolt", "flamethrower", "uturn", "toxic"],
randomDoubleBattleMoves: ["protect", "icebeam", "thunderbolt", "partingshot", "uturn", "thunderwave"],
requiredItem: "Ice Memory",
tier: "PU",
},
silvallypoison: {
randomBattleMoves: ["multiattack", "flamethrower", "icebeam", "partingshot", "toxic"],
randomDoubleBattleMoves: ["protect", "multiattack", "uturn", "partingshot", "flamethrower", "icebeam", "thunderwave"],
requiredItem: "Poison Memory",
tier: "PU",
},
silvallypsychic: {
randomBattleMoves: ["multiattack", "flamethrower", "rockslide", "partingshot", "thunderwave"],
randomDoubleBattleMoves: ["protect", "multiattack", "partingshot", "uturn", "flamethrower", "thunderwave"],
requiredItem: "Psychic Memory",
tier: "PU",
},
silvallyrock: {
randomBattleMoves: ["multiattack", "flamethrower", "icebeam", "partingshot", "toxic"],
randomDoubleBattleMoves: ["protect", "rockslide", "uturn", "icebeam", "flamethrower", "partingshot"],
requiredItem: "Rock Memory",
tier: "PU",
},
silvallysteel: {
randomBattleMoves: ["multiattack", "crunch", "flamethrower", "thunderbolt"],
randomDoubleBattleMoves: ["protect", "multiattack", "swordsdance", "rockslide", "flamecharge", "uturn", "partingshot"],
requiredItem: "Steel Memory",
tier: "PU",
},
silvallywater: {
randomBattleMoves: ["multiattack", "icebeam", "thunderbolt", "partingshot"],
randomDoubleBattleMoves: ["protect", "multiattack", "icebeam", "thunderbolt", "flamethrower", "partingshot", "uturn", "thunderwave"],
requiredItem: "Water Memory",
tier: "PU",
},
minior: {
randomBattleMoves: ["shellsmash", "powergem", "acrobatics", "earthquake"],
randomDoubleBattleMoves: ["shellsmash", "powergem", "acrobatics", "earthquake", "protect"],
tier: "NU",
},
miniormeteor: {
battleOnly: true,
},
komala: {
randomBattleMoves: ["return", "suckerpunch", "woodhammer", "earthquake", "playrough", "uturn"],
randomDoubleBattleMoves: ["protect", "return", "uturn", "suckerpunch", "woodhammer", "shadowclaw", "playrough", "swordsdance"],
tier: "PU",
},
turtonator: {
randomBattleMoves: ["fireblast", "shelltrap", "earthquake", "dragontail", "explosion", "dracometeor"],
randomDoubleBattleMoves: ["dragonpulse", "dracometeor", "fireblast", "shellsmash", "protect", "focusblast", "explosion"],
eventPokemon: [
{"generation": 7, "level": 1, "shiny": 1, "moves":["flamethrower", "bodyslam", "wideguard"], "pokeball": "cherishball"},
{"generation": 7, "level": 30, "gender": "M", "nature": "Brave", "moves":["flamethrower", "shelltrap", "dragontail"], "pokeball": "cherishball"},
],
tier: "PU",
},
togedemaru: {
randomBattleMoves: ["spikyshield", "zingzap", "nuzzle", "uturn", "wish"],
randomDoubleBattleMoves: ["zingzap", "nuzzle", "spikyshield", "encore", "fakeout", "uturn"],
tier: "PU",
},
mimikyu: {
randomBattleMoves: ["swordsdance", "shadowsneak", "playrough", "woodhammer", "shadowclaw"],
randomDoubleBattleMoves: ["trickroom", "shadowclaw", "playrough", "woodhammer", "willowisp", "shadowsneak", "swordsdance", "protect"],
eventPokemon: [
{"generation": 7, "level": 10, "moves":["copycat", "babydolleyes", "splash", "astonish"], "pokeball": "cherishball"},
{"generation": 7, "level": 10, "moves":["astonish", "playrough", "copycat", "substitute"], "pokeball": "cherishball"},
],
tier: "OU",
},
mimikyubusted: {
battleOnly: true,
},
bruxish: {
randomBattleMoves: ["psychicfangs", "crunch", "waterfall", "icefang", "aquajet", "swordsdance"],
randomDoubleBattleMoves: ["trickroom", "psychicfangs", "crunch", "waterfall", "protect", "swordsdance"],
tier: "RU",
},
drampa: {
randomBattleMoves: ["dracometeor", "dragonpulse", "hypervoice", "fireblast", "thunderbolt", "glare", "substitute", "roost"],
randomDoubleBattleMoves: ["dracometeor", "dragonpulse", "hypervoice", "fireblast", "icebeam", "energyball", "thunderbolt", "protect", "roost"],
eventPokemon: [
{"generation": 7, "level": 1, "shiny": 1, "isHidden": true, "moves":["playnice", "echoedvoice", "hurricane"], "pokeball": "cherishball"},
],
tier: "PU",
},
dhelmise: {
randomBattleMoves: ["swordsdance", "powerwhip", "phantomforce", "anchorshot", "switcheroo", "earthquake"],
randomDoubleBattleMoves: ["powerwhip", "shadowclaw", "anchorshot", "protect", "gyroball"],
tier: "RU",
},
jangmoo: {
tier: "LC",
},
hakamoo: {
tier: "NFE",
},
kommoo: {
randomBattleMoves: ["dragondance", "outrage", "dragonclaw", "skyuppercut", "poisonjab"],
randomDoubleBattleMoves: ["clangingscales", "focusblast", "flashcannon", "substitute", "protect", "dracometeor"],
tier: "RU",
},
tapukoko: {
randomBattleMoves: ["wildcharge", "voltswitch", "naturesmadness", "bravebird", "uturn", "dazzlinggleam"],
randomDoubleBattleMoves: ["wildcharge", "voltswitch", "dazzlinggleam", "bravebird", "protect", "thunderbolt", "hiddenpowerice", "taunt", "skydrop", "naturesmadness", "uturn"],
eventPokemon: [
{"generation": 7, "level": 60, "isHidden": false, "moves":["naturesmadness", "discharge", "agility", "electroball"]},
{"generation": 7, "level": 60, "shiny": true, "nature": "Timid", "isHidden": false, "moves":["naturesmadness", "discharge", "agility", "electroball"], "pokeball": "cherishball"},
],
eventOnly: true,
unreleasedHidden: true,
tier: "OU",
},
tapulele: {
randomBattleMoves: ["moonblast", "psyshock", "calmmind", "focusblast", "taunt"],
randomDoubleBattleMoves: ["moonblast", "psychic", "dazzlinggleam", "focusblast", "protect", "taunt", "shadowball", "thunderbolt"],
eventPokemon: [
{"generation": 7, "level": 60, "isHidden": false, "moves":["naturesmadness", "extrasensory", "flatter", "moonblast"]},
],
eventOnly: true,
unreleasedHidden: true,
tier: "OU",
},
tapubulu: {
randomBattleMoves: ["woodhammer", "hornleech", "stoneedge", "superpower", "megahorn", "bulkup"],
randomDoubleBattleMoves: ["woodhammer", "hornleech", "stoneedge", "superpower", "leechseed", "protect", "naturesmadness"],
eventPokemon: [
{"generation": 7, "level": 60, "isHidden": false, "moves":["naturesmadness", "zenheadbutt", "megahorn", "skullbash"]},
],
eventOnly: true,
unreleasedHidden: true,
tier: "OU",
},
tapufini: {
randomBattleMoves: ["calmmind", "moonblast", "surf", "substitute", "icebeam", "hydropump"],
randomDoubleBattleMoves: ["muddywater", "moonblast", "calmmind", "icebeam", "healpulse", "protect", "taunt", "swagger"],
eventPokemon: [
{"generation": 7, "level": 60, "isHidden": false, "moves":["naturesmadness", "muddywater", "aquaring", "hydropump"]},
],
eventOnly: true,
unreleasedHidden: true,
tier: "OU",
},
cosmog: {
eventPokemon: [
{"generation": 7, "level": 5, "moves":["splash"]},
],
eventOnly: true,
tier: "LC",
},
cosmoem: {
tier: "NFE",
},
solgaleo: {
randomBattleMoves: ["sunsteelstrike", "zenheadbutt", "flareblitz", "morningsun", "stoneedge", "earthquake"],
randomDoubleBattleMoves: ["wideguard", "protect", "sunsteelstrike", "morningsun", "zenheadbutt", "flareblitz"],
eventPokemon: [
{"generation": 7, "level": 55, "moves":["sunsteelstrike", "cosmicpower", "crunch", "zenheadbutt"]},
],
tier: "Uber",
},
lunala: {
randomBattleMoves: ["moongeistbeam", "psyshock", "calmmind", "focusblast", "roost"],
randomDoubleBattleMoves: ["wideguard", "protect", "roost", "moongeistbeam", "psychic", "focusblast"],
eventPokemon: [
{"generation": 7, "level": 55, "moves":["moongeistbeam", "cosmicpower", "nightdaze", "shadowball"]},
],
tier: "Uber",
},
nihilego: {
randomBattleMoves: ["stealthrock", "acidspray", "powergem", "toxicspikes", "sludgewave"],
randomDoubleBattleMoves: ["powergem", "sludgebomb", "grassknot", "protect", "thunderbolt", "hiddenpowerice"],
eventPokemon: [
{"generation": 7, "level": 55, "moves":["powergem", "mirrorcoat", "acidspray", "venomdrench"]},
],
eventOnly: true,
tier: "UU",
},
buzzwole: {
randomBattleMoves: ["superpower", "leechlife", "stoneedge", "poisonjab", "earthquake"],
randomDoubleBattleMoves: ["hammerarm", "superpower", "leechlife", "icepunch", "poisonjab"],
eventPokemon: [
{"generation": 7, "level": 65, "moves":["counter", "hammerarm", "lunge", "dynamicpunch"]},
],
eventOnly: true,
tier: "BL",
},
pheromosa: {
randomBattleMoves: ["highjumpkick", "uturn", "icebeam", "poisonjab", "bugbuzz"],
randomDoubleBattleMoves: ["highjumpkick", "uturn", "icebeam", "poisonjab", "bugbuzz", "protect", "speedswap"],
eventPokemon: [
{"generation": 7, "level": 60, "moves":["triplekick", "lunge", "bugbuzz", "mefirst"]},
],
eventOnly: true,
tier: "Uber",
},
xurkitree: {
randomBattleMoves: ["thunderbolt", "voltswitch", "energyball", "dazzlinggleam", "hiddenpowerice"],
randomDoubleBattleMoves: ["thunderbolt", "hiddenpowerice", "tailglow", "protect", "energyball", "hypnosis"],
eventPokemon: [
{"generation": 7, "level": 65, "moves":["hypnosis", "discharge", "electricterrain", "powerwhip"]},
],
eventOnly: true,
tier: "BL",
},
celesteela: {
randomBattleMoves: ["autotomize", "heavyslam", "airslash", "fireblast", "earthquake", "leechseed", "protect"],
randomDoubleBattleMoves: ["protect", "heavyslam", "fireblast", "earthquake", "wideguard", "leechseed", "flamethrower", "substitute"],
eventPokemon: [
{"generation": 7, "level": 65, "moves":["autotomize", "seedbomb", "skullbash", "irondefense"]},
],
eventOnly: true,
tier: "OU",
},
kartana: {
randomBattleMoves: ["leafblade", "sacredsword", "smartstrike", "psychocut", "swordsdance"],
randomDoubleBattleMoves: ["leafblade", "sacredsword", "smartstrike", "psychocut", "protect", "nightslash"],
eventPokemon: [
{"generation": 7, "level": 60, "moves":["leafblade", "xscissor", "detect", "airslash"]},
],
eventOnly: true,
tier: "OU",
},
guzzlord: {
randomBattleMoves: ["dracometeor", "hammerarm", "crunch", "earthquake", "fireblast"],
randomDoubleBattleMoves: ["dracometeor", "crunch", "darkpulse", "wideguard", "fireblast", "protect"],
eventPokemon: [
{"generation": 7, "level": 70, "moves":["thrash", "gastroacid", "heavyslam", "wringout"]},
],
eventOnly: true,
tier: "PU",
},
necrozma: {
randomBattleMoves: ["calmmind", "psychic", "darkpulse", "moonlight", "stealthrock", "storedpower"],
randomDoubleBattleMoves: ["calmmind", "autotomize", "irondefense", "trickroom", "moonlight", "storedpower", "psyshock"],
eventPokemon: [
{"generation": 7, "level": 75, "moves":["stealthrock", "irondefense", "wringout", "prismaticlaser"]},
],
eventOnly: true,
tier: "BL3",
},
magearna: {
randomBattleMoves: ["shiftgear", "flashcannon", "aurasphere", "fleurcannon", "ironhead", "thunderbolt", "icebeam"],
randomDoubleBattleMoves: ["dazzlinggleam", "flashcannon", "substitute", "protect", "trickroom", "fleurcannon", "aurasphere", "voltswitch"],
eventPokemon: [
{"generation": 7, "level": 50, "moves":["fleurcannon", "flashcannon", "luckychant", "helpinghand"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "OU",
},
magearnaoriginal: {
isUnreleased: true,
tier: "Unreleased",
},
marshadow: {
randomBattleMoves: ["spectralthief", "closecombat", "stoneedge", "shadowsneak", "icepunch"],
randomDoubleBattleMoves: ["spectralthief", "closecombat", "shadowsneak", "icepunch", "protect"],
eventPokemon: [
{"generation": 7, "level": 50, "moves":["spectralthief", "closecombat", "forcepalm", "shadowball"], "pokeball": "cherishball"},
],
eventOnly: true,
tier: "Uber",
},
missingno: {
randomBattleMoves: ["watergun", "skyattack", "doubleedge", "metronome"],
isNonstandard: true,
tier: "Illegal",
},
tomohawk: {
randomBattleMoves: ["aurasphere", "roost", "stealthrock", "rapidspin", "hurricane", "airslash", "taunt", "substitute", "toxic", "naturepower", "earthpower"],
isNonstandard: true,
tier: "CAP",
},
necturna: {
randomBattleMoves: ["powerwhip", "hornleech", "willowisp", "shadowsneak", "stoneedge", "sacredfire", "boltstrike", "vcreate", "extremespeed", "closecombat", "shellsmash", "spore", "milkdrink", "batonpass", "stickyweb"],
isNonstandard: true,
tier: "CAP",
},
mollux: {
randomBattleMoves: ["fireblast", "thunderbolt", "sludgebomb", "thunderwave", "willowisp", "recover", "rapidspin", "trick", "stealthrock", "toxicspikes", "lavaplume"],
isNonstandard: true,
tier: "CAP",
},
aurumoth: {
randomBattleMoves: ["dragondance", "quiverdance", "closecombat", "bugbuzz", "hydropump", "megahorn", "psychic", "blizzard", "thunder", "focusblast", "zenheadbutt"],
isNonstandard: true,
tier: "CAP",
},
malaconda: {
randomBattleMoves: ["powerwhip", "glare", "toxic", "suckerpunch", "rest", "substitute", "uturn", "synthesis", "rapidspin", "knockoff"],
isNonstandard: true,
tier: "CAP",
},
cawmodore: {
randomBattleMoves: ["bellydrum", "bulletpunch", "drainpunch", "acrobatics", "drillpeck", "substitute", "ironhead", "quickattack"],
isNonstandard: true,
tier: "CAP",
},
volkraken: {
randomBattleMoves: ["scald", "powergem", "hydropump", "memento", "hiddenpowerice", "fireblast", "willowisp", "uturn", "substitute", "flashcannon", "surf"],
isNonstandard: true,
tier: "CAP",
},
plasmanta: {
randomBattleMoves: ["sludgebomb", "thunderbolt", "substitute", "hiddenpowerice", "psyshock", "dazzlinggleam", "flashcannon"],
isNonstandard: true,
tier: "CAP",
},
naviathan: {
randomBattleMoves: ["dragondance", "waterfall", "ironhead", "iciclecrash"],
isNonstandard: true,
tier: "CAP",
},
crucibelle: {
randomBattleMoves: ["headsmash", "gunkshot", "coil", "lowkick", "uturn", "stealthrock"],
isNonstandard: true,
tier: "CAP",
},
crucibellemega: {
randomBattleMoves: ["headsmash", "gunkshot", "coil", "woodhammer", "lowkick", "uturn"],
requiredItem: "Crucibellite",
isNonstandard: true,
tier: "CAP",
},
kerfluffle: {
randomBattleMoves: ["aurasphere", "moonblast", "taunt", "partingshot", "gigadrain", "yawn"],
isNonstandard: true,
eventPokemon: [
{"generation": 6, "level": 16, "isHidden": false, "abilities":["naturalcure"], "moves":["celebrate", "holdhands", "fly", "metronome"], "pokeball": "cherishball"},
],
tier: "CAP",
},
syclant: {
randomBattleMoves: ["bugbuzz", "icebeam", "blizzard", "earthpower", "spikes", "superpower", "tailglow", "uturn", "focusblast"],
isNonstandard: true,
tier: "CAP",
},
revenankh: {
randomBattleMoves: ["bulkup", "shadowsneak", "drainpunch", "rest", "moonlight", "icepunch", "glare"],
isNonstandard: true,
tier: "CAP",
},
pyroak: {
randomBattleMoves: ["leechseed", "lavaplume", "substitute", "protect", "gigadrain"],
isNonstandard: true,
tier: "CAP",
},
fidgit: {
randomBattleMoves: ["spikes", "stealthrock", "toxicspikes", "wish", "rapidspin", "encore", "uturn", "sludgebomb", "earthpower"],
isNonstandard: true,
tier: "CAP",
},
stratagem: {
randomBattleMoves: ["paleowave", "earthpower", "fireblast", "gigadrain", "calmmind", "substitute"],
isNonstandard: true,
tier: "CAP",
},
arghonaut: {
randomBattleMoves: ["recover", "bulkup", "waterfall", "drainpunch", "crosschop", "stoneedge", "thunderpunch", "aquajet", "machpunch"],
isNonstandard: true,
tier: "CAP",
},
kitsunoh: {
randomBattleMoves: ["shadowstrike", "earthquake", "superpower", "meteormash", "uturn", "icepunch", "trick", "willowisp"],
isNonstandard: true,
tier: "CAP",
},
cyclohm: {
randomBattleMoves: ["slackoff", "dracometeor", "dragonpulse", "fireblast", "thunderbolt", "hydropump", "discharge", "healbell"],
isNonstandard: true,
tier: "CAP",
},
colossoil: {
randomBattleMoves: ["earthquake", "crunch", "suckerpunch", "uturn", "rapidspin", "encore", "pursuit", "knockoff"],
isNonstandard: true,
tier: "CAP",
},
krilowatt: {
randomBattleMoves: ["surf", "thunderbolt", "icebeam", "earthpower"],
isNonstandard: true,
tier: "CAP",
},
voodoom: {
randomBattleMoves: ["aurasphere", "darkpulse", "taunt", "painsplit", "substitute", "hiddenpowerice", "vacuumwave", "flashcannon"],
isNonstandard: true,
tier: "CAP",
},
syclar: {
isNonstandard: true,
tier: "CAP LC",
},
embirch: {
isNonstandard: true,
tier: "CAP LC",
},
flarelm: {
isNonstandard: true,
tier: "CAP NFE",
},
breezi: {
isNonstandard: true,
tier: "CAP LC",
},
scratchet: {
isNonstandard: true,
tier: "CAP LC",
},
necturine: {
isNonstandard: true,
tier: "CAP LC",
},
cupra: {
isNonstandard: true,
tier: "CAP LC",
},
argalis: {
isNonstandard: true,
tier: "CAP NFE",
},
brattler: {
isNonstandard: true,
tier: "CAP LC",
},
cawdet: {
isNonstandard: true,
tier: "CAP LC",
},
volkritter: {
isNonstandard: true,
tier: "CAP LC",
},
snugglow: {
isNonstandard: true,
tier: "CAP LC",
},
floatoy: {
isNonstandard: true,
tier: "CAP LC",
},
caimanoe: {
isNonstandard: true,
tier: "CAP NFE",
},
pluffle: {
isNonstandard: true,
tier: "CAP LC",
},
pokestarufo: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 38, "moves": ["bubblebeam", "counter", "recover", "signalbeam"]},
],
gen: 5,
tier: "Illegal",
},
pokestarufo2: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 47, "moves": ["darkpulse", "flamethrower", "hyperbeam", "icebeam"]},
],
gen: 5,
tier: "Illegal",
},
pokestarbrycenman: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 56, "moves": ["icebeam", "nightshade", "psychic", "uturn"]},
],
gen: 5,
tier: "Illegal",
},
pokestarmt: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 63, "moves": ["earthquake", "ironhead", "spark", "surf"]},
],
gen: 5,
tier: "Illegal",
},
pokestarmt2: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 72, "moves": ["dragonpulse", "flamethrower", "metalburst", "thunderbolt"]},
],
gen: 5,
tier: "Illegal",
},
pokestartransport: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 20, "moves": ["clearsmog", "flameburst", "discharge"]},
{"generation": 5, "level": 50, "moves": ["iciclecrash", "overheat", "signalbeam"]},
],
gen: 5,
tier: "Illegal",
},
pokestargiant: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 99, "moves": ["crushgrip", "focuspunch", "growl", "rage"]},
],
gen: 5,
tier: "Illegal",
},
pokestargiant2: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 99, "moves": ["crushgrip", "doubleslap", "teeterdance", "stomp"]},
],
gen: 5,
tier: "Illegal",
},
pokestarhumanoid: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 20, "gender": "M", "moves": ["scratch", "shadowclaw", "acid"]},
{"generation": 5, "level": 30, "gender": "M", "moves": ["darkpulse", "shadowclaw", "slash"]},
{"generation": 5, "level": 20, "gender": "F", "moves": ["acid", "nightslash"]},
{"generation": 5, "level": 20, "gender": "M", "moves": ["acid", "doubleedge"]},
{"generation": 5, "level": 20, "gender": "F", "moves": ["acid", "rockslide"]},
{"generation": 5, "level": 20, "gender": "M", "moves": ["acid", "thudnerpunch"]},
{"generation": 5, "level": 20, "gender": "F", "moves": ["acid", "icepunch"]},
{"generation": 5, "level": 40, "gender": "F", "moves": ["explosion", "selfdestruct"]},
{"generation": 5, "level": 40, "gender": "F", "moves": ["shadowclaw", "scratch"]},
{"generation": 5, "level": 40, "gender": "M", "moves": ["nightslash", "scratch"]},
{"generation": 5, "level": 40, "gender": "M", "moves": ["doubleedge", "scratch"]},
{"generation": 5, "level": 40, "gender": "F", "moves": ["rockslide", "scratch"]},
],
gen: 5,
tier: "Illegal",
},
pokestarmonster: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 50, "moves": ["darkpulse", "confusion"]},
],
gen: 5,
tier: "Illegal",
},
pokestarf00: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 10, "moves": ["teeterdance", "growl", "flail", "chatter"]},
{"generation": 5, "level": 58, "moves": ["needlearm", "headsmash", "headbutt", "defensecurl"]},
{"generation": 5, "level": 60, "moves": ["hammerarm", "perishsong", "ironhead", "thrash"]},
],
gen: 5,
tier: "Illegal",
},
pokestarf002: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 52, "moves": ["flareblitz", "ironhead", "psychic", "wildcharge"]},
],
gen: 5,
tier: "Illegal",
},
pokestarspirit: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 99, "moves": ["crunch", "dualchop", "slackoff", "swordsdance"]},
],
gen: 5,
tier: "Illegal",
},
pokestarblackdoor: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 53, "moves": ["luckychant", "amnesia", "ingrain", "rest"]},
{"generation": 5, "level": 70, "moves": ["batonpass", "counter", "flamecharge", "toxic"]},
],
gen: 5,
tier: "Illegal",
},
pokestarwhitedoor: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 7, "moves": ["batonpass", "inferno", "mirrorcoat", "toxic"]},
],
gen: 5,
tier: "Illegal",
},
pokestarblackbelt: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 30, "moves": ["focuspunch", "machpunch", "taunt"]},
{"generation": 5, "level": 40, "moves": ["machpunch", "hammerarm", "jumpkick"]},
],
gen: 5,
tier: "Illegal",
},
pokestargiantpropo2: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 99, "moves": ["crushgrip", "doubleslap", "teeterdance", "stomp"]},
],
gen: 5,
tier: "Illegal",
},
pokestarufopropu2: {
isNonstandard: true,
eventPokemon: [
{"generation": 5, "level": 47, "moves": ["darkpulse", "flamethrower", "hyperbeam", "icebeam"]},
],
gen: 5,
tier: "Illegal",
},
};
|
/*
* GET home page.
*/
exports.index = function(req, res){
res.render('index', { title: 'DSA' });
};
exports.game = function (req,res){
res.render('game',{title: req.params.id })
}; |
const fs = require('fs');
module.exports = (params) => () => {
fs.writeFileSync(`${params.projectRoot}/License.md`, params.license);
return 'licenseMd: ok';
};
|
function Improvement(options) {
this.name = options.name;
this.image = options.image;
this.depth = options.depth || 0;
this.parent = options.parent;
this.children = options.children || [];
this.siblings = options.siblings || [];
this.toDisplay = options.toDisplay || [];
this.toBuild = options.toBuild || [];
this.cost = options.cost;
this.materials = options.materials;
this.buildEvent = 'event:'+options.buildEvent;
}
Improvement.prototype = {
/*
* The build function will build the improvement, adding it to the list of
* improvements built in the GameState and removing the needed materials
* from the character's inventory.
*/
build: function() {
GameState.buildImprovement(this.code);
var character = GameState.getCharacter();
character.adjustCurrency(-this.cost);
$.each(this.materials, function(key, value) {
character.removeItem({ item:key, count:value });
});
},
/*
* An improvement is active when it has been built and none of its children
* have been built.
*/
isActive: function() {
if (!GameState.isImprovementBuilt(this.code)) {
return false;
}
for (var i=0; i<this.children.length; i++) {
if (GameState.isImprovementBuilt(this.children[i])) {
return false;
}
}
return true;
},
/*
* Function used to check to see if the improvement can be built regardless
* of whether the character has the materials or not. If this improvement
* has a parent location that hasn't been built then this improvement cannot
* be built. If this improvement has any sibling improvements that have been
* built then this improvement cannot be built.
*/
canBuild: function() {
if (this.canDisplay() == false) { return false; }
for (var i=0; i<this.siblings.length; i++) {
if (GameState.isImprovementBuilt(this.siblings[i])) {
return false;
}
}
return Resolver.meetsRequirements(this.toBuild);
},
/*
* Function used to check to see if an improvement should be displayed in
* the list of improvements. Improvements with parent improvements will not
* be displayed until their parent improvements have been built.
*/
canDisplay: function() {
if (this.parent && !GameState.isImprovementBuilt(this.parent)) {
return false;
}
return Resolver.meetsRequirements(this.toDisplay);
},
/*
* Function used to check to see if the character has both the currency and
* materials needed to build the improvement.
*/
hasMaterials: function() {
var character = GameState.getCharacter();
if (character.getCurrency() < this.cost) {
return false;
}
var result = true;
$.each(this.materials, function(key, value) {
if (character.getItemQuantity(key) < value) {
result = false;
}
});
return result;
},
/* Get the description of the improvement from the interface data. */
getDescription: function() {
return Data.getInterface('improvement_'+this.getCode());
},
getBuildEvent: function() { return this.buildEvent; },
getCode: function() { return this.code; },
getCost: function() { return this.cost; },
getDepth: function() { return this.depth; },
getImage: function() { return this.image; },
getMaterials: function() { return this.materials; },
getName: function() { return this.name; },
}; |
(function($, UI) {
"use strict";
var $win = $(window),
$doc = $(document),
scrollspies = [],
checkScrollSpy = function() {
for(var i=0; i < scrollspies.length; i++) {
UI.support.requestAnimationFrame.apply(window, [scrollspies[i].check]);
}
};
UI.component('scrollspy', {
defaults: {
"cls" : "uk-scrollspy-inview",
"initcls" : "uk-scrollspy-init-inview",
"topoffset" : 0,
"leftoffset" : 0,
"repeat" : false,
"delay" : 0
},
init: function() {
var $this = this, idle, inviewstate, initinview,
fn = function(){
var inview = UI.Utils.isInView($this.element, $this.options);
if(inview && !inviewstate) {
if(idle) clearTimeout(idle);
if(!initinview) {
$this.element.addClass($this.options.initcls);
$this.offset = $this.element.offset();
initinview = true;
$this.trigger("uk.scrollspy.init");
}
idle = setTimeout(function(){
if(inview) {
$this.element.addClass("uk-scrollspy-inview").addClass($this.options.cls).width();
}
}, $this.options.delay);
inviewstate = true;
$this.trigger("uk.scrollspy.inview");
}
if (!inview && inviewstate && $this.options.repeat) {
$this.element.removeClass("uk-scrollspy-inview").removeClass($this.options.cls);
inviewstate = false;
$this.trigger("uk.scrollspy.outview");
}
};
fn();
this.check = fn;
scrollspies.push(this);
}
});
var scrollspynavs = [],
checkScrollSpyNavs = function() {
for(var i=0; i < scrollspynavs.length; i++) {
UI.support.requestAnimationFrame.apply(window, [scrollspynavs[i].check]);
}
};
UI.component('scrollspynav', {
defaults: {
"cls" : 'uk-active',
"closest" : false,
"topoffset" : 0,
"leftoffset" : 0,
"smoothscroll" : false
},
init: function() {
var ids = [],
links = this.find("a[href^='#']").each(function(){ ids.push($(this).attr("href")); }),
targets = $(ids.join(","));
var $this = this, inviews, fn = function(){
inviews = [];
for(var i=0 ; i < targets.length ; i++) {
if(UI.Utils.isInView(targets.eq(i), $this.options)) {
inviews.push(targets.eq(i));
}
}
if(inviews.length) {
var scrollTop = $win.scrollTop(),
target = (function(){
for(var i=0; i< inviews.length;i++){
if(inviews[i].offset().top >= scrollTop){
return inviews[i];
}
}
})();
if(!target) return;
if($this.options.closest) {
links.closest($this.options.closest).removeClass($this.options.cls).end().filter("a[href='#"+target.attr("id")+"']").closest($this.options.closest).addClass($this.options.cls);
} else {
links.removeClass($this.options.cls).filter("a[href='#"+target.attr("id")+"']").addClass($this.options.cls);
}
}
};
if(this.options.smoothscroll && UI["smoothScroll"]) {
links.each(function(){
UI.smoothScroll(this, $this.options.smoothscroll);
});
}
fn();
this.element.data("scrollspynav", this);
this.check = fn;
scrollspynavs.push(this);
}
});
var fnCheck = function(){
checkScrollSpy();
checkScrollSpyNavs();
};
// listen to scroll and resize
$doc.on("uk-scroll", fnCheck);
$win.on("resize orientationchange", UI.Utils.debounce(fnCheck, 50));
// init code
$doc.on("uk-domready", function(e) {
$("[data-uk-scrollspy]").each(function() {
var element = $(this);
if (!element.data("scrollspy")) {
var obj = UI.scrollspy(element, UI.Utils.options(element.attr("data-uk-scrollspy")));
}
});
$("[data-uk-scrollspy-nav]").each(function() {
var element = $(this);
if (!element.data("scrollspynav")) {
var obj = UI.scrollspynav(element, UI.Utils.options(element.attr("data-uk-scrollspy-nav")));
}
});
});
})(jQuery, jQuery.UIkit); |
var typecheck = require('./typeinference').typecheck,
macroexpand = require('./macroexpand').macroexpand,
loadModule = require('./modules').loadModule,
exportType = require('./modules').exportType,
types = require('./types'),
nodeToType = require('./typeinference').nodeToType,
nodes = require('./nodes').nodes,
lexer = require('./lexer'),
parser = require('../lib/parser').parser,
typeparser = require('../lib/typeparser').parser,
_ = require('underscore');
// Assigning the nodes to `parser.yy` allows the grammar to access the nodes from
// the `yy` namespace.
parser.yy = typeparser.yy = nodes;
parser.lexer = typeparser.lexer = {
"lex": function() {
var token = this.tokens[this.pos] ? this.tokens[this.pos++] : ['EOF'];
this.yytext = token[1];
this.yylineno = token[2];
return token[0];
},
"setInput": function(tokens) {
this.tokens = tokens;
this.pos = 0;
},
"upcomingInput": function() {
return "";
}
};
// Separate end comments from other expressions
var splitComments = function(body) {
return _.reduceRight(body, function(accum, node) {
if(!accum.body.length && node instanceof nodes.Comment) {
accum.comments.unshift(node);
return accum;
}
accum.body.unshift(node);
return accum;
}, {
body: [],
comments: []
});
};
// Compile an abstract syntax tree (AST) node to JavaScript.
var indent = 0;
var getIndent = function(extra) {
if(!extra) {
extra = 0;
}
var spacing = "";
var i;
for(i = 0; i < indent + extra; i++) {
spacing += " ";
}
return spacing;
};
var joinIndent = function(args, extra) {
var lineIndent = "\n" + getIndent(extra);
var argIndent = args.join("\n" + getIndent(extra));
if(argIndent) {
return argIndent + lineIndent;
}
return "";
};
var pushIndent = function() {
indent++;
return getIndent();
};
var popIndent = function() {
indent--;
return getIndent();
};
var compileNodeWithEnv = function(n, env, opts) {
if(!opts) opts = {};
var compileNode = function(n) {
return compileNodeWithEnv(n, env);
};
return n.accept({
// Function definition to JavaScript function.
visitFunction: function() {
var getArgs = function(a) {
return _.map(a, function(v) {
return v.name;
}).join(", ");
};
pushIndent();
var split = splitComments(n.body);
var compiledWhereDecls = _.map(n.whereDecls, compileNode);
var compiledNodeBody = _.map(split.body, compileNode);
var init = [];
if(compiledWhereDecls.length > 0) {
init.push(compiledWhereDecls.join(';\n' + getIndent()) + ';');
}
if(compiledNodeBody.length > 1) {
init.push(compiledNodeBody.slice(0, compiledNodeBody.length - 1).join(';\n' + getIndent()) + ';');
}
var lastString = compiledNodeBody[compiledNodeBody.length - 1];
var varEquals = "";
if(n.name) {
varEquals = "var " + n.name + " = ";
}
var compiledEndComments = "";
if(split.comments.length) {
compiledEndComments = getIndent() + _.map(split.comments, compileNode).join("\n" + getIndent()) + "\n";
}
return varEquals + "function(" + getArgs(n.args) + ") {\n" +
getIndent() + joinIndent(init) + "return " + lastString +
";\n" + compiledEndComments + popIndent() + "}";
},
visitIfThenElse: function() {
var compiledCondition = compileNode(n.condition);
var compileAppendSemicolon = function(n) {
return compileNode(n) + ';';
};
var ifTrue = splitComments(n.ifTrue);
var ifFalse = splitComments(n.ifFalse);
pushIndent();
pushIndent();
var compiledIfTrueInit = joinIndent(_.map(ifTrue.body.slice(0, ifTrue.body.length - 1), compileAppendSemicolon));
var compiledIfTrueLast = compileNode(ifTrue.body[ifTrue.body.length - 1]);
var compiledIfTrueEndComments = "";
if(ifTrue.comments.length) {
compiledIfTrueEndComments = getIndent() + _.map(ifTrue.comments, compileNode).join("\n" + getIndent()) + "\n";
}
var compiledIfFalseInit = joinIndent(_.map(ifFalse.body.slice(0, ifFalse.body.length - 1), compileAppendSemicolon));
var compiledIfFalseLast = compileNode(ifFalse.body[ifFalse.body.length - 1]);
var compiledIfFalseEndComments = "";
if(ifFalse.comments.length) {
compiledIfFalseEndComments = getIndent() + _.map(ifFalse.comments, compileNode).join("\n" + getIndent()) + "\n";
}
popIndent();
popIndent();
return "(function() {\n" +
getIndent(1) + "if(" + compiledCondition + ") {\n" +
getIndent(2) + compiledIfTrueInit + "return " + compiledIfTrueLast + ";\n" + compiledIfTrueEndComments +
getIndent(1) + "} else {\n" +
getIndent(2) + compiledIfFalseInit + "return " + compiledIfFalseLast + ";\n" + compiledIfFalseEndComments +
getIndent(1) + "}\n" +
getIndent() + "})()";
},
// Let binding to JavaScript variable.
visitLet: function() {
return "var " + n.name + " = " + compileNode(n.value);
},
visitInstance: function() {
return "var " + n.name + " = " + compileNode(n.object);
},
visitAssignment: function() {
return compileNode(n.name) + " = " + compileNode(n.value) + ";";
},
visitData: function() {
var defs = _.map(n.tags, compileNode);
return defs.join(";\n");
},
visitExpression: function() {
// No need to retain parenthesis for operations of higher
// precendence in JS
if(n.value instanceof nodes.Function || n.value instanceof nodes.Call) {
return compileNode(n.value);
}
return '(' + compileNode(n.value) + ')';
},
visitReplacement: function() {
return n.value;
},
visitQuoted: function() {
var serializeNode = {
visitReplacement: function(v) {
return "new nodes.Replacement(" + compileNode(v.value) + ")";
},
visitIdentifier: function(v) {
return "new nodes.Identifier(" + JSON.stringify(v.value) + ")";
},
visitAccess: function(v) {
return "new nodes.Access(" + serialize(v.value) + ", " + JSON.stringify(v.property) + ")";
},
visitPropertyAccess: function(v) {
return "new nodes.PropertyAccess(" + serialize(v.value) + ", " + JSON.stringify(v.property) + ")";
},
visitCall: function(v) {
return "new nodes.Call(" + serialize(v.func) + ", [" + _.map(v.args, serialize).join(', ') + "])";
}
};
var serialize = function(v) {
return v.accept(serializeNode);
};
return serialize(n.value);
},
visitReturn: function() {
return "__monad__.return(" + compileNode(n.value) + ");";
},
visitBind: function() {
var init = n.rest.slice(0, n.rest.length - 1);
var last = n.rest[n.rest.length - 1];
return "__monad__.bind(" + compileNode(n.value) +
", function(" + n.name + ") {\n" + pushIndent() +
_.map(init, compileNode).join(";\n" + getIndent()) + "\n" +
getIndent() + "return " + compileNode(last) + "\n" +
popIndent() + "});";
},
visitDo: function() {
var compiledInit = [];
var firstBind;
var lastBind;
var lastBindIndex = 0;
_.each(n.body, function(node, i) {
if(node instanceof nodes.Bind) {
if(!lastBind) {
firstBind = node;
} else {
lastBind.rest = n.body.slice(lastBindIndex + 1, i + 1);
}
lastBindIndex = i;
lastBind = node;
} else {
if(!lastBind) {
compiledInit.push(compileNode(node));
}
}
});
if(lastBind) {
lastBind.rest = n.body.slice(lastBindIndex + 1);
}
return "(function(){\n" + pushIndent() + "var __monad__ = " +
compileNode(n.value) + ";\n" + getIndent() +
(!firstBind ? 'return ' : '') + compiledInit.join(';\n' + getIndent()) + '\n' + getIndent() +
(firstBind ? 'return ' + compileNode(firstBind) : '') + "\n" +
popIndent() + "})()";
},
visitTag: function() {
var args = _.map(n.vars, function(v, i) {
return v.value + "_" + i;
});
var setters = _.map(args, function(v, i) {
return "this._" + i + " = " + v;
});
pushIndent();
var constructorString = "if(!(this instanceof " + n.name + ")) {\n" + getIndent(1) + "return new " + n.name + "(" + args.join(", ") + ");\n" + getIndent() + "}";
var settersString = (setters.length === 0 ? "" : "\n" + getIndent() + setters.join(";\n" + getIndent()) + ";");
popIndent();
return "var " + n.name + " = function(" + args.join(", ") + ") {\n" + getIndent(1) + constructorString + settersString + getIndent() + "\n}";
},
visitMatch: function() {
var flatMap = function(a, f) {
return _.flatten(_.map(a, f));
};
var pathConditions = _.map(n.cases, function(c) {
var getVars = function(pattern, varPath) {
return flatMap(pattern.vars, function(a, i) {
var nextVarPath = varPath.slice();
nextVarPath.push(i);
return a.accept({
visitIdentifier: function() {
if(a.value == '_') return [];
var accessors = _.map(nextVarPath, function(x) {
return "._" + x;
}).join('');
return ["var " + a.value + " = " + compileNode(n.value) + accessors + ";"];
},
visitPattern: function() {
return getVars(a, nextVarPath);
}
});
});
};
var vars = getVars(c.pattern, []);
var getTagPaths = function(pattern, patternPath) {
return flatMap(pattern.vars, function(a, i) {
var nextPatternPath = patternPath.slice();
nextPatternPath.push(i);
return a.accept({
visitIdentifier: function() {
return [];
},
visitPattern: function() {
var inner = getTagPaths(a, nextPatternPath);
inner.unshift({path: nextPatternPath, tag: a.tag});
return inner;
}
});
});
};
var tagPaths = getTagPaths(c.pattern, []);
var compiledValue = compileNode(n.value);
var extraConditions = _.map(tagPaths, function(e) {
return ' && ' + compiledValue + '._' + e.path.join('._') + ' instanceof ' + e.tag.value;
}).join('');
// More specific patterns need to appear first
// Need to sort by the length of the path
var maxTagPath = _.max(tagPaths, function(t) {
return t.path.length;
});
var maxPath = maxTagPath ? maxTagPath.path : [];
return {
path: maxPath,
condition: "if(" + compiledValue + " instanceof " + c.pattern.tag.value +
extraConditions + ") {\n" + getIndent(2) +
joinIndent(vars, 2) + "return " + compileNode(c.value) +
";\n" + getIndent(1) + "}"
};
});
var cases = _.map(_.sortBy(pathConditions, function(t) {
return -t.path.length;
}), function(e) {
return e.condition;
});
return "(function() {\n" + getIndent(1) + cases.join(" else ") + "\n" + getIndent() + "})()";
},
// Call to JavaScript call.
visitCall: function() {
var typeClasses = '';
if(n.typeClassInstance) {
typeClasses = n.typeClassInstance + ', ';
}
if(n.func.value == 'import') {
return importModule(JSON.parse(n.args[0].value), env, opts);
}
return compileNode(n.func) + "(" + typeClasses + _.map(n.args, compileNode).join(", ") + ")";
},
visitPropertyAccess: function() {
return compileNode(n.value) + "." + n.property;
},
visitAccess: function() {
return compileNode(n.value) + "[" + compileNode(n.property) + "]";
},
visitUnaryBooleanOperator: function() {
return [n.name, compileNode(n.value)].join(" ");
},
visitBinaryGenericOperator: function() {
return [compileNode(n.left), n.name, compileNode(n.right)].join(" ");
},
visitBinaryNumberOperator: function() {
return [compileNode(n.left), n.name, compileNode(n.right)].join(" ");
},
visitBinaryBooleanOperator: function() {
return [compileNode(n.left), n.name, compileNode(n.right)].join(" ");
},
visitBinaryStringOperator: function() {
return [compileNode(n.left), n.name, compileNode(n.right)].join(" ");
},
visitWith: function() {
var args = compileNode(n.left) + ', ' + compileNode(n.right);
var inner = _.map(['__l__', '__r__'], function(name) {
return 'for(__n__ in ' + name + ') {\n' + getIndent(2) + '__o__[__n__] = ' + name + '[__n__];\n' + getIndent(1) + '}';
});
return joinIndent(['(function(__l__, __r__) {', 'var __o__ = {}, __n__;'], 1) + joinIndent(inner, 1) + 'return __o__;\n' + getIndent() + '})(' + args + ')';
},
// Print all other nodes directly.
visitComment: function() {
return n.value;
},
visitIdentifier: function() {
var typeClassAccessor = '';
if(n.typeClassInstance) {
typeClassAccessor = n.typeClassInstance + '.';
}
return typeClassAccessor + n.value;
},
visitNumber: function() {
return n.value;
},
visitString: function() {
return n.value;
},
visitBoolean: function() {
return n.value;
},
visitUnit: function() {
return "null";
},
visitArray: function() {
return '[' + _.map(n.values, compileNode).join(', ') + ']';
},
visitTuple: function() {
return '[' + _.map(n.values, compileNode).join(', ') + ']';
},
visitObject: function() {
var key;
var pairs = [];
pushIndent();
for(key in n.values) {
pairs.push("\"" + key + "\": " + compileNode(n.values[key]));
}
return "{\n" + getIndent() + pairs.join(",\n" + getIndent()) + "\n" + popIndent() + "}";
}
});
};
exports.compileNodeWithEnv = compileNodeWithEnv;
var compile = function(source, env, aliases, opts) {
if(!env) env = {};
if(!aliases) aliases = {};
if(!opts) opts = {};
if(!opts.exported) opts.exported = {};
// Parse the file to an AST.
var tokens = lexer.tokenise(source);
var ast = parser.parse(tokens);
ast = macroexpand(ast, env, opts);
// Typecheck the AST. Any type errors will throw an exception.
var resultType = typecheck(ast, env, aliases);
// Export types
ast = _.map(ast, function(n) {
if(n instanceof nodes.Call && n.func.value == 'export') {
return exportType(n.args[0], env, opts.exported, opts.nodejs);
}
return n;
});
var output = [];
if(!opts.nodejs) {
output.push("(function() {");
}
if(opts.strict) {
output.push('"use strict";');
}
var outputLine = output.length + 1;
_.each(ast, function(v) {
var compiled = compileNodeWithEnv(v, env, opts),
j, lineCount;
if(compiled) {
lineCount = compiled.split('\n').length;
if(opts.sourceMap && v.lineno > 1) {
opts.sourceMap.addMapping({
source: opts.filename,
original: {
line: v.lineno,
column: 0
},
generated: {
line: outputLine,
column: 0
}
});
}
outputLine += lineCount;
output.push(compiled + (v instanceof nodes.Comment ? '' : ';'));
}
});
if(!opts.nodejs) {
output.push("})();");
}
// Add a newline at the end
output.push("");
return {type: resultType, output: output.join('\n')};
};
exports.compile = compile;
var getSandbox = function() {
var sandbox = {require: require, exports: exports};
var name;
for(name in global) {
sandbox[name] = global[name];
}
return sandbox;
};
var getFileContents = function(filename) {
var fs = require('fs'),
exts = ["", ".roy", ".lroy"],
filenames = _.map(exts, function(ext){
return filename + ext;
}),
foundFilename,
source,
err,
i;
// Check to see if an extension is specified, if so, don't bother
// checking others
if (/\..+$/.test(filename)) {
source = fs.readFileSync(filename, 'utf8');
filenames = [filename];
} else {
foundFilename = _.find(filenames, function(filename) {
return fs.existsSync(filename);
});
if(foundFilename) {
source = fs.readFileSync(foundFilename, 'utf8');
}
}
if(!source) {
throw new Error("File(s) not found: " + filenames.join(", "));
}
return source;
};
var nodeRepl = function(opts) {
var readline = require('readline'),
path = require('path'),
vm = require('vm'),
prettyPrint = require('./prettyprint').prettyPrint;
var stdout = process.stdout;
var stdin = process.openStdin();
var repl = readline.createInterface(stdin, stdout);
var env = {};
var sources = {};
var aliases = {};
var sandbox = getSandbox();
var colorLog = function(color) {
var args = [].slice.call(arguments, 1);
if(opts.colorConsole) {
args[0] = '\u001b[' + color + 'm' + args[0];
args[args.length - 1] = args[args.length - 1] + '\u001b[0m';
}
console.log.apply(console, args);
};
// Include the standard library
var fs = require('fs');
var prelude = fs.readFileSync(path.dirname(__dirname) + '/lib/prelude.roy', 'utf8');
vm.runInNewContext(compile(prelude, env, {}, {nodejs: true}).output, sandbox, 'eval');
repl.setPrompt('roy> ');
repl.on('close', function() {
stdin.destroy();
});
repl.on('line', function(line) {
var compiled;
var output;
var filename;
var source;
var tokens;
var ast;
// Check for a "metacommand"
// e.g. ":q" or ":l test.roy"
var metacommand = line.replace(/^\s+/, '').split(' ');
try {
switch(metacommand[0]) {
case ":q":
// Exit
process.exit();
break;
case ":l":
// Load
filename = metacommand[1];
source = getFileContents(filename);
compiled = compile(source, env, aliases, {nodejs: true, filename: ".", run: true});
break;
case ":t":
if(metacommand[1] in env) {
console.log(env[metacommand[1]].toString());
} else {
colorLog(33, metacommand[1], "is not defined.");
}
break;
case ":s":
// Source
if(sources[metacommand[1]]) {
colorLog(33, metacommand[1], "=", prettyPrint(sources[metacommand[1]]));
} else {
if(metacommand[1]){
colorLog(33, metacommand[1], "is not defined.");
}else{
console.log("Usage :s command ");
console.log(":s [identifier] :: show original code about identifier.");
}
}
break;
case ":?":
// Help
colorLog(32, "Commands available from the prompt");
console.log(":l -- load and run an external file");
console.log(":q -- exit REPL");
console.log(":s -- show original code about identifier");
console.log(":t -- show the type of the identifier");
console.log(":? -- show help");
break;
default:
// The line isn't a metacommand
// Remember the source if it's a binding
tokens = lexer.tokenise(line);
ast = parser.parse(tokens);
ast[0].accept({
visitLet: function(n) {
sources[n.name] = n.value;
}
});
// Just eval it
compiled = compile(line, env, aliases, {nodejs: true, filename: ".", run: true});
break;
}
if(compiled) {
output = vm.runInNewContext(compiled.output, sandbox, 'eval');
if(typeof output != 'undefined') {
colorLog(32, (typeof output == 'object' ? JSON.stringify(output) : output) + " : " + compiled.type);
}
}
} catch(e) {
colorLog(31, (e.stack || e.toString()));
}
repl.prompt();
});
repl.prompt();
};
var writeModule = function(env, exported, filename) {
var fs = require('fs');
var moduleOutput = _.map(exported, function(v, k) {
if(v instanceof types.TagType) {
return 'type ' + v.toString().replace(/#/g, '');
}
return k + ': ' + v.toString();
}).join('\n') + '\n';
fs.writeFile(filename, moduleOutput, 'utf8');
};
var importModule = function(name, env, opts) {
var addTypesToEnv = function(moduleTypes) {
_.each(moduleTypes, function(v, k) {
var dataType = [new types.TagNameType(k)];
_.each(function() {
dataType.push(new types.Variable());
});
env[k] = new types.TagType(dataType);
});
};
var moduleTypes;
if(opts.nodejs) {
// Need to convert to absolute paths for the CLI
if(opts.run) {
var path = require("path");
name = path.resolve(path.dirname(opts.filename), name);
}
moduleTypes = loadModule(name, opts);
addTypesToEnv(moduleTypes.types);
var variable = name.substr(name.lastIndexOf("/") + 1);
env[variable] = new types.Variable();
var props = {};
_.each(moduleTypes.env, function(v, k) {
props[k] = nodeToType(v, env, {});
});
env[variable] = new types.ObjectType(props);
console.log("Using sync CommonJS module:", name);
return variable + " = require(" + JSON.stringify(name) + ")";
} else {
moduleTypes = loadModule(name, opts);
addTypesToEnv(moduleTypes.types);
_.each(moduleTypes.env, function(v, k) {
env[k] = nodeToType(v, env, {});
});
if(console) console.log("Using browser module:", name);
return "";
}
};
var main = function() {
var argv = process.argv.slice(2);
// Meta-commands configuration
var opts = {
colorConsole: false
};
// Roy package information
var fs = require('fs'),
path = require('path');
var info = JSON.parse(fs.readFileSync(path.dirname(__dirname) + '/package.json', 'utf8'));
if(process.argv.length < 3) {
console.log("Roy: " + info.description);
console.log(info.author);
console.log(":? for help");
nodeRepl(opts);
return;
}
var source;
var vm;
var browserModules = false;
var run = false;
var includePrelude = true;
switch(argv[0]) {
case "-v":
case "--version":
console.log("Roy: " + info.description);
console.log(info.version);
process.exit();
break;
case "--help":
case "-h":
console.log("Roy: " + info.description + "\n");
console.log("-v : show current version");
console.log("-r [file] : run Roy-code without JavaScript output");
console.log("-p : run without prelude (standard library)");
console.log("-c : colorful REPL mode");
console.log("-h : show this help");
return;
case "--stdio":
source = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(data) {
source += data;
});
process.stdin.on('end', function() {
console.log(compile(source).output);
});
return;
case "-p":
includePrelude = false;
/* falls through */
case "-r":
vm = require('vm');
run = true;
argv.shift();
break;
case "-b":
case "--browser":
browserModules = true;
argv.shift();
break;
case "-c":
case "--color":
opts.colorConsole = true;
nodeRepl(opts);
return;
}
var extensions = /\.l?roy$/;
var literateExtension = /\.lroy$/;
var exported;
var env = {};
var aliases = {};
var sandbox = getSandbox();
if(run) {
// Include the standard library
if(includePrelude) {
argv.unshift(path.dirname(__dirname) + '/lib/prelude.roy');
}
} else {
var modules = [];
if(!argv.length || argv[0] != 'lib/prelude.roy') {
modules.push(path.dirname(__dirname) + '/lib/prelude');
}
_.each(modules, function(module) {
var moduleTypes = loadModule(module, {filename: '.'});
_.each(moduleTypes.env, function(v, k) {
env[k] = new types.Variable();
env[k] = nodeToType(v, env, aliases);
});
});
}
_.each(argv, function(filename) {
// Read the file content.
var source = getFileContents(filename);
if(filename.match(literateExtension)) {
// Strip out the Markdown.
source = source.match(/^ {4,}.+$/mg).join('\n').replace(/^ {4}/gm, '');
} else {
console.assert(filename.match(extensions), 'Filename must end with ".roy" or ".lroy"');
}
exported = {};
var outputPath = filename.replace(extensions, '.js');
var SourceMapGenerator = require('source-map').SourceMapGenerator;
var sourceMap = new SourceMapGenerator({file: path.basename(outputPath)});
var compiled = compile(source, env, aliases, {
nodejs: !browserModules,
filename: filename,
run: run,
exported: exported,
sourceMap: sourceMap
});
if(run) {
// Execute the JavaScript output.
output = vm.runInNewContext(compiled.output, sandbox, 'eval');
} else {
// Write the JavaScript output.
fs.writeFile(outputPath, compiled.output + '//@ sourceMappingURL=' + path.basename(outputPath) + '.map\n', 'utf8');
fs.writeFile(outputPath + '.map', sourceMap.toString(), 'utf8');
writeModule(env, exported, filename.replace(extensions, '.roym'));
}
});
};
exports.main = main;
if(exports && !module.parent) {
main();
}
|
// @license
// Redistribution and use in source and binary forms ...
// Class for sending and receiving postMessages.
// Based off the library by Daniel Park (http://metaweb.com, http://postmessage.freebaseapps.com)
//
// Dependencies:
// * None
//
// Copyright 2014 Carnegie Mellon University. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other materials
// provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ''AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The views and conclusions contained in the software and documentation are those of the
// authors and should not be interpreted as representing official policies, either expressed
// or implied, of Carnegie Mellon University.
//
// Authors:
// Paul Dille ([email protected])
//
"use strict";
(function(window) {
// Send postMessages.
window.pm = function(options) {
pm.send(options);
};
// Bind a handler to a postMessage response.
window.pm.bind = function(type, fn) {
pm.bind(type, fn);
};
// Unbind postMessage handlers
window.pm.unbind = function(type, fn) {
pm.unbind(type, fn);
};
var pm = {
// The origin domain.
_origin: null,
// Internal storage (keep track of listeners, etc).
data: function(key, value) {
if (value === undefined) {
return pm._data[key];
}
pm._data[key] = value;
return value;
},
_data: {},
// Send postMessages.
send: function(options) {
if (!options) {
console.warn("Need to specify at least 3 options (origin, target, type).");
return;
}
if (options.origin) {
if (!pm._origin) {
pm._origin = options.origin;
}
} else {
console.warn("postMessage origin must be specified.");
return;
}
var target = options.target;
if (!target) {
console.warn("postMessage target window required.");
return;
}
if (!options.type) {
console.warn("postMessage message type required.");
return;
}
var msg = {data: options.data, type: options.type};
if ("postMessage" in target) {
// Send the postMessage.
try {
target.postMessage(JSON.stringify(msg), options.origin);
} catch (ex) {
console.warn("postMessage failed with " + ex.name + ":", ex.message);
}
} else {
console.warn("postMessage not supported");
}
},
// Listen to incoming postMessages.
bind: function(type, fn) {
if (!pm.data("listening.postMessage")) {
if (window.addEventListener) {
window.addEventListener("message", pm._dispatch, false);
}
// Make sure we create only one receiving postMessage listener.
pm.data("listening.postMessage", true);
}
// Keep track of listeners and their handlers.
var listeners = pm.data("listeners.postMessage");
if (!listeners) {
listeners = {};
pm.data("listeners.postMessage", listeners);
}
var fns = listeners[type];
if (!fns) {
fns = [];
listeners[type] = fns;
}
fns.push({fn: fn, origin: pm._origin});
},
// Unbind postMessage listeners.
unbind: function(type, fn) {
var listeners = pm.data("listeners.postMessage");
if (listeners) {
if (type) {
if (fn) {
// Remove specific listener
var fns = listeners[type];
if (fns) {
var newListeners = [];
for (var i = 0, len = fns.length; i < len; i++) {
var obj = fns[i];
if (obj.fn !== fn) {
newListeners.push(obj);
}
}
listeners[type] = newListeners;
}
} else {
// Remove all listeners by type
delete listeners[type];
}
} else {
// Unbind all listeners of all types
for (var i in listeners) {
delete listeners[i];
}
}
}
},
// Run the handler, if one exists, based on the type defined in the postMessage.
_dispatch: function(e) {
var msg = {};
try {
msg = JSON.parse(e.data);
} catch (ex) {
console.warn("postMessage data parsing failed: ", ex);
return;
}
if (!msg.type) {
console.warn("postMessage message type required.");
return;
}
var listeners = pm.data("listeners.postMessage") || {};
var fns = listeners[msg.type] || [];
for (var i = 0, len = fns.length; i < len; i++) {
var obj = fns[i];
if (obj.origin && obj.origin !== '*' && e.origin !== obj.origin) {
console.warn("postMessage message origin mismatch: ", e.origin, obj.origin);
continue;
}
// Run handler
try {
obj.fn(msg.data);
} catch (ex) {
throw ex;
}
}
}
};
})(this);
|
"use strict";
/*
The MIT License (MIT)
Copyright (c) Bryan Hughes <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const i2c_bus_1 = require("i2c-bus");
const child_process_1 = require("child_process");
const raspi_peripheral_1 = require("raspi-peripheral");
const raspi_board_1 = require("raspi-board");
function checkAddress(address) {
if (typeof address !== 'number' || address < 0 || address > 0x7f) {
throw new Error(`Invalid I2C address ${address}. Valid addresses are 0 through 0x7f.`);
}
}
function checkRegister(register) {
if (register !== undefined &&
(typeof register !== 'number' || register < 0 || register > 0xff)) {
throw new Error(`Invalid I2C register ${register}. Valid registers are 0 through 0xff.`);
}
}
function checkLength(length, hasRegister) {
if (typeof length !== 'number' || length < 0 || (hasRegister && length > 32)) {
// Enforce 32 byte length limit only for SMBus.
throw new Error(`Invalid I2C length ${length}. Valid lengths are 0 through 32.`);
}
}
function checkBuffer(buffer, hasRegister) {
if (!Buffer.isBuffer(buffer) || buffer.length < 0 || (hasRegister && buffer.length > 32)) {
// Enforce 32 byte length limit only for SMBus.
throw new Error(`Invalid I2C buffer. Valid lengths are 0 through 32.`);
}
}
function checkByte(byte) {
if (typeof byte !== 'number' || byte < 0 || byte > 0xff) {
throw new Error(`Invalid I2C byte ${byte}. Valid values are 0 through 0xff.`);
}
}
function checkWord(word) {
if (typeof word !== 'number' || word < 0 || word > 0xffff) {
throw new Error(`Invalid I2C word ${word}. Valid values are 0 through 0xffff.`);
}
}
function checkCallback(cb) {
if (typeof cb !== 'function') {
throw new Error('Invalid I2C callback');
}
}
function createReadBufferCallback(suppliedCallback) {
return (err, resultOrBytesRead, result) => {
if (suppliedCallback) {
if (err) {
suppliedCallback(err, null);
}
else if (typeof result !== 'undefined') {
suppliedCallback(null, result);
}
else if (Buffer.isBuffer(resultOrBytesRead)) {
suppliedCallback(null, resultOrBytesRead);
}
}
};
}
function createReadNumberCallback(suppliedCallback) {
return (err, result) => {
if (suppliedCallback) {
if (err) {
suppliedCallback(err, null);
}
else if (typeof result !== 'undefined') {
suppliedCallback(null, result);
}
}
};
}
function createWriteCallback(suppliedCallback) {
return (err) => {
if (suppliedCallback) {
suppliedCallback(err || null);
}
};
}
class I2C extends raspi_peripheral_1.Peripheral {
constructor() {
super(['SDA0', 'SCL0']);
this._devices = [];
child_process_1.execSync('modprobe i2c-dev');
}
destroy() {
this._devices.forEach((device) => device.closeSync());
this._devices = [];
super.destroy();
}
read(address, registerOrLength, lengthOrCb, cb) {
this.validateAlive();
let length;
let register;
if (typeof cb === 'function' && typeof lengthOrCb === 'number') {
length = lengthOrCb;
register = registerOrLength;
}
else if (typeof lengthOrCb === 'function') {
cb = lengthOrCb;
length = registerOrLength;
register = undefined;
}
else {
throw new TypeError('Invalid I2C read arguments');
}
checkAddress(address);
checkRegister(register);
checkLength(length, !!register);
checkCallback(cb);
const buffer = new Buffer(length);
if (register === undefined) {
this._getDevice(address).i2cRead(address, length, buffer, createReadBufferCallback(cb));
}
else {
this._getDevice(address).readI2cBlock(address, register, length, buffer, createReadBufferCallback(cb));
}
}
readSync(address, registerOrLength, length) {
this.validateAlive();
let register;
if (typeof length === 'undefined') {
length = +registerOrLength;
}
else {
register = registerOrLength;
length = +length;
}
checkAddress(address);
checkRegister(register);
checkLength(length, !!register);
const buffer = new Buffer(length);
if (register === undefined) {
this._getDevice(address).i2cReadSync(address, length, buffer);
}
else {
this._getDevice(address).readI2cBlockSync(address, register, length, buffer);
}
return buffer;
}
readByte(address, registerOrCb, cb) {
this.validateAlive();
let register;
if (typeof registerOrCb === 'function') {
cb = registerOrCb;
register = undefined;
}
checkAddress(address);
checkRegister(register);
checkCallback(cb);
if (register === undefined) {
const buffer = new Buffer(1);
this._getDevice(address).i2cRead(address, buffer.length, buffer, (err) => {
if (err) {
if (cb) {
cb(err, null);
}
}
else if (cb) {
cb(null, buffer[0]);
}
});
}
else {
this._getDevice(address).readByte(address, register, createReadNumberCallback(cb));
}
}
readByteSync(address, register) {
this.validateAlive();
checkAddress(address);
checkRegister(register);
let byte;
if (register === undefined) {
const buffer = new Buffer(1);
this._getDevice(address).i2cReadSync(address, buffer.length, buffer);
byte = buffer[0];
}
else {
byte = this._getDevice(address).readByteSync(address, register);
}
return byte;
}
readWord(address, registerOrCb, cb) {
this.validateAlive();
let register;
if (typeof registerOrCb === 'function') {
cb = registerOrCb;
}
else {
register = registerOrCb;
}
checkAddress(address);
checkRegister(register);
checkCallback(cb);
if (register === undefined) {
const buffer = new Buffer(2);
this._getDevice(address).i2cRead(address, buffer.length, buffer, (err) => {
if (cb) {
if (err) {
return cb(err, null);
}
cb(null, buffer.readUInt16LE(0));
}
});
}
else {
this._getDevice(address).readWord(address, register, createReadNumberCallback(cb));
}
}
readWordSync(address, register) {
this.validateAlive();
checkAddress(address);
checkRegister(register);
let byte;
if (register === undefined) {
const buffer = new Buffer(2);
this._getDevice(address).i2cReadSync(address, buffer.length, buffer);
byte = buffer.readUInt16LE(0);
}
else {
byte = this._getDevice(address).readWordSync(address, register);
}
return byte;
}
write(address, registerOrBuffer, bufferOrCb, cb) {
this.validateAlive();
let buffer;
let register;
if (Buffer.isBuffer(registerOrBuffer)) {
cb = bufferOrCb;
buffer = registerOrBuffer;
register = undefined;
}
else if (typeof registerOrBuffer === 'number' && Buffer.isBuffer(bufferOrCb)) {
register = registerOrBuffer;
buffer = bufferOrCb;
}
else {
throw new TypeError('Invalid I2C write arguments');
}
checkAddress(address);
checkRegister(register);
checkBuffer(buffer, !!register);
if (register === undefined) {
this._getDevice(address).i2cWrite(address, buffer.length, buffer, createWriteCallback(cb));
}
else {
this._getDevice(address).writeI2cBlock(address, register, buffer.length, buffer, createWriteCallback(cb));
}
}
writeSync(address, registerOrBuffer, buffer) {
this.validateAlive();
let register;
if (Buffer.isBuffer(registerOrBuffer)) {
buffer = registerOrBuffer;
}
else {
if (!buffer) {
throw new Error('Invalid I2C write arguments');
}
register = registerOrBuffer;
}
checkAddress(address);
checkRegister(register);
checkBuffer(buffer, !!register);
if (register === undefined) {
this._getDevice(address).i2cWriteSync(address, buffer.length, buffer);
}
else {
this._getDevice(address).writeI2cBlockSync(address, register, buffer.length, buffer);
}
}
writeByte(address, registerOrByte, byteOrCb, cb) {
this.validateAlive();
let byte;
let register;
if (typeof byteOrCb === 'number') {
byte = byteOrCb;
register = registerOrByte;
}
else {
cb = byteOrCb;
byte = registerOrByte;
}
checkAddress(address);
checkRegister(register);
checkByte(byte);
if (register === undefined) {
this._getDevice(address).i2cWrite(address, 1, new Buffer([byte]), createWriteCallback(cb));
}
else {
this._getDevice(address).writeByte(address, register, byte, createWriteCallback(cb));
}
}
writeByteSync(address, registerOrByte, byte) {
this.validateAlive();
let register;
if (byte === undefined) {
byte = registerOrByte;
}
else {
register = registerOrByte;
}
checkAddress(address);
checkRegister(register);
checkByte(byte);
if (register === undefined) {
this._getDevice(address).i2cWriteSync(address, 1, new Buffer([byte]));
}
else {
this._getDevice(address).writeByteSync(address, register, byte);
}
}
writeWord(address, registerOrWord, wordOrCb, cb) {
this.validateAlive();
let register;
let word;
if (typeof wordOrCb === 'number') {
register = registerOrWord;
word = wordOrCb;
}
else if (typeof wordOrCb === 'function') {
word = registerOrWord;
cb = wordOrCb;
}
else {
throw new Error('Invalid I2C write arguments');
}
checkAddress(address);
checkRegister(register);
checkWord(word);
if (register === undefined) {
const buffer = new Buffer(2);
buffer.writeUInt16LE(word, 0);
this._getDevice(address).i2cWrite(address, buffer.length, buffer, createWriteCallback(cb));
}
else {
this._getDevice(address).writeWord(address, register, word, createWriteCallback(cb));
}
}
writeWordSync(address, registerOrWord, word) {
this.validateAlive();
let register;
if (word === undefined) {
word = registerOrWord;
}
else {
register = registerOrWord;
}
checkAddress(address);
checkRegister(register);
checkWord(word);
if (register === undefined) {
const buffer = new Buffer(2);
buffer.writeUInt16LE(word, 0);
this._getDevice(address).i2cWriteSync(address, buffer.length, buffer);
}
else {
this._getDevice(address).writeWordSync(address, register, word);
}
}
_getDevice(address) {
let device = this._devices[address];
if (device === undefined) {
device = i2c_bus_1.openSync(raspi_board_1.getBoardRevision() === raspi_board_1.VERSION_1_MODEL_B_REV_1 ? 0 : 1);
this._devices[address] = device;
}
return device;
}
}
exports.I2C = I2C;
exports.module = {
createI2C() {
return new I2C();
}
};
//# sourceMappingURL=index.js.map |
require.config({ urlArgs: "v=" + (new Date()).getTime() });
require(["game"], function(game) {
// I know it's ugly but it works, make game a global object
G = game;
G.init();
$(window).resize(G.camera.resize);
G.render();
});
|
define([], function () {
var TAGNAMES = {
'select':'input',
'change':'input',
'submit':'form',
'reset':'form',
'error':'img',
'load':'img',
'abort':'img'
};
var Utility = function() {
};
Utility.isEventSupported = function(eventName) {
var el = document.createElement(TAGNAMES[eventName] || 'div');
eventName = 'on' + eventName;
var isSupported = (eventName in el);
if (!isSupported) {
el.setAttribute(eventName, 'return;');
isSupported = typeof el[eventName] == 'function';
}
el = null;
return isSupported;
};
Utility.getSupportedEvent = function(events) {
// get the length
var len = events.length;
if (typeof(len) == 'undefined') {
len = 0;
}
for (var i = 0; i < len; i++) {
if (Utility.isEventSupported(events[i])) {
return events[i];
}
}
return null;
};
return Utility;
}); |
if($.cookie('age') !== 'pass') {
$('body').addClass('uh-oh');
$('#age-verify').show();
}
//generate map
function showMap() {
//set locations
var location = new google.maps.LatLng(39.90658,-105.09859);
var stylesArray = [
{
"stylers": [
{ "saturation": -100 }
]
},{
"featureType": "road",
"elementType": "geometry",
"stylers": [
{ "visibility": "simplified" }
]
},{
"elementType": "labels.text.stroke",
"stylers": [
{ "visibility": "off" }
]
},{
"elementType": "labels.text.fill",
"stylers": [
{ "lightness": 3 }
]
},{
"featureType": "administrative.land_parcel",
"elementType": "geometry",
"stylers": [
{ "visibility": "simplified" }
]
}
];
//set options
var myOptions = {
center: location,
zoom: 14,
styles: stylesArray,
disableDefaultUI: true,
scrollwheel: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
//create map
var map = new google.maps.Map(document.getElementById('map'),
myOptions);
//Add a marker and modal box
var image = new google.maps.MarkerImage('/assets/img/icn.map-marker.png',
//Marker size
new google.maps.Size(100, 160),
//Origin
new google.maps.Point(0,0),
//Anchor
new google.maps.Point(50, 160));
//place a custom marker
var marker = new google.maps.Marker({
position: location,
map: map,
icon: image
});
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(new ZoomPanControl(map));
//create elements
function CreateElement(tagName, properties) {
var elem = document.createElement(tagName);
for (var prop in properties) {
if (prop == "style")
elem.style.cssText = properties[prop];
else if (prop == "class")
elem.className = properties[prop];
else
elem.setAttribute(prop, properties[prop]);
}
return elem;
}
//add map custom map controls
function ZoomPanControl(map) {
this.map = map
var t = this
var zoomPanContainer = CreateElement("div", { 'class':'map-controls' })
//Map Controls
div = CreateElement("div", {'title': 'Zoom in', 'class':'zoom-in' })
google.maps.event.addDomListener(div, "click", function() { t.zoom(ZoomDirection.IN); })
zoomPanContainer.appendChild(div)
div = CreateElement("div", {'title': 'Center', 'class':'center-map' })
google.maps.event.addDomListener(div, "click", function() { map.setCenter(location); })
zoomPanContainer.appendChild(div)
div = CreateElement("div", {'title': 'Zoom out', 'class':'zoom-out' })
google.maps.event.addDomListener(div, "click", function() { t.zoom(ZoomDirection.OUT); })
zoomPanContainer.appendChild(div)
return zoomPanContainer
}
ZoomPanControl.prototype.zoom = function(direction) {
var zoom = this.map.getZoom();
if (direction == ZoomDirection.IN && zoom < 19)
this.map.setZoom(zoom + 1);
else if (direction == ZoomDirection.OUT && zoom > 1)
this.map.setZoom(zoom - 1);
}
var ZoomDirection = {
IN: 0,
OUT: 1
}
}
//load articles
function loadPost(href) {
$('#beer').fadeIn(400)
$('#beer').load(href + ' #beer > *', function(response, status, xhr) {
if ( status == "error" ) {
console.log(xhr.status)
} else {
$('body').addClass('beer')
}
})
}
(function() {
// Highlight current section while scrolling DOWN
$('.section').waypoint(function(direction) {
if (direction === 'down') {
var $link = $('a[href="/' + this.id + '"]');
$('ul.nav.navbar-nav li').removeClass('active');
$link.parent().addClass('active');
}
}, { offset: '50%' });
// Highlight current section while scrolling UP
$('.section').waypoint(function(direction) {
if (direction === 'up') {
var $link = $('a[href="/' + this.id + '"]');
$('ul.nav.navbar-nav li').removeClass('active');
$link.parent().addClass('active');
}
}, {
offset: function() {
// This is the calculation that would give you
// "bottom of element hits middle of window"
return $.waypoints('viewportHeight') / 2 - $(this).outerHeight();
}
});
// history.js
if(!$('body').hasClass('blog')) {
$('ul.nav.navbar-nav li:not(".external") a, .beer > a').on('click', addressUpdate)
}
function addressUpdate(ev) {
ev.preventDefault()
var $that = $(this)
var separator = ' | '
var title = $(document).find('title').text()
title = title.substring(title.indexOf(separator), title.length)
//set title
if($('h3', this).length) {
title = $('h3', this).text() + title
} else {
title = $that.text() + title
}
//update url + title
var href = $that.attr('href')
History.pushState(null, title, href)
//load post
if($that.parent().hasClass('beer')) {
loadPost(href)
//scroll to section
} else {
$('#beer').fadeOut(400, function() {
$('body').removeClass('beer')
}).empty()
$('html, body').stop().animate({
scrollTop: ($('#' + href.replace('/', '')).offset().top-88)
}, 2000,'easeInOutExpo')
}
}
})();
//on page load
$(window).load(function() {
//scroll to section
var path = document.location.pathname
var article = path.split('/')[2]
path = path.substring(path.lastIndexOf('/') + 1, path.length)
if ($('#' + path).length && !article) {
$('html, body').stop().animate({
scrollTop: ($('#' + path).offset().top-88)
}, 2000,'easeInOutExpo')
} else if (typeof article !== 'undefined') {
$(document).scrollTop($('#blog').offset().top)
$('body').addClass('fixed')
}
})
google.maps.event.addDomListener(window, "load", showMap);
$(document).ready(function() {
// resizeContent()
// //attach on resize event
// $(window).resize(function() {
// resizeContent()
// });
// $('.hero-photo').each(function() {
// var img = $('> img', this)
// $(this).backstretch(img.attr('src'))
// img.hide()
// })
//setup full-screen images
$('.full-img').each(function() {
var img = $('> img', this)
$(this).backstretch(img.attr('src'))
img.hide()
})
//slider
$('.slider').slick({
autoplay: true,
infinite: true,
arrows: false,
speed: 800,
cssEase: 'cubic-bezier(0.86, 0, 0.07, 1)',
slidesToShow: 1,
slidesToScroll: 1,
responsive: [
{
breakpoint: 480,
settings: {
dots: true,
arrows: false
}
}
]
})
$('.trucks, .beers').slick({
infinite: true,
arrows: true,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next"><i class="fa fa-angle-right"></i></button>',
speed: 800,
cssEase: 'cubic-bezier(0.86, 0, 0.07, 1)',
slidesToShow: 5,
responsive: [
{
breakpoint: 1100,
settings: {
slidesToShow: 4,
slidesToScroll: 1
}
},
{
breakpoint: 900,
settings: {
slidesToShow: 3,
slidesToScroll: 1
}
},
{
breakpoint: 640,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
dots: true
}
}
]
})
//truck hover text
// $('.truck').on('hover', function () {
// //stuff to do on mouse enter
// $('.overlay', this).stop().fadeIn(200)
// },
// function () {
// //stuff to do on mouse leave
// $('.overlay', this).stop().fadeOut(200)
// });
$(document).on({
mouseenter: function () {
//stuff to do on mouse enter
$('.overlay', this).stop().fadeIn(200)
},
mouseleave: function () {
//stuff to do on mouse leave
$('.overlay', this).stop().fadeOut(200)
}
}, '.truck');
//mobile help
$(document).on('touchstart touchend', function(e) {
e.preventDefault()
$('.overlay', this).stop().fadeToggle(200)
}, '.truck');
$('#mc-form').ajaxChimp({
url: 'http://nickdimatteo.us2.list-manage.com/subscribe/post?u=3d3f46742d639b10307a1d9d8&id=a1365fcbea'
});
//age verification
$('#age-verify #enter').on('click', function(e) {
e.preventDefault();
$.cookie('age', 'pass');
$('#age-verify').fadeOut(400, function() {
$('body').removeClass('uh-oh');
});
});
//go to admin
$(document).keyup(function(e) {
if (e.keyCode == 27) {
console.log('hello')
window.location.href = '/admin';
}
});
}) |
(function($) {
$.extend({
tablesorter: new function() {
var parsers = [], widgets = [];
this.defaults = {
cssHeader: "header",
cssAsc: "headerSortUp",
cssDesc: "headerSortDown",
sortInitialOrder: "asc",
sortMultiSortKey: "shiftKey",
sortForce: null,
sortAppend: null,
textExtraction: "simple",
parsers: {},
widgets: [],
widgetZebra: {css: ["even","odd"]},
headers: {},
widthFixed: false,
cancelSelection: true,
sortList: [],
headerList: [],
dateFormat: "us",
decimal: '.',
debug: false
};
/* debuging utils */
function benchmark(s,d) {
log(s + "," + (new Date().getTime() - d.getTime()) + "ms");
}
this.benchmark = benchmark;
function log(s) {
if (typeof console != "undefined" && typeof console.debug != "undefined") {
console.log(s);
} else {
alert(s);
}
}
/* parsers utils */
function buildParserCache(table,$headers) {
if(table.config.debug) { var parsersDebug = ""; }
var rows = table.tBodies[0].rows;
if(table.tBodies[0].rows[0]) {
var list = [], cells = rows[0].cells, l = cells.length;
for (var i=0;i < l; i++) {
var p = false;
if($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter) ) {
p = getParserById($($headers[i]).metadata().sorter);
} else if((table.config.headers[i] && table.config.headers[i].sorter)) {
p = getParserById(table.config.headers[i].sorter);
}
if(!p) {
p = detectParserForColumn(table,cells[i]);
}
if(table.config.debug) { parsersDebug += "column:" + i + " parser:" +p.id + "\n"; }
list.push(p);
}
}
if(table.config.debug) { log(parsersDebug); }
return list;
};
function detectParserForColumn(table,node) {
var l = parsers.length;
for(var i=1; i < l; i++) {
if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)) {
return parsers[i];
}
}
// 0 is always the generic parser (text)
return parsers[0];
}
function getParserById(name) {
var l = parsers.length;
for(var i=0; i < l; i++) {
if(parsers[i].id.toLowerCase() == name.toLowerCase()) {
return parsers[i];
}
}
return false;
}
/* utils */
function buildCache(table) {
if(table.config.debug) { var cacheTime = new Date(); }
var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0,
totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0,
parsers = table.config.parsers,
cache = {row: [], normalized: []};
for (var i=0;i < totalRows; ++i) {
/** Add the table data to main data array */
var c = table.tBodies[0].rows[i], cols = [];
cache.row.push($(c));
for(var j=0; j < totalCells; ++j) {
cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));
}
cols.push(i); // add position for rowCache
cache.normalized.push(cols);
cols = null;
};
if(table.config.debug) { benchmark("Building cache for " + totalRows + " rows:", cacheTime); }
return cache;
};
function getElementText(config,node) {
if(!node) return "";
var t = "";
if(config.textExtraction == "simple") {
if(node.childNodes[0] && node.childNodes[0].hasChildNodes()) {
t = node.childNodes[0].innerHTML;
} else {
t = node.innerHTML;
}
} else {
if(typeof(config.textExtraction) == "function") {
t = config.textExtraction(node);
} else {
t = $(node).text();
}
}
return t;
}
function appendToTable(table,cache) {
if(table.config.debug) {var appendTime = new Date()}
var c = cache,
r = c.row,
n= c.normalized,
totalRows = n.length,
checkCell = (n[0].length-1),
tableBody = $(table.tBodies[0]),
rows = [];
for (var i=0;i < totalRows; i++) {
rows.push(r[n[i][checkCell]]);
if(!table.config.appender) {
var o = r[n[i][checkCell]];
var l = o.length;
for(var j=0; j < l; j++) {
tableBody[0].appendChild(o[j]);
}
//tableBody.append(r[n[i][checkCell]]);
}
}
if(table.config.appender) {
table.config.appender(table,rows);
}
rows = null;
if(table.config.debug) { benchmark("Rebuilt table:", appendTime); }
//apply table widgets
applyWidget(table);
// trigger sortend
setTimeout(function() {
$(table).trigger("sortEnd");
},0);
};
function buildHeaders(table) {
if(table.config.debug) { var time = new Date(); }
var meta = ($.metadata) ? true : false, tableHeadersRows = [];
for(var i = 0; i < table.tHead.rows.length; i++) { tableHeadersRows[i]=0; };
$tableHeaders = $("thead th",table);
$tableHeaders.each(function(index) {
this.count = 0;
this.column = index;
this.order = formatSortingOrder(table.config.sortInitialOrder);
if(checkHeaderMetadata(this) || checkHeaderOptions(table,index)) this.sortDisabled = true;
if(!this.sortDisabled) {
$(this).addClass(table.config.cssHeader);
}
// add cell to headerList
table.config.headerList[index]= this;
});
if(table.config.debug) { benchmark("Built headers:", time); log($tableHeaders); }
return $tableHeaders;
};
function checkCellColSpan(table, rows, row) {
var arr = [], r = table.tHead.rows, c = r[row].cells;
for(var i=0; i < c.length; i++) {
var cell = c[i];
if ( cell.colSpan > 1) {
arr = arr.concat(checkCellColSpan(table, headerArr,row++));
} else {
if(table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row+1])) {
arr.push(cell);
}
//headerArr[row] = (i+row);
}
}
return arr;
};
function checkHeaderMetadata(cell) {
if(($.metadata) && ($(cell).metadata().sorter === false)) { return true; };
return false;
}
function checkHeaderOptions(table,i) {
if((table.config.headers[i]) && (table.config.headers[i].sorter === false)) { return true; };
return false;
}
function applyWidget(table) {
var c = table.config.widgets;
var l = c.length;
for(var i=0; i < l; i++) {
getWidgetById(c[i]).format(table);
}
}
function getWidgetById(name) {
var l = widgets.length;
for(var i=0; i < l; i++) {
if(widgets[i].id.toLowerCase() == name.toLowerCase() ) {
return widgets[i];
}
}
};
function formatSortingOrder(v) {
if(typeof(v) != "Number") {
i = (v.toLowerCase() == "desc") ? 1 : 0;
} else {
i = (v == (0 || 1)) ? v : 0;
}
return i;
}
function isValueInArray(v, a) {
var l = a.length;
for(var i=0; i < l; i++) {
if(a[i][0] == v) {
return true;
}
}
return false;
}
function setHeadersCss(table,$headers, list, css) {
// remove all header information
$headers.removeClass(css[0]).removeClass(css[1]);
var h = [];
$headers.each(function(offset) {
if(!this.sortDisabled) {
h[this.column] = $(this);
}
});
var l = list.length;
for(var i=0; i < l; i++) {
h[list[i][0]].addClass(css[list[i][1]]);
}
}
function fixColumnWidth(table,$headers) {
var c = table.config;
if(c.widthFixed) {
var colgroup = $('<colgroup>');
$("tr:first td",table.tBodies[0]).each(function() {
colgroup.append($('<col>').css('width',$(this).width()));
});
$(table).prepend(colgroup);
};
}
function updateHeaderSortCount(table,sortList) {
var c = table.config, l = sortList.length;
for(var i=0; i < l; i++) {
var s = sortList[i], o = c.headerList[s[0]];
o.count = s[1];
o.count++;
}
}
/* sorting methods */
function multisort(table,sortList,cache) {
if(table.config.debug) { var sortTime = new Date(); }
var dynamicExp = "var sortWrapper = function(a,b) {", l = sortList.length;
for(var i=0; i < l; i++) {
var c = sortList[i][0];
var order = sortList[i][1];
var s = (getCachedSortType(table.config.parsers,c) == "text") ? ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ? "sortNumeric" : "sortNumericDesc");
var e = "e" + i;
dynamicExp += "var " + e + " = " + s + "(a[" + c + "],b[" + c + "]); ";
dynamicExp += "if(" + e + ") { return " + e + "; } ";
dynamicExp += "else { ";
}
// if value is the same keep orignal order
var orgOrderCol = cache.normalized[0].length - 1;
dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];";
for(var i=0; i < l; i++) {
dynamicExp += "}; ";
}
dynamicExp += "return 0; ";
dynamicExp += "}; ";
eval(dynamicExp);
cache.normalized.sort(sortWrapper);
if(table.config.debug) { benchmark("Sorting on " + sortList.toString() + " and dir " + order+ " time:", sortTime); }
return cache;
};
function sortText(a,b) {
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
};
function sortTextDesc(a,b) {
return ((b < a) ? -1 : ((b > a) ? 1 : 0));
};
function sortNumeric(a,b) {
return a-b;
};
function sortNumericDesc(a,b) {
return b-a;
};
function getCachedSortType(parsers,i) {
return parsers[i].type;
};
/* public methods */
this.construct = function(settings) {
return this.each(function() {
if(!this.tHead || !this.tBodies) return;
var $this, $document,$headers, cache, config, shiftDown = 0, sortOrder;
this.config = {};
config = $.extend(this.config, $.tablesorter.defaults, settings);
// store common expression for speed
$this = $(this);
// build headers
$headers = buildHeaders(this);
// try to auto detect column type, and store in tables config
this.config.parsers = buildParserCache(this,$headers);
// build the cache for the tbody cells
cache = buildCache(this);
// get the css class names, could be done else where.
var sortCSS = [config.cssDesc,config.cssAsc];
// fixate columns if the users supplies the fixedWidth option
fixColumnWidth(this);
// apply event handling to headers
// this is to big, perhaps break it out?
$headers.click(function(e) {
$this.trigger("sortStart");
var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0;
if(!this.sortDisabled && totalRows > 0) {
// store exp, for speed
var $cell = $(this);
// get current column index
var i = this.column;
// get current column sort order
this.order = this.count++ % 2;
// user only whants to sort on one column
if(!e[config.sortMultiSortKey]) {
// flush the sort list
config.sortList = [];
if(config.sortForce != null) {
var a = config.sortForce;
for(var j=0; j < a.length; j++) {
if(a[j][0] != i) {
config.sortList.push(a[j]);
}
}
}
// add column to sort list
config.sortList.push([i,this.order]);
// multi column sorting
} else {
// the user has clicked on an all ready sortet column.
if(isValueInArray(i,config.sortList)) {
// revers the sorting direction for all tables.
for(var j=0; j < config.sortList.length; j++) {
var s = config.sortList[j], o = config.headerList[s[0]];
if(s[0] == i) {
o.count = s[1];
o.count++;
s[1] = o.count % 2;
}
}
} else {
// add column to sort list array
config.sortList.push([i,this.order]);
}
};
setTimeout(function() {
//set css for headers
setHeadersCss($this[0],$headers,config.sortList,sortCSS);
appendToTable($this[0],multisort($this[0],config.sortList,cache));
},1);
// stop normal event by returning false
return false;
}
// cancel selection
}).mousedown(function() {
if(config.cancelSelection) {
this.onselectstart = function() {return false};
return false;
}
});
// apply easy methods that trigger binded events
$this.bind("update",function() {
// rebuild parsers.
this.config.parsers = buildParserCache(this,$headers);
// rebuild the cache map
cache = buildCache(this);
}).bind("sorton",function(e,list) {
$(this).trigger("sortStart");
config.sortList = list;
// update and store the sortlist
var sortList = config.sortList;
// update header count index
updateHeaderSortCount(this,sortList);
//set css for headers
setHeadersCss(this,$headers,sortList,sortCSS);
// sort the table and append it to the dom
appendToTable(this,multisort(this,sortList,cache));
}).bind("appendCache",function() {
appendToTable(this,cache);
}).bind("applyWidgetId",function(e,id) {
getWidgetById(id).format(this);
}).bind("applyWidgets",function() {
// apply widgets
applyWidget(this);
});
if($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) {
config.sortList = $(this).metadata().sortlist;
}
// if user has supplied a sort list to constructor.
if(config.sortList.length > 0) {
$this.trigger("sorton",[config.sortList]);
}
// apply widgets
applyWidget(this);
});
};
this.addParser = function(parser) {
var l = parsers.length, a = true;
for(var i=0; i < l; i++) {
if(parsers[i].id.toLowerCase() == parser.id.toLowerCase()) {
a = false;
}
}
if(a) { parsers.push(parser); };
};
this.addWidget = function(widget) {
widgets.push(widget);
};
this.formatFloat = function(s) {
var i = parseFloat(s);
return (isNaN(i)) ? 0 : i;
};
this.formatInt = function(s) {
var i = parseInt(s);
return (isNaN(i)) ? 0 : i;
};
this.isDigit = function(s,config) {
var DECIMAL = '\\' + config.decimal;
var exp = '/(^[+]?0(' + DECIMAL +'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)' + DECIMAL +'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*' + DECIMAL +'0+$)/';
return RegExp(exp).test($.trim(s));
};
this.clearTableBody = function(table) {
if($.browser.msie) {
function empty() {
while ( this.firstChild ) this.removeChild( this.firstChild );
}
empty.apply(table.tBodies[0]);
} else {
table.tBodies[0].innerHTML = "";
}
};
}
});
// extend plugin scope
$.fn.extend({
tablesorter: $.tablesorter.construct
});
var ts = $.tablesorter;
// add default parsers
ts.addParser({
id: "text",
is: function(s) {
return true;
},
format: function(s) {
return $.trim(s.toLowerCase());
},
type: "text"
});
ts.addParser({
id: "digit",
is: function(s,table) {
var c = table.config;
return $.tablesorter.isDigit(s,c);
},
format: function(s) {
return $.tablesorter.formatFloat(s);
},
type: "numeric"
});
ts.addParser({
id: "currency",
is: function(s) {
return /^[£$€?.]/.test(s);
},
format: function(s) {
return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));
},
type: "numeric"
});
ts.addParser({
id: "ipAddress",
is: function(s) {
return /^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);
},
format: function(s) {
var a = s.split("."), r = "", l = a.length;
for(var i = 0; i < l; i++) {
var item = a[i];
if(item.length == 2) {
r += "0" + item;
} else {
r += item;
}
}
return $.tablesorter.formatFloat(r);
},
type: "numeric"
});
ts.addParser({
id: "url",
is: function(s) {
return /^(https?|ftp|file):\/\/$/.test(s);
},
format: function(s) {
return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));
},
type: "text"
});
ts.addParser({
id: "isoDate",
is: function(s) {
return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);
},
format: function(s) {
return $.tablesorter.formatFloat((s != "") ? new Date(s.replace(new RegExp(/-/g),"/")).getTime() : "0");
},
type: "numeric"
});
ts.addParser({
id: "percent",
is: function(s) {
return /\%$/.test($.trim(s));
},
format: function(s) {
return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));
},
type: "numeric"
});
ts.addParser({
id: "usLongDate",
is: function(s) {
return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));
},
format: function(s) {
return $.tablesorter.formatFloat(new Date(s).getTime());
},
type: "numeric"
});
ts.addParser({
id: "shortDate",
is: function(s) {
return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);
},
format: function(s,table) {
var c = table.config;
s = s.replace(/\-/g,"/");
if(c.dateFormat == "us") {
// reformat the string in ISO format
s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2");
} else if(c.dateFormat == "uk") {
//reformat the string in ISO format
s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1");
} else if(c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") {
s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3");
}
return $.tablesorter.formatFloat(new Date(s).getTime());
},
type: "numeric"
});
ts.addParser({
id: "time",
is: function(s) {
return /^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);
},
format: function(s) {
return $.tablesorter.formatFloat(new Date("2000/01/01 " + s).getTime());
},
type: "numeric"
});
ts.addParser({
id: "metadata",
is: function(s) {
return false;
},
format: function(s,table,cell) {
var c = table.config, p = (!c.parserMetadataName) ? 'sortValue' : c.parserMetadataName;
return $(cell).metadata()[p];
},
type: "numeric"
});
// add default widgets
ts.addWidget({
id: "zebra",
format: function(table) {
if(table.config.debug) { var time = new Date(); }
$("tr:visible",table.tBodies[0])
.filter(':even')
.removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0])
.end().filter(':odd')
.removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);
if(table.config.debug) { $.tablesorter.benchmark("Applying Zebra widget", time); }
}
});
})(jQuery); |
var exec = require('child_process').exec;
exports.setHostname = function(envSettings){
var command = 'hostname';
exec(command,[], function (error, stdout, stderr) {
if(error){
console.log('error when executing: ' + command);
console.log('output : ' + stderr);
}
console.log('hostname : ' + stdout);
var result = stdout.replace(/(\r\n|\n|\r)/gm,"");
envSettings.serverPath = result;
});
}; |
//AppliedRules.defineSetByView
module.exports = (function( viewId ){
return this.defineSetByTag( viewId );
}); |
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS201: Simplify complex destructure assignments
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const { CompositeDisposable } = require('atom')
let MinimapBookmarksBinding
module.exports = {
isActive () {
return this.active
},
activate () {
this.active = false
this.subscriptions = new CompositeDisposable()
this.bindings = new Map()
require('atom-package-deps').install('minimap-git-diff')
},
consumeMinimapServiceV1 (minimap) {
this.minimap = minimap
this.minimap.registerPlugin('bookmarks', this)
},
deactivate () {
if (this.minimap) {
this.minimap.unregisterPlugin('bookmarks')
}
this.minimap = null
},
activatePlugin () {
if (this.active) {
return
}
const bookmarksPkg = atom.packages.getLoadedPackage('bookmarks')
if (!bookmarksPkg) {
return
}
const bookmarks = bookmarksPkg.mainModule
this.active = true
this.minimapsSubscription = this.minimap.observeMinimaps(minimap => {
if (!MinimapBookmarksBinding) {
MinimapBookmarksBinding = require('./minimap-bookmarks-binding')
}
const binding = new MinimapBookmarksBinding(minimap, bookmarks)
this.bindings.set(minimap.id, binding)
const subscription = minimap.onDidDestroy(() => {
binding.destroy()
this.subscriptions.remove(subscription)
subscription.dispose()
this.bindings.delete(minimap.id)
})
this.subscriptions.add(subscription)
})
},
deactivatePlugin () {
if (!this.active) { return }
const bindings = this.bindings.values()
for (const binding of bindings) { binding.destroy() }
this.bindings.clear()
this.active = false
this.minimapsSubscription.dispose()
this.subscriptions.dispose()
},
}
|
/* global ga */
import 'core-js/fn/array/find-index'
import 'core-js/fn/string/starts-with'
import './index.css'
import '../node_modules/md-components/style.css'
import React from 'react'
import ReactDOM from 'react-dom'
import {Route, NavLink, HashRouter} from 'react-router-dom'
import {Shell} from 'md-components'
import BottomNavigationRoute from './bottomnavigationRoute'
import ButtonRoute from './buttonRoute'
import CardRoute from './cardRoute'
import CheckboxRoute from './checkboxRoute'
import ChipRoute from './chipRoute'
import ExpansionPanelRoute from './expansionpanelRoute'
import HeaderRoute from './headerRoute'
import HomeRoute from './homeRoute'
import IconRoute from './iconRoute'
import ListRoute from './listRoute'
import MenuRoute from './menuRoute'
import ModalRoute from './modalRoute'
import NavigationRoute from './navigationRoute'
import ProgressRoute from './progressRoute'
import RadiobuttonRoute from './radiobuttonRoute'
import SelectRoute from './selectRoute'
import SelectNativeRoute from './selectnativeRoute'
import SliderRoute from './sliderRoute'
import SnackbarRoute from './snackbarRoute'
// import StepperRoute from './stepperRoute'
import SwitchRoute from './switchRoute'
import TableRoute from './tableRoute'
import TabsRoute from './tabsRoute'
import TabsControlledRoute from './tabscontrolledRoute'
import TextfieldRoute from './textfieldRoute'
import TextareaRoute from './textareaRoute'
// import TooltipRoute from './tooltipRoute'
class App extends React.Component {
state = {
title: 'HBM/md-components',
subtitle: ''
}
onLinkChange = event => {
const link = event.currentTarget
// use google analytics to track single page apps
// https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications
if (window.ga) {
ga('set', 'page', link.href)
ga('send', 'pageview')
}
this.setState({
title: 'md-components',
subtitle: link.text
})
}
componentDidMount () {
this.setState({
subtitle: document.querySelector('a.active').text
})
}
render () {
const links = [
<NavLink to='/' exact>Home</NavLink>,
<NavLink to='/bottomnavigation'>Bottom Navigation</NavLink>,
<NavLink to='/button'>Button</NavLink>,
<NavLink to='/card'>Card</NavLink>,
<NavLink to='/checkbox'>Checkbox</NavLink>,
<NavLink to='/chip'>Chip</NavLink>,
<NavLink to='/expansionpanel'>Expansion Panel</NavLink>,
<NavLink to='/header'>Header</NavLink>,
<NavLink to='/icon'>Icon</NavLink>,
<NavLink to='/list'>List</NavLink>,
<NavLink to='/menu'>Menu</NavLink>,
<NavLink to='/modal'>Modal</NavLink>,
<NavLink to='/navigation'>Navigation</NavLink>,
<NavLink to='/progress'>Progress</NavLink>,
<NavLink to='/radiobutton'>Radiobutton</NavLink>,
<NavLink to='/select'>Select</NavLink>,
<NavLink to='/selectnative'>Select Native</NavLink>,
<NavLink to='/slider'>Slider</NavLink>,
<NavLink to='/snackbar'>Snackbar</NavLink>,
<NavLink to='/switch'>Switch</NavLink>,
<NavLink to='/table'>Table</NavLink>,
<NavLink to='/tabs'>Tabs</NavLink>,
<NavLink to='/tabscontrolled'>TabsControlled</NavLink>,
<NavLink to='/textfield'>Textfield</NavLink>,
<NavLink to='/textarea'>Textarea</NavLink>
].map(link => React.cloneElement(link, {onClick: this.onLinkChange}))
return (
<HashRouter>
<Shell
links={links}
title={this.state.title}
subtitle={this.state.subtitle}
>
<Route exact path='/' component={HomeRoute} />
<Route path='/bottomnavigation' component={BottomNavigationRoute} />
<Route path='/button' component={ButtonRoute} />
<Route path='/card' component={CardRoute} />
<Route path='/checkbox' component={CheckboxRoute} />
<Route path='/chip' component={ChipRoute} />
<Route path='/expansionpanel' component={ExpansionPanelRoute} />
<Route path='/header' component={HeaderRoute} />
<Route path='/icon' component={IconRoute} />
<Route path='/list' component={ListRoute} />
<Route path='/menu' component={MenuRoute} />
<Route path='/modal' component={ModalRoute} />
<Route path='/navigation' component={NavigationRoute} />
<Route path='/progress' component={ProgressRoute} />
<Route path='/radiobutton' component={RadiobuttonRoute} />
<Route path='/select' component={SelectRoute} />
<Route path='/selectnative' component={SelectNativeRoute} />
<Route path='/slider' component={SliderRoute} />
<Route path='/snackbar' component={SnackbarRoute} />
<Route path='/switch' component={SwitchRoute} />
<Route path='/table' component={TableRoute} />
<Route path='/tabs' component={TabsRoute} />
<Route path='/tabscontrolled' component={TabsControlledRoute} />
<Route path='/textfield' component={TextfieldRoute} />
<Route path='/textarea' component={TextareaRoute} />
</Shell>
</HashRouter>
)
}
}
ReactDOM.render(<App />, document.getElementById('root'))
|
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { lodash } from 'meteor/stevezhu:lodash';
import { Bert } from 'meteor/themeteorchef:bert';
import { moment } from 'meteor/momentjs:moment';
import 'meteor/sacha:spin';
import { Workshops } from '../../../api/workshops/schema.js';
import { UserQuestions } from '../../../api/userQuestions/schema.js';
import './myDay.jade';
import '../../components/connect/connect.js';
Template.myDay.onCreated(function() {
this.autorun(() => {
this.subscribe('allWorkshopsForTheDay');
this.subscribe('resultForQuestionsAnswered', Meteor.userId());
});
});
Template.myDay.helpers({
workshopData() {
return Workshops.findOne({ _id: this._id }, {
fields: {
name: 1,
dateStart: 1,
dateEnd: 1,
color: 1,
peopleToGo: 1,
description: 1
}
});
},
workshopColor(index) {
if (index % 2 === 0) {
return 'grey2';
} else {
return false;
}
},
customWorkshops() {
let questions = UserQuestions.find({ userId: Meteor.userId(), answered: true, deprecated: false }, { fields: { result: 1 } }).fetch();
let questionsObject = {};
let questionsArray = [];
questions.map((cur) => {
cur.result.map((cur1) => {
if (cur1.workshopId) {
if (questionsObject[cur1.workshopId]) {
questionsObject[cur1.workshopId].value += cur1.result;
questionsObject[cur1.workshopId].long += 1;
} else {
questionsObject[cur1.workshopId] = {
value: cur1.result,
long: 1
};
}
}
});
});
for (var prop in questionsObject) {
questionsArray.push({
_id: prop,
value: lodash.round(questionsObject[prop].value / questionsObject[prop].long * 100, 2)
});
}
questionsArray.sort((a, b) => {
if (a.value < b.value) {
return 1;
} else if (a.value > b.value) {
return -1;
} else {
return 0;
}
});
return questionsArray;
},
dateStart() {
return moment(this.dateStart).format('H:mm');
},
dateEnd() {
return moment(this.dateEnd).format('H:mm');
},
isUserAlreadyIn() {
if (lodash.findIndex(this.peopleToGo, ['userId', Meteor.userId()]) !== -1) {
return true;
} else {
return false;
}
}
});
Template.myDay.events({
'click .goToWorkshop': function(event) {
event.preventDefault();
const data = {
userId: Meteor.userId(),
workshopId: this._id
};
Meteor.call('addUserToWorkshop', data, (error) => {
if (error) {
return Bert.alert(error.message, 'danger', 'growl-top-right');
}
});
},
'click .removeFromWorkshop': function(event) {
event.preventDefault();
const data = {
userId: Meteor.userId(),
workshopId: this._id
};
Meteor.call('removeUserFromWorkshop', data, (error) => {
if (error) {
return Bert.alert(error.message, 'danger', 'growl-top-right');
}
});
}
});
|
angular.module('luhbot',[
'ui.router',
'dashboard'
])
//TODO: Persistance of socket
.factory('IO',function(Toasts){
var IO = function(){
this.namespace = null;
this.socket = {};
var self = this;
this.connect = function(namespace){
if(namespace){
this.namespace = String('/').concat(namespace);
this.socket = io.connect(String("http://").concat(window.location.hostname).concat(':7171').concat(this.namespace));
return this;
}
this.socket = io.connect(String("http://").concat(window.location.hostname).concat(':7171').concat(this.namespace));
return this;
}
this.listenNewMessages = function(){
this.socket.on('newMessage',function(data){
Toasts.makeToast(data.msg);
});
return this;
}
this.joinChannel = function(channel){
this.socket.emit('joinChannel', channel);
console.log('join')
return this;
}
return this;
}
return new IO;
})
.factory('Toasts',function(){
function makeToast(message){
Materialize.toast(message, 4000);
}
return {
makeToast: makeToast
}
})
.factory('BOT',function($http,Toasts){
function connect(){
$http.get('/api/irc/turn/on')
.success(function(data,status){
Toasts.makeToast(data.msg)
})
.error(function(data,status){
Toasts.makeToast(data.msg)
});
$http.get('/api/twitch/update/user')
}
function disconnect(){
$http.get('/api/irc/turn/off')
.success(function(data,status){
Toasts.makeToast(data.msg)
})
.error(function(data,status){
Toasts.makeToast(data.msg)
});
}
function ping(){
$http.get('/api/irc/ping')
.success(function(data,status){
Toasts.makeToast(data.msg)
})
.error(function(data,status){
Toasts.makeToast(data.msg)
});
}
function restart(){
$http.get('/api/irc/force')
.success(function(data,status){
Toasts.makeToast(data.msg)
})
.error(function(data,status){
Toasts.makeToast(data.msg)
});
}
return {
connect : connect,
disconnect: disconnect,
ping : ping
}
})
.factory('User',function($http,$q){
var _user = new Object();
var df = $q.defer();
function getUserApi(){
$http.get('/api/users/me')
.success(function(data,status){
df.resolve(data);
})
.error(function(data,status){
console.error(data);
df.reject(data)
});
return df.promise;
}
function retrieveUserData(property){
if(!Object.keys(_user).length){
return getUserApi().then(function(data){
_user = data;
if(property){
return _user[property];
}
return _user;
});
;
}
if(property){
return _user[property];
}
return _user;
}
return {
getData: retrieveUserData
}
})
.config(function($urlRouterProvider){
$urlRouterProvider.otherwise('/dashboard');
})
.run(function(IO, User){
User.getData('twitchUser').then(function(channel){
IO.connect('alerts').listenNewMessages().joinChannel(channel);
});
});
|
class ias_machineaccountvalidation {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.Object GetLifetimeService()
GetLifetimeService() {
}
// type GetType()
GetType() {
}
// System.Object InitializeLifetimeService()
InitializeLifetimeService() {
}
// string ToString()
ToString() {
}
}
module.exports = ias_machineaccountvalidation;
|
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
// add hot-reload related code to entry chunks
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
})
module.exports = merge(baseWebpackConfig, {
node: {
console: false,
fs: 'empty',
net: 'empty',
tls: 'empty'
},
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
},
{
loader: 'file-loader',
options: {
name: '../static/theme/2001/*.fmi'
}
},
{
loader: 'file-loader',
options: {
name: '../static/10347/10347.fmap'
}
},
// cheap-module-eval-source-map is faster for development
devtool: '#cheap-module-eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': config.dev.env
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
new FriendlyErrorsPlugin()
]
})
|
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h(h.f, null, h("circle", {
cx: "15.5",
cy: "9.5",
r: "1.5"
}), h("circle", {
cx: "8.5",
cy: "9.5",
r: "1.5"
}), h("path", {
d: "M12 16c-1.48 0-2.75-.81-3.45-2H6.88c.8 2.05 2.79 3.5 5.12 3.5s4.32-1.45 5.12-3.5h-1.67c-.7 1.19-1.97 2-3.45 2zm-.01-14C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
})), 'SentimentSatisfiedOutlined'); |
var content = '<abcdテスト>';
var result = '';
result = encodeURI(content);
console.log("encodeURI('abcdテスト')", result);
console.log("decodeURI(encodeURI('abcdテスト'))", decodeURI(encodeURI(content)));
result = encodeURIComponent(content);
console.log("encodeURIComponent('abcdテスト')", result);
console.log("decodeURIComponent(encodeURIComponent('abcdテスト'))", decodeURIComponent(encodeURIComponent(content)));
result = 'var a=1,b=2;console.log(a+b);';
eval(result);
console.log("isFinite('aa')", isFinite('aa'));
console.log("isFinite('1111')", isFinite('1111'));
console.log("isFinite('1111.23')", isFinite('1111.23'));
console.log("isFinite(null)", isFinite(null));
console.log("isFinite(undefined)", isFinite(undefined));
console.log("isFinite(NaN)", isFinite(NaN));
console.log("isFinite(true)", isFinite(true));
console.log("isNaN('aa')", isNaN('aa'));
console.log("isNaN('1111')", isNaN('1111'));
console.log("isNaN('1111.23')", isNaN('1111.23'));
console.log("isNaN(null)", isNaN(null));
console.log("isNaN(undefined)", isNaN(undefined));
console.log("isNaN(NaN)", isNaN(NaN));
console.log("isNaN(true)", isNaN(true));
console.log("parseFloat('aa')", parseFloat('aa'));
console.log("parseFloat('1111')", parseFloat('1111'));
console.log("parseFloat('1111.23')", parseFloat('1111.23'));
console.log("parseFloat(null)", parseFloat(null));
console.log("parseFloat(undefined)", parseFloat(undefined));
console.log("parseFloat(NaN)", parseFloat(NaN));
console.log("parseFloat(true)", parseFloat(true));
console.log("parseInt('aa')", parseInt('aa'));
console.log("parseInt('1111')", parseInt('1111'));
console.log("parseInt('1111.73')", parseInt('1111.73'));
console.log("parseInt(null)", parseInt(null));
console.log("parseInt(undefined)", parseInt(undefined));
console.log("parseInt(NaN)", parseInt(NaN));
console.log("parseInt(true)", parseInt(true));
|
// 使用缓存优化标签选择
// 如果没有缓存的话建立缓存,否则返回缓存中的标签对象
function getElements(name) {
if (!getElements.cache) {
getElements.cache = {};
}
return getElements.cache[name] = getElements.cache[name] || document.getElementsByTagName(name);
} |
function ajaxChimpCallback(a) {
if ("success" === a.result) {
$(".beta-request-result").show();
$(".beta-request-form").hide();
$(".beta-request-title").hide();
$.featherlight.current().close();
}
else
{
a.msg.indexOf("already subscribed") >= 0 ? ($(".beta-request-form").hide(), $(".beta-request-title").hide(), $(".beta-request-already-subscribed").show()) : $(".beta-request-error").show(), $(".beta-request-btn").html("Invite me")
}
};
function contactLightbox()
{
var configuration = ({
afterOpen: function(event)
{
$('body').toggleClass('body-open-modal');
setContactTabindex();
sendContactMessage();
},
afterClose: function(event)
{
$('body').toggleClass('body-open-modal');
}
});
$('body').on('click', '.open-contact-form', function(event)
{
event.preventDefault();
$.featherlight('#contactLightbox', configuration);
});
}
function setContactTabindex()
{
var $form = $('.featherlight-content form.sendingContactMessage');
$form.find('input[name=from_name]').focus().attr('tabindex', 1);
$form.find('input[name=from_email]').attr('tabindex', 2);
$form.find('textarea[name=message]').attr('tabindex', 3);
}
function setBetaTabIndex()
{
var $form = $('.beta-request-form');
$form.find('.first-name').focus().attr('tabindex', 1);
$form.find('.email').attr('tabindex', 2);
}
function sendContactMessage()
{
$('.featherlight-content form.sendingContactMessage').validate({
rules: {
from_name: "required",
from_email: {
required: true,
email: true
},
message: "required"
},
messages: {
from_name: "Please enter your name",
from_email: "Please enter a valid email address",
message: "Please enter a message."
},
submitHandler: function(form, event) {
event.preventDefault();
var $form = $('.featherlight-content form.sendingContactMessage'),
service_id = "default_service",
template_id = "trado_contact_message",
currentModal = $.featherlight.current();
params = $form.serializeArray().reduce(function(obj, item) {
obj[item.name] = item.value;
return obj;
}, {});
$form.find('input').prop('disabled', true);
$form.find('textarea').prop('disabled', true);
$form.find("button").text("Sending...");
$('#errors, #success').html('');
emailjs.send(service_id,template_id,params)
.then(function(){
$form.find('#success').html('<p>Message has been sent. We will get back to you within 24 hours.</p>');
setTimeout(function(){
currentModal.close();
$form.find('input').prop('disabled', false);
$form.find('textarea').prop('disabled', false);
$form.find("button").text("Send");
}, 5000);
}, function(err) {
$form.find('input').prop('disabled', false);
$form.find('textarea').prop('disabled', false);
$form.find("#errors").html('<p>' + JSON.parse(err.text).service_error + '</p>');
$form.find("button").text("Send");
});
}
});
}
function scrollingNavbar()
{
$(window).on('scroll', function() {
var y_scroll_pos = window.pageYOffset;
var scroll_pos_test = 150; // set to whatever you want it to be
if(y_scroll_pos > scroll_pos_test)
{
$('header.scrolling').fadeIn();
$('#home-layout .slicknav_menu').addClass('home-scrolling');
}
else
{
$('header.scrolling').stop().fadeOut();
$('#home-layout .slicknav_menu').removeClass('home-scrolling');
}
});
$('.menu').slicknav({
label: "",
brand: "<a href='/'><img src=\"https://dlczmkt02tnnw.cloudfront.net/trado-promo/assets/img/cropped.png\" height=\"100\"></a>"
});
}
function betaLightbox()
{
$(".beta-request-form").ajaxChimp({
url: "https://tomdallimore.us9.list-manage.com/subscribe/post?u=b141eef8b30b7dc5813bd752a&id=95c7eadbb9",
callback: ajaxChimpCallback
});
$(".beta-request-form").submit(function() {
ga("send", "event", "invite", "request");
$(".beta-request-btn").html("<i class='fa fa-spinner fa-spin'></i>");
$(".beta-request-error").hide();
$(".beta-request-already-subscribed").hide();
});
if (!readCookie('tradoPopup'))
{
var configuration = ({
afterOpen: function(event)
{
$('body').toggleClass('body-open-modal');
setBetaTabIndex();
sendContactMessage();
},
afterClose: function(event)
{
$('body').toggleClass('body-open-modal');
}
});
setTimeout( function()
{
$.featherlight('#newsletterLightbox', configuration);
createCookie('tradoPopup','1',1);
}, 3000);
}
}
$(document).ready(function() {
contactLightbox();
betaLightbox();
scrollingNavbar();
if(!$('html').hasClass('touch'))
{
$(".first-name").first().focus();
}else{
bouncefix.add('html');
}
$('[data-ga="true"]').click(function()
{
var dataCategory = $(this).attr('data-event-category'),
dataAction = $(this).attr('data-event-action');
if(dataCategory == '' || dataAction == '')
{
return false;
}
else
{
ga("send", "event", dataCategory, dataAction);
}
});
});
jQuery.fn.capitalize = function() {
return $(this).each(function(a, b) {
$(b).keyup(function(a) {
var b = a.target,
c = $(this).val(),
d = b.selectionStart,
e = b.selectionEnd;
$(this).val(c.replace(/^(.)|(\s|\-)(.)/g, function(a) {
return a.toUpperCase()
})), b.setSelectionRange(d, e)
})
}), this
};
$(".first-name").capitalize();
$('#documentation .content, #documentation .sidebar').theiaStickySidebar(
{
additionalMarginTop: 120
});
// cookies
function createCookie(name,value,days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + value + expires + "; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
} |
export default class Definition {
get module() { return this._module; }
set module(value) { this._module = value; }
get classArguments() { return this._arguments || []; }
set classArguments(value) { this._arguments = value; }
get tags() { return this._tags || []; }
set tags(value) { this._tags = value; }
constructor(module = '', classArguments = [], tags = []) {
this.module = module;
this.classArguments = classArguments;
this.tags = tags;
}
setModule(module) {
this.module = module;
}
addArgument(argument) {
this.classArguments.push(argument);
return this;
}
setArgument(index, argument) {
this.classArguments[index] = argument;
return this;
}
removeArgument(index) {
if (undefined !== this.classArguments[index]) {
delete this.classArguments[index];
}
return this;
}
setArguments(classArguments) {
this.classArguments = classArguments;
}
setTags(tags) {
this.tags = tags;
}
getTags() {
return this.tags;
}
addTag(name) {
this.tags.push(name);
}
} |
/* eslint-disable no-console*/
import low from 'lowdb';
import fse from 'fs-extra';
import uuid from 'uuid';
import slug from 'slug';
import constants from './constants';
import { crypt } from '../utils';
const user = {
id: uuid(),
name: constants.USER_NAME,
password: crypt.encrypt(constants.USER_PASSWORD),
role: 'admin',
slug: slug(constants.USER_NAME),
};
fse.ensureFileSync(constants.DATA_FILE);
const db = low(constants.DATA_FILE);
db.defaults({
users: [user],
containers: [],
imageSources: [],
images: [],
templates: [],
volumes: [],
}).write();
console.log('DB is running');
export default () => (db);
|
/**
* Fetch configuration data using an API Key and the Application Secret Key.
* By doing so, the sconfig servers will just apply firewall rules (if any) and return
* the encrypted configuration data. The client will then decrypt the configuration
* data using the App Secret Key
* Note: Ff no API Key or App Secret is provided, it will look for it in process.env.SCONFIG_KEY and process.env.SCONFIG_SECRET
* */
var sconfig = require('sconfig');
sconfig({
key: '{YOUR_API_KEY}', // the 32-char version of an API Key
secret: '{YOUR_APP_SECRET}', // the 32 char secret key found under the App Details tab
//version: '{YOUR_VERSION}', // version name to fetch, defaults to latest version created
// json: true // expect the result data to be JSON. This is true by default.
sync: true // persist the configuration data locally in the event of an sconfig server outage
}, function(err, config) {
if (err) {
console.log(err);
return;
}
console.log("OK", config);
}); |
// Lecture 11
function b() {
console.log('Called b!');
}
b();
console.log(a);
// Will return undefined as only set in Creation Phase
var a = 'Hello World!';
console.log(a);
// Lecture 12 Conceptual Aside
/*
-Single Threaded: One command at a time
-Caveat, Javascript is not the only thing happening within a browser.
-Synchronous: One line (and order in this case) at a time
-How do asynchronous calls in AJAX work?
*/
// Lecture 14
// -Invocation: Running the function, use () in JS
function b() {
var d;
}
function a() {
b();
var c;
}
a();
var d;
/*
-Parser parses code. Global Execution Context is created. Compiler does this.
-Window object created and code attached. Executes line by line.
-New Execution Context is created and placed in Execution Stack. Whatever is on top, that is currently running.
-Own space for functions and variables.
- a() runs, then function a(), then b() within function a()
-When finished b() pops out
*/
// Lecture 15
/*
-Variable Environment: Where variables live an how they live relative to each other.
*/
function b() {
var myVar;
console.log(myVar);
}
function a() {
var myVar = 2;
console.log(myVar);
b();
}
var myVar = 1;
console.log(myVar);
a();
console.log(myVar);
// Second console.log will still give you 1 as you are in Global Execution Context.
// Lecture 16
/*
-Scope Chain: Link of Outer Environments
-Every Execution Context has a Reference to Outer Environment
-Lexical Environment...
*/
function a() {
function b() {
console.log(myVar);
}
var myVar = 2;
b();
}
var myVar = 1;
a();
b();
// a() is 2, b() is undefined
// b()'s Outer Reference is a() now
// Lexical refers to when it is created
// Lecture 17: Scope, ES6, and let
/*
-Scope: Where a variable is available in your code
-ECMAScript 6
-let can be used instead of var
-Allows JS engine to use blockscoping
-Not allowed to use until line of code is run
-Declared inside a block ()
if (a > b) {
let c = true;
}
*/
// Lecture 18
/*
-What about Asynchronous Callbacks
-Asynchronous: More than one at a time
-Click events etc
-JS Engine:
-Doesn't exist by itself. Other elements, engines running.
-Rendering Engine, HTTP Request
-Has hooks to talk to each other
-Event Queue: List of events that are happening. If JS Engine wants to be notified, gets placed.
-When stack is empty, JS engine looks at Event Queue periodically and then creates Execution Context
-Browser is putting things asynchronously
-Asynchronous is possible in JS but it's about events happening outside JS Engine.
*/
function waitThreeSeconds() {
var ms = 3000 + new Date().getTime();
while (new Date() < ms){}
console.log('Finished Function');
}
function clickHandler() {
console.log('Click Event');
}
document.addEventListener('click', clickHandler);
waitThreeSeconds();
console.log('Finished Execution');
// Section 3
// Lecture 19: Conceptual Aside: Types and JS
/*
-Dynamic Typing: You don't tell the engine what type of data a variable holds, it figures it out while your code is running.
-C# using Static Typing hence you have to tell.
*/
// Lecture 20: Primitive Types
/*
-Primitive or Simple Type: A type of data that represents a single value aka not an object.
-Undefined: Lack of existence, default.
-Null: Lack of existence, but you can set this etc.
-Boolean: True or false.
-Number: Floating point # (there's always some decimals)...you can fake it, makes math weird.
-String: A sequence of characters using '' or "".
-Symbol: Used in ES6
*/
// Lecture 21: Conceptual Aside
/*
-Operators: A special function that is syntactically (written) differently
-Take two parameters and return one result.
-Infix notation: Operators sits in between two parameters.
*/
var a = 3 + 4;
console.log(a);
// Lecture 22: Operator Precedence and Associativity
/*
-Associativity: What order operator functions gets called in: L-R or R-L (when functions have same precedence).
-If they have same precedence, helps to resolve.
-Operator Precedence: Which operator function gets called first; in order of precedence.
-What happens if you have the same associativity?
*/
var a = 3 + 4 * 5;
console.log(a);
var a = 2, b = 3, c = 4;
a = b = c;
console.log(a);
console.log(b);
console.log(c);
// Lecture 23: Coercion
/*
Coercion: Convering a value from one type to another
-Due to it be a dynamic type language
*/
// Lecture 24: Comparison Operators
/*
*/
console.log(1 < 2 < 3) // returns true
console.log(3 < 2 < 1) //returns true (L to R, gives False < 1 aka 0 < 1)
// true becomes a 1
// undefined is notation
// null is 0, however null == 0 (returns false)
"" == 0
"" == false
// Both return true
// Use strict equality aka ===
// Object.is in ES6
// Lecture 27: Existence and Booleans
/*
-All things with a lack of existence will yield False
*/
var a;
a = 0;
if (a || a === 0) {
console.log('Something is there.');
};
// returns true and console logs it...
// Lecture 28: Default Values
/*
-Operators are functions that return values
*/
function greet(name) {
console.console.log(name);
console.log('Hello' + name);
}
greet();
// Lecture 29: Framework Aside
// Lecture 30: Objects and Functions
/*
-Objects: Collections of NV pairs
-How does it reside in memory?
-Primitive (Property), Object (Property), Function (Method)
-Core Address with References
-Dot is just a function that takes the objects and passes the string.
-Below is not preferred way to create new object
*/
var person = new Object();
person["firstname"] = "Tony";
person["lastname"] = "Alicia";
var firstNameProperty = "firstname";
console.log(person);
console.log(person[firstNameProperty]);
console.log(person.firstname);
console.log(person.lastname);
person.address = new Object();
person.address.street = "111 Main St.";
// Lecture 31: Objects and Object Literals
/*
-When JS engine is parsing syntax, assumes you are creating a new object.
-Can setup and initialize...
-JS is very liberal about using white space.
*/
var person = {firstname: 'Tony'};
function greet(person) {
console.log('Hi' + person.firstname);
}
greet(Tony);
greet({
firstname: 'Mary';
});
// Above shows creating object on the fly.
// Object Literal, Dot, Operators do the same thing under the hood.
// Lecture 32: Framework Aside: Faking Namespace
/*
-Namespace: Container for Variables and functions
-Typically to keep variables and functions with the same name separate
-No Namespacing in JS
*/
// Lecture 33: JSON and Object Literals
/*
-Use to be XML
-<object></object>
-Properties have to be in quotes
-JSON has stricter rules. Can use JSON.stringify or JSON.parse to go back and forth.
*/
// Lecture 34: Functions are Objects
/*
-First Class Functions: Everything you can do with other types you can do with functions.
-Assign them to variables, pass them around, or crate them on the fly.
-Has special Properties
-Can be Anonymous
-Code can be set. Will be invocable.
-Code is a property of that function.
*/
// Lecture 35: Functions Statements and Expressions
/*
Function Expression: Unit of code that results in a value; doesn't have to save in a variable
Statement: Does not result in value.
*/
greet();
function greet() {
console.log('Hi');
}
// Above is hoisted while below sets variable as undefined primitive.
// Hence function expressions are not hoisted.
anonymousGreet();
var anonymousGreet =m function() {
console.log('Hi');
}
function log(a) {
a();
}
log(function() {
console.log('Hi');
});
// Example of Functional Programming above
// Lecture 36: Conceptual Aside: By Value vs By Reference
/*
-In both cases talking about Variables.
-Reference points to same memory space whereas Value makes a clone and separate memoryspace.
-Mutate: To change something.
-Equal operator sets up new memory space (new address)
*/
var a = 3;
var b;
b = a;
a = 2;
console.log(a);
console.log(b);
// By Reference
var c = { greeting: 'Hi' };
var d;
d = c;
c.greeting = 'hello';
// Both pointing to same point aka greeting. Just aliases.
console.log(c);
console.log(d);
// Lecture 37: Objects, Functions, and 'This'
/*
-When function invoked, execution context is created (Creation Phase)
-Every time a function is run, JS engine gives us this.
*/
var c = {
name: 'The c object';
log: function() {
this.name = 'Updated c object';
console.log(this);
var setname = function(newname) {
this.name = newname;
}
setname('Updated again! The c object');
console.log(this);
};
};
c.log();
// Setname changes in global namespace but console.log will not reflect.
// If you set var self = this right below log function and then use self instead of this.
// Let keyword is to replace the var keyword to help with this issue.
// Lecture 38: Conceptual Aside: Arrays
// Lecture 39: Arguments
/*
-Next version won't have this.
-Arguments: Contains list of all parameters/values you pass to a function.
-Will become depracted.
-Spread: Add ...name
*/
// Lecture 40: Framework Aside: Function Overloading
// Lecture 41: Conceptual Aside: Syntax Parsers
/*
-Intermediate programs that translates code so that your computer can understand.
*/
// Lecture 42: Dangerous Aside
/*
-Automatic Semicolon Insertion: Injects where character return is.
*/
// Lecture 43: Framework Aside: Whitespace
/*
-Whitespace: Invisible characters that create literal 'space' in your written code.
*/
// Lecture 44: IIFEs
/*
-You can invoke at point of creation.
-Put parentheses around function.
-With new execution context, can call desired variable so as to not interfere with other code.
-Wrap entire code with parentheses
-Global is reusable accross server whereas window is not.
*/
// Function Statement
function greet(name) {
console.log('Hello' + name);
}
greet();
// Function Expression (sort of Object Literal, not in memoryspace)
var greetFunc = function(name) {
console.log('Hello' + name);
};
greetFunc();
// IIFE
var greetFunc = function(name) {
return 'Hello' + name;
}();
// Lecture 46: Understanding Closures
/*
-Closure: Execution context can close in outside variables.
*/
function greet(whattosay) {
return function (name) {
console.log(whattosay) + ' ' + name);
}
}
greet('Hi')('Tony');
var sayHi = greet('Hi');
sayHi('Tony');
// Lecture 47: Understanding Closures Part 2
/*
-
*/
function buildFunctions() {
var arr = [];
for (var i = 0; i < 3, i++) {
arr.push(
function () {
console.log(i);
}
)
}
return arr;
}
var fs = buildFunctions()
fs[0]();
fs[1]();
fs[2]();
// All return 3 because that is what i is.
// Lecture 48: Framework Aside: Function Factories
/*
-Factory: Returns or makes something for you.
-
*/
function makeGreeting(language) {
return function (firstname, lastname) {
if (language === 'en') {
console.log('Hello ' + firstname + ' ' + lastname);
}
if (language === 'es') {
console.log('Hola ' + firstname + ' ' + lastname);
}
}
}
var greetEnglish = makeGreeting('en');
var greetSpanish = makeGreeting('es');
greetEnglish('John', 'Doe');
greetSpanish('John', 'Doe');
// Lecture 49: Closures and Callbacks
/*
-setTimeout uses Expressions and Closures.
*/
// Lecture 50: Calls(), Bind() and Apply()
/*
-Bind functions makes a copy of function.
logName();
logName.call(person, 'en');
logName.apply (person, ['en'])
-Latter determines what this is and actually calls it.
-Apply requires an array.
*/
// Function Borrowing
// Function Carrying
function multiply(a,b) {
return a*b;
}
var multipleByTwo = multiply.bind(this, 2);
// Lecture 51: Functional Programming
/*
-Utilizes first class functions.
-You functions should not mutate data at lower levels.
*/
var checkPastLimitSimplified = function (limiter) {
return function (limiter, item) {
return item > limiter;
}.bind(this, limiter);
};
// Lecture 52: Functional Programming Continued
/*
-Underscore.JS Library
-Shows how it does what is does.
-Underscore.JS
-Implements a lot of Functional Programming
-Alternate called Lodash
-Works a bit faster.
-
*/
// SECTION 5
// SECTION 6
// Lecture 57: Function Constructors, 'new', and the History of JS
/*
-Built by Brandon Eich
-Netscape, Microsoft, Oracle and Sun. Written eventually for browser. Named to attract Java developers.
-A class in Java is not an object but used to define an object.
-Class in JS isn't really a class like in C++.
-Function Constructors: A normal function that is used to construct objects
*/
Function Person() {
this.firstname = 'John';
this.lastname = 'Doe';
}
var john = new Person();
console.log('John');
// Gives you function with firstname and lastname
// New is an operator. Immediately empty object is created. Then invokes function. When function is called, execution context generates variable called this.
// As long as function doesn't return value then JS engine will return that object that was created by the new operator.
// Lecture 58: Function Constructors and '.prototype'
/*
-The prototype property on a function is NOT the prototype of the function.
-It's the prototype of any objects created if you're using function constructors.
-Why add method to the prototype method? Takes up memory space.
*/
Person.prototype.getFullName = function() {
return this.firstname + ' ' + this.lastname;
}
// Lecture 59: Danger Aside: 'new' and Functions
/*
-Function constructors likely going away.
*/
// Lecture 60: Conceptual Aside: Built-In Function Constructors
/*
-Actually created objects that contain primitives
*/
String.prototype.isLengthGreaterThan = function(limit) {
return this.length > limit;
}
console.log("John".isLengthGreaterThan(3));
// Lecture 61: Dangerous Aside: Built-In Function Constructors
/*
-Moment.js (library on dates)
*/
// Lecture 62: Dangerous Aside: Arrays and for..in
// Lecture 63: Object.create and Pure Prototypal Inheritance
/*
-Polyfill: Code that adds a Feature which the engine may lack.
*/
// Polyfill
if (!Object.create) {
Object.create = function (o) {
if (arguments.length > 1) {
throw new Error('Object.create implementation' + ' only accepts the first parameter.');
}
function F() {}
F.prototype = o;
return new F();
};
}
// Lecture 64: ES6 and Classes
/*
-Classes are not objects in other languages, but in JS it is.
-extend sets prototype.
-Syntactic Sugar: A different way to type somethign that doesn't change how it works under the hood.
*/
class Person {
constructor(firstname, lastname) {
this.firstname = firstname;
this.lastname = lastname;
}
greet() {
return 'Hi' + firstname;
}
}
var john = new Person('John', 'Doe');
class InformalPerson extends Person {
constructor(firstname, lastname) {
super(firstname, lastname);
}
greet() {
return 'Yo' + firstname;
}
}
// SECTION 7
// Lecture 65: Initialization
// Lecture 66: 'typeof', 'instanceof', and Figuring What Something Is
/*
-typeof and instanceof
-Do different things.
*/
// Lecture 67: Strict Mode
/*
-Must declare variable to define it
-Top of file or top of function
-Not every engine implements it the same way.
*/
function Person(a) {
'use strict';
console.log(a)
}
// Lecture 68: Strict Mode Reference
// SECTION 8:
// Lecture 69: Learning From Other's Good Code
// Lectures 70-72: Deep Dive into Source Code: jQuery
/*
-Manipulate the DOM.
-Method Chaining: Calling one method after another, and each affects the parent object
-Because methods are on the prototype it points back using return this.
*/
addChild().removeClass();
// SECTION 9
// Lecture 73: Requirements
// Lecture 74: Structuring Safe Code
// Lecture 75: Our Object and Its prototype
// Lecture 76: Properties and Chainable Methods
// Lecture 77: Adding jQuery Support
// Lecture 78: Good Commenting
// Lecture 79: Let's Use Our Framework
// Lecture 80: A Side Note
// SECTION 10
// Lecture 81: TypeScript, ES6, and Transpiled Languages
// Lecture 82: Transpiled Languages References
// SECTION 11
// Lecture 83: Existing and Upcoming Features
// Lecture 84: ES6 Features Reference
|
'use strict';
var mongoose = require('mongoose')
, Schema = mongoose.Schema;
// 스키마 구조
var PollReplySchema = new Schema({
_id: { type:Schema.Types.ObjectId, required:true },
itemMulti: [{
_id: { type:Schema.Types.ObjectId, required:true },
reply: [{
_id: { type:Schema.Types.ObjectId, required:true },
user: { type:String, required:true, trim:true }
}]
}],
itemShort: [{
_id: { type:Schema.Types.ObjectId, required:true },
reply: [{
user: { type:String, required:true, trim:true },
content: { type:String, required:true, trim:true }
}]
}],
characters: [{
_id: { type:Schema.Types.ObjectId, required:true },
reply: [{
_id: { type:Schema.Types.ObjectId, required:true },
user: { type:String, required:true, trim:true }
}]
}],
users: [{
_id: { type:String, required:true, trim:true },
ip: { type:String, trim:true },
agent: { type:String, trim:true }
}],
created: { type: Date, default: Date.now }
});
// 후킹
PollReplySchema.pre('save', function(next) {
next();
});
// 자주쓰는 Model
PollReplySchema.static({
load: function(id, callback, isCount) {
if (isCount) {
this.count({ _id: id }, callback);
} else {
this.findOne({ _id: id }, callback);
}
}
});
mongoose.model('PollReply', PollReplySchema); |
/**
* @author sole / http://soledadpenades.com
* @author mrdoob / http://mrdoob.com
* @author Robert Eisele / http://www.xarg.org
* @author Philippe / http://philippe.elsass.me
* @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
* @author Paul Lewis / http://www.aerotwist.com/
* @author lechecacharro
* @author Josh Faul / http://jocafa.com/
* @author egraether / http://egraether.com/
*/
if ( Date.now === undefined ) {
Date.now = function () {
return new Date().valueOf();
}
}
var TWEEN = TWEEN || ( function () {
var _tweens = [];
return {
REVISION: '8',
getAll: function () {
return _tweens;
},
removeAll: function () {
_tweens = [];
},
add: function ( tween ) {
_tweens.push( tween );
},
remove: function ( tween ) {
var i = _tweens.indexOf( tween );
if ( i !== -1 ) {
_tweens.splice( i, 1 );
}
},
update: function ( time ) {
if ( _tweens.length === 0 ) return false;
var i = 0, numTweens = _tweens.length;
time = time !== undefined ? time : Date.now();
while ( i < numTweens ) {
if ( _tweens[ i ].update( time ) ) {
i ++;
} else {
_tweens.splice( i, 1 );
numTweens --;
}
}
return true;
}
};
} )();
TWEEN.Tween = function ( object ) {
var _object = object;
var _valuesStart = {};
var _valuesEnd = {};
var _duration = 1000;
var _delayTime = 0;
var _startTime = null;
var _easingFunction = TWEEN.Easing.Linear.None;
var _interpolationFunction = TWEEN.Interpolation.Linear;
var _chainedTweens = [];
var _onStartCallback = null;
var _onStartCallbackFired = false;
var _onUpdateCallback = null;
var _onCompleteCallback = null;
this.to = function ( properties, duration ) {
if ( duration !== undefined ) {
_duration = duration;
}
_valuesEnd = properties;
return this;
};
this.start = function ( time ) {
TWEEN.add( this );
_onStartCallbackFired = false;
_startTime = time !== undefined ? time : Date.now();
_startTime += _delayTime;
for ( var property in _valuesEnd ) {
// This prevents the interpolation of null values or of non-existing properties
if( _object[ property ] === null || !(property in _object) ) {
continue;
}
// check if an Array was provided as property value
if ( _valuesEnd[ property ] instanceof Array ) {
if ( _valuesEnd[ property ].length === 0 ) {
continue;
}
// create a local copy of the Array with the start value at the front
_valuesEnd[ property ] = [ _object[ property ] ].concat( _valuesEnd[ property ] );
}
_valuesStart[ property ] = _object[ property ];
}
return this;
};
this.stop = function () {
TWEEN.remove( this );
return this;
};
this.delay = function ( amount ) {
_delayTime = amount;
return this;
};
this.easing = function ( easing ) {
_easingFunction = easing;
return this;
};
this.interpolation = function ( interpolation ) {
_interpolationFunction = interpolation;
return this;
};
this.chain = function () {
_chainedTweens = arguments;
return this;
};
this.onStart = function ( callback ) {
_onStartCallback = callback;
return this;
};
this.onUpdate = function ( callback ) {
_onUpdateCallback = callback;
return this;
};
this.onComplete = function ( callback ) {
_onCompleteCallback = callback;
return this;
};
this.update = function ( time ) {
if ( time < _startTime ) {
return true;
}
if ( _onStartCallbackFired === false ) {
if ( _onStartCallback !== null ) {
_onStartCallback.call( _object );
}
_onStartCallbackFired = true;
}
var elapsed = ( time - _startTime ) / _duration;
elapsed = elapsed > 1 ? 1 : elapsed;
var value = _easingFunction( elapsed );
for ( var property in _valuesStart ) {
var start = _valuesStart[ property ];
var end = _valuesEnd[ property ];
if ( end instanceof Array ) {
_object[ property ] = _interpolationFunction( end, value );
} else {
_object[ property ] = start + ( end - start ) * value;
}
}
if ( _onUpdateCallback !== null ) {
_onUpdateCallback.call( _object, value );
}
if ( elapsed == 1 ) {
if ( _onCompleteCallback !== null ) {
_onCompleteCallback.call( _object );
}
for ( var i = 0, numChainedTweens = _chainedTweens.length; i < numChainedTweens; i ++ ) {
_chainedTweens[ i ].start( time );
}
return false;
}
return true;
};
};
TWEEN.Easing = {
Linear: {
None: function ( k ) {
return k;
}
},
Quadratic: {
In: function ( k ) {
return k * k;
},
Out: function ( k ) {
return k * ( 2 - k );
},
InOut: function ( k ) {
if ( ( k *= 2 ) < 1 ) return 0.5 * k * k;
return - 0.5 * ( --k * ( k - 2 ) - 1 );
}
},
Cubic: {
In: function ( k ) {
return k * k * k;
},
Out: function ( k ) {
return --k * k * k + 1;
},
InOut: function ( k ) {
if ( ( k *= 2 ) < 1 ) return 0.5 * k * k * k;
return 0.5 * ( ( k -= 2 ) * k * k + 2 );
}
},
Quartic: {
In: function ( k ) {
return k * k * k * k;
},
Out: function ( k ) {
return 1 - ( --k * k * k * k );
},
InOut: function ( k ) {
if ( ( k *= 2 ) < 1) return 0.5 * k * k * k * k;
return - 0.5 * ( ( k -= 2 ) * k * k * k - 2 );
}
},
Quintic: {
In: function ( k ) {
return k * k * k * k * k;
},
Out: function ( k ) {
return --k * k * k * k * k + 1;
},
InOut: function ( k ) {
if ( ( k *= 2 ) < 1 ) return 0.5 * k * k * k * k * k;
return 0.5 * ( ( k -= 2 ) * k * k * k * k + 2 );
}
},
Sinusoidal: {
In: function ( k ) {
return 1 - Math.cos( k * Math.PI / 2 );
},
Out: function ( k ) {
return Math.sin( k * Math.PI / 2 );
},
InOut: function ( k ) {
return 0.5 * ( 1 - Math.cos( Math.PI * k ) );
}
},
Exponential: {
In: function ( k ) {
return k === 0 ? 0 : Math.pow( 1024, k - 1 );
},
Out: function ( k ) {
return k === 1 ? 1 : 1 - Math.pow( 2, - 10 * k );
},
InOut: function ( k ) {
if ( k === 0 ) return 0;
if ( k === 1 ) return 1;
if ( ( k *= 2 ) < 1 ) return 0.5 * Math.pow( 1024, k - 1 );
return 0.5 * ( - Math.pow( 2, - 10 * ( k - 1 ) ) + 2 );
}
},
Circular: {
In: function ( k ) {
return 1 - Math.sqrt( 1 - k * k );
},
Out: function ( k ) {
return Math.sqrt( 1 - ( --k * k ) );
},
InOut: function ( k ) {
if ( ( k *= 2 ) < 1) return - 0.5 * ( Math.sqrt( 1 - k * k) - 1);
return 0.5 * ( Math.sqrt( 1 - ( k -= 2) * k) + 1);
}
},
Elastic: {
In: function ( k ) {
var s, a = 0.1, p = 0.4;
if ( k === 0 ) return 0;
if ( k === 1 ) return 1;
if ( !a || a < 1 ) { a = 1; s = p / 4; }
else s = p * Math.asin( 1 / a ) / ( 2 * Math.PI );
return - ( a * Math.pow( 2, 10 * ( k -= 1 ) ) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) );
},
Out: function ( k ) {
var s, a = 0.1, p = 0.4;
if ( k === 0 ) return 0;
if ( k === 1 ) return 1;
if ( !a || a < 1 ) { a = 1; s = p / 4; }
else s = p * Math.asin( 1 / a ) / ( 2 * Math.PI );
return ( a * Math.pow( 2, - 10 * k) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) + 1 );
},
InOut: function ( k ) {
var s, a = 0.1, p = 0.4;
if ( k === 0 ) return 0;
if ( k === 1 ) return 1;
if ( !a || a < 1 ) { a = 1; s = p / 4; }
else s = p * Math.asin( 1 / a ) / ( 2 * Math.PI );
if ( ( k *= 2 ) < 1 ) return - 0.5 * ( a * Math.pow( 2, 10 * ( k -= 1 ) ) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) );
return a * Math.pow( 2, -10 * ( k -= 1 ) ) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) * 0.5 + 1;
}
},
Back: {
In: function ( k ) {
var s = 1.70158;
return k * k * ( ( s + 1 ) * k - s );
},
Out: function ( k ) {
var s = 1.70158;
return --k * k * ( ( s + 1 ) * k + s ) + 1;
},
InOut: function ( k ) {
var s = 1.70158 * 1.525;
if ( ( k *= 2 ) < 1 ) return 0.5 * ( k * k * ( ( s + 1 ) * k - s ) );
return 0.5 * ( ( k -= 2 ) * k * ( ( s + 1 ) * k + s ) + 2 );
}
},
Bounce: {
In: function ( k ) {
return 1 - TWEEN.Easing.Bounce.Out( 1 - k );
},
Out: function ( k ) {
if ( k < ( 1 / 2.75 ) ) {
return 7.5625 * k * k;
} else if ( k < ( 2 / 2.75 ) ) {
return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75;
} else if ( k < ( 2.5 / 2.75 ) ) {
return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375;
} else {
return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375;
}
},
InOut: function ( k ) {
if ( k < 0.5 ) return TWEEN.Easing.Bounce.In( k * 2 ) * 0.5;
return TWEEN.Easing.Bounce.Out( k * 2 - 1 ) * 0.5 + 0.5;
}
}
};
TWEEN.Interpolation = {
Linear: function ( v, k ) {
var m = v.length - 1, f = m * k, i = Math.floor( f ), fn = TWEEN.Interpolation.Utils.Linear;
if ( k < 0 ) return fn( v[ 0 ], v[ 1 ], f );
if ( k > 1 ) return fn( v[ m ], v[ m - 1 ], m - f );
return fn( v[ i ], v[ i + 1 > m ? m : i + 1 ], f - i );
},
Bezier: function ( v, k ) {
var b = 0, n = v.length - 1, pw = Math.pow, bn = TWEEN.Interpolation.Utils.Bernstein, i;
for ( i = 0; i <= n; i++ ) {
b += pw( 1 - k, n - i ) * pw( k, i ) * v[ i ] * bn( n, i );
}
return b;
},
CatmullRom: function ( v, k ) {
var m = v.length - 1, f = m * k, i = Math.floor( f ), fn = TWEEN.Interpolation.Utils.CatmullRom;
if ( v[ 0 ] === v[ m ] ) {
if ( k < 0 ) i = Math.floor( f = m * ( 1 + k ) );
return fn( v[ ( i - 1 + m ) % m ], v[ i ], v[ ( i + 1 ) % m ], v[ ( i + 2 ) % m ], f - i );
} else {
if ( k < 0 ) return v[ 0 ] - ( fn( v[ 0 ], v[ 0 ], v[ 1 ], v[ 1 ], -f ) - v[ 0 ] );
if ( k > 1 ) return v[ m ] - ( fn( v[ m ], v[ m ], v[ m - 1 ], v[ m - 1 ], f - m ) - v[ m ] );
return fn( v[ i ? i - 1 : 0 ], v[ i ], v[ m < i + 1 ? m : i + 1 ], v[ m < i + 2 ? m : i + 2 ], f - i );
}
},
Utils: {
Linear: function ( p0, p1, t ) {
return ( p1 - p0 ) * t + p0;
},
Bernstein: function ( n , i ) {
var fc = TWEEN.Interpolation.Utils.Factorial;
return fc( n ) / fc( i ) / fc( n - i );
},
Factorial: ( function () {
var a = [ 1 ];
return function ( n ) {
var s = 1, i;
if ( a[ n ] ) return a[ n ];
for ( i = n; i > 1; i-- ) s *= i;
return a[ n ] = s;
};
} )(),
CatmullRom: function ( p0, p1, p2, p3, t ) {
var v0 = ( p2 - p0 ) * 0.5, v1 = ( p3 - p1 ) * 0.5, t2 = t * t, t3 = t * t2;
return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;
}
}
};
|
var geometry = new (function() {
var pub = this;
pub.distance = function(object1, object2) {
return Math.sqrt(Math.pow(object1.x - object2.x, 2) + Math.pow(object1.y - object2.y, 2));
}
})();
|
/* eslint no-unused-vars:0 */
import {util} from '../../math';
/**
* Particle Emitter base class
*
* @property {number|string} id
* @property {string} name
* @property {Tw2ParticleSystem} particleSystem
* @class
*/
export class Tw2ParticleEmitter
{
constructor()
{
this._id = util.generateID();
this.name = '';
this.particleSystem = null;
}
/**
* Initializes the particle emitter
*/
Initialize()
{
}
/**
* Per frame update
* @param {number} dt - delta time
*/
Update(dt)
{
}
} |
var should = require('chai').should();
var pathFn = require('path');
var fs = require('hexo-fs');
var Promise = require('bluebird');
var crypto = require('crypto');
var util = require('hexo-util');
var Pattern = util.Pattern;
var testUtil = require('../../util');
function shasum(content){
var hash = crypto.createHash('sha1');
hash.update(content);
return hash.digest('hex');
}
describe('Box', function(){
var Hexo = require('../../../lib/hexo');
var baseDir = pathFn.join(__dirname, 'box_tmp');
var Box = require('../../../lib/box');
function newBox(path){
var hexo = new Hexo(baseDir, {silent: true});
var base = path ? pathFn.join(baseDir, path) : baseDir;
return new Box(hexo, base);
}
before(function(){
return fs.mkdir(baseDir);
});
after(function(){
return fs.rmdir(baseDir);
});
it('constructor - add trailing "/" to the base path', function(){
var box = newBox('foo');
box.base.should.eql(pathFn.join(baseDir, 'foo') + pathFn.sep);
});
it('addProcessor() - no pattern', function(){
var box = newBox();
box.addProcessor(function(){
return 'test';
});
var p = box.processors[0];
p.pattern.match('').should.eql({});
p.process().should.eql('test');
});
it('addProcessor() - with regex', function(){
var box = newBox();
box.addProcessor(/^foo/, function(){
return 'test';
});
var p = box.processors[0];
p.pattern.match('foobar').should.be.ok;
p.pattern.should.be.an.instanceof(Pattern);
p.process().should.eql('test');
});
it('addProcessor() - with pattern', function(){
var box = newBox();
box.addProcessor(new Pattern(/^foo/), function(){
return 'test';
});
var p = box.processors[0];
p.pattern.match('foobar').should.be.ok;
p.pattern.should.be.an.instanceof(Pattern);
p.process().should.eql('test');
});
it('addProcessor() - no fn', function(){
var box = newBox();
try {
box.addProcessor('test');
} catch (err){
err.should.have.property('message', 'fn must be a function');
}
});
it('_loadFiles() - create', function(){
var box = newBox('test');
var path = pathFn.join(box.base, 'a.txt');
return fs.writeFile(path, 'a').then(function(){
return Promise.all([
box._loadFiles(),
fs.stat(path)
]);
}).spread(function(files, stats){
var cacheId = 'test/a.txt';
files.should.eql([
{path: 'a.txt', type: 'create'}
]);
box.Cache.toArray({lean: true}).should.eql([
{_id: cacheId, shasum: shasum('a'), modified: stats.mtime.getTime()}
]);
return fs.rmdir(box.base);
});
});
it('_loadFiles() - update', function(){
var box = newBox('test');
var path = pathFn.join(box.base, 'a.txt');
var cacheId = 'test/a.txt';
var Cache = box.Cache;
return Promise.all([
fs.writeFile(path, 'a'),
Cache.insert({_id: cacheId, shasum: 'a'})
]).then(function(){
return Promise.all([
box._loadFiles(),
fs.stat(path)
]);
}).spread(function(files, stats){
files.should.eql([
{path: 'a.txt', type: 'update'}
]);
Cache.toArray({lean: true}).should.eql([
{_id: cacheId, shasum: shasum('a'), modified: stats.mtime.getTime()}
]);
return fs.rmdir(box.base);
});
});
it('_loadFiles() - skip', function(){
var box = newBox('test');
var path = pathFn.join(box.base, 'a.txt');
var cacheId = 'test/a.txt';
var hash = shasum('a');
var Cache = box.Cache;
var mtime = Date.now()
return Promise.all([
fs.writeFile(path, 'a'),
Cache.insert({_id: cacheId, shasum: hash, modified: mtime})
]).then(function(){
return box._loadFiles();
}).then(function(files){
files.should.eql([
{type: 'skip', path: 'a.txt'}
]);
Cache.toArray({lean: true}).should.eql([
{_id: cacheId, shasum: hash, modified: mtime}
]);
return fs.rmdir(box.base);
});
});
it('_loadFiles() - delete', function(){
var box = newBox('test');
var cacheId = 'test/a.txt';
var Cache = box.Cache;
return Cache.insert({
_id: cacheId,
shasum: 'a'
}).then(function(){
return box._loadFiles();
}).then(function(files){
files.should.eql([
{type: 'delete', path: 'a.txt'}
]);
should.not.exist(Cache.findById(cacheId));
});
});
it('_dispatch()', function(){
var box = newBox();
var path = 'a.txt';
var data;
box.addProcessor(function(file){
box.processingFiles[path].should.be.true;
data = file;
});
return box._dispatch({
path: path,
type: 'create'
}).then(function(){
box.processingFiles[path].should.be.false;
data.source.should.eql(pathFn.join(box.base, path));
data.path.should.eql(path);
data.type.should.eql('create');
data.params.should.eql({});
});
});
it('_dispatch() - params', function(){
var box = newBox();
var data = new Array(2);
box.addProcessor(/(.*).js/, function(file){
data[0] = file;
});
box.addProcessor(function(file){
data[1] = file;
});
return box._dispatch({
path: 'server.js',
type: 'create'
}).then(function(){
data[0].params[1].should.eql('server');
data[1].params.should.eql({});
});
});
it('process()', function(){
var box = newBox('test');
var data = {};
box.addProcessor(function(file){
data[file.path] = file;
});
return Promise.all([
fs.writeFile(pathFn.join(box.base, 'a.txt'), 'a'),
fs.writeFile(pathFn.join(box.base, 'b', 'c.js'), 'c')
]).then(function(){
return box.process();
}).then(function(){
var keys = Object.keys(data);
var key, item;
for (var i = 0, len = keys.length; i < len; i++){
key = keys[i];
item = data[key];
item.path.should.eql(key);
item.source.should.eql(pathFn.join(box.base, key));
item.type.should.eql('create');
item.params.should.eql({});
}
return fs.rmdir(box.base);
});
});
it('process() - do nothing if target does not exist', function(){
var box = newBox('test');
return box.process();
});
it('watch() - create', function(callback){
var box = newBox('test');
var path = 'a.txt';
var src = pathFn.join(box.base, path);
box.watch().then(function(){
box.isWatching().should.be.true;
box.addProcessor(function(file){
file.source.should.eql(src);
file.path.should.eql(path);
file.type.should.eql('create');
file.params.should.eql({});
file.content.toString().should.eql('a');
box.unwatch();
fs.rmdir(box.base, callback);
});
fs.writeFile(src, 'a');
});
});
it('watch() - update', function(callback){
var box = newBox('test');
var path = 'a.txt';
var src = pathFn.join(box.base, path);
var cacheId = 'test/' + path;
var Cache = box.Cache;
Promise.all([
fs.writeFile(src, 'a'),
Cache.insert({_id: cacheId, shasum: 'a'})
]).then(function(){
return box.watch();
}).then(function(){
return testUtil.wait(300);
}).then(function(){
box.addProcessor(function(file){
file.source.should.eql(src);
file.path.should.eql(path);
file.type.should.eql('update');
file.params.should.eql({});
file.content.should.eql(new Buffer('ab'));
box.unwatch();
fs.rmdir(box.base, callback);
});
fs.appendFile(src, 'b');
});
});
it('watch() - delete', function(callback){
var box = newBox('test');
var path = 'a.txt';
var src = pathFn.join(box.base, path);
var cacheId = 'test/' + path;
var Cache = box.Cache;
Promise.all([
fs.writeFile(src, 'a'),
Cache.insert({_id: cacheId, shasum: 'a'})
]).then(function(){
return box.watch();
}).then(function(){
return testUtil.wait(300);
}).then(function(){
box.addProcessor(function(file){
file.source.should.eql(src);
file.path.should.eql(path);
file.type.should.eql('delete');
file.params.should.eql({});
should.not.exist(file.content);
box.unwatch();
fs.rmdir(box.base, callback);
});
fs.unlink(src);
});
});
it.skip('watch() - watcher has started', function(callback){
var box = newBox();
box.watch().then(function(){
box.watch().catch(function(err){
err.should.have.property('message', 'Watcher has already started.');
box.unwatch();
callback();
});
});
});
it('watch() - run process() before start watching', function(){
var box = newBox('test');
var data = [];
box.addProcessor(function(file){
data.push(file.path);
});
return Promise.all([
fs.writeFile(pathFn.join(box.base, 'a.txt'), 'a'),
fs.writeFile(pathFn.join(box.base, 'b', 'c.js'), 'c')
]).then(function(){
return box.watch();
}).then(function(){
data.should.have.members(['a.txt', 'b/c.js']);
box.unwatch();
return fs.rmdir(box.base);
});
});
it.skip('unwatch()', function(callback){
var box = newBox('test');
box.watch().then(function(){
var emitted = false;
box.addProcessor(function(file){
emitted = true;
});
box.unwatch();
fs.writeFile(pathFn.join(box.base, 'a.txt'), 'a').then(function(){
emitted.should.be.false;
fs.rmdir(box.base, callback);
});
});
});
it('unwatch() - watcher not started', function(){
var box = newBox();
try {
box.unwatch();
} catch (err){
err.should.have.property('message', 'Watcher hasn\'t started yet.');
}
});
it.skip('isWatching()', function(){
var box = newBox();
return box.watch().then(function(){
box.isWatching().should.be.true;
return box.unwatch();
}).then(function(){
box.isWatching().should.be.false;
});
});
it('processBefore & processAfter events');
}); |
jQuery(function($) {
$('ul li.active').qtip({
content: 'This is an active list element',
show: 'mouseover',
hide: 'mouseout',
position: { target: 'mouse' }
})
}); |
/**
The MIT License (MIT)
Copyright (c) 2014 MyChannel-Apps.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@author Christoph Kühl <djchrisnet>, Adrian Preuß <Bizarrus>
*/
if(!Array.prototype.each) {
Object.defineProperty(Array.prototype, 'each', {
enumerable: false,
configurable: false,
writable: false,
value: function(callback) {
for(var index = 0; index < this.length; index++) {
if(callback.apply(this[index], index) === false) {
break;
}
}
}
});
}
if(!Array.prototype.random) {
Object.defineProperty(Array.prototype, 'random', {
enumerable: false,
configurable: false,
writable: false,
value: function() {
return this[RandomOperations.nextInt(this.length)];
}
});
}
if(!Array.prototype.exists) {
Object.defineProperty(Array.prototype, 'exists', {
enumerable: false,
configurable: false,
writable: false,
value: function(value) {
return (this.indexOf(value) > -1);
}
});
}
if(!Array.prototype.size) {
Object.defineProperty(Array.prototype, 'size', {
enumerable: false,
configurable: false,
writable: false,
value: function() {
return this.length;
}
});
} |
module.exports = function(app){
var validacao = require('../validacoes/usuarios');
var Usuario = app.models.usuarios;
var UsuarioController = {
index: function(req,res){
Usuario.find(function(err,dados){
if(err){
req.flash('erro', 'Erro ao buscar usuários: '+err);
res.redirect('/usuarios');
}else{
res.render('usuarios/index', {lista: dados});
}
});
},
create: function(req,res){
res.render('usuarios/create', {user: new Usuario()});
},
post: function(req,res){
if(validacao(req,res)){
var model = new Usuario();
model.nome = req.body.nome;
model.email = req.body.email;
model.telefone = req.body.telefone;
model.password = model.generateHash(req.body.password);
Usuario.findOne({'email': model.email}, function(err,data){
if(data){
req.flash('erro', 'E-mail encontra-se cadastrado, tente outro.');
res.render('usuarios/create', {user: model});
}else{
model.save(function(err){
if(err){
req.flash('erro', 'Erro ao cadastrar: '+err);
res.render('usuarios/create', {user: req.body});
}else{
req.flash('info', 'Registro cadastrado com sucesso!');
res.redirect('/usuarios');
}
});
}
});
}else{
res.render('usuarios/create', {user: req.body});
}
},
show: function(req,res){
Usuario.findById(req.params.id, function(err,dados){
if(err){
req.flash('erro', 'Erro ao visualizar usuário: '+err);
res.redirect('/usuarios');
}else{
res.render('usuarios/show', {dados: dados});
}
});
},
delete: function(req,res){
Usuario.remove({_id: req.params.id}, function(err){
if(err){
req.flash('erro', 'Erro ao excluir usuário: '+err);
res.redirect('/usuarios');
}else{
req.flash('info', 'Registro excluído com sucesso!');
res.redirect('/usuarios');
}
});
},
edit: function(req,res){
Usuario.findById(req.params.id, function(err,data){
if(err){
req.flash('erro', 'Erro ao editar: '+err);
res.redirect('/usuarios');
}else{
res.render('usuarios/edit', {dados: data});
}
});
},
update: function(req,res){
if(validacao(req,res)){
Usuario.findById(req.params.id, function(err,data){
var model = data;
model.nome = req.body.nome;
model.telefone = req.body.telefone;
model.save(function(err){
if(err){
req.flash('erro', 'Erro ao editar: '+err);
res.render('usuarios/edit', {dados: model});
}else{
req.flash('info', 'Registro atualizado com sucesso!');
res.redirect('/usuarios');
}
});
});
}else{
res.render('usuarios/edit', {user: req.body});
}
}
}
return UsuarioController;
} |
console.log("J U I loaded");
var timer;
var timer2;
var timer3;
var counter;
var cell;
var curCount = 0;
var gameLost = false;
var multiUp = 0;
var total = 10;
var score = 0;
var points = 100;
var board = [ 0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0];
var cellTypes = [
{name: "empty", color: "white"},
{name: "normal", color: "black"},
{name: "freeze", color: "blue"},
{name: "multi", color: "green"},
{name: "max", color: "yellow"},
{name: "super", color: "red"}
];
var WHITE = 0,
BLACK = 1,
BLUE = 2,
GREEN = 3,
YELLOW = 4,
RED = 5;
var randomType = function() {
var randomNum = Math.floor((Math.random() * 100) + 1);
if (randomNum < 88) return BLACK; // 88%
else if (randomNum < 91) return BLUE; // 3%
else if (randomNum < 94) return GREEN; // 3%
else if (randomNum < 97) return YELLOW; // 3%
else return RED; // 3%
};
// EFFECTS -------------------------------------------------------------
var freezeEffect = function() {
clearInterval(timer2);
setTimeout(function() {
timer2 = setInterval(tickCell, counter);
}, 2000);
};
var multiEffect = function() {
multiUp++;
points = Math.floor((1 + (multiUp * 0.1)) * points);
};
var maxEffect = function() {
total++;
};
var superEffect = function() {
for (var i = 0; i < board.length; i++) {
if (board[i] < 2) board[i] = 0;
};
};
// LOSING & PRINTSTATE ------------------------------------------------
var hasLost = function() {
var count = 0;
for (var i = 0; i < board.length; i++) {
if (board[i] > 0 && board[i] < 2) count++;
if (count > total) break;
};
curCount = count;
return count > total;
};
var printState = function() {
$("#max2").text(curCount);
$("#max4").text(total);
$("#score2").text(score);
};
// PICKCELL & FADE ----------------------------------------------------
var pickCell = function() {
var randomIndex;
do {
randomIndex = Math.floor(Math.random() * board.length);
}
while (board[randomIndex] !== 0);
board[randomIndex] = randomType();
var $fade = $("#cell" + randomIndex);
if (board[randomIndex] > BLACK) {
setTimeout(function() {
$fade.animate({backgroundColor: "white"}, 700);
setTimeout(function() {
board[randomIndex] = 0;
}, 690);
}, 1000);
};
};
// CLICK MOVE ---------------------------------------------------------
var click = function(evt) {
clickValue = parseInt(this.id.substr(4));
if (board[clickValue] > BLACK) {
$(this).stop()
.toggle("explode", {pieces:16})
.css({backgroundColor: "white"})
.fadeIn();
};
if (board[clickValue] === BLACK) score += points;
else if (board[clickValue] === BLUE) freezeEffect();
else if (board[clickValue] === GREEN) multiEffect();
else if (board[clickValue] === YELLOW) maxEffect();
else if (board[clickValue] === RED) superEffect();
board[clickValue] = 0;
render();
};
// RENDER -------------------------------------------------------------
var render = function() {
if (gameLost === false) renderBoard();
function renderBoard() {
board.forEach(function(cell, idx) {
var el = $('#cell' + idx);
el.css('background-color', cellTypes[cell].color);
});
};
};
// TICKS --------------------------------------------------------------
var tick = function() {
printState();
if (hasLost()) {
clearInterval(timer);
clearInterval(timer2);
gameLost = true;
var lose = function() {
$(".lose").css({opacity:1});
setTimeout(function() {
$(".lose").css({opacity:0});
}, 400);
};
timer3 = setInterval(lose, 800);
};
printState();
};
var tickCell = function() {
pickCell();
render();
clearInterval(timer2);
counter *= 0.99;
timer2 = setInterval(tickCell, counter);
};
// STARTGAME ----------------------------------------------------------
var startGame = function() {
for (var i = 0; i < board.length; i++) {
board[i] = 0;
};
curCount = 0;
gameLost = false;
multiUp = 0;
total = 10;
score = 0;
points = 100;
counter = 800;
printState();
render();
clearInterval(timer3);
clearInterval(timer2);
clearInterval(timer);
timer = setInterval(tick, 10);
timer2 = setInterval(tickCell, counter);
};
// BUTTONS ------------------------------------------------------------
$("#startgame").on('click', function() {
$(".one").css("display", "none");
$(".two").css("display","inline");
$(".three").css("display","none");
startGame();
});
$("#restart").on('click', function() {
startGame();
});
$("#mainmenu").on('click', function() {
$(".one").css("display", "inline");
$(".two").css("display","none");
$(".three").css("display","none");
});
$("#howtoplay").on('click', function() {
$(".one").css("display", "none");
$(".two").css("display","none");
$(".three").css("display","inline");
});
$("#mainmenu2").on('click', function() {
$(".one").css("display", "inline");
$(".two").css("display","none");
$(".three").css("display","none");
});
$("#startgame2").on('click', function() {
$(".one").css("display", "none");
$(".two").css("display","inline");
$(".three").css("display","none");
startGame();
});
var audio = document.getElementById("tomb");
var mute = document.getElementById('mute');
mute.onclick = function() {
audio.muted = !audio.muted;
};
audio.addEventListener('ended', function() {
this.currentTime = 0;
this.play();
}, false);
// EVENTLISTENERS -----------------------------------------------------
document.addEventListener("DOMContentLoaded", function(evt) {
var cellEls = document.querySelectorAll("td");
for (var i = 0; i < board.length; i++) {
cellEls[i].addEventListener("click", click);
};
});
|
module.exports = {
label: {
display: 'block',
width: '90%',
marginBottom: 15
},
labelText: {
color: '#777',
fontSize: '15px',
display: 'block'
},
input: {
display: 'block',
fontSize: '20px',
padding: 10,
width: '100%',
border: '1px solid #ddd'
},
textarea: {
display: 'block',
fontSize: '20px',
border: '1px solid #ddd',
width: 'auto',
height: 100,
padding: 10,
width: '100%'
}
};
|
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-atom-shell": {
version: "0.23.0",
outputDir: "./atom-shell",
rebuild: true
}
});
grunt.loadNpmTasks('grunt-download-atom-shell');
};
|
// Dependencies
var UFirst = require("ucfirst");
/**
* CrossStyle
* Returns an array of cross-browser CSS properties for given input.
*
* @name CrossStyle
* @function
* @param {String} input The CSS property (e.g. `"transform"` or `"transformOrigin"`).
* @return {Array} An array of strings representing the cross-browser CSS properties for the given input.
*/
function CrossStyle(input) {
var uInput = UFirst(input);
return [
"webkit" + uInput
, "moz" + uInput
, "ms" + uInput
, "o" + uInput
, input
]
}
module.exports = CrossStyle;
|
export default {
forward: "转发",
reply: "回复",
ignore: "忽略",
toVoicemail: "到语音信箱",
answer: "接听",
answerAndEnd: "接听并结束",
answerAndHold: "接听并保持"
};
// @key: @#@"forward"@#@ @source: @#@"Forward"@#@
// @key: @#@"reply"@#@ @source: @#@"Reply"@#@
// @key: @#@"ignore"@#@ @source: @#@"Ignore"@#@
// @key: @#@"toVoicemail"@#@ @source: @#@"To Voicemail"@#@
// @key: @#@"answer"@#@ @source: @#@"Answer"@#@
// @key: @#@"answerAndEnd"@#@ @source: @#@"Answer & End"@#@
// @key: @#@"answerAndHold"@#@ @source: @#@"Answer & Hold"@#@
|
/*
用 action 来描述“发生了什么”,和使用 reducers 来根据 action 更新 state 的用法。
Store 就是把它们联系到一起的对象。Store 有以下职责:
维持应用的 state;
提供 getState() 方法获取 state;
提供 dispatch(action) 方法更新 state;
通过 subscribe(listener) 注册监听器;
通过 subscribe(listener) 返回的函数注销监听器。
再次强调一下 Redux 应用只有一个单一的 store。当需要拆分数据处理逻辑时,你应该使用 reducer 组合 而不是创建多个 store
*/
import { AsyncStorage } from 'react-native';
import { Iterable } from 'immutable';
import { applyMiddleware, createStore, compose } from 'redux';
import { autoRehydrate, persistStore, purgeStoredState } from 'redux-persist';
import reduxThunk from 'redux-thunk';
import createLogger from 'redux-logger';
import rootReducer from '../reducers/rootReducer';
let reduxMiddleware = [reduxThunk];
let reduxLogger = createLogger(
/* {
level = 'log': 'log' | 'console' | 'warn' | 'error' | 'info', // console's level
duration = false: Boolean, // Print the duration of each action?
timestamp = true: Boolean, // Print the timestamp with each action?
colors: ColorsObject, // Object with color getters. See the ColorsObject interface.
logger = console: LoggerObject, // Implementation of the `console` API.
logErrors = true: Boolean, // Should the logger catch, log, and re-throw errors?
collapsed, // Takes a boolean or optionally a function that receives `getState` function for accessing current store state and `action` object as parameters. Returns `true` if the log group should be collapsed, `false` otherwise.
predicate, // If specified this function will be called before each action is processed with this middleware.
stateTransformer, // Transform state before print. Eg. convert Immutable object to plain JSON.
actionTransformer, // Transform state before print. Eg. convert Immutable object to plain JSON.
errorTransformer, // Transform state before print. Eg. convert Immutable object to plain JSON.
titleFormatter, // Format the title used when logging actions.
diff = false: Boolean, // Show diff between states.
diffPredicate // Filter function for showing states diff.'
}*/
{
level: 'log',
duration: true,
timestamp: true,
colors: {
title: () => 'inherit',
prevState: () => '#9E9E9E',
action: () => '#03A9F4',
nextState: () => '#4CAF50',
error: () => '#F20404',
},
logger: console,
logErrors: true,
collapsed : (getState, action) => (
action.type === 'REACT_NATIVE_ROUTER_FLUX_FOCUS' ||
action.type === 'REACT_NATIVE_ROUTER_FLUX_RESET'
),
stateTransformer: (state) => {
if (Iterable.isIterable(state)) {
return state.toJS();
}
return state;
},
actionTransformer: (action) => {
// if() { some judgement code}
return action;
},
errorTransformer: (error) => {
// if() {some judgement code}
return error;
},
diff: true,
diffPredicate: (getState, action) => (
action.type === 'ADD_TODO' ||
action.type === 'SET_VISIBILITY_FILTER' ||
action.type === 'SHOW_ACTIVE'
)
}
);
if (__DEV__) {
// 开发环境打印 action 日志
reduxMiddleware.push(reduxLogger);
}
export let store = null;
let enhancers = compose(...[
applyMiddleware(...reduxMiddleware),
autoRehydrate()
]);
function hotReloading() {
// https://github.com/gaearon/redux-devtools/issues/233#issuecomment-176210686
// Enable Webpack hot module replacement for reducers
if (module.hot) {
let reducerPath = '../reducers/rootReducer';
module.hot.accept(reducerPath, () => {
let nextRootReducer = require(reducerPath).default;
store.replaceReducer(nextRootReducer);
});
}
}
export default function configureStore(initialState = {}) {
store = createStore(rootReducer, initialState, enhancers);
hotReloading();
setPersistStore();
return store;
}
function setPersistStore() {
// more information: http://gold.xitu.io/entry/57cac7b167f3560057bb00a7
persistStore(store, {
blacklist: ['signIn', 'someKey'], // 黑名单数组,可以忽略指定 reducers 中的 key
// whitelist: ['auth'], // 白名单数组,一旦设置,其他的 key 都会被忽略。
storage: AsyncStorage,
// transforms: // 在 rehydration 和 storage 阶段被调用的转换器
debounce: 100 // storage 操作被调用的频度, ms
// store: // redux store 我们要存储的 store
// config: // 对象
}, () => {
});
}
export function resetPersistStore() {
purgeStoredState({storage: AsyncStorage});
} |
'use strict';
angular.module('citizenForumsShowApp', [
'citizenForumsShowApp.services',
'ngCookies',
'ngResource',
'ngSanitize',
'ngRoute',
'uiGmapgoogle-maps',
'xeditable',
'restangular',
'nl2br'
]).config(['$interpolateProvider', function($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
}]).config(function(uiGmapGoogleMapApiProvider) {
uiGmapGoogleMapApiProvider.configure({
// key: '', // TODO set Google Maps API key
v: '3.17',
language: 'es',
sensor: false,
libraries: 'drawing,geometry,visualization'
});
})
.run(function(editableOptions) {
editableOptions.theme = 'bs3'; // X-editable form theme
})
.constant('CFG', {
DELAY: 600,
RANGE_STEPS: 20,
GMAPS_ZOOM: 14,
GPS_CENTER_POS: { lat: 41.4926867, lng: 2.3613954}, // Premià de Mar (Barcelona) center
PROCESS_PARTICIPATION_STATE: { DRAFT: 1, PRESENTATION: 2, DEBATE: 3, CLOSED: 4 }
})
;
|
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*!
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=8a41afce6c65a5315ae2)
* Config saved to config.json and https://gist.github.com/8a41afce6c65a5315ae2
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
+function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
}
}(jQuery);
/* ========================================================================
* Bootstrap: alert.js v3.3.5
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// ALERT CLASS DEFINITION
// ======================
var dismiss = '[data-dismiss="alert"]'
var Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.3.5'
Alert.TRANSITION_DURATION = 150
Alert.prototype.close = function (e) {
var $this = $(this)
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = $(selector)
if (e) e.preventDefault()
if (!$parent.length) {
$parent = $this.closest('.alert')
}
$parent.trigger(e = $.Event('close.bs.alert'))
if (e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement() {
// detach from parent, fire event then clean up data
$parent.detach().trigger('closed.bs.alert').remove()
}
$.support.transition && $parent.hasClass('fade') ?
$parent
.one('bsTransitionEnd', removeElement)
.emulateTransitionEnd(Alert.TRANSITION_DURATION) :
removeElement()
}
// ALERT PLUGIN DEFINITION
// =======================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.alert')
if (!data) $this.data('bs.alert', (data = new Alert(this)))
if (typeof option == 'string') data[option].call($this)
})
}
var old = $.fn.alert
$.fn.alert = Plugin
$.fn.alert.Constructor = Alert
// ALERT NO CONFLICT
// =================
$.fn.alert.noConflict = function () {
$.fn.alert = old
return this
}
// ALERT DATA-API
// ==============
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
}(jQuery);
/* ========================================================================
* Bootstrap: button.js v3.3.5
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
var Button = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Button.DEFAULTS, options)
this.isLoading = false
}
Button.VERSION = '3.3.5'
Button.DEFAULTS = {
loadingText: 'loading...'
}
Button.prototype.setState = function (state) {
var d = 'disabled'
var $el = this.$element
var val = $el.is('input') ? 'val' : 'html'
var data = $el.data()
state += 'Text'
if (data.resetText == null) $el.data('resetText', $el[val]())
// push to event loop to allow forms to submit
setTimeout($.proxy(function () {
$el[val](data[state] == null ? this.options[state] : data[state])
if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
} else if (this.isLoading) {
this.isLoading = false
$el.removeClass(d).removeAttr(d)
}
}, this), 0)
}
Button.prototype.toggle = function () {
var changed = true
var $parent = this.$element.closest('[data-toggle="buttons"]')
if ($parent.length) {
var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') {
if ($input.prop('checked')) changed = false
$parent.find('.active').removeClass('active')
this.$element.addClass('active')
} else if ($input.prop('type') == 'checkbox') {
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
this.$element.toggleClass('active')
}
$input.prop('checked', this.$element.hasClass('active'))
if (changed) $input.trigger('change')
} else {
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
this.$element.toggleClass('active')
}
}
// BUTTON PLUGIN DEFINITION
// ========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.button')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.button', (data = new Button(this, options)))
if (option == 'toggle') data.toggle()
else if (option) data.setState(option)
})
}
var old = $.fn.button
$.fn.button = Plugin
$.fn.button.Constructor = Button
// BUTTON NO CONFLICT
// ==================
$.fn.button.noConflict = function () {
$.fn.button = old
return this
}
// BUTTON DATA-API
// ===============
$(document)
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle')
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
})
}(jQuery);
/* ========================================================================
* Bootstrap: carousel.js v3.3.5
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// CAROUSEL CLASS DEFINITION
// =========================
var Carousel = function (element, options) {
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.paused = null
this.sliding = null
this.interval = null
this.$active = null
this.$items = null
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Carousel.VERSION = '3.3.5'
Carousel.TRANSITION_DURATION = 600
Carousel.DEFAULTS = {
interval: 5000,
pause: 'hover',
wrap: true,
keyboard: true
}
Carousel.prototype.keydown = function (e) {
if (/input|textarea/i.test(e.target.tagName)) return
switch (e.which) {
case 37: this.prev(); break
case 39: this.next(); break
default: return
}
e.preventDefault()
}
Carousel.prototype.cycle = function (e) {
e || (this.paused = false)
this.interval && clearInterval(this.interval)
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
Carousel.prototype.getItemIndex = function (item) {
this.$items = item.parent().children('.item')
return this.$items.index(item || this.$active)
}
Carousel.prototype.getItemForDirection = function (direction, active) {
var activeIndex = this.getItemIndex(active)
var willWrap = (direction == 'prev' && activeIndex === 0)
|| (direction == 'next' && activeIndex == (this.$items.length - 1))
if (willWrap && !this.options.wrap) return active
var delta = direction == 'prev' ? -1 : 1
var itemIndex = (activeIndex + delta) % this.$items.length
return this.$items.eq(itemIndex)
}
Carousel.prototype.to = function (pos) {
var that = this
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
}
Carousel.prototype.pause = function (e) {
e || (this.paused = true)
if (this.$element.find('.next, .prev').length && $.support.transition) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
this.interval = clearInterval(this.interval)
return this
}
Carousel.prototype.next = function () {
if (this.sliding) return
return this.slide('next')
}
Carousel.prototype.prev = function () {
if (this.sliding) return
return this.slide('prev')
}
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $next = next || this.getItemForDirection(type, $active)
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
var that = this
if ($next.hasClass('active')) return (this.sliding = false)
var relatedTarget = $next[0]
var slideEvent = $.Event('slide.bs.carousel', {
relatedTarget: relatedTarget,
direction: direction
})
this.$element.trigger(slideEvent)
if (slideEvent.isDefaultPrevented()) return
this.sliding = true
isCycling && this.pause()
if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
$nextIndicator && $nextIndicator.addClass('active')
}
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
if ($.support.transition && this.$element.hasClass('slide')) {
$next.addClass(type)
$next[0].offsetWidth // force reflow
$active.addClass(direction)
$next.addClass(direction)
$active
.one('bsTransitionEnd', function () {
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
setTimeout(function () {
that.$element.trigger(slidEvent)
}, 0)
})
.emulateTransitionEnd(Carousel.TRANSITION_DURATION)
} else {
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
this.$element.trigger(slidEvent)
}
isCycling && this.cycle()
return this
}
// CAROUSEL PLUGIN DEFINITION
// ==========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.carousel')
var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
var action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (action) data[action]()
else if (options.interval) data.pause().cycle()
})
}
var old = $.fn.carousel
$.fn.carousel = Plugin
$.fn.carousel.Constructor = Carousel
// CAROUSEL NO CONFLICT
// ====================
$.fn.carousel.noConflict = function () {
$.fn.carousel = old
return this
}
// CAROUSEL DATA-API
// =================
var clickHandler = function (e) {
var href
var $this = $(this)
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
if (!$target.hasClass('carousel')) return
var options = $.extend({}, $target.data(), $this.data())
var slideIndex = $this.attr('data-slide-to')
if (slideIndex) options.interval = false
Plugin.call($target, options)
if (slideIndex) {
$target.data('bs.carousel').to(slideIndex)
}
e.preventDefault()
}
$(document)
.on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
.on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
$(window).on('load', function () {
$('[data-ride="carousel"]').each(function () {
var $carousel = $(this)
Plugin.call($carousel, $carousel.data())
})
})
}(jQuery);
/* ========================================================================
* Bootstrap: dropdown.js v3.3.5
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// DROPDOWN CLASS DEFINITION
// =========================
var backdrop = '.dropdown-backdrop'
var toggle = '[data-toggle="dropdown"]'
var Dropdown = function (element) {
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION = '3.3.5'
function getParent($this) {
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = selector && $(selector)
return $parent && $parent.length ? $parent : $this.parent()
}
function clearMenus(e) {
if (e && e.which === 3) return
$(backdrop).remove()
$(toggle).each(function () {
var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return
if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
if ($this.is('.disabled, :disabled')) return
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
clearMenus()
if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
// if mobile we use a backdrop because click events don't delegate
$(document.createElement('div'))
.addClass('dropdown-backdrop')
.insertAfter($(this))
.on('click', clearMenus)
}
var relatedTarget = { relatedTarget: this }
$parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$this
.trigger('focus')
.attr('aria-expanded', 'true')
$parent
.toggleClass('open')
.trigger('shown.bs.dropdown', relatedTarget)
}
return false
}
Dropdown.prototype.keydown = function (e) {
if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
var $this = $(this)
e.preventDefault()
e.stopPropagation()
if ($this.is('.disabled, :disabled')) return
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
if (!isActive && e.which != 27 || isActive && e.which == 27) {
if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}
var desc = ' li:not(.disabled):visible a'
var $items = $parent.find('.dropdown-menu' + desc)
if (!$items.length) return
var index = $items.index(e.target)
if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
$items.eq(index).trigger('focus')
}
// DROPDOWN PLUGIN DEFINITION
// ==========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.dropdown')
if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
var old = $.fn.dropdown
$.fn.dropdown = Plugin
$.fn.dropdown.Constructor = Dropdown
// DROPDOWN NO CONFLICT
// ====================
$.fn.dropdown.noConflict = function () {
$.fn.dropdown = old
return this
}
// APPLY TO STANDARD DROPDOWN ELEMENTS
// ===================================
$(document)
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
}(jQuery);
/* ========================================================================
* Bootstrap: modal.js v3.3.5
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// MODAL CLASS DEFINITION
// ======================
var Modal = function (element, options) {
this.options = options
this.$body = $(document.body)
this.$element = $(element)
this.$dialog = this.$element.find('.modal-dialog')
this.$backdrop = null
this.isShown = null
this.originalBodyPad = null
this.scrollbarWidth = 0
this.ignoreBackdropClick = false
if (this.options.remote) {
this.$element
.find('.modal-content')
.load(this.options.remote, $.proxy(function () {
this.$element.trigger('loaded.bs.modal')
}, this))
}
}
Modal.VERSION = '3.3.5'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Modal.DEFAULTS = {
backdrop: true,
keyboard: true,
show: true
}
Modal.prototype.toggle = function (_relatedTarget) {
return this.isShown ? this.hide() : this.show(_relatedTarget)
}
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
if (this.isShown || e.isDefaultPrevented()) return
this.isShown = true
this.checkScrollbar()
this.setScrollbar()
this.$body.addClass('modal-open')
this.escape()
this.resize()
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
this.$dialog.on('mousedown.dismiss.bs.modal', function () {
that.$element.one('mouseup.dismiss.bs.modal', function (e) {
if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
})
})
this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade')
if (!that.$element.parent().length) {
that.$element.appendTo(that.$body) // don't move modals dom position
}
that.$element
.show()
.scrollTop(0)
that.adjustDialog()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
that.$element.addClass('in')
that.enforceFocus()
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
transition ?
that.$dialog // wait for modal to slide in
.one('bsTransitionEnd', function () {
that.$element.trigger('focus').trigger(e)
})
.emulateTransitionEnd(Modal.TRANSITION_DURATION) :
that.$element.trigger('focus').trigger(e)
})
}
Modal.prototype.hide = function (e) {
if (e) e.preventDefault()
e = $.Event('hide.bs.modal')
this.$element.trigger(e)
if (!this.isShown || e.isDefaultPrevented()) return
this.isShown = false
this.escape()
this.resize()
$(document).off('focusin.bs.modal')
this.$element
.removeClass('in')
.off('click.dismiss.bs.modal')
.off('mouseup.dismiss.bs.modal')
this.$dialog.off('mousedown.dismiss.bs.modal')
$.support.transition && this.$element.hasClass('fade') ?
this.$element
.one('bsTransitionEnd', $.proxy(this.hideModal, this))
.emulateTransitionEnd(Modal.TRANSITION_DURATION) :
this.hideModal()
}
Modal.prototype.enforceFocus = function () {
$(document)
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
this.$element.trigger('focus')
}
}, this))
}
Modal.prototype.escape = function () {
if (this.isShown && this.options.keyboard) {
this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
e.which == 27 && this.hide()
}, this))
} else if (!this.isShown) {
this.$element.off('keydown.dismiss.bs.modal')
}
}
Modal.prototype.resize = function () {
if (this.isShown) {
$(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
} else {
$(window).off('resize.bs.modal')
}
}
Modal.prototype.hideModal = function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.$body.removeClass('modal-open')
that.resetAdjustments()
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')
})
}
Modal.prototype.removeBackdrop = function () {
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
this.$backdrop = $(document.createElement('div'))
.addClass('modal-backdrop ' + animate)
.appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (this.ignoreBackdropClick) {
this.ignoreBackdropClick = false
return
}
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus()
: this.hide()
}, this))
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
this.$backdrop.addClass('in')
if (!callback) return
doAnimate ?
this.$backdrop
.one('bsTransitionEnd', callback)
.emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
callback()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
var callbackRemove = function () {
that.removeBackdrop()
callback && callback()
}
$.support.transition && this.$element.hasClass('fade') ?
this.$backdrop
.one('bsTransitionEnd', callbackRemove)
.emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
callbackRemove()
} else if (callback) {
callback()
}
}
// these following methods are used to handle overflowing modals
Modal.prototype.handleUpdate = function () {
this.adjustDialog()
}
Modal.prototype.adjustDialog = function () {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
})
}
Modal.prototype.resetAdjustments = function () {
this.$element.css({
paddingLeft: '',
paddingRight: ''
})
}
Modal.prototype.checkScrollbar = function () {
var fullWindowWidth = window.innerWidth
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
var documentElementRect = document.documentElement.getBoundingClientRect()
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
}
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
this.scrollbarWidth = this.measureScrollbar()
}
Modal.prototype.setScrollbar = function () {
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
this.originalBodyPad = document.body.style.paddingRight || ''
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
}
Modal.prototype.resetScrollbar = function () {
this.$body.css('padding-right', this.originalBodyPad)
}
Modal.prototype.measureScrollbar = function () { // thx walsh
var scrollDiv = document.createElement('div')
scrollDiv.className = 'modal-scrollbar-measure'
this.$body.append(scrollDiv)
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
this.$body[0].removeChild(scrollDiv)
return scrollbarWidth
}
// MODAL PLUGIN DEFINITION
// =======================
function Plugin(option, _relatedTarget) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.modal')
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option](_relatedTarget)
else if (options.show) data.show(_relatedTarget)
})
}
var old = $.fn.modal
$.fn.modal = Plugin
$.fn.modal.Constructor = Modal
// MODAL NO CONFLICT
// =================
$.fn.modal.noConflict = function () {
$.fn.modal = old
return this
}
// MODAL DATA-API
// ==============
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
if ($this.is('a')) e.preventDefault()
$target.one('show.bs.modal', function (showEvent) {
if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
$target.one('hidden.bs.modal', function () {
$this.is(':visible') && $this.trigger('focus')
})
})
Plugin.call($target, option, this)
})
}(jQuery);
/* ========================================================================
* Bootstrap: tooltip.js v3.3.5
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
var Tooltip = function (element, options) {
this.type = null
this.options = null
this.enabled = null
this.timeout = null
this.hoverState = null
this.$element = null
this.inState = null
this.init('tooltip', element, options)
}
Tooltip.VERSION = '3.3.5'
Tooltip.TRANSITION_DURATION = 150
Tooltip.DEFAULTS = {
animation: true,
placement: 'top',
selector: false,
template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
trigger: 'hover focus',
title: '',
delay: 0,
html: false,
container: false,
viewport: {
selector: 'body',
padding: 0
}
}
Tooltip.prototype.init = function (type, element, options) {
this.enabled = true
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
this.inState = { click: false, hover: false, focus: false }
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
}
var triggers = this.options.trigger.split(' ')
for (var i = triggers.length; i--;) {
var trigger = triggers[i]
if (trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (trigger != 'manual') {
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}
}
this.options.selector ?
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
}
Tooltip.prototype.getDefaults = function () {
return Tooltip.DEFAULTS
}
Tooltip.prototype.getOptions = function (options) {
options = $.extend({}, this.getDefaults(), this.$element.data(), options)
if (options.delay && typeof options.delay == 'number') {
options.delay = {
show: options.delay,
hide: options.delay
}
}
return options
}
Tooltip.prototype.getDelegateOptions = function () {
var options = {}
var defaults = this.getDefaults()
this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
})
return options
}
Tooltip.prototype.enter = function (obj) {
var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
if (obj instanceof $.Event) {
self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
}
if (self.tip().hasClass('in') || self.hoverState == 'in') {
self.hoverState = 'in'
return
}
clearTimeout(self.timeout)
self.hoverState = 'in'
if (!self.options.delay || !self.options.delay.show) return self.show()
self.timeout = setTimeout(function () {
if (self.hoverState == 'in') self.show()
}, self.options.delay.show)
}
Tooltip.prototype.isInStateTrue = function () {
for (var key in this.inState) {
if (this.inState[key]) return true
}
return false
}
Tooltip.prototype.leave = function (obj) {
var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
if (obj instanceof $.Event) {
self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
}
if (self.isInStateTrue()) return
clearTimeout(self.timeout)
self.hoverState = 'out'
if (!self.options.delay || !self.options.delay.hide) return self.hide()
self.timeout = setTimeout(function () {
if (self.hoverState == 'out') self.hide()
}, self.options.delay.hide)
}
Tooltip.prototype.show = function () {
var e = $.Event('show.bs.' + this.type)
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
if (e.isDefaultPrevented() || !inDom) return
var that = this
var $tip = this.tip()
var tipId = this.getUID(this.type)
this.setContent()
$tip.attr('id', tipId)
this.$element.attr('aria-describedby', tipId)
if (this.options.animation) $tip.addClass('fade')
var placement = typeof this.options.placement == 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
var autoToken = /\s?auto?\s?/i
var autoPlace = autoToken.test(placement)
if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
.addClass(placement)
.data('bs.' + this.type, this)
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
this.$element.trigger('inserted.bs.' + this.type)
var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight
if (autoPlace) {
var orgPlacement = placement
var viewportDim = this.getPosition(this.$viewport)
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
placement
$tip
.removeClass(orgPlacement)
.addClass(placement)
}
var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
this.applyPlacement(calculatedOffset, placement)
var complete = function () {
var prevHoverState = that.hoverState
that.$element.trigger('shown.bs.' + that.type)
that.hoverState = null
if (prevHoverState == 'out') that.leave(that)
}
$.support.transition && this.$tip.hasClass('fade') ?
$tip
.one('bsTransitionEnd', complete)
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
complete()
}
}
Tooltip.prototype.applyPlacement = function (offset, placement) {
var $tip = this.tip()
var width = $tip[0].offsetWidth
var height = $tip[0].offsetHeight
// manually read margins because getBoundingClientRect includes difference
var marginTop = parseInt($tip.css('margin-top'), 10)
var marginLeft = parseInt($tip.css('margin-left'), 10)
// we must check for NaN for ie 8/9
if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0
offset.top += marginTop
offset.left += marginLeft
// $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0
$.offset.setOffset($tip[0], $.extend({
using: function (props) {
$tip.css({
top: Math.round(props.top),
left: Math.round(props.left)
})
}
}, offset), 0)
$tip.addClass('in')
// check to see if placing tip in new offset caused the tip to resize itself
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight
if (placement == 'top' && actualHeight != height) {
offset.top = offset.top + height - actualHeight
}
var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
if (delta.left) offset.left += delta.left
else offset.top += delta.top
var isVertical = /top|bottom/.test(placement)
var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
$tip.offset(offset)
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
}
Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
this.arrow()
.css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
.css(isVertical ? 'top' : 'left', '')
}
Tooltip.prototype.setContent = function () {
var $tip = this.tip()
var title = this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}
Tooltip.prototype.hide = function (callback) {
var that = this
var $tip = $(this.$tip)
var e = $.Event('hide.bs.' + this.type)
function complete() {
if (that.hoverState != 'in') $tip.detach()
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
callback && callback()
}
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip.removeClass('in')
$.support.transition && $tip.hasClass('fade') ?
$tip
.one('bsTransitionEnd', complete)
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
complete()
this.hoverState = null
return this
}
Tooltip.prototype.fixTitle = function () {
var $e = this.$element
if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
}
}
Tooltip.prototype.hasContent = function () {
return this.getTitle()
}
Tooltip.prototype.getPosition = function ($element) {
$element = $element || this.$element
var el = $element[0]
var isBody = el.tagName == 'BODY'
var elRect = el.getBoundingClientRect()
if (elRect.width == null) {
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
}
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
return $.extend({}, elRect, scroll, outerDims, elOffset)
}
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
}
Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
var delta = { top: 0, left: 0 }
if (!this.$viewport) return delta
var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
var viewportDimensions = this.getPosition(this.$viewport)
if (/right|left/.test(placement)) {
var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
if (topEdgeOffset < viewportDimensions.top) { // top overflow
delta.top = viewportDimensions.top - topEdgeOffset
} else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
}
} else {
var leftEdgeOffset = pos.left - viewportPadding
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
delta.left = viewportDimensions.left - leftEdgeOffset
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
}
}
return delta
}
Tooltip.prototype.getTitle = function () {
var title
var $e = this.$element
var o = this.options
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
return title
}
Tooltip.prototype.getUID = function (prefix) {
do prefix += ~~(Math.random() * 1000000)
while (document.getElementById(prefix))
return prefix
}
Tooltip.prototype.tip = function () {
if (!this.$tip) {
this.$tip = $(this.options.template)
if (this.$tip.length != 1) {
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
}
}
return this.$tip
}
Tooltip.prototype.arrow = function () {
return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
}
Tooltip.prototype.enable = function () {
this.enabled = true
}
Tooltip.prototype.disable = function () {
this.enabled = false
}
Tooltip.prototype.toggleEnabled = function () {
this.enabled = !this.enabled
}
Tooltip.prototype.toggle = function (e) {
var self = this
if (e) {
self = $(e.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(e.currentTarget, this.getDelegateOptions())
$(e.currentTarget).data('bs.' + this.type, self)
}
}
if (e) {
self.inState.click = !self.inState.click
if (self.isInStateTrue()) self.enter(self)
else self.leave(self)
} else {
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
}
}
Tooltip.prototype.destroy = function () {
var that = this
clearTimeout(this.timeout)
this.hide(function () {
that.$element.off('.' + that.type).removeData('bs.' + that.type)
if (that.$tip) {
that.$tip.detach()
}
that.$tip = null
that.$arrow = null
that.$viewport = null
})
}
// TOOLTIP PLUGIN DEFINITION
// =========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tooltip')
var options = typeof option == 'object' && option
if (!data && /destroy|hide/.test(option)) return
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.tooltip
$.fn.tooltip = Plugin
$.fn.tooltip.Constructor = Tooltip
// TOOLTIP NO CONFLICT
// ===================
$.fn.tooltip.noConflict = function () {
$.fn.tooltip = old
return this
}
}(jQuery);
/* ========================================================================
* Bootstrap: popover.js v3.3.5
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
var Popover = function (element, options) {
this.init('popover', element, options)
}
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.3.5'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
// NOTE: POPOVER EXTENDS tooltip.js
// ================================
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
Popover.prototype.constructor = Popover
Popover.prototype.getDefaults = function () {
return Popover.DEFAULTS
}
Popover.prototype.setContent = function () {
var $tip = this.tip()
var title = this.getTitle()
var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
](content)
$tip.removeClass('fade top bottom left right in')
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
// this manually by checking the contents.
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
}
Popover.prototype.hasContent = function () {
return this.getTitle() || this.getContent()
}
Popover.prototype.getContent = function () {
var $e = this.$element
var o = this.options
return $e.attr('data-content')
|| (typeof o.content == 'function' ?
o.content.call($e[0]) :
o.content)
}
Popover.prototype.arrow = function () {
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
}
// POPOVER PLUGIN DEFINITION
// =========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.popover')
var options = typeof option == 'object' && option
if (!data && /destroy|hide/.test(option)) return
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.popover
$.fn.popover = Plugin
$.fn.popover.Constructor = Popover
// POPOVER NO CONFLICT
// ===================
$.fn.popover.noConflict = function () {
$.fn.popover = old
return this
}
}(jQuery);
/* ========================================================================
* Bootstrap: tab.js v3.3.5
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// TAB CLASS DEFINITION
// ====================
var Tab = function (element) {
// jscs:disable requireDollarBeforejQueryAssignment
this.element = $(element)
// jscs:enable requireDollarBeforejQueryAssignment
}
Tab.VERSION = '3.3.5'
Tab.TRANSITION_DURATION = 150
Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
var selector = $this.data('target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
if ($this.parent('li').hasClass('active')) return
var $previous = $ul.find('.active:last a')
var hideEvent = $.Event('hide.bs.tab', {
relatedTarget: $this[0]
})
var showEvent = $.Event('show.bs.tab', {
relatedTarget: $previous[0]
})
$previous.trigger(hideEvent)
$this.trigger(showEvent)
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
var $target = $(selector)
this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () {
$previous.trigger({
type: 'hidden.bs.tab',
relatedTarget: $this[0]
})
$this.trigger({
type: 'shown.bs.tab',
relatedTarget: $previous[0]
})
})
}
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', false)
element
.addClass('active')
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if (element.parent('.dropdown-menu').length) {
element
.closest('li.dropdown')
.addClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
}
callback && callback()
}
$active.length && transition ?
$active
.one('bsTransitionEnd', next)
.emulateTransitionEnd(Tab.TRANSITION_DURATION) :
next()
$active.removeClass('in')
}
// TAB PLUGIN DEFINITION
// =====================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tab')
if (!data) $this.data('bs.tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.tab
$.fn.tab = Plugin
$.fn.tab.Constructor = Tab
// TAB NO CONFLICT
// ===============
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
// TAB DATA-API
// ============
var clickHandler = function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
}
$(document)
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
}(jQuery);
/* ========================================================================
* Bootstrap: affix.js v3.3.5
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// AFFIX CLASS DEFINITION
// ======================
var Affix = function (element, options) {
this.options = $.extend({}, Affix.DEFAULTS, options)
this.$target = $(this.options.target)
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
this.$element = $(element)
this.affixed = null
this.unpin = null
this.pinnedOffset = null
this.checkPosition()
}
Affix.VERSION = '3.3.5'
Affix.RESET = 'affix affix-top affix-bottom'
Affix.DEFAULTS = {
offset: 0,
target: window
}
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
var targetHeight = this.$target.height()
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
if (this.affixed == 'bottom') {
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
}
var initializing = this.affixed == null
var colliderTop = initializing ? scrollTop : position.top
var colliderHeight = initializing ? targetHeight : height
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
return false
}
Affix.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
return (this.pinnedOffset = position.top - scrollTop)
}
Affix.prototype.checkPositionWithEventLoop = function () {
setTimeout($.proxy(this.checkPosition, this), 1)
}
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var height = this.$element.height()
var offset = this.options.offset
var offsetTop = offset.top
var offsetBottom = offset.bottom
var scrollHeight = Math.max($(document).height(), $(document.body).height())
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
if (this.affixed != affix) {
if (this.unpin != null) this.$element.css('top', '')
var affixType = 'affix' + (affix ? '-' + affix : '')
var e = $.Event(affixType + '.bs.affix')
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
this.affixed = affix
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
this.$element
.removeClass(Affix.RESET)
.addClass(affixType)
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
}
if (affix == 'bottom') {
this.$element.offset({
top: scrollHeight - height - offsetBottom
})
}
}
// AFFIX PLUGIN DEFINITION
// =======================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.affix')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.affix
$.fn.affix = Plugin
$.fn.affix.Constructor = Affix
// AFFIX NO CONFLICT
// =================
$.fn.affix.noConflict = function () {
$.fn.affix = old
return this
}
// AFFIX DATA-API
// ==============
$(window).on('load', function () {
$('[data-spy="affix"]').each(function () {
var $spy = $(this)
var data = $spy.data()
data.offset = data.offset || {}
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
if (data.offsetTop != null) data.offset.top = data.offsetTop
Plugin.call($spy, data)
})
})
}(jQuery);
/* ========================================================================
* Bootstrap: collapse.js v3.3.5
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Collapse.DEFAULTS, options)
this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
'[data-toggle="collapse"][data-target="#' + element.id + '"]')
this.transitioning = null
if (this.options.parent) {
this.$parent = this.getParent()
} else {
this.addAriaAndCollapsedClass(this.$element, this.$trigger)
}
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.3.5'
Collapse.TRANSITION_DURATION = 350
Collapse.DEFAULTS = {
toggle: true
}
Collapse.prototype.dimension = function () {
var hasWidth = this.$element.hasClass('width')
return hasWidth ? 'width' : 'height'
}
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
var activesData
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
if (actives && actives.length) {
activesData = actives.data('bs.collapse')
if (activesData && activesData.transitioning) return
}
var startEvent = $.Event('show.bs.collapse')
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
if (actives && actives.length) {
Plugin.call(actives, 'hide')
activesData || actives.data('bs.collapse', null)
}
var dimension = this.dimension()
this.$element
.removeClass('collapse')
.addClass('collapsing')[dimension](0)
.attr('aria-expanded', true)
this.$trigger
.removeClass('collapsed')
.attr('aria-expanded', true)
this.transitioning = 1
var complete = function () {
this.$element
.removeClass('collapsing')
.addClass('collapse in')[dimension]('')
this.transitioning = 0
this.$element
.trigger('shown.bs.collapse')
}
if (!$.support.transition) return complete.call(this)
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
this.$element
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
}
Collapse.prototype.hide = function () {
if (this.transitioning || !this.$element.hasClass('in')) return
var startEvent = $.Event('hide.bs.collapse')
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
var dimension = this.dimension()
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
this.$element
.addClass('collapsing')
.removeClass('collapse in')
.attr('aria-expanded', false)
this.$trigger
.addClass('collapsed')
.attr('aria-expanded', false)
this.transitioning = 1
var complete = function () {
this.transitioning = 0
this.$element
.removeClass('collapsing')
.addClass('collapse')
.trigger('hidden.bs.collapse')
}
if (!$.support.transition) return complete.call(this)
this.$element
[dimension](0)
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(Collapse.TRANSITION_DURATION)
}
Collapse.prototype.toggle = function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
Collapse.prototype.getParent = function () {
return $(this.options.parent)
.find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
.each($.proxy(function (i, element) {
var $element = $(element)
this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
}, this))
.end()
}
Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
var isOpen = $element.hasClass('in')
$element.attr('aria-expanded', isOpen)
$trigger
.toggleClass('collapsed', !isOpen)
.attr('aria-expanded', isOpen)
}
function getTargetFromTrigger($trigger) {
var href
var target = $trigger.attr('data-target')
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
return $(target)
}
// COLLAPSE PLUGIN DEFINITION
// ==========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.collapse
$.fn.collapse = Plugin
$.fn.collapse.Constructor = Collapse
// COLLAPSE NO CONFLICT
// ====================
$.fn.collapse.noConflict = function () {
$.fn.collapse = old
return this
}
// COLLAPSE DATA-API
// =================
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
var $this = $(this)
if (!$this.attr('data-target')) e.preventDefault()
var $target = getTargetFromTrigger($this)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $this.data()
Plugin.call($target, option)
})
}(jQuery);
/* ========================================================================
* Bootstrap: scrollspy.js v3.3.5
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// SCROLLSPY CLASS DEFINITION
// ==========================
function ScrollSpy(element, options) {
this.$body = $(document.body)
this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
this.selector = (this.options.target || '') + ' .nav li > a'
this.offsets = []
this.targets = []
this.activeTarget = null
this.scrollHeight = 0
this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
this.refresh()
this.process()
}
ScrollSpy.VERSION = '3.3.5'
ScrollSpy.DEFAULTS = {
offset: 10
}
ScrollSpy.prototype.getScrollHeight = function () {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
}
ScrollSpy.prototype.refresh = function () {
var that = this
var offsetMethod = 'offset'
var offsetBase = 0
this.offsets = []
this.targets = []
this.scrollHeight = this.getScrollHeight()
if (!$.isWindow(this.$scrollElement[0])) {
offsetMethod = 'position'
offsetBase = this.$scrollElement.scrollTop()
}
this.$body
.find(this.selector)
.map(function () {
var $el = $(this)
var href = $el.data('target') || $el.attr('href')
var $href = /^#./.test(href) && $(href)
return ($href
&& $href.length
&& $href.is(':visible')
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
that.offsets.push(this[0])
that.targets.push(this[1])
})
}
ScrollSpy.prototype.process = function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
var scrollHeight = this.getScrollHeight()
var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
var offsets = this.offsets
var targets = this.targets
var activeTarget = this.activeTarget
var i
if (this.scrollHeight != scrollHeight) {
this.refresh()
}
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
}
if (activeTarget && scrollTop < offsets[0]) {
this.activeTarget = null
return this.clear()
}
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
&& this.activate(targets[i])
}
}
ScrollSpy.prototype.activate = function (target) {
this.activeTarget = target
this.clear()
var selector = this.selector +
'[data-target="' + target + '"],' +
this.selector + '[href="' + target + '"]'
var active = $(selector)
.parents('li')
.addClass('active')
if (active.parent('.dropdown-menu').length) {
active = active
.closest('li.dropdown')
.addClass('active')
}
active.trigger('activate.bs.scrollspy')
}
ScrollSpy.prototype.clear = function () {
$(this.selector)
.parentsUntil(this.options.target, '.active')
.removeClass('active')
}
// SCROLLSPY PLUGIN DEFINITION
// ===========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.scrollspy')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.scrollspy
$.fn.scrollspy = Plugin
$.fn.scrollspy.Constructor = ScrollSpy
// SCROLLSPY NO CONFLICT
// =====================
$.fn.scrollspy.noConflict = function () {
$.fn.scrollspy = old
return this
}
// SCROLLSPY DATA-API
// ==================
$(window).on('load.bs.scrollspy.data-api', function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
Plugin.call($spy, $spy.data())
})
})
}(jQuery);
/* ========================================================================
* Bootstrap: transition.js v3.3.5
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
function transitionEnd() {
var el = document.createElement('bootstrap')
var transEndEventNames = {
WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
OTransition : 'oTransitionEnd otransitionend',
transition : 'transitionend'
}
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] }
}
}
return false // explicit for ie8 ( ._.)
}
// http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false
var $el = this
$(this).one('bsTransitionEnd', function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}
$(function () {
$.support.transition = transitionEnd()
if (!$.support.transition) return
$.event.special.bsTransitionEnd = {
bindType: $.support.transition.end,
delegateType: $.support.transition.end,
handle: function (e) {
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
}
}
})
}(jQuery);
|
window.onload = function () {
// Start a new marked instance and renderer
var marked = window.marked;
var renderer = new marked.Renderer();
var counter = 0;
var specs = [];
var opts = {"mode": "vega-lite", "renderer": "svg" };
// Render the ```vis as a div and save the json spec
renderer.code = function (code, lang, escaped) {
if (lang == "vis") {
jsonVis = YAML.parse(code);
specs.push(jsonVis);
counter++;
el = "#vis-" + counter;
htmlChart = "<div id='vis-" + counter + "'></div>";
return htmlChart;
}
var result = marked.Renderer.prototype.code.call(this, code, lang, escaped);
return result;
};
// Render the vega-lite chart for each json spec
vegaliteRender = function (err, content) {
for (var i=0; i < specs.length; i++) {
j = i + 1;
el = "#vis-" + j;
vega.embed(el, specs[i], opts);
}
return content;
};
// Convert from Markdown to HTML
var input = document.querySelector("#visdown-input");
var output = document.querySelector("#visdown-output");
window.visdown = function () {
console.log('visdown');
var markdownText = input.value;
output.innerHTML = marked(markdownText, { renderer: renderer});
vegaliteRender();
}
visdown()
}
|
module.exports = require("npm:[email protected]/index"); |
import React from 'react';
import { Gateway } from 'react-gateway';
import ReactModal2 from './ReactModal2';
import Icon from '../Icon';
import './Modal.scss';
/**
* This component is only created to facilitate the process of using react-modal2 with react gateway
*
* You can import this Modal and use onClose props with internal state to control its appearance:
*
*export default class MyComponent extends React.Component {
* state = {
* isModalOpen: false
* };
*
* handleOpen = () => {
* this.setState({ isModalOpen: true });
* };
*
* handleClose = () => {
* this.setState({ isModalOpen: false });
* };
*
* render() {
* return (
* <div>
* <button onClick={this.handleOpen}>Open</button>
* {this.state.isModalOpen && (
* <MyCustomModal onClose={this.handleClose}>
* <h1>Hello from Modal</h1>
* <button onClick={this.handleClose}>Close</button>
* </MyCustomModal>
* )}
* </div>
* );
* }
*}
*
* more info: https://www.npmjs.com/package/react-modal2
*/
const freezeTheScroll = () => {
// eslint-disable-next-line
const body = window.document.querySelector('body');
body.style.overflow = 'hidden';
};
const unfreezeTheScroll = () => {
// eslint-disable-next-line
const body = window.document.querySelector('body');
body.style.overflow = 'initial';
};
export default class Modal extends React.Component {
static propTypes = {
onClose: React.PropTypes.func.isRequired,
};
static defaultProps = {
closeOnEsc: true,
closeOnBackdropClick: true,
};
/* eslint-disable */
componentDidMount() {
if (window) {
freezeTheScroll();
}
}
componentWillUnmount() {
if (window) {
unfreezeTheScroll();
}
}
/* eslint-enable */
render() {
return (
<Gateway into="modal">
<ReactModal2
onClose={this.props.onClose}
closeOnEsc={this.props.closeOnEsc}
closeOnBackdropClick={this.props.closeOnEsc}
backdropClassName="BusyModalBackdrop"
modalClassName="BusyModal"
>
<a className="BusyModal--close" onClick={this.props.onClose}>
<Icon name="close" />
</a>
{this.props.children}
</ReactModal2>
</Gateway>
);
}
}
|
function solve(args) {
var text = args[0].split('\n');
var textA = text[0];
var textB = text[1];
var state = 0;
for (var i = 0; i < Math.min(textA.length, textB.length); i += 1) {
if (textA[i] > textB[i]) {
state = 1;
break;
}
if (textA[i] < textB[i]) {
state = 2;
break;
}
}
if (state === 0 && textA.length > textB.length) {
state = 1;
}
if (state === 0 && textB.length > textA.length) {
state = 2;
}
switch (state) {
case 0:
console.log('=');
break;
case 1:
console.log('>');
break;
case 2:
console.log('<');
break;
default:
break;
}
} |
/* animation.js */
Janice._Animation = {};
Janice._Animation.staticm = {};
Janice._Animation.method = {};
Janice._Animation.staticm.decomposeVersion = function(versionNumber) {
var major = Math.floor(versionNumber)
var minor = parseInt(('' + (versionNumber - major)).substr(2));
return {
major: major,
minor: minor
};
};
Janice._Animation.method.draw = function(context, t) {
this.container.draw(context, t);
};
Janice._Animation.method.save = function() {
var saveStr = '{';
saveStr += '"v":' + this.version;
saveStr += ',';
saveStr += '"w":' + this.width;
saveStr += ',';
saveStr += '"h":' + this.height;
saveStr += ',';
saveStr += '"d":' + this.duration;
saveStr += ',';
saveStr += '"c":' + Janice._Container.staticm.save(this.container);
return saveStr + '}';
};
Janice._Animation.method.load = function(data) {
if (typeof data == 'string') {
try {
data = jsonParse(data);
}
catch (ex) {
throw 'InvalidJsonData';
}
}
// Check version:
var thisVersion = Janice._Animation.staticm.decomposeVersion(this.version);
var dataVersion = Janice._Animation.staticm.decomposeVersion(data.v);
if (thisVersion.major !== dataVersion.major) {
throw 'IncompatibleMajorVersion';
}
else if (thisVersion.minor < dataVersion.minor) {
throw 'IncompatibleMinorVersion';
}
// Load animation settings:
this.width = data.w;
this.height = data.h;
this.duration = data.d;
// Load contents:
this.container = Janice._Container.staticm.load(data.c);
};
Janice.Animation = function(duration) {
var animation = {};
animation.version = 0.1;
animation.width = 480;
animation.height = 320;
animation.duration = duration ? parseInt(duration) : 5000; // In milliseconds.
animation.container = Janice.Container();
animation.draw = Janice._Animation.method.draw;
animation.save = Janice._Animation.method.save;
animation.load = Janice._Animation.method.load;
return animation;
};
|
function f() {
console.log(1);
console.log(2);
} |
/* SPDX-License-Identifier: MIT */
function GHDataReport(apiUrl) {
apiUrl = apiUrl || '/';
var owner = this.getParameterByName('owner');
var repo = this.getParameterByName('repo');
this.api = new GHDataAPIClient(apiUrl, owner, repo);
this.buildReport();
}
GHDataReport.prototype.getParameterByName = function(name, url) {
if (!url) {
url = window.location.href;
}
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
};
GHDataReport.prototype.buildReport = function () {
if (this.api.owner && this.api.repo) {
document.getElementById('repo-label').innerHTML = this.api.owner + ' / ' + this.api.repo;
// Commits
this.api.commitsByWeek().then(function (commits) {
MG.data_graphic({
title: "Commits/Week",
data: MG.convert.date(commits, 'date', '%Y-%m-%dT%H:%M:%S.%LZ'),
chart_type: 'point',
least_squares: true,
full_width: true,
height: 300,
color_range: ['#aaa'],
x_accessor: 'date',
y_accessor: 'commits',
target: '#commits-over-time'
});
});
// Stargazers
this.api.stargazersByWeek().then(function (stargazers) {
MG.data_graphic({
title: "Stars/Week",
data: MG.convert.date(stargazers, 'date', '%Y-%m-%dT%H:%M:%S.%LZ'),
chart_type: 'point',
least_squares: true,
full_width: true,
height: 300,
color_range: ['#aaa'],
x_accessor: 'date',
y_accessor: 'watchers',
target: '#stargazers-over-time'
});
});
// Forks
this.api.forksByWeek().then(function (forks) {
MG.data_graphic({
title: "Forks/Week",
data: MG.convert.date(forks, 'date', '%Y-%m-%dT%H:%M:%S.%LZ'),
chart_type: 'point',
least_squares: true,
full_width: true,
height: 300,
color_range: ['#aaa'],
x_accessor: 'date',
y_accessor: 'projects',
target: '#forks-over-time'
});
});
// Issues
this.api.issuesByWeek().then(function (issues) {
MG.data_graphic({
title: "Issues/Week",
data: MG.convert.date(issues, 'date', '%Y-%m-%dT%H:%M:%S.%LZ'),
chart_type: 'point',
least_squares: true,
full_width: true,
height: 300,
color_range: ['#aaa'],
x_accessor: 'date',
y_accessor: 'issues',
target: '#issues-over-time'
});
});
// Pull Requests
this.api.pullRequestsByWeek().then(function (pulls) {
MG.data_graphic({
title: "Pull Requests/Week",
data: MG.convert.date(pulls, 'date', '%Y-%m-%dT%H:%M:%S.%LZ'),
chart_type: 'point',
least_squares: true,
full_width: true,
height: 300,
color_range: ['#aaa'],
x_accessor: 'date',
y_accessor: 'pull_requests',
target: '#pulls-over-time'
});
});
}
};
var client = new GHDataReport();
|
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z" /></g>
, 'PermIdentity');
|
// -------------------------------------------------------------------------------
// OEA Original colors
// --------------------------------------------------------------------------------
export default {
blue: "#3299BB",
lightBlue: "#88D4E1",
lighterBlue: "#D6EBF1",
white: "#fff",
black: "#000",
backgroundGray: "#E9E9E9",
backgroundGreen:"#d1f1eb",
darkGreen: "#1abc9c",
backgroundRed: "#f7c9c4",
red: "#E74C3C",
textGrey: "#333333",
buttonFace: "buttonface",
textColor: "#555",
linkColor: "#1abc9c",
// Colors
almost_black: "#424242",
firm: "#1abc9c",
gray: "#BCBCBC",
lightergrey: "#F3F3F3",
lightgray: "#E9E9E9",
inverse: "#fff",
// Kate Colors
kateDarkOrange: "rgb(25,153,0)",
kateOrange: "rgb(255,153,0)",
kateLightOrange: "rgb(255,173,51)",
kateLightBlue: "#A6F2FF",
// MIT OCW colors
mitocwRed: "#D20035",
mitocwDarkBrown: "#574B49",
mitocwMediumBrown: "#775C57",
mitocwLightBrown: "#E7E0DB",
mitocwDarkGray: "#363636",
mitocwLightGray: "#999",
// pony
ponyLightGray: "#EDEDED",
ponyDarkGray: "#BFBFBF",
ponyLightBlue: "#8FF1FF",
ponyLightPurple: "#770073",
ponyPink: "#FF002C",
ponyOrange: "#FF6728",
ponyYellow: "#FFF8B0",
ponyLightGreen: "#82D771",
ponyGreen: "#44C635",
ponyBlue: "#008DCF",
ponyPurple: "#A756A3",
// Lumen Learing
lumenSeafoam: "#108043",
lumenDarkGreen: "#003136",
lumenBlue: "#1e74d1",
lumenRed: "#ad4646",
// Twitter bootstrap overrides
navbarInverseBg: "#424242",
navbarInverseLinkColor: "#E9E9E9",
navbarInverseLinkHoverColor: "rgb(255,173,51)",
navbarInverseLinkHoverBg: "#424242",
navbarInverseLinkActiveColor: "rgb(255,173,51)",
navbarInverseLinkActiveBg: "#E9E9E9",
inputColor: "#4d4d4d",
}
|
// Modules
const Config = require('../config/main'),
Good = require('good');
module.exports = {
options: Config.HAPI.GOOD_OPTIONS,
register: Good
};
|
var chokidar = require('chokidar');
process.chdir(__dirname + '/../');
chokidar.watch('.', {ignoreInitial: true, useFsEvents: true}).on('all', function(event, path) {
console.log(new Date, event, path);
});
|
$(function(){
function notOk(s, m) {equal(!!s,false,m);}
module("lock");
test('create', function () {
var lock1 = $.lock(),
lock2 = $.lock(false),
lock3 = $.lock(true);
expect(3);
ok(!lock1.isLocked());
ok(!lock2.isLocked());
ok(lock3.isLocked());
});
var lock = $.lock();
test('lock', function () {
lock.unlock().lock();
expect(1);
ok(lock.isLocked());
});
test('unlock', function () {
lock.lock().unlock();
expect(1);
ok(!lock.isLocked());
});
}) |
var should=require('should');
var toast=('../toast');
describe('test/toast.js', function () {
it('toast', function () {
toast.should.equal(toast);
});
});
|
var gm = require('gm');
var request = require('request');
var cors = require('cors');
var upload = require('./s3-upload');
function crop(req, res) {
try {
var q = req.query;
var image = gm(request(q.image), 'tempImage');
image.crop(q.width, q.height, q.left, q.top).toBuffer(function(err, buffer) {
if (err) {
throw err;
}
var fileObj = {
alteration: 'cropped',
protocol: req.get('x-orig-proto') || req.protocol,
prefix: q.prefix,
buffer: buffer
};
upload(fileObj, res);
});
} catch(e) {
res.status(500).send(e);
}
}
module.exports = function (app) {
app.get('/crop', cors(), crop);
};
|
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Created by skytzi on 15.4.17.
*/
var core_1 = require("@angular/core");
var common_1 = require("@angular/common");
var router_1 = require("@angular/router");
var login_component_1 = require("./login.component");
var LoginModule = (function () {
function LoginModule() {
}
return LoginModule;
}());
LoginModule = __decorate([
core_1.NgModule({
imports: [router_1.RouterModule, common_1.CommonModule],
declarations: [login_component_1.LoginComponent],
exports: [login_component_1.LoginComponent]
})
], LoginModule);
exports.LoginModule = LoginModule;
//# sourceMappingURL=authentication.module.js.map
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _libs = require('../../libs');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Radio = function (_Component) {
_inherits(Radio, _Component);
function Radio(props) {
_classCallCheck(this, Radio);
var _this = _possibleConstructorReturn(this, (Radio.__proto__ || Object.getPrototypeOf(Radio)).call(this, props));
_this.state = {
checked: _this.getChecked(props)
};
return _this;
}
_createClass(Radio, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(props) {
var checked = this.getChecked(props);
if (this.state.checked != checked) {
this.setState({ checked: checked });
}
}
}, {
key: 'onChange',
value: function onChange(e) {
var checked = e.target.checked;
if (checked) {
if (this.props.onChange) {
if (this.props.hasOwnProperty('model')) {
this.props.onChange(this.props.value);
} else {
this.props.onChange(e);
}
}
}
this.setState({ checked: checked });
}
}, {
key: 'onFocus',
value: function onFocus() {
this.setState({
focus: true
});
}
}, {
key: 'onBlur',
value: function onBlur() {
this.setState({
focus: false
});
}
}, {
key: 'getChecked',
value: function getChecked(props) {
return props.model == props.value || Boolean(props.checked);
}
}, {
key: 'render',
value: function render() {
var checked = this.state.checked;
var _props = this.props,
disabled = _props.disabled,
focus = _props.focus,
value = _props.value,
children = _props.children;
return _react2.default.createElement(
'label',
{ style: this.style(), className: this.className('el-radio') },
_react2.default.createElement(
'span',
{ className: this.classNames({
'el-radio__input': true,
'is-checked': checked,
'is-disabled': disabled,
'is-focus': focus
}) },
_react2.default.createElement('span', { className: 'el-radio__inner' }),
_react2.default.createElement('input', {
type: 'radio',
className: 'el-radio__original',
checked: checked,
disabled: disabled,
onChange: this.onChange.bind(this),
onFocus: this.onFocus.bind(this),
onBlur: this.onBlur.bind(this)
})
),
_react2.default.createElement(
'span',
{ className: 'el-radio__label' },
children || value
)
);
}
}]);
return Radio;
}(_libs.Component);
var _default = Radio;
exports.default = _default;
Radio.propTypes = {
value: _libs.PropTypes.oneOfType([_libs.PropTypes.string, _libs.PropTypes.number]).isRequired,
onChange: _libs.PropTypes.func,
disabled: _libs.PropTypes.bool,
focus: _libs.PropTypes.bool,
/* eslint-disable */
checked: _libs.PropTypes.bool
/* eslint-enable */
};
;
var _temp = function () {
if (typeof __REACT_HOT_LOADER__ === 'undefined') {
return;
}
__REACT_HOT_LOADER__.register(Radio, 'Radio', 'src/radio/Radio.jsx');
__REACT_HOT_LOADER__.register(_default, 'default', 'src/radio/Radio.jsx');
}();
; |
// Manipulating JavaScript Objects
// I worked on this challenge: [by myself, with: ]
// There is a section below where you will write your code.
// DO NOT ALTER THIS OBJECT BY ADDING ANYTHING WITHIN THE CURLY BRACES!
var terah = {
name: "Terah",
age: 32,
height: 66,
weight: 130,
hairColor: "brown",
eyeColor: "brown"
}
// __________________________________________
// Write your code below.
var adam = {
}
adam.name = "Adam";
terah.spouse = adam;
terah.weight = 125;
delete terah.eyeColor;
adam.spouse = terah;
terah.children = new Object();
var carson = {
name: "Carson",
}
terah.children.carson = carson;
var carter = {
name: "Carter",
}
terah.children.carter = carter;
var colton = {
name: "Colton",
}
terah.children.colton = colton;
adam.children = terah.children;
// __________________________________________
// Reflection: Use the reflection guidelines
/*
What tests did you have trouble passing? What did you do to make
it pass? Why did that work?
There were two tests that I had difficulty with, the first was
assigning terah a spouse. This was mainly because I had misread
the instructions and I was passing terah adam.name and not the
object adam. The second was assigning carson to terah.children,
again this ending up being more a confusion with the instructions
and I failed to initially create carson as a property of
terah.children. Once I realized the mistake, I passed the tests
and moved on.
How difficult was it to add and delete properties outside of the
object itself?
It was easy for the most part and I just needed to spend more
time reading the directions and figuring out what was being asked.
What did you learn about manipulating objects in this challenge?
I started this challenge before finishing 7.2 Eloquent
JavaScript, having only completed the Codecademy JavaScript
track. So I had to do some research on deleting a property. Other
than that, it was mostly things I had already covered.
*/
// __________________________________________
// Driver Code: Do not alter code below this line.
function assert(test, message, test_number) {
if (!test) {
console.log(test_number + "false");
throw "ERROR: " + message;
}
console.log(test_number + "true");
return true;
}
assert(
(adam instanceof Object),
"The value of adam should be an Object.",
"1. "
)
assert(
(adam.name === "Adam"),
"The value of the adam name property should be 'Adam'.",
"2. "
)
assert(
terah.spouse === adam,
"terah should have a spouse property with the value of the object adam.",
"3. "
)
assert(
terah.weight === 125,
"The terah weight property should be 125.",
"4. "
)
assert(
terah.eyeColor === undefined || null,
"The terah eyeColor property should be deleted.",
"5. "
)
assert(
terah.spouse.spouse === terah,
"Terah's spouse's spouse property should refer back to the terah object.",
"6. "
)
assert(
(terah.children instanceof Object),
"The value of the terah children property should be defined as an Object.",
"7. "
)
assert(
(terah.children.carson instanceof Object),
"carson should be defined as an object and assigned as a child of Terah",
"8. "
)
assert(
terah.children.carson.name === "Carson",
"Terah's children should include an object called carson which has a name property equal to 'Carson'.",
"9. "
)
assert(
(terah.children.carter instanceof Object),
"carter should be defined as an object and assigned as a child of Terah",
"10. "
)
assert(
terah.children.carter.name === "Carter",
"Terah's children should include an object called carter which has a name property equal to 'Carter'.",
"11. "
)
assert(
(terah.children.colton instanceof Object),
"colton should be defined as an object and assigned as a child of Terah",
"12. "
)
assert(
terah.children.colton.name === "Colton",
"Terah's children should include an object called colton which has a name property equal to 'Colton'.",
"13. "
)
assert(
adam.children === terah.children,
"The value of the adam children property should be equal to the value of the terah children property",
"14. "
)
console.log("\nHere is your final terah object:")
console.log(terah) |
function Logger () {
}
Logger.getBeats = function (attacker, defender) {
return attacker.role.title + attacker.name + (attacker.weapon.name? '用' + attacker.weapon.name: '') +
'攻击了' + defender.role.title + defender.name + ', ';
};
Logger.getDetails = function (attacker, defender, damage, extra) {
var mainBody = defender.name + '受到了' + damage + '点伤害, ';
var extraText = '';
var before = false;
if(extra && extra.type == 'strike') {
extraText = attacker.name + '发动了致命一击' + ', ';
before = true;
}
else if(extra && extra.type) {
extraText = defender.name + extra.describe + '了, ';
}
return before? extraText + mainBody: mainBody + extraText;
};
Logger.getRemain = function (player) {
return player.name + '剩余生命:' + player.life;
};
Logger.getExtraDamage = function (attacker, defender, extra) {
var map = {
toxin: attacker.name + '受到' + extra.damage + '点毒性伤害, ' + attacker.name + '剩余生命:' + attacker.life,
flame: attacker.name + '受到' + extra.damage + '点火焰伤害, ' + attacker.name + '剩余生命:' + attacker.life,
frozen: attacker.name + '冻得直哆嗦, 没有击中' + defender.name,
faint: attacker.name + '晕倒了, 无法攻击, 眩晕还剩:' + --extra.remain + '轮'
};
return map[extra.type];
};
Logger.getEffect = function (attacker, defender, effect, damage) {
if(!effect) {
return '';
}
if(effect.repel) {
return defender.name + '被击退了, ';
}
if(effect.double) {
return attacker.name + '发动了连击, ' + defender.name + '受到了' + damage[0] + '点伤害, ';
}
if(effect.defence) {
return defender.name + '发动了隔挡反击, ' + attacker.name + '受到了' + damage[1] + '点伤害, ';
}
return '';
};
Logger.getDeath = function (player) {
return player.name + '被打败了.';
};
Logger.getForward = function (attacker, defender) {
return attacker.name + '靠近了' + defender.name + '.';
};
|
var webpack = require('webpack');
var helpers = require('./helpers');
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
const ENV = process.env.NODE_ENV = process.env.ENV = 'development';
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: {
'polyfills': './app/polyfills.ts',
'vendor': './app/vendor.ts',
'app': './app/boot.ts'
},
output: {
path: helpers.root('dist'),
publicPath: 'http://localhost:8084/',
filename: '[name].js',
chunkFilename: '[id].chunk.js'
},
resolve: {
extensions: ['', '.ts', '.js']
},
module: {
loaders: [{
test: /\.ts$/,
exclude: path.resolve(__dirname, "node_modules"),
loaders: ['awesome-typescript-loader', 'angular2-template-loader', 'angular2-router-loader']
},
{
test: /\.html$/,
loader: 'html'
},
{
test: /\.(png|jpe?g|gif|ico)$/,
loader: 'file-loader?name=images/[name].[ext]'
},
{
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
loader: 'url-loader?limit=10000&mimetype=application/font-woff'
},
{
test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
loader: 'url-loader?limit=10000&mimetype=application/font-woff'
},
{
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
loader: 'url-loader?limit=10000&mimetype=application/octet-stream'
},
{
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
loader: 'file-loader'
},
{
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
loader: 'url-loader?limit=10000&mimetype=image/svg+xml'
},
{
// site wide css (excluding all css under the app dir)
test: /\.css$/,
exclude: helpers.root('app'),
loader: ExtractTextPlugin.extract('style', 'css?sourceMap')
},
{
// included styles under the app directory - these are for styles included
// with styleUrls
test: /\.css$/,
include: helpers.root('app'),
loader: 'raw'
},
{
test: /\.scss$/,
include: helpers.root('node_modules'),
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
},
]
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: ['app', 'vendor', 'polyfills']
}),
new ExtractTextPlugin('[name].css'),
new HtmlWebpackPlugin({
template: 'config/index.html'
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
'process.env.APP_VERSION': JSON.stringify(process.env.npm_package_version),
})
],
devServer: {
historyApiFallback: true,
stats: 'minimal',
}
}; |
---
layout: null
---
$(document).ready(function(){
console.log("exam.js: document is ready");
$('.template').each(function(i) {
$(this).css('display','none');
});
// Use with <div class="copy-of" data-id="foo"></div>
// Use <div id="foo" class="template"></div> on the stuff you want to copy
// The class="template" will hide it the first time.
// The class="copy-of" data-id="foo" signals that you want a copy of foo inserted here.
$('.copy-of').each(function(i) {
var id = $(this).data('id')
$(this).html($(document.getElementById(id)).clone().html());
});
$('.page-break-before').each(function(i) {
var pageNum = i+1;
var prev = $(this).prev();
var evenOddClass = (pageNum % 2 == 0)?
"even-page" : "odd-page";
$(this).addClass(evenOddClass);
var $div = $("<div>", {class: "pagebreak " + evenOddClass});
prev.append($div);
$('.exam-page-header-template').first().clone().appendTo($div);
if (pageNum %2 ==0) {
var img = $('<img>');
img.addClass("even-page-staple-img");
img.attr('src', "/images/Staple-Even-Pages.png");
img.appendTo($div);
} else {
$('.exam-name-header-template').first().clone().appendTo($div);
}
prev.css('margin-bottom','0');
});
$('td.page-num').each(function(i) {
var pageNum = i + 1
$(this).html(pageNum); // re-calculate page numbers
$(this).data("pageNum",pageNum);
if (pageNum % 2==0) {
$(this).parents(".pagebreak").removeClass("odd-page");
$(this).parents(".pagebreak").addClass("even-page");
} else {
$(this).parents(".pagebreak").removeClass("even-page");
$(this).parents(".pagebreak").addClass("odd-page");
}
});
console.log("exam.js: done");
});
|
/*-
* #%L
* ARROWHEAD::WP5::Market Manager
* %%
* Copyright (C) 2016 The ARROWHEAD Consortium
* %%
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* #L%
*/
'use strict';
angular.module('marketManApp')
.controller('HeaderCtrl', function ($scope, $location, $timeout, serviceMarket) {
$scope.isActive = function (viewLocation) {
return viewLocation === $location.path();
};
$scope.connect = function(connect) {
var c = new serviceMarket.Connection();
c.value = connect;
c.$save();
};
$scope.isConnected = { value: false };
(function tick() {
serviceMarket.Connection.get().$promise.then(
function(val) {
$scope.isConnected = val;
}, function(error){
$scope.isConnected = null;
});
$timeout(tick, 2000);
})();
});
|
// this is a little Node program, running on a Node server
// require() will look inside of a folder and get information, similar to import
// NOTE: gulpfile.js must be in the main directory
var gulp = require('gulp');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var autoprefixer = require('gulp-autoprefixer');
var minifyCss = require('gulp-minify-css');
var browserSync = require('browser-sync').create();
var reload = browserSync.reload;
var jade = require('gulp-jade');
var plumber = require('gulp-plumber');
////////////////////////////////////////////
// JADE COMPILE
////////////////////////////////////////////
gulp.task('jade', function() {
var jade_locals = {};
// using src = ./*.jade causes index.layout.jade to also compile which we don't want... unless we have multiple main directory files... in which case we do use ./*.jade
// otherwise use src = ./index.jade if there aren't other jade files in ./ (i.e. contact.jade, about.jade, etc.)
return gulp.src('./index.jade')
.pipe(plumber())
.pipe(jade({
locals: jade_locals,
pretty: true
}))
.pipe(gulp.dest('./'))
});
////////////////////////////////////////////
// END JADE COMPILE
////////////////////////////////////////////
////////////////////////////////////////////
// SASS COMPILE
////////////////////////////////////////////
gulp.task('sass', function () {
return gulp.src('css/*.scss')
.pipe(plumber())
.pipe(sass({
'sourcemap=none':true,
'errLogToConsole':true
}))
.pipe(concat('style.css'))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
// .pipe(minifyCss({compatibility: 'ie8'}))
.pipe(gulp.dest('css/'))
.pipe(browserSync.stream());
});
////////////////////////////////////////////
// END SASS COMPILE
////////////////////////////////////////////
////////////////////////////////////////////
// BROWSER SYNC
////////////////////////////////////////////
gulp.task('server', ['sass','jade'], function() {
browserSync.init({
server: "./",
});
gulp.watch("css/*.scss", ['sass']);
// to get SASS partials to trigger changes
// the SCSS partials need to be in their own folder because css/*.scss causes all of them to trigger in the same directory, in the order they currently are which messes up everything
gulp.watch("css/partials/*.scss", ['sass']);
gulp.watch('./*.jade',['jade']);
// to get jade partials to trigger changes
gulp.watch('includes/*.jade',['jade']);
// whenever the .js files change reload
gulp.watch("js/*.js").on('change', reload);
// whenever the .css file changes reload
gulp.watch("css/*.css").on('change', reload);
// whenever the .html file changes reload
gulp.watch("*.html").on('change', reload);
});
////////////////////////////////////////////
// END BROWSER SYNC
////////////////////////////////////////////
////////////////////////////////////////////
// DEFAULT
////////////////////////////////////////////
gulp.task('default', ['server'], function () {
// place everything in here in 'server'
});
////////////////////////////////////////////
// END DEFAULT
////////////////////////////////////////////
|
var $ = require('jquery');
var Backbone = require('backbone');
Backbone.$ = $;
//CHALLENGE: "bring in" the appropriate template for this view
var TodoListView = Backbone.View.extend({
tagName: 'div',
className: 'list-group',
initialize: function () {
this.listenTo(this.collection,'all', this.render);
},
render: function () {
var data = [];
this.collection.models.forEach(function (item) {
data.push({title: item.escape('title'), description: item.escape('description') });
});
this.$el.html(myTemplate({todoData:data}));
}
});
module.exports = TodoListView;
|
// MinuteRepeater Class
// @params dial: object
// @params settings: object
// @params parentWatch: Watch instance
//
// The minuterepeater class accepts a dial, or defaults to the 0th index of the
// dials array on the parent Watch class, and based on the hands' rotation values
// calculates the amount of hours, quarter hours, and remaining minutes. With
// these values, the class then plays back chimes to audibly indicate the time.
class MinuteRepeater {
constructor(dial, repeater, parentWatch) {
this.errorChecking(dial, repeater);
this.hands = dial.hands;
this.hourAngle = 0;
this.hourChimes = 0;
this.hourElement = null;
this.hourDivisor = dial.format === 12 ?
30 :
15;
this.allMinutes = 0;
this.minuteAngle = 0;
this.fifteenMinuteChimes = 0;
this.fifteenMinuteElement = null;
this.minuteChimes = 0;
this.minuteElement = null;
this.trigger = document.getElementById(repeater.id || repeater.trigger);
this.chimes = repeater.chimes;
this.hourChimeDuration = 0;
this.counter = 1;
this.isPlaying = false;
this.quartersPlaying = false;
this.minutesPlaying = false;
this.parent = parentWatch;
if (!this.parent.testing) this.init();
}
errorChecking(dial, settings) {
if (!settings.id && !settings.trigger) throw new ReferenceError('The MinuteRepeater class requires that an ID of the repeater element be provided.');
if (!dial.hands.minute) throw new ReferenceError('The minute repeater, like, by definition, requires a dial which supports a minute hand.');
}
convertAngleToIncrements() {
this.hourAngle = this.parent.getCurrentRotateValue(this.hands.hour);
if (this.hourAngle > 360) {
this.hourAngle -= 360;
}
this.hourChimes = Math.floor(this.hourAngle / this.hourDivisor) || 12;
this.minuteAngle = this.parent.getCurrentRotateValue(this.hands.minute);
if (this.minuteAngle > 360) {
this.minuteAngle %= 360;
}
this.allMinutes = Math.floor(this.minuteAngle / 6);
this.fifteenMinuteChimes = Math.floor(this.allMinutes / 15);
this.minuteChimes = Math.floor(this.allMinutes - (this.fifteenMinuteChimes * 15));
}
bindEvents() {
this.trigger.addEventListener('click', () => {
this.toggleActiveState(this.trigger);
this.togglePlaying();
});
this.trigger.addEventListener('transitionend', () => {
if (this.trigger.classList.contains('active')) this.toggleActiveState(this.trigger);
});
this.hourElement.addEventListener('ended', () => {
if (!this.quartersPlaying && !this.minutesPlaying) {
this.playHours();
}
});
if (this.chimes.quarter) {
this.fifteenMinuteElement.addEventListener("ended", () => {
this.playQuarterHours();
});
}
this.minuteElement.addEventListener('ended', () => {
if (this.quartersPlaying) {
this.playQuarterHours();
} else {
this.playMinutes();
}
});
}
toggleActiveState(btn) {
btn.classList.toggle('active');
}
stopAll() {
this.hourElement.pause();
this.hourElement.currentTime = 0;
if (this.chimes.quarter) {
this.fifteenMinuteElement.pause();
this.fifteenMinuteElementcurrentTime = 0;
}
this.minuteElement.pause();
this.minuteElementcurrentTime = 0;
this.counter = 1;
this.isPlaying = false;
this.quartersPlaying = false;
this.minutesPlaying = false;
}
togglePlaying() {
if (this.parent.globalInterval) {
this.isPlaying = !this.isPlaying;
if (this.isPlaying) {
this.convertAngleToIncrements();
this.playHours();
} else {
this.stopAll();
}
}
}
playHours() {
if (this.counter <= this.hourChimes) {
this.hourElement.play();
this.counter++;
} else if (this.counter === this.hourChimes + 1) {
this.counter = 1;
this.playQuarterHours();
}
}
playQuarterHours() {
if (this.chimes.quarter) {
this.playFifteenMinutes();
} else {
if (this.counter <= this.fifteenMinuteChimes) {
this.quartersPlaying = true;
this.hourElement.play();
setTimeout(() => {
this.minuteElement.play();
this.counter++;
}, this.hourChimeDuration / 2 * 500);
} else {
this.quartersPlaying = false;
this.minutesPlaying = true;
this.counter = 1;
this.playMinutes();
}
}
}
playFifteenMinutes() {
if (this.counter <= this.fifteenMinuteChimes) {
this.fifteenMinuteElement.play();
this.counter++;
} else if (this.counter === this.fifteenMinuteChimes + 1) {
this.counter = 1;
this.playMinutes();
}
}
playMinutes() {
if (this.counter <= this.minuteChimes) {
this.minuteElement.play();
this.counter++;
} else if (this.counter === this.minuteChimes + 1) {
this.stopAll();
}
}
buildAudioElements() {
this.hourElement = document.createElement('audio');
this.hourElement.src = this.chimes.hour;
document.body.appendChild(this.hourElement);
this.hourElement.addEventListener("loadedmetadata", () => {
this.hourChimeDuration = this.hourElement.duration;
}, false);
if (this.chimes.quarter) {
this.fifteenMinuteElement = document.createElement("audio");
this.fifteenMinuteElement.src = this.chimes.quarter;
document.body.appendChild(this.fifteenMinuteElement);
}
this.minuteElement = document.createElement('audio');
this.minuteElement.src = this.chimes.minute;
document.body.appendChild(this.minuteElement);
}
updateCursorForTrigger() {
this.trigger.style.cursor = 'pointer';
}
init() {
this.buildAudioElements();
this.bindEvents();
this.updateCursorForTrigger();
}
}
module.exports = MinuteRepeater; |
import {first, uniq, compact, startsWith} from 'lodash'
import cheerio from 'cheerio'
import urijs from 'urijs'
import {flattenDeepCheerioElements} from 'utils'
export function getRelevantTags(htmlText, urlToFetch){
return new Promise((resolve, reject) => {
const doc = cheerio.load(htmlText, {
ignoreWhitespace: true,
decodeEntities: true,
lowerCaseTags: true,
lowerCaseAttributeNames: true,
recognizeCDATA: true,
recognizeSelfClosing: true
})
resolve({
title: extractTitle(doc) || '',
description: extractDescription(doc) || '',
imageUrls: extractImages(doc, urlToFetch)
})
})
}
function extractDescription(doc){
return first(compact([
doc("meta[name='description']").attr('content'),
doc("meta[property='og:description']").attr('content')
]))
}
function extractTitle(doc) {
return first(compact([
doc("meta[name='title']").attr('content'),
doc("meta[property='og:title']").attr('content'),
doc('title').text(),
]))
}
function extractImages(doc, urlToFetch) {
const imageUrls = flattenDeepCheerioElements([
doc("meta[name='image']").attr("content"),
doc("meta[property='og:image']").attr("content"),
doc("img").map((i, imgNode) => doc(imgNode).attr("src"))
])
return uniq(imageUrls
.map(imageUrl => imageUrl.replace('\\', '/'))
.map(imageUrl => {
const imageProtocol = urijs(imageUrl).protocol()
if(imageProtocol){
return imageUrl
}
if(startsWith(imageUrl, '//')){
const urlToFetchProtocol = urijs(urlToFetch).protocol()
return urijs(imageUrl).protocol(urlToFetchProtocol).toString()
}
return urijs(imageUrl).absoluteTo(urlToFetch).toString()
})
)
} |
!function($,t,e,n){"use strict";function i(t,e){this.element=t,this.settings=$.extend({},s,e),this._defaults=s,this._name=u,this.init()}var u="defaultPluginName",s={propertyName:"value"};$.extend(i.prototype,{init:function(){$(this.element).hide(),this.yourOtherFunction("jQuery Boilerplatess")},yourOtherFunction:function(t){$(this.element).text(t)}}),$.fn[u]=function(t){return this.each(function(){$.data(this,"plugin_"+u)||$.data(this,"plugin_"+u,new i(this,t))})}}(jQuery,window,document); |
import { Response } from 'aurelia-fetch-client';
import toastr from 'toastr';
/**
* Defines the logger service that provides logging/messaging capabilities.
*/
export class LoggerService {
/**
* @function {logApiError}
* @param {Fault} fault - The http fault message.
* @return {type} {Logs an error concerning an API call.}
*/
logApiError(fault) {
let message = fault.statusText;
if (fault.message) message = fault.message;
fault.json()
.then(result => {
if (fault.status === 500) {
toastr.error(message, 'API error:')
}
else {
toastr.warning(result.message)
}
})
.catch(() =>
toastr.error(message, 'API error:'))
}
/**
* @function {show}
* @param {string} message - The message to show.
* @return {type} {Popups a message.}
*/
show(message) {
toastr.success(message);
}
} |
import Boolius from "./boolius"; // which in turn imports all the classes it depends upon
import XMLius from "./xmlius";
import Mathius from "./mathius";
window.onload = function () {
d3.select("#modeSelect").on("change", function (e) {
var selectedMode = d3.select("#modeSelect").node().value.toLowerCase();
changeMode(selectedMode);
});
function changeMode(newMode) {
if (newMode.indexOf("arithmetic") > -1) {
// the user wants to look at arithmetic expressions.
// is boolius already loaded?
if (!evaluator || !(evaluator instanceof Mathius)) {
var grammarObject = [
[["NUMERIC", "^", "NUMERIC"], "NUMERIC"],
[["NUMERIC", "*", "NUMERIC"], "NUMERIC"],
[["NUMERIC", "+", "NUMERIC"], "NUMERIC", ["*", "/", "^"]],
[["NUMERIC", "-", "NUMERIC"], "NUMERIC", ["*", "/", "^"]],
[["NUM_LIT"], "NUMERIC"],
[["(", "NUMERIC", ")"], "NUMERIC"],
];
let IGNORE = true;
let tokenDefinitions = [
[/\s+/, "", IGNORE], // ignore whitespace
[/\^/, "^"], // this is the escaped form of ^
[/\(/, "("],
[/\)/, ")"],
[/\+/, "+"],
[/-/, "-"],
[/\*/, "*"],
[/\//, "/"],
[/[-+]?[0-9]*\.?[0-9]+/, "NUM_LIT"],
[/[a-zA-Z]+/, "IDENT"],
[/.+/, "DIRTYTEXT"],
];
makeEvaluatorAndInitialize(
new Mathius(tokenDefinitions, grammarObject),
"1 + 2 ^ (5 - 2) * 3",
"Click operators to expand or collapse."
);
}
} else if (newMode.indexOf("boolean") > -1) {
// the user wants to look at boolean expressions.
// is boolius already loaded?
if (!evaluator || !(evaluator instanceof Boolius)) {
var grammarObject = [
[["TRUE"], "BOOLEAN"],
[["FALSE"], "BOOLEAN"],
[["IDENT"], "BOOLEAN"],
[["!", "BOOLEAN"], "BOOLEAN"],
[["BOOLEAN", "&", "BOOLEAN"], "BOOLEAN"],
[["BOOLEAN", "|", "BOOLEAN"], "BOOLEAN"],
[["(", "BOOLEAN", ")"], "BOOLEAN"],
];
let IGNORE = true;
let tokenDefinitions = [
[/\s+/, "", IGNORE], // ignore whitespace
[/&&/, "&"],
[/AND/i, "&"],
[/\|\|/, "|"], // this is the escaped form of ||
[/XOR/i, "^"],
[/OR/i, "|"],
[/\^/, "^"], // this is the escaped form of ^
[/\!/, "!"], // this is the escaped form of !
[/NOT/i, "!"],
[/\(/, "("],
[/\)/, ")"],
[/(true)(?![a-zA-Z0-9])/i, "TRUE"],
[/(false)(?![a-zA-Z0-9])/i, "FALSE"],
[/[a-zA-Z]+/, "IDENT"],
[/.+/, "DIRTYTEXT"],
];
makeEvaluatorAndInitialize(
new Boolius(tokenDefinitions, grammarObject),
"((d && c)) || (!b && a) && (!d || !a) && (!c || !b)",
"Click operators to expand or collapse. Click leaf nodes to toggle true/false."
);
}
} else if (newMode.indexOf("xml") > -1) {
// the user wants to look at boolean expressions.
// is boolius already loaded?
if (!evaluator || !(evaluator instanceof XMLius)) {
let grammarObject = [
[["OPENCOMMENT", "WILDCARD", "CLOSECOMMENT"], "COMMENT"],
// comments will be engulfed by the text of a node
// and ignored when the node is asked for its text as a string
[["COMMENT"], "#TEXT_NODE"],
[["<", "/", "IDENT", ">"], "CLOSETAG"],
[["<", "IDENT", ">"], "OPENTAG"],
[["<", "IDENT", "/", ">"], "XMLNODE"],
[["<", "IDENT", "IDENT", "=", '"', "WILDCARD", '"'], "OPENTAGSTART"],
/* Some recursive self-nesting here */
[
["OPENTAGSTART", "IDENT", "=", '"', "WILDCARD", '"'],
"OPENTAGSTART",
],
[["OPENTAGSTART", ">"], "OPENTAG"],
// can't have two identifiers in a row, unless we're between an opening and closing tag
// a/k/a node.text
[["IDENT", "IDENT"], "#TEXT_NODE"],
[["IDENT", "#TEXT_NODE"], "#TEXT_NODE"],
[["#TEXT_NODE", "#TEXT_NODE"], "#TEXT_NODE"],
// let's also have nested nodes engulfed in the NODETEXT
[["XMLNODE", "#TEXT_NODE"], "#TEXT_NODE"],
[["XMLNODES", "#TEXT_NODE"], "#TEXT_NODE"],
[["#TEXT_NODE", "XMLNODE"], "#TEXT_NODE"],
[["#TEXT_NODE", "XMLNODES"], "#TEXT_NODE"],
[["OPENTAG", "CLOSETAG"], "XMLNODE"],
[["OPENTAG", "#TEXT_NODE", "CLOSETAG"], "XMLNODE"],
[["OPENTAG", "XMLNODE", "CLOSETAG"], "XMLNODE"],
[["XMLNODE", "XMLNODE"], "XMLNODES"],
[["OPENTAG", "XMLNODES", "CLOSETAG"], "XMLNODE"],
];
let IGNORE = true;
let tokenDefinitions = [
[/\s+/, "", IGNORE],
[/<!--/, "OPENCOMMENT"],
[/-->/, "CLOSECOMMENT"],
[/\//, "/"],
[/>/, ">"],
[/</, "<"],
[/=/, "="],
[/"/, '"'],
[/'/, '"'],
[/[-+]?[0-9]*\.?[0-9]+/, "NUM_LIT"],
[/[a-zA-Z]+[a-zA-Z0-9-]*/, "IDENT"],
// having trapped all these things, what's left is nodetext
[/[^<]+/, "#TEXT_NODE"],
];
makeEvaluatorAndInitialize(
new XMLius(tokenDefinitions, grammarObject),
`<div class="hintwrapper"><div class="hint">Click operators to expand or collapse. Click leaf nodes to toggle true/false.</div><div class="styled-select green semi-square" style="bold"></div></div>`,
"Mouseover nodes to see attributes. Click nodetext to see content."
);
}
}
}
function makeEvaluatorAndInitialize(newEvaluator, statement, hintText) {
assignEvaluator(newEvaluator);
d3.select("#statement").node().value = statement;
d3.select("div.hint").text(hintText);
evaluateStatement();
}
function assignEvaluator(newEvaluator) {
// don't change if the user wants what they already have
if (evaluator && newEvaluator.constructor === evaluator.constructor) return;
evaluator = newEvaluator;
}
var evaluator;
var winWidth = Math.max(1000, window.innerWidth);
let header = document.querySelector("header")[0];
var winHeight = Math.max(500, window.innerHeight - 240);
var winWidth = Math.max(800, window.innerWidth);
var m = [0, 120, 140, 120],
w = winWidth - m[1] - m[3],
h = winHeight - m[0] - m[2],
i = 0,
root;
var tree = d3.layout.tree().size([h, w]);
var diagonal = d3.svg.diagonal().projection(function (d) {
return [d.y, d.x];
});
var vis = d3
.select("#body")
.append("svg:svg")
.attr("width", w + m[1] + m[3])
.attr("height", h + m[0] + m[2])
.append("svg:g")
.attr("transform", "translate(" + m[3] + "," + m[0] + ")");
vis
.append("text")
.attr("opacity", 1)
.attr("y", 246)
.attr("dy", "1.71em")
.style("font-size", "34px")
.style("text-anchor", "end")
.attr("id", "result")
.text("");
d3.select("#testbutton").on("click", function (e) {
evaluateStatement();
});
d3.select("#statement").on("keyup", function () {
if (d3.event.keyCode == 13) {
d3.select("#testbutton").on("click")();
}
});
var parseTree;
function evaluateStatement() {
var statement = d3.select("#statement").node().value;
parseTree = evaluator.parse(statement);
displayJSON(parseTree);
}
function displayJSON(json) {
if (json == null) return;
root = json;
root.x0 = h / 2;
root.y0 = 0;
//d3.select("#statement").val( root.title );
d3.select("#statement").property("value", root.expressionString);
d3.select("#result").text(root.value);
function toggleAll(d, delay) {
if (!delay) delay = 1;
if (d.children) {
toggle(d);
}
if (d._children) {
toggle(d);
}
}
// Initialize the display to show all nodes.
root.children.forEach(toggleAll, 444);
update(root);
}
// Toggle children.
function toggle(d, showOverlay) {
if (d == undefined) return;
//boolean
if (d.value === true || d.value === false) {
if (d.children) {
// hide the children by moving them into _children
d._children = d.children;
d.children = null;
} else {
// bring back the hidden children
d.children = d._children;
d._children = null;
}
var hasNoChildren = !d.children && !d._children;
if (!hasNoChildren) {
// has an array in d.children or d._children
// but it might be empty!
if (d.children && d.children.length == 0) hasNoChildren = true;
if (d._children && d._children.length == 0) hasNoChildren = true;
}
if (hasNoChildren) {
// it's a leaf
// toggle true/false
if (d.value === true || d.value === false) {
d.value = !d.value;
//var myInt = parseInt( d.name );
//conditionTruthValues[ myInt ] = d.value;
var myVar = d.name;
evaluator.state[myVar] = d.value;
updateWithoutDeleting(root);
}
}
} // you clicked something that isn't in a boolean flow
else {
if (showOverlay) {
var attributeText = d.attributes
? JSON.stringify(d.attributes)
: "None";
if (!d.children && !d._children) {
// it's a leaf
//showValueOverlay( d.value );
showValueOverlay(
"Attributes: " + attributeText + "</br>Content: " + d.value
);
} //oops, we wanted to collapse this thing
else {
//showValueOverlay( "Attributes: " + attributeText + "</br>Content: " + d.value );
if (d.children) {
// hide the children by moving them into _children
d._children = d.children;
d.children = null;
} else {
// bring back the hidden children
d.children = d._children;
d._children = null;
}
}
}
}
}
function showValueOverlay(val) {
$("#valueModalText").html(val);
$("#valueModal").modal("show");
}
function updateWithoutDeleting() {
parseTree = evaluator.evaluateParseTree();
updateObjectAndItsChildren(parseTree, root);
d3.select("#result").text(root.value);
}
function updateObjectAndItsChildren(newObjectTemp, rootTemp) {
rootTemp.value = newObjectTemp.value;
if (!newObjectTemp.children) return;
for (var i = 0; i < newObjectTemp.children.length; i++) {
if (rootTemp.children) {
updateObjectAndItsChildren(
newObjectTemp.children[i],
rootTemp.children[i]
);
} else {
if (rootTemp._children) {
updateObjectAndItsChildren(
newObjectTemp.children[i],
rootTemp._children[i]
);
}
}
}
}
function update(source) {
var duration = d3.event && d3.event.altKey ? 5000 : 500;
// Compute the new tree layout.
var nodes = tree.nodes(root).reverse();
// Normalize for fixed-depth.
// OK -- why is d.y correlated with the horizontal position here???
widthPerNode = 110;
var body = d3.select("body");
var svg = body.select("svg");
var widthInPixels = svg.style("width").replace("px", "");
widthInPixels = parseInt(widthInPixels);
var widthPerNode = widthInPixels / nodes.length;
nodes.forEach(function (d) {
d.y = d.depth * widthPerNode;
});
d3.select("#result")
.transition()
.duration(duration)
.attr("x", nodes[nodes.length - 1].y - 40)
.attr("y", function (d) {
return nodes[nodes.length - 1].x - 48;
});
// Update the nodes…
var node = vis.selectAll("g.node").data(nodes, function (d) {
return d.id || (d.id = ++i);
});
var modalOverlayTimeout;
// Enter any new nodes at the parent's previous position.
var nodeEnter = node
.enter()
.append("svg:g")
.attr("class", "node")
.attr("transform", function (d) {
return "translate(" + source.y0 + "," + source.x0 + ")";
})
.on("click", function (d) {
if (modalOverlayTimeout != null) clearTimeout(modalOverlayTimeout);
toggle(d, true);
update(d);
})
.on("mouseover", function (d) {
var attributeText = d.attributes ? JSON.stringify(d.attributes) : "";
if (attributeText.length > 0) {
if (modalOverlayTimeout != null) clearTimeout(modalOverlayTimeout);
modalOverlayTimeout = setTimeout(() => {
showValueOverlay(
"Attributes: " + attributeText + "</br>Content: " + d.value
);
}, 800);
}
});
nodeEnter
.append("svg:circle")
.attr("r", 1e-6)
.style("stroke", function (d) {
return d.value ? "green" : "red";
})
.style("fill", function (d) {
return d._children ? "grey" : "#fff";
});
nodeEnter
.append("svg:text")
.attr("x", function (d) {
return d.children || d._children ? -1 : 17;
})
.attr("y", function (d) {
return d.children || d._children ? 18 : -1;
})
.attr("dy", ".35em")
.attr("text-anchor", function (d) {
return d.children || d._children ? "middle" : "left";
})
// .attr("text-anchor", function(d) { return d.children || d._children ? "end" : "start"; })
.text(function (d) {
return d.name;
})
.style("fill-opacity", 1e-6);
// Transition nodes to their new position.
var nodeUpdate = node
.transition()
.duration(duration)
.style("stroke", function (d) {
return d.value ? "green" : "red";
})
.attr("transform", function (d) {
return "translate(" + d.y + "," + d.x + ")";
});
nodeUpdate
.select("circle")
.attr("r", 8.5)
.style("stroke", function (d) {
return d.value ? "green" : "red";
})
.style("fill", function (d) {
return d._children ? "lightsteelblue" : "#fff";
});
nodeUpdate.select("text").style("fill-opacity", 1);
// Transition exiting nodes to the parent's new position.
var nodeExit = node
.exit()
.transition()
.duration(duration)
.attr("transform", function (d) {
return "translate(" + source.y + "," + source.x + ")";
})
.remove();
nodeExit.select("circle").attr("r", 1e-6);
nodeExit.select("text").style("fill-opacity", 1e-6);
// Update the links…
var link = vis.selectAll("path.link").data(tree.links(nodes), function (d) {
return d.target.id;
});
// Enter any new links at the parent's previous position.
link
.enter()
.insert("svg:path", "g")
.attr("class", "link")
.attr("d", function (d) {
var o = { x: source.x0, y: source.y0 };
return diagonal({ source: o, target: o });
})
.transition()
.duration(duration)
.attr("d", diagonal);
// Transition links to their new position.
link.transition().duration(duration).attr("d", diagonal);
// Transition exiting nodes to the parent's new position.
link
.exit()
.transition()
.duration(duration)
.attr("d", function (d) {
var o = { x: source.x, y: source.y };
return diagonal({ source: o, target: o });
})
.remove();
// Stash the old positions for transition.
nodes.forEach(function (d) {
d.x0 = d.x;
d.y0 = d.y;
});
}
changeMode("boolean");
evaluateStatement();
};
|
var ErrorHandler = require('./error').errorHandler;
module.exports = exports = function(app) {
// The main page of the blog
app.get('/', function(req, res, next){
return res.render('index', {
title: 'Editor homepage'
});
});
/* The main page of the blog, filtered by tag
app.get('/tag/:tag', contentHandler.displayMainPageByTag);
app.get("/post/:permalink", contentHandler.displayPostByPermalink);
app.post('/newcomment', contentHandler.handleNewComment);
app.get("/post_not_found", contentHandler.displayPostNotFound);
app.get('/newpost', contentHandler.displayNewPostPage);
app.post('/newpost', contentHandler.handleNewPost);
app.get('/login', sessionHandler.displayLoginPage);
app.post('/login', sessionHandler.handleLoginRequest);
app.get('/logout', sessionHandler.displayLogoutPage);
app.get("/welcome", sessionHandler.displayWelcomePage);
app.get('/signup', sessionHandler.displaySignupPage);
app.post('/signup', sessionHandler.handleSignup);
app.use(ErrorHandler);
*/
}
|
var Transform = require('stream').Transform,
util = require('util');
var StreamConcat = function(streams, options) {
Transform.call(this, options);
var self = this;
this.streams = streams;
this.canAddStream = true;
this.currentStream = null;
this.streamIndex = 0;
var nextStream = function() {
self.currentStream = null;
if (self.streams.constructor === Array && self.streamIndex < self.streams.length) {
self.currentStream = self.streams[self.streamIndex++];
} else if (typeof self.streams === 'function') {
this.canAddStream = false;
self.currentStream = self.streams();
}
if (self.currentStream === null) {
this.canAddStream = false;
self.push(null);
} else {
self.currentStream.pipe(self, {end: false});
self.currentStream.on('end', nextStream);
}
};
nextStream();
};
util.inherits(StreamConcat, Transform);
StreamConcat.prototype._transform = function(chunk, encoding, callback) {
callback(null, chunk);
};
StreamConcat.prototype.addStream = function(newStream) {
if (this.canAddStream)
this.streams.push(newStream);
else
this.emit('error', new Error('Can\'t add stream.'));
};
module.exports = StreamConcat; |
'use strict';
angular.module('home', ['ngMessages'])
.controller('homeCtrl', [function() {
}]); |
/**
* @author 도플광어
-버전 0.13
Box2d 추가
*
* 버전 0.12
* matrix 추가
* box2d 추가
*
*/
this.gbox3d = {
core : {}
};
///
//수학 함수관련 선언
///
gbox3d.core.PI = 3.14159265359;
gbox3d.core.RECIPROCAL_PI = 1 / 3.14159265359;
gbox3d.core.HALF_PI = 3.14159265359 / 2;
gbox3d.core.PI64 = 3.141592653589793;
gbox3d.core.DEGTORAD = 3.14159265359 / 180;
gbox3d.core.RADTODEG = 180 / 3.14159265359;
gbox3d.core.TOLERANCE = 1e-8;
gbox3d.core.radToDeg = function(a) {
return a * gbox3d.core.RADTODEG
};
gbox3d.core.degToRad = function(a) {
return a * gbox3d.core.DEGTORAD
};
gbox3d.core.iszero = function(b) {
return (b < 1e-8) && (b > -1e-8)
};
gbox3d.core.isone = function(b) {
return (b + 1e-8 >= 1) && (b - 1e-8 <= 1)
};
gbox3d.core.equals = function(d, c) {
return (d + 1e-8 >= c) && (d - 1e-8 <= c)
};
gbox3d.core.clamp = function(c, a, b) {
if (c < a) {
return a
}
if (c > b) {
return b
}
return c
};
//일정 범위의 랜덤 값 만들기
gbox3d.core.randomIntFromTo = function (from, to){
return Math.floor(Math.random() * (to - from + 1) + from);
}
gbox3d.core.randomFloatFromTo = function(from, to){
return Math.random() * (to - from + 1) + from;
}
gbox3d.core.fract = function(a) {
return a - Math.floor(a)
};
gbox3d.core.max3 = function(e, d, f) {
if (e > d) {
if (e > f) {
return e
}
return f
}
if (d > f) {
return d
}
return f
};
gbox3d.core.min3 = function(e, d, f) {
if (e < d) {
if (e < f) {
return e
}
return f
}
if (d < f) {
return d
}
return f
};
gbox3d.core.round = function(num, valid) {
v = Math.pow(10, valid);
return Math.round(num * v) / v;
}
gbox3d.core.epsilon = function ( value ) {
return Math.abs( value ) < 0.000001 ? 0 : value;
};
gbox3d.core.getAlpha = function(a) {
return ((a & 4278190080) >>> 24)
};
gbox3d.core.getRed = function(a) {
return ((a & 16711680) >> 16)
};
gbox3d.core.getGreen = function(a) {
return ((a & 65280) >> 8)
};
gbox3d.core.getBlue = function(a) {
return ((a & 255))
};
gbox3d.core.createColor = function(d, f, e, c) {
d = d & 255;
f = f & 255;
e = e & 255;
c = c & 255;
return (d << 24) | (f << 16) | (e << 8) | c
};
gbox3d.core.ColorF = function() {
this.A = 1;
this.R = 1;
this.G = 1;
this.B = 1
};
gbox3d.core.ColorF.prototype.clone = function() {
var a = new gbox3d.core.Light();
a.A = this.A;
a.R = this.R;
a.G = this.G;
a.B = this.B;
return a
};
gbox3d.core.ColorF.prototype.A = 1;
gbox3d.core.ColorF.prototype.R = 1;
gbox3d.core.ColorF.prototype.G = 1;
gbox3d.core.ColorF.prototype.B = 1;
//타이머 객체
//gbox3d.core.CLTimer = function() {
//
//};
//
//gbox3d.core.CLTimer.getTime = function() {
// var a = new Date();
// return a.getTime()
//};
gbox3d.core.Timer = function() {
this.prevTime = (new Date()).getTime();
};
gbox3d.core.Timer.prototype.getTime = function() {
var a = new Date();
return a.getTime()
};
gbox3d.core.Timer.prototype.getDeltaTime = function() {
var current = this.getTime();
var delta = current - this.prevTime;
this.prevTime = current;
return delta/1000.0;
}
gbox3d.core.Timer.prototype.getDeltaTick = function() {
var current = this.getTime();
var delta = current - this.prevTime;
this.prevTime = current;
return delta;
}
// Vect3D (3D 벡터 )
gbox3d.core.Vect3d = function(a, c, b) {
if (a == null) {
this.X = 0;
this.Y = 0;
this.Z = 0
} else {
this.X = a;
this.Y = c;
this.Z = b
}
};
gbox3d.core.Vect3d.prototype.X = 0;
gbox3d.core.Vect3d.prototype.Y = 0;
gbox3d.core.Vect3d.prototype.Z = 0;
gbox3d.core.Vect3d.prototype.set = function(a, c, b) {
this.X = a;
this.Y = c;
this.Z = b
};
gbox3d.core.Vect3d.prototype.clone = function() {
return new gbox3d.core.Vect3d(this.X, this.Y, this.Z)
};
gbox3d.core.Vect3d.prototype.copyTo = function(a) {
a.X = this.X;
a.Y = this.Y;
a.Z = this.Z
};
gbox3d.core.Vect3d.prototype.setTo = function(a) {
this.X = a.X;
this.Y = a.Y;
this.Z = a.Z;
return this
};
gbox3d.core.Vect3d.prototype.substract = function(a) {
return new gbox3d.core.Vect3d(this.X - a.X, this.Y - a.Y, this.Z - a.Z)
};
gbox3d.core.Vect3d.prototype.substractFromThis = function(a) {
this.X -= a.X;
this.Y -= a.Y;
this.Z -= a.Z
};
gbox3d.core.Vect3d.prototype.add = function(a) {
return new gbox3d.core.Vect3d(this.X + a.X, this.Y + a.Y, this.Z + a.Z)
};
gbox3d.core.Vect3d.prototype.addToThis = function(a) {
this.X += a.X;
this.Y += a.Y;
this.Z += a.Z
};
gbox3d.core.Vect3d.prototype.addToThisReturnMe = function(a) {
this.X += a.X;
this.Y += a.Y;
this.Z += a.Z;
return this
};
gbox3d.core.Vect3d.prototype.normalize = function() {
var a = this.X * this.X + this.Y * this.Y + this.Z * this.Z;
if (a > -1e-7 && a < 1e-7) {
return
}
a = 1 / Math.sqrt(a);
this.X *= a;
this.Y *= a;
this.Z *= a;
return this;
};
gbox3d.core.Vect3d.prototype.getNormalized = function() {
var a = this.X * this.X + this.Y * this.Y + this.Z * this.Z;
if (a > -1e-7 && a < 1e-7) {
return new gbox3d.core.Vect3d(0, 0, 0)
}
a = 1 / Math.sqrt(a);
return new gbox3d.core.Vect3d(this.X * a, this.Y * a, this.Z * a)
};
gbox3d.core.Vect3d.prototype.setLength = function(b) {
var a = this.X * this.X + this.Y * this.Y + this.Z * this.Z;
if (a > -1e-7 && a < 1e-7) {
return
}
a = b / Math.sqrt(a);
this.X *= a;
this.Y *= a;
this.Z *= a
};
gbox3d.core.Vect3d.prototype.equals = function(a) {
return gbox3d.core.equals(this.X, a.X) && gbox3d.core.equals(this.Y, a.Y) && gbox3d.core.equals(this.Z, a.Z)
};
gbox3d.core.Vect3d.prototype.equalsZero = function() {
return gbox3d.core.iszero(this.X) && gbox3d.core.iszero(this.Y) && gbox3d.core.iszero(this.Z)
};
gbox3d.core.Vect3d.prototype.equalsByNumbers = function(a, c, b) {
return gbox3d.core.equals(this.X, a) && gbox3d.core.equals(this.Y, c) && gbox3d.core.equals(this.Z, b)
};
gbox3d.core.Vect3d.prototype.isZero = function() {
return this.X == 0 && this.Y == 0 && this.Z == 0
};
gbox3d.core.Vect3d.prototype.getLength = function() {
return Math.sqrt(this.X * this.X + this.Y * this.Y + this.Z * this.Z)
};
gbox3d.core.Vect3d.prototype.getDistanceTo = function(b) {
var a = b.X - this.X;
var d = b.Y - this.Y;
var c = b.Z - this.Z;
return Math.sqrt(a * a + d * d + c * c)
};
gbox3d.core.Vect3d.prototype.getDistanceFromSQ = function(b) {
var a = b.X - this.X;
var d = b.Y - this.Y;
var c = b.Z - this.Z;
return a * a + d * d + c * c
};
gbox3d.core.Vect3d.prototype.getLengthSQ = function() {
return this.X * this.X + this.Y * this.Y + this.Z * this.Z
};
gbox3d.core.Vect3d.prototype.multiplyWithScal = function(a) {
return new gbox3d.core.Vect3d(this.X * a, this.Y * a, this.Z * a)
};
gbox3d.core.Vect3d.prototype.multiplyThisWithScal = function(a) {
this.X *= a;
this.Y *= a;
this.Z *= a
};
gbox3d.core.Vect3d.prototype.multiplyThisWithScalReturnMe = function(a) {
this.X *= a;
this.Y *= a;
this.Z *= a;
return this
};
gbox3d.core.Vect3d.prototype.multiplyThisWithVect = function(a) {
this.X *= a.X;
this.Y *= a.Y;
this.Z *= a.Z
};
gbox3d.core.Vect3d.prototype.multiplyWithVect = function(a) {
return new gbox3d.core.Vect3d(this.X * a.X, this.Y * a.Y, this.Z * a.Z)
};
gbox3d.core.Vect3d.prototype.divideThisThroughVect = function(a) {
this.X /= a.X;
this.Y /= a.Y;
this.Z /= a.Z
};
gbox3d.core.Vect3d.prototype.divideThroughVect = function(a) {
return new gbox3d.core.Vect3d(this.X / a.X, this.Y / a.Y, this.Z / a.Z)
};
gbox3d.core.Vect3d.prototype.crossProduct = function(a) {
return new gbox3d.core.Vect3d(this.Y * a.Z - this.Z * a.Y, this.Z * a.X - this.X * a.Z, this.X * a.Y - this.Y * a.X)
};
gbox3d.core.Vect3d.prototype.dotProduct = function(a) {
return this.X * a.X + this.Y * a.Y + this.Z * a.Z;
};
//(0,0,1)을 기준으로 각도를 구한다
gbox3d.core.Vect3d.prototype.getHorizontalAngle = function() {
var b = new gbox3d.core.Vect3d();
b.Y = gbox3d.core.radToDeg(Math.atan2(this.X, this.Z));
if (b.Y < 0) {
b.Y += 360
}
if (b.Y >= 360) {
b.Y -= 360
}
var a = Math.sqrt(this.X * this.X + this.Z * this.Z);
b.X = gbox3d.core.radToDeg(Math.atan2(a, this.Y)) - 90;
if (b.X < 0) {
b.X += 360
}
if (b.X >= 360) {
b.X -= 360
}
return b;
};
gbox3d.core.Vect3d.prototype.toString = function() {
return "(x: " + this.X + " y:" + this.Y + " z:" + this.Z + ")";
};
///////////////////////////////////////////////////////////
//벡터 2D
gbox3d.core.Vect2d = function(a, b) {
if (a == null) {
this.X = 0;
this.Y = 0
} else {
if (a.x != null) {
this.X = a.x;
this.Y = a.y;
} else if (a.X != null) {
this.X = a.X;
this.Y = a.Y;
} else {
this.X = a;
this.Y = b;
}
}
};
gbox3d.core.Vect2d.prototype.X = 0;
gbox3d.core.Vect2d.prototype.Y = 0;
gbox3d.core.Vect2d.prototype.rotate = function(angle, center) {
var cs = Math.cos(angle);
var sn = Math.sin(angle);
var x, y;
if (center == undefined) {
center = new gbox3d.core.Vect2d(0, 0);
}
this.X -= center.X;
this.Y -= center.Y;
this.set((this.X * cs - this.Y * sn), -(this.X * sn + this.Y * cs));
this.X += center.X;
this.Y += center.Y;
}
gbox3d.core.Vect2d.prototype.translate = function( param ) {
this.X += param.X;
this.Y += param.Y;
return this;
}
gbox3d.core.Vect2d.prototype.multiply = function(mult) {
this.X *= mult;
this.Y *= mult;
return this;
}
gbox3d.core.Vect2d.prototype.add = function(a) {
return new gbox3d.core.Vect2d(this.X + a.X, this.Y + a.Y);
};
gbox3d.core.Vect2d.prototype.addToThis = function(a) {
this.X += a.X;
this.Y += a.Y;
return this;
}
gbox3d.core.Vect2d.prototype.sub = function(a,b) {
if(!b) {
return new gbox3d.core.Vect2d(this.X - a.X, this.Y - a.Y);
}
else
return new gbox3d.core.Vect2d(this.X - a, this.Y - b);
};
gbox3d.core.Vect2d.prototype.subToThis = function(a) {
this.X -= a.X;
this.Y -= a.Y;
return this;
}
gbox3d.core.Vect2d.prototype.getDistance = function() {
return Math.sqrt(this.X * this.X + this.Y * this.Y);
}
gbox3d.core.Vect2d.prototype.normalize = function() {
dist = this.getDistance();
// Math.sqrt(this.X * this.X + this.Y * this.Y);
this.X /= dist;
this.Y /= dist;
return this;
}
gbox3d.core.Vect2d.prototype.set = function(x, y) {
this.X = x;
this.Y = y;
return this;
}
gbox3d.core.Vect2d.prototype.copy = function(a) {
this.X = a.X;
this.Y = a.Y;
return this;
}
gbox3d.core.Vect2d.prototype.set_point = function(a) {
this.X = a.x;
this.Y = a.y;
return this;
}
gbox3d.core.Vect2d.prototype.clone = function() {
return new gbox3d.core.Vect2d(this.X, this.Y);
}
gbox3d.core.Vect2d.prototype.getAngle = function() {
var X = this.X;
var Y = this.Y;
if (Y == 0)// corrected thanks to a suggestion by Jox
return X < 0 ? 180 : 0;
else if (X == 0)
return Y < 0 ? 90 : 270;
// don't use getLength here to avoid precision loss with s32 vectors
var tmp = Y / Math.sqrt((X * X + Y * Y));
tmp = Math.atan(Math.sqrt(1 - tmp * tmp) / tmp) * gbox3d.core.RADTODEG;
if (X > 0 && Y > 0)
return tmp + 270;
else if (X > 0 && Y < 0)
return tmp + 90;
else if (X < 0 && Y < 0)
return 90 - tmp;
else if (X < 0 && Y > 0)
return 270 - tmp;
return tmp;
}
gbox3d.core.Vect2d.prototype.getDistanceTo = function(b) {
var a = b.X - this.X;
var d = b.Y - this.Y;
return Math.sqrt(a * a + d * d);
}
gbox3d.core.Vect2d.prototype.formSVG = function(svgElement) {
switch(svgElement.tagName)
{
case 'circle':
case 'ellipse':
this.X = parseInt(svgElement.getAttribute('cx'));
this.Y = parseInt(svgElement.getAttribute('cy'));
break;
case 'rect':
this.X = parseInt(svgElement.getAttribute('x'));
this.Y = parseInt(svgElement.getAttribute('y'));
break;
}
}
gbox3d.core.Vect2d.prototype.toSVG = function(svgElement) {
switch(svgElement.tagName)
{
case 'circle':
case 'ellipse':
svgElement.setAttribute('cx',this.X);
svgElement.setAttribute('cy',this.Y);
break;
case 'rect':
svgElement.setAttribute('x',this.X);
svgElement.setAttribute('y',this.Y);
break;
}
}
gbox3d.core.Vect2d.prototype.InPolygon = function(points) {
var length = points.length;
var counter = 0;
var x_inter;
var p1 = points[0];
for ( var i = 1; i <= length; i++ ) {
var p2 = points[i%length];
if ( this.Y > Math.min(p1.Y, p2.Y)) {
if ( this.Y <= Math.max(p1.Y, p2.Y)) {
if ( this.X <= Math.max(p1.X, p2.X)) {
if ( p1.Y != p2.y ) {
x_inter = (this.Y - p1.Y) * (p2.X - p1.X) / (p2.Y - p1.Y) + p1.X;
//console.log(x_inter);
if ( p1.X == p2.X || this.X <= x_inter) {
counter++;
}
}
}
}
}
p1 = p2;
}
/*
var p1 = this.handles[0].point;
for ( var i = 1; i <= length; i++ ) {
var p2 = this.handles[i%length].point;
if ( point.y > Math.min(p1.y, p2.y)) {
if ( point.y <= Math.max(p1.y, p2.y)) {
if ( point.x <= Math.max(p1.x, p2.x)) {
if ( p1.y != p2.y ) {
x_inter = (point.y - p1.y) * (p2.x - p1.x) / (p2.y - p1.y) + p1.x;
if ( p1.x == p2.x || point.x <= x_inter) {
counter++;
}
}
}
}
}
p1 = p2;
}
*/
return ( counter % 2 == 1 );
};
gbox3d.core.Vect2d.prototype.toString = function() {
return '{"X" :' + this.X + ',"Y":' + this.Y + '}';
}
///////////////////////////////////////////////////////////
//box 2D
gbox3d.core.Box2d = function(param) {
//param = param || {topleft:new,bottomright:0};
if(param) {
this.topLeft = param.topleft;
this.bottomRight = param.bottomright;
}
};
gbox3d.core.Box2d.prototype.ptInBox = function(x,y) {
if(this.topLeft.X < x && this.bottomRight.X > x ) {
if(this.topLeft.Y < y && this.bottomRight.Y > y ) {
return true;
}
}
return false;
}
//DOM 앨리먼트의 충돌 사각형 영역 얻기
gbox3d.core.Box2d.prototype.getCollisionArea = function (node) {
var width = parseInt( node.css('width').slice(0,-2));
var height = parseInt (node.css('height').slice(0,-2));
//console.log(node.css('-webkit-transform'));
var sx,sy
var strmat = node.css('-webkit-transform');
if(strmat == 'none') {
sx = 0;
sy = 0;
}
else {
strmat = strmat.slice(0,-1);
strmat = strmat.slice(7,strmat.length);
var temp = strmat.split(',');
sx = parseInt( temp[4]);
sy = parseInt( temp[5] );
//console.log(strmat);
}
this.topLeft = new gbox3d.core.Vect2d(sx,sy);
this.bottomRight = new gbox3d.core.Vect2d(sx+width,sy+height);
// return new gbox3d.core.Box2d({
//
// topleft : new gbox3d.core.Vect2d(sx,sy),
// bottomright: new gbox3d.core.Vect2d(sx+width,sy+height)
//
// });
};
///////////////matrix2d
///
/*
var computedStyle = window.getComputedStyle(element);
var css_transform = computedStyle.getPropertyValue('-webkit-transform');
*/
gbox3d.core.matrix2d = function(css_transform) {
if(css_transform) {
this.matrix = new WebKitCSSMatrix(css_transform);
}
else {
this.matrix = new WebKitCSSMatrix();
}
};
gbox3d.core.matrix2d.prototype.setupFromElement = function(element)
{
var computedStyle = window.getComputedStyle(element);
var css_transform = computedStyle.getPropertyValue('-webkit-transform');
this.matrix = new WebKitCSSMatrix(css_transform);
}
gbox3d.core.matrix2d.prototype.translate = function(x,y) {
this.matrix = this.matrix.translate(x,y);
};
gbox3d.core.matrix2d.prototype.rotate = function(angle) {
this.matrix = this.matrix.rotate(angle);
};
gbox3d.core.matrix2d.prototype.scale = function(x,y) {
this.matrix = this.matrix.scale(x,y);
};
//행렬 분해
gbox3d.core.matrix2d.prototype.decompose = function() {
var cssmat = this.matrix;
//이동변환 얻기
var x = cssmat.e;
var y = cssmat.f;
//스케일 얻기
var scalex = Math.sqrt(cssmat.a*cssmat.a + cssmat.b*cssmat.b);
var scaley = Math.sqrt(cssmat.c*cssmat.c + cssmat.d*cssmat.d);
//회전 얻기
var angle = Math.round(Math.atan2(cssmat.b/scalex, cssmat.a/scalex) * (180/Math.PI));
return {
x: x,
y: y,
scalex : scalex,
scaley : scaley,
angle:angle
}
}
gbox3d.core.matrix2d.prototype.compose = function(param) {
this.matrix = new WebKitCSSMatrix();
if(param.translation) {
this.matrix = this.matrix.translate(param.translation.x,param.translation.y);
}
if(param.angle)
this.matrix = this.matrix.rotate(param.angle);
if(param.scale)
this.matrix = this.matrix.scale(param.scale.x,param.scale.y);
}
gbox3d.core.matrix2d.prototype.setTranslation = function(x,y) {
//this.matrix = this.matrix = new WebKitCSSMatrix();
this.matrix.e = x;
this.matrix.f = y;
};
/*
gbox3d.core.matrix2d.prototype.setRotation = function(angle) {
//단위행렬로 재초기화
//this.matrix = this.matrix = new WebKitCSSMatrix();
this.matrix = this.matrix.rotate(angle);
};
gbox3d.core.matrix2d.prototype.setScale = function(x,y) {
//this.matrix = this.matrix = new WebKitCSSMatrix();
this.matrix = this.matrix.scale(x,y);
};
*/
gbox3d.core.matrix2d.prototype.toString = function() {
return this.matrix.toString();
};
/////////////////////////
//애니미에션 프레임 초기화
//타이머 보단 좀 나은듯?
(function() {
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame
|| function(callback) {
//60 fps.
window.setTimeout(callback, 1000 / 60);
};
window.requestAnimationFrame = requestAnimationFrame;
})();
///////System 관련 모듈////
/////////////////////////
gbox3d.system = {
//코루틴 관리자.(지연 실행 관리자, 지연후 특정 타이밍 호출할필요가 있을때 사용한다.)
CoroutineManger : function(param) {
this.Callbacks = new Array();
this.Apply = function(deltatime) {
while(this.Callbacks.length > 0) {
var callback = this.Callbacks.pop();
callback({
deltaTime : deltatime
});
}
}
this.yield = function(coroutin) {
this.Callbacks.push(coroutin);
}
}
};
///////helper 모듈////
/////////////////////////
gbox3d.helper = {
css : {
getElementWidth : function(element) {
return parseInt(element.style.width.slice(0,-2));
},
getElementHeight : function(element) {
return parseInt(element.style.height.slice(0,-2));
}
}
}
|
/*! glimpse 08-03-2014 */
function Glimpse(a){if(!(this instanceof Glimpse))return new Glimpse(a);"undefined"==typeof a&&(a=window);var b=this;return b.domEl="string"==typeof a?document.getElementById(a):a,b.lastFocused=void 0,b.lastBlurred=void 0,b.lastChanged=void 0,b.blurredCallback=void 0,b.focusedCallback=void 0,function(){b.domEl.onfocus=function(a){b.lastFocused=+new Date,b.lastChanged=b.lastFocused-b.lastBlurred,"function"==typeof b.focusedCallback&&b.focusedCallback.call(b,a)},b.domEl.onblur=function(a){b.lastBlurred=+new Date,b.lastChanged=b.lastBlurred-b.lastFocused,"function"==typeof b.blurredCallback&&b.blurredCallback.call(b,a)}}(),b}Glimpse.prototype.blurred=function(a){return"function"==typeof a&&(this.blurredCallback=a),this},Glimpse.prototype.focused=function(a){return"function"==typeof a&&(this.focusedCallback=a),this}; |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.10.1-rc2-master-7bbfd1f
*/
goog.provide('ng.material.components.radioButton');
goog.require('ng.material.core');
/**
* @ngdoc module
* @name material.components.radioButton
* @description radioButton module!
*/
angular.module('material.components.radioButton', [
'material.core'
])
.directive('mdRadioGroup', mdRadioGroupDirective)
.directive('mdRadioButton', mdRadioButtonDirective);
/**
* @ngdoc directive
* @module material.components.radioButton
* @name mdRadioGroup
*
* @restrict E
*
* @description
* The `<md-radio-group>` directive identifies a grouping
* container for the 1..n grouped radio buttons; specified using nested
* `<md-radio-button>` tags.
*
* As per the [material design spec](http://www.google.com/design/spec/style/color.html#color-ui-color-application)
* the radio button is in the accent color by default. The primary color palette may be used with
* the `md-primary` class.
*
* Note: `<md-radio-group>` and `<md-radio-button>` handle tabindex differently
* than the native `<input type='radio'>` controls. Whereas the native controls
* force the user to tab through all the radio buttons, `<md-radio-group>`
* is focusable, and by default the `<md-radio-button>`s are not.
*
* @param {string} ng-model Assignable angular expression to data-bind to.
* @param {boolean=} md-no-ink Use of attribute indicates flag to disable ink ripple effects.
*
* @usage
* <hljs lang="html">
* <md-radio-group ng-model="selected">
*
* <md-radio-button
* ng-repeat="d in colorOptions"
* ng-value="d.value" aria-label="{{ d.label }}">
*
* {{ d.label }}
*
* </md-radio-button>
*
* </md-radio-group>
* </hljs>
*
*/
function mdRadioGroupDirective($mdUtil, $mdConstant, $mdTheming, $timeout) {
RadioGroupController.prototype = createRadioGroupControllerProto();
return {
restrict: 'E',
controller: ['$element', RadioGroupController],
require: ['mdRadioGroup', '?ngModel'],
link: { pre: linkRadioGroup }
};
function linkRadioGroup(scope, element, attr, ctrls) {
$mdTheming(element);
var rgCtrl = ctrls[0];
var ngModelCtrl = ctrls[1] || $mdUtil.fakeNgModel();
function setFocus() {
if (!element.hasClass('md-focused')) { element.addClass('md-focused'); }
}
function keydownListener(ev) {
var keyCode = ev.which || ev.keyCode;
switch(keyCode) {
case $mdConstant.KEY_CODE.LEFT_ARROW:
case $mdConstant.KEY_CODE.UP_ARROW:
ev.preventDefault();
rgCtrl.selectPrevious();
setFocus();
break;
case $mdConstant.KEY_CODE.RIGHT_ARROW:
case $mdConstant.KEY_CODE.DOWN_ARROW:
ev.preventDefault();
rgCtrl.selectNext();
setFocus();
break;
case $mdConstant.KEY_CODE.ENTER:
var form = angular.element($mdUtil.getClosest(element[0], 'form'));
if (form.length > 0) {
form.triggerHandler('submit');
}
break;
}
}
rgCtrl.init(ngModelCtrl);
scope.mouseActive = false;
element.attr({
'role': 'radiogroup',
'tabIndex': element.attr('tabindex') || '0'
})
.on('keydown', keydownListener)
.on('mousedown', function(event) {
scope.mouseActive = true;
$timeout(function() {
scope.mouseActive = false;
}, 100);
})
.on('focus', function() {
if(scope.mouseActive === false) { rgCtrl.$element.addClass('md-focused'); }
})
.on('blur', function() { rgCtrl.$element.removeClass('md-focused'); });
}
function RadioGroupController($element) {
this._radioButtonRenderFns = [];
this.$element = $element;
}
function createRadioGroupControllerProto() {
return {
init: function(ngModelCtrl) {
this._ngModelCtrl = ngModelCtrl;
this._ngModelCtrl.$render = angular.bind(this, this.render);
},
add: function(rbRender) {
this._radioButtonRenderFns.push(rbRender);
},
remove: function(rbRender) {
var index = this._radioButtonRenderFns.indexOf(rbRender);
if (index !== -1) {
this._radioButtonRenderFns.splice(index, 1);
}
},
render: function() {
this._radioButtonRenderFns.forEach(function(rbRender) {
rbRender();
});
},
setViewValue: function(value, eventType) {
this._ngModelCtrl.$setViewValue(value, eventType);
// update the other radio buttons as well
this.render();
},
getViewValue: function() {
return this._ngModelCtrl.$viewValue;
},
selectNext: function() {
return changeSelectedButton(this.$element, 1);
},
selectPrevious: function() {
return changeSelectedButton(this.$element, -1);
},
setActiveDescendant: function (radioId) {
this.$element.attr('aria-activedescendant', radioId);
}
};
}
/**
* Change the radio group's selected button by a given increment.
* If no button is selected, select the first button.
*/
function changeSelectedButton(parent, increment) {
// Coerce all child radio buttons into an array, then wrap then in an iterator
var buttons = $mdUtil.iterator(parent[0].querySelectorAll('md-radio-button'), true);
if (buttons.count()) {
var validate = function (button) {
// If disabled, then NOT valid
return !angular.element(button).attr("disabled");
};
var selected = parent[0].querySelector('md-radio-button.md-checked');
var target = buttons[increment < 0 ? 'previous' : 'next'](selected, validate) || buttons.first();
// Activate radioButton's click listener (triggerHandler won't create a real click event)
angular.element(target).triggerHandler('click');
}
}
}
mdRadioGroupDirective.$inject = ["$mdUtil", "$mdConstant", "$mdTheming", "$timeout"];
/**
* @ngdoc directive
* @module material.components.radioButton
* @name mdRadioButton
*
* @restrict E
*
* @description
* The `<md-radio-button>`directive is the child directive required to be used within `<md-radio-group>` elements.
*
* While similar to the `<input type="radio" ng-model="" value="">` directive,
* the `<md-radio-button>` directive provides ink effects, ARIA support, and
* supports use within named radio groups.
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} ngChange Angular expression to be executed when input changes due to user
* interaction with the input element.
* @param {string} ngValue Angular expression which sets the value to which the expression should
* be set when selected.*
* @param {string} value The value to which the expression should be set when selected.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} aria-label Adds label to radio button for accessibility.
* Defaults to radio button's text. If no text content is available, a warning will be logged.
*
* @usage
* <hljs lang="html">
*
* <md-radio-button value="1" aria-label="Label 1">
* Label 1
* </md-radio-button>
*
* <md-radio-button ng-model="color" ng-value="specialValue" aria-label="Green">
* Green
* </md-radio-button>
*
* </hljs>
*
*/
function mdRadioButtonDirective($mdAria, $mdUtil, $mdTheming) {
var CHECKED_CSS = 'md-checked';
return {
restrict: 'E',
require: '^mdRadioGroup',
transclude: true,
template: '<div class="md-container" md-ink-ripple md-ink-ripple-checkbox>' +
'<div class="md-off"></div>' +
'<div class="md-on"></div>' +
'</div>' +
'<div ng-transclude class="md-label"></div>',
link: link
};
function link(scope, element, attr, rgCtrl) {
var lastChecked;
$mdTheming(element);
configureAria(element, scope);
rgCtrl.add(render);
attr.$observe('value', render);
element
.on('click', listener)
.on('$destroy', function() {
rgCtrl.remove(render);
});
function listener(ev) {
if (element[0].hasAttribute('disabled')) return;
scope.$apply(function() {
rgCtrl.setViewValue(attr.value, ev && ev.type);
});
}
function render() {
var checked = (rgCtrl.getViewValue() == attr.value);
if (checked === lastChecked) {
return;
}
lastChecked = checked;
element.attr('aria-checked', checked);
if (checked) {
element.addClass(CHECKED_CSS);
rgCtrl.setActiveDescendant(element.attr('id'));
} else {
element.removeClass(CHECKED_CSS);
}
}
/**
* Inject ARIA-specific attributes appropriate for each radio button
*/
function configureAria( element, scope ){
scope.ariaId = buildAriaID();
element.attr({
'id' : scope.ariaId,
'role' : 'radio',
'aria-checked' : 'false'
});
$mdAria.expectWithText(element, 'aria-label');
/**
* Build a unique ID for each radio button that will be used with aria-activedescendant.
* Preserve existing ID if already specified.
* @returns {*|string}
*/
function buildAriaID() {
return attr.id || ( 'radio' + "_" + $mdUtil.nextUid() );
}
}
}
}
mdRadioButtonDirective.$inject = ["$mdAria", "$mdUtil", "$mdTheming"];
ng.material.components.radioButton = angular.module("material.components.radioButton"); |
var webpack = require('webpack');
var path = require('path');
var mainPath = path.resolve(__dirname,'..','..','src','index.jsx');
var srcPath = path.resolve(__dirname,'..','..', 'src');
var config = require("./webpack.config.js");
var packageJson = require('../../package.json')
/** ============
NOTE: change the following per the dependencies
of the component you are developing.
============ **/
config.externals = {
// "react": "react",
// "react-dom": "react-dom",
// your dependencies here
// "d3": "d3",
}
config.entry = mainPath;
config.devtool = 'none';
config.plugins = [
new webpack.optimize.UglifyJsPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
}),
new webpack.ProvidePlugin({
'react': "react"
})
];
config.module.loaders.unshift({
test: /\.jsx$/,
loaders: ['babel'],
exclude: ['node_modules']
})
module.exports = config;
|
//main.js
// const greeter = require('./Greeter.js');
// document.querySelector("#root").appendChild(greeter());
import React from 'react';
import {render} from 'react-dom';
import Greeter from './Greeter';
import './main.css';//使用require导入css文件
render(<Greeter />, document.getElementById('root')); |
/**
* Created by eirikskogland on 24.09.15.
*/
angular.module('ExamApp').directive('solutionTableCell', function() {
return {
restrict: 'E',
templateUrl: 'templates/directives/solution-table-cell.html',
scope: {
tableIndex: '@',
hasSolution: '@'
},
controller: function($scope) {
console.log("Solution Table Cell Controller");
$scope.showingSolutionRow = false;
$scope.showSolutionForm = function(index) {
$(document.getElementById("solutionForm"+index)).toggle();
};
$scope.showSolutionPDF = function(index) {
$(document.getElementById("solutionPDF"+index)).toggle();
};
$scope.showSolutionClicked = function(index) {
$scope.showingSolutionRow = !$scope.showingSolutionRow;
if($scope.hasSolution) {
// show solution
$scope.showSolutionPDF(index);
} else {
// if logged in
// show solution form
$scope.showSolutionForm(index);
// else
// show login message
}
};
},
controllerAs: 'ctrl'
}
}); |
//
// Copyright (c) 2011 - 2015 ASPECTRON Inc.
// All Rights Reserved.
//
// This file is part of JSX (https://github.com/aspectron/jsx) project.
//
// Distributed under the MIT software license, see the accompanying
// file LICENSE
//
var registry = (function()
{
var log = require("log");
var _registry = new rt.bindings.library("registry");
function Registry(hkey_root_string, path)
{
var self = this;
self.__proto__ = new _registry.Registry(hkey_root_string, path);
return self;
}
function split_path(full_path) // HKEY\\...\\VALUE
{
full_path = full_path.replace(/\//g, "\\");
var list = full_path.split('\\');
if(list.length < 2)
throw new Error("Invalid registry path supplied: "+full_path);
var hkey = list[0];
var filename = list[list.length-1];
var sub_path_start = hkey.length+1;
var path_to_value = full_path.substring(sub_path_start);//, full_path.length-sub_path_start);
var sub_path_length = full_path.length-sub_path_start-(filename.length+1);
var sub_path = path_to_value.substring(0, sub_path_length);
var result =
{
hkey : hkey, // HKEY
filename: filename, // VALUE
sub_path : sub_path, // HKEY/[SUB_PATH]/VALUE
path : path_to_value, // SUB_PATH/VALUE
full_path : full_path // HKEY/SUB_PATH/VALUE
}
return result;
}
function registry_iface()
{
var self = this;
self.Registry = Registry; // Registry class for creation
self.write = function(path, value)
{
var target = split_path(path);
//log.info(target);
var inst = new Registry(target.hkey); // , target.path);
inst.write(target.path,value);
}
self.enumerate_values = function(path, cb_fn)
{
var target = split_path(path);
// log.info(target);
var inst = new Registry(target.hkey);//, target.path);
var index = 0;
while(true)
{
var filename = inst.enum_values(target.path,index++);
if(!filename)
break;
cb_fn.call(filename,filename);
}
}
self.erase_values = function(path, cb_fn)
{
var target = split_path(path);
var inst = new Registry(target.hkey);
var values = [];
var index = 0;
while(true)
{
var filename = inst.enum_values(target.path,index++);
if(!filename)
break;
values.push(filename);
}
for(var i = 0; i < values.length; i++)
{
if(cb_fn.call(values[i]))
inst.erase_value(target.path+'\\'+values[i]);
}
}
return self;
}
return new registry_iface();
})();
exports.$ = registry; |
'use strict';
module.exports = {
skip: {
type: 'integer',
format: 'int32',
minimum: 0,
maximum: 500,
default: 0,
description: 'The number of results to skip before returning matches. Use this to support paging. Maximum of 500'
},
limit: {
type: 'integer',
format: 'int32',
minimum: 1,
maximum: 200,
default: 20,
description: 'Limit the number of results returned. Defaults to 20. Maximum of 200'
}
};
|
// Use this file to change prototype configuration.
// Note: prototype config can be overridden using environment variables (eg on heroku)
module.exports = {
// Service name used in header. Eg: 'Renew your passport'
serviceName: "Publish data",
// Default port that prototype runs on
port: '3000',
// Enable or disable password protection on production
useAuth: 'true',
// Force HTTP to redirect to HTTPs on production
useHttps: 'true',
// Cookie warning - update link to service's cookie page.
cookieText: 'GOV.UK uses cookies to make the site simpler. <a href="#" title="Find out more about cookies">Find out more about cookies</a>'
};
|
import config from '../../config/common';
import Context from '../../src/server/context';
import range from 'range';
/**
* Create an instance of Context with the given list of blacklisted IPs.
*
* @param {Array=} blacklistIPs Array of IPs to blacklist in the context.
* @returns {Object} Initialized context object.
*/
function create(blacklistIPs) {
const ctx = {
blacklist: Context.prototype.initBlacklistCache(),
db: {},
yubikey: Context.prototype.initYubikeyValidator()
};
ctx.allu = {
template: () => {}
};
range
.range(0, config.blacklist.maxFailedAttempts + 1)
.forEach(() => (blacklistIPs || []).forEach((ip) => ctx.blacklist.increment(ip)));
return ctx;
}
const contextFactory = {
create
};
export default contextFactory;
|
// @flow
import { workspacesRun, toWorkspacesRunOptions } from '../run';
test('bolt workspaces run');
|
'use strict';
var eslint = require('eslint');
var ruleTester = new eslint.RuleTester();
ruleTester.run('rules/no-exports-typo', require('../rules/no-exports-typo'), {
valid: [
'module.exports = true;',
'module.exports.house()',
'exports.mouse = 234',
'exports = module.exports = {}',
'var House = module.exports = function() {}'
],
invalid: [
{ code: 'module.exprts = 123;', errors: [ { message: 'Expected module.exports.' }] },
{ code: 'module.exprts = 123;', errors: [ { message: 'Expected module.exports.' }] },
{ code: 'module.export = 123;', errors: [ { message: 'Expected module.exports.' }] },
{ code: 'module.export()', errors: [ { message: 'Expected module.exports.' }] },
{ code: 'module.extorts.house()', errors: [ { message: 'Expected module.exports.' }] }
]
});
|
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* jshint maxlen: false */
const apirequest_1 = require("../../lib/apirequest");
/**
* Google Cloud Datastore API
*
* Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.
*
* @example
* const google = require('googleapis');
* const datastore = google.datastore('v1beta1');
*
* @namespace datastore
* @type {Function}
* @version v1beta1
* @variation v1beta1
* @param {object=} options Options for Datastore
*/
function Datastore(options) {
const self = this;
self._options = options || {};
self.projects = {
/**
* datastore.projects.export
*
* @desc Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
*
* @alias datastore.projects.export
* @memberOf! datastore(v1beta1)
*
* @param {object} params Parameters for request
* @param {string} params.projectId Project ID against which to make the request.
* @param {datastore(v1beta1).GoogleDatastoreAdminV1beta1ExportEntitiesRequest} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
export: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://datastore.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/projects/{projectId}:export').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: ['projectId'],
pathParams: ['projectId'],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* datastore.projects.import
*
* @desc Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.
*
* @alias datastore.projects.import
* @memberOf! datastore(v1beta1)
*
* @param {object} params Parameters for request
* @param {string} params.projectId Project ID against which to make the request.
* @param {datastore(v1beta1).GoogleDatastoreAdminV1beta1ImportEntitiesRequest} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
import: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://datastore.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/projects/{projectId}:import').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: ['projectId'],
pathParams: ['projectId'],
context: self
};
return apirequest_1.default(parameters, callback);
}
};
}
module.exports = Datastore;
//# sourceMappingURL=v1beta1.js.map |
var express = require('express');
var router = express.Router();
/**
* 获得主页内容
*
*/
router.get('/', function(req, res, next) {
res.render('user/index', {
title: 'Express'
});
});
module.exports = router;
|
import Channels from './Channels'
export default Channels
export ChannelBackButton from './ChannelBackButton'
export ChannelBalance from './ChannelBalance'
export ChannelCapacity from './ChannelCapacity'
export ChannelCardList from './ChannelCardList'
export ChannelCardListItem from './ChannelCardListItem'
export ChannelCloseDialog from './ChannelCloseDialog'
export ChannelCount from './ChannelCount'
export ChannelCreate from './ChannelCreate'
export ChannelCreateForm from './ChannelCreateForm'
export ChannelCreateHeader from './ChannelCreateHeader'
export ChannelCreateSummary from './ChannelCreateSummary'
export ChannelData from './ChannelData'
export ChannelDetail from './ChannelDetail'
export ChannelFilter from './ChannelFilter'
export ChannelFooter from './ChannelFooter'
export ChannelHeader from './ChannelHeader'
export ChannelMoreButton from './ChannelMoreButton'
export ChannelNodeSearch from './ChannelNodeSearch'
export ChannelSearch from './ChannelSearch'
export ChannelStatus from './ChannelStatus'
export ChannelSummaryList from './ChannelSummaryList'
export ChannelSummaryListItem from './ChannelSummaryListItem'
export ChannelsActions from './ChannelsActions'
export ChannelsCapacity from './ChannelsCapacity'
export ChannelsCapacityDonut from './ChannelsCapacityDonut'
export ChannelsHeader from './ChannelsHeader'
export ChannelsInfo from './ChannelsInfo'
export ChannelsRefresh from './ChannelsRefresh'
export ChannelsSummaryDonut from './ChannelsSummaryDonut'
export ChannelsViewSwitcher from './ChannelsViewSwitcher'
export NodeCardList from './NodeCardList'
export NodeCardView from './NodeCardView'
|
var allcoin = require('..');
var api = allcoin.PublicApi;
api.depth('mona_btc').then(console.log);
|
function test(){return 5} |
var _privateMethod = babelHelpers.classPrivateFieldLooseKey("privateMethod");
class Foo {
constructor() {
Object.defineProperty(this, _privateMethod, {
value: _privateMethod2
});
this.publicField = babelHelpers.classPrivateFieldLooseBase(this, _privateMethod)[_privateMethod]();
}
}
var _privateMethod2 = function _privateMethod2() {
return 42;
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.