This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Matchmaker | |
* Pokemon Showdown - http://pokemonshowdown.com/ | |
* | |
* This keeps track of challenges to battle made between users, setting up | |
* matches between users looking for a battle, and starting new battles. | |
* | |
* @license MIT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ChatBot.java | |
* http://programmingforliving.com | |
*/ | |
//package com.pfl.samples.jee7.websocket; | |
import java.io.*; | |
import java.net.URI; | |
import javax.websocket.ClientEndpoint; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let glob = require('glob') | |
let fs = require('fs') | |
let getDirectories = function (src, callback) { | |
glob(src + '/**/*', callback); | |
}; | |
getDirectories('./', function (err, res) { | |
if (err) { | |
console.log('Error', err); | |
} else { | |
res.forEach(file => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Written by Spandan Punwatkar | |
* https://github.com/Spandamn | |
* Requires node.js: nodejs.org | |
*/ | |
const fs = require('fs'); | |
let messages = JSON.parse(fs.readFileSync('./messages.json').toString()); // Converts the JSON file to an object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Requires... Node.js 6? | |
'use strict'; | |
let fs = require('fs'); | |
let fileName = "Bee Movie.srt"; //Input the name of the subtitle file here. | |
let file = fs.readFileSync(`./${fileName}`).toString(); | |
let delay = 2; //If the subtitle is fast, input a positive number. If its lagging, input a negative number. | |
let mili = 500; //The thing after the comma, whatever its called. Im assuming it adds to seconds | |
let indisubs = file.split('\n'); | |
for (let i = 0; i < indisubs.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
exports.BattleItems = { | |
leppaberry: { | |
inherit: true, | |
onUpdate: function (pokemon) { | |
if (!pokemon.hp) return; | |
let moveSlot = pokemon.getMoveData(pokemon.getLastMoveAbsolute()); | |
if (moveSlot && moveSlot.pp === 0) { | |
pokemon.addVolatile('leppaberry'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
exports.BattleMovedex = { | |
/** | |
* Artificial priority | |
* | |
*/ | |
pursuit: { | |
inherit: true, | |
beforeTurnCallback: function (pokemon, target) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
exports.BattleStatuses = { | |
slp: { | |
inherit: true, | |
onBeforeMove: function (pokemon, target, move) { | |
if (this.effectData.timerDecreased !== this.turn) { | |
this.effectData.timerDecreased = this.turn; | |
if (pokemon.hasAbility('earlybird')) { | |
pokemon.statusData.time--; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
exports.BattleScripts = { | |
runMove: function (move, pokemon, targetLoc, sourceEffect, zMove, externalMove) { | |
let target = this.getTarget(pokemon, zMove || move, targetLoc); | |
if (!sourceEffect && toId(move) !== 'struggle' && !zMove) { | |
let changedMove = this.runEvent('OverrideAction', pokemon, target, move); | |
if (changedMove && changedMove !== true) { | |
move = changedMove; | |
target = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
exports.BattleScripts = { | |
getDamage : function(pokemon, target, move, suppressMessages) { | |
if (typeof move === 'string') move = this.getMove(move); | |
if (typeof move === 'number') { | |
move = { | |
basePower: move, | |
type: '???', |
NewerOlder