Obliterate trailing whitespace

This commit is contained in:
小太 2013-08-18 22:48:11 +10:00
parent 3b06c3d3d8
commit cf699c0494
20 changed files with 270 additions and 271 deletions

View File

@ -3443,7 +3443,7 @@ exports.BattleFormatsData = {
tier: "UU"
},
rotom: {
viableMoves: {"thunderbolt":1,"discharge":1,"voltswitch":1,"shadowball":1,"substitute":1,"painsplit":1,"hiddenpowerice":1,"hiddenpowerfighting":1,"willowisp":1,"rest":1,"sleeptalk":1,"trick":1},
viableMoves: {"thunderbolt":1,"discharge":1,"voltswitch":1,"shadowball":1,"substitute":1,"painsplit":1,"hiddenpowerice":1,"hiddenpowerfighting":1,"willowisp":1,"rest":1,"sleeptalk":1,"trick":1},
tier: "RU"
},
rotomheat: {

View File

@ -381,7 +381,7 @@ exports.BattleFormats = {
effectType: 'Rule',
validateSet: function(set) {
var template = this.getTemplate(set.species || set.name);
if (template.prevo) {
return [set.species+" isn't the first in its evolution family."];
}

View File

@ -144,7 +144,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('wisp',{
x: attacker.x,
y: attacker.y,
@ -164,7 +164,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
attacker.anim({
x: defender.x,
y: defender.y+80,
@ -195,7 +195,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
attacker.anim({
x: defender.leftof(-30),
y: defender.y+80,
@ -245,7 +245,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
attacker.anim({
x: defender.leftof(30),
y: defender.y+80,
@ -276,7 +276,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('wisp',{
x: defender.x,
y: defender.y,
@ -353,7 +353,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('topbite',{
x: defender.x,
y: defender.y+50,
@ -390,7 +390,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('foot',{
x: defender.x,
y: defender.y,
@ -412,7 +412,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('wisp',{
x: defender.x,
y: defender.y,
@ -500,7 +500,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
attacker.anim({
x: attacker.leftof(-20),
y: attacker.y,
@ -552,7 +552,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
attacker.anim({
x: defender.x,
y: defender.y+60,
@ -629,7 +629,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
attacker.anim({
x: attacker.leftof(-200),
y: attacker.y + 80,
@ -778,7 +778,7 @@ var BattleOtherAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('energyball',{
x: defender.x,
y: defender.y,
@ -904,7 +904,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('poisonwisp',{
x: attacker.x,
y: attacker.y,
@ -952,7 +952,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.backgroundEffect('#B84038',700,.6);
battle.showEffect('electroball',{
x: attacker.x,
@ -1207,7 +1207,7 @@ var BattleMoveAnims = {
explosion: {
anim: function(battle, args) {
var attacker = args[0];
battle.showEffect('fireball',{
x: attacker.x+40,
y: attacker.y,
@ -1692,7 +1692,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('shadowball',{
x: defender.x,
y: defender.y,
@ -1761,7 +1761,7 @@ var BattleMoveAnims = {
},
prepareAnim: function(battle, args) {
var attacker = args[0];
attacker.anim({
opacity: 0.2,
time: 300
@ -1775,7 +1775,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('wisp',{
x: defender.x,
y: defender.y,
@ -1848,7 +1848,7 @@ var BattleMoveAnims = {
},
prepareAnim: function(battle, args) {
var attacker = args[0];
attacker.anim({
opacity: 0.2,
y: attacker.y+80,
@ -1863,7 +1863,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('wisp',{
x: defender.x,
y: defender.y,
@ -1936,7 +1936,7 @@ var BattleMoveAnims = {
},
prepareAnim: function(battle, args) {
var attacker = args[0];
attacker.anim({
opacity: 0.2,
y: attacker.y-80,
@ -1951,7 +1951,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('waterwisp',{
x: defender.x,
y: defender.y,
@ -2022,7 +2022,7 @@ var BattleMoveAnims = {
},
prepareAnim: function(battle, args) {
var attacker = args[0];
attacker.anim({
opacity: 0.2,
y: attacker.y-80,
@ -2037,7 +2037,7 @@ var BattleMoveAnims = {
anim: BattleOtherAnims.flight.anim,
prepareAnim: function(battle, args) {
var attacker = args[0];
attacker.anim({
opacity: 0.2,
y: attacker.y+80,
@ -2053,7 +2053,7 @@ var BattleMoveAnims = {
prepareAnim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
attacker.anim({
opacity: 0.2,
y: attacker.y+80,
@ -2073,7 +2073,7 @@ var BattleMoveAnims = {
anim: BattleOtherAnims.contactattack.anim,
prepareAnim: function(battle, args) {
var attacker = args[0];
attacker.anim({
opacity: 0.8,
time: 300
@ -2087,7 +2087,7 @@ var BattleMoveAnims = {
anim: BattleOtherAnims.flight.anim,
prepareAnim: function(battle, args) {
var attacker = args[0];
attacker.anim({
opacity: 0.8,
time: 300
@ -2101,12 +2101,12 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
var xf=[1,-1,1,-1];
var yf=[1,-1,-1,1];
var xf2=[1,0,-1,0];
var yf2=[0,1,0,-1];
for (var i=0; i<4; i++)
{
battle.showEffect('electroball',{
@ -2144,12 +2144,12 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
var xf=[1,-1,1,-1];
var yf=[1,-1,-1,1];
var xf2=[1,0,-1,0];
var yf2=[0,1,0,-1];
for (var i=0; i<4; i++)
{
battle.showEffect('poisonwisp',{
@ -2187,12 +2187,12 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
var xf=[1,-1,1,-1];
var yf=[1,-1,-1,1];
var xf2=[1,0,-1,0];
var yf2=[0,1,0,-1];
battle.showEffect('energyball',{
x: attacker.x,
y: attacker.y,
@ -2567,7 +2567,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
BattleOtherAnims.fastattack.anim(battle, args);
battle.showEffect('fist',{
x: defender.x,
@ -2590,7 +2590,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
BattleOtherAnims.fastattack.anim(battle, args);
battle.showEffect('fist',{
x: defender.x,
@ -2625,7 +2625,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.backgroundEffect('#987058',400,.3);
battle.showEffect('wisp',{
x: defender.x,
@ -2674,7 +2674,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('fireball',{
x: defender.x,
y: defender.y,
@ -2751,7 +2751,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('icicle',{
x: defender.x,
y: defender.y,
@ -2829,7 +2829,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('electroball',{
x: defender.x,
y: defender.y,
@ -2906,7 +2906,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('icicle',{
x: defender.x,
y: defender.y,
@ -2937,7 +2937,7 @@ var BattleMoveAnims = {
opacity: 0,
time: 900
}, 'linear');
BattleOtherAnims.contactattack.anim(battle,args);
BattleOtherAnims.bite.anim(battle,args);
}
@ -2946,7 +2946,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('fireball',{
x: defender.x,
y: defender.y,
@ -2977,7 +2977,7 @@ var BattleMoveAnims = {
opacity: 0,
time: 900
}, 'linear');
BattleOtherAnims.contactattack.anim(battle,args);
BattleOtherAnims.bite.anim(battle,args);
}
@ -2986,7 +2986,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('electroball',{
x: defender.x,
y: defender.y,
@ -3017,7 +3017,7 @@ var BattleMoveAnims = {
opacity: 0,
time: 900
}, 'linear');
BattleOtherAnims.contactattack.anim(battle,args);
BattleOtherAnims.bite.anim(battle,args);
}
@ -3026,7 +3026,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('electroball',{
x: defender.x,
y: defender.y,
@ -3057,7 +3057,7 @@ var BattleMoveAnims = {
opacity: 0,
time: 900
}, 'linear');
BattleOtherAnims.contactattack.anim(battle,args);
}
},
@ -3065,7 +3065,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.backgroundEffect('#000000', 700, 0.2);
battle.showEffect('electroball',{
x: attacker.x,
@ -3187,9 +3187,9 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.backgroundEffect('#000000', 700, 0.2);
battle.showEffect('shadowball',{
x: defender.x,
y: defender.y,
@ -3261,7 +3261,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('fireball',{
x: defender.x,
y: defender.y,
@ -3309,7 +3309,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('poisonwisp',{
x: attacker.x,
y: attacker.y,
@ -3379,7 +3379,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('shadowball',{
x: defender.x,
y: defender.y,
@ -3437,7 +3437,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
attacker.anim({
x: attacker.x-30,
time: 75
@ -3458,7 +3458,7 @@ var BattleMoveAnims = {
x: attacker.x,
time: 100
});
defender.anim({
x: defender.x-30,
time: 75
@ -3485,7 +3485,7 @@ var BattleMoveAnims = {
earthpower: {
anim: function(battle, args) {
var defender = args[1];
defender.anim({
x: defender.x-30,
time: 75
@ -3875,7 +3875,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('rock2',{
x: attacker.x,
y: attacker.y,
@ -3900,7 +3900,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('icicle',{
x: attacker.x,
y: attacker.y,
@ -3961,7 +3961,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('energyball',{
x: attacker.x,
y: attacker.y,
@ -3996,7 +3996,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('waterwisp',{
x: attacker.x+20,
y: attacker.y+30,
@ -4095,7 +4095,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('icicle',{
x: attacker.x,
y: attacker.y,
@ -4143,7 +4143,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('icicle',{
x: attacker.x,
y: attacker.y,
@ -4205,7 +4205,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('rock1',{
x: attacker.x,
y: attacker.y,
@ -4254,7 +4254,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('electroball',{
x: attacker.x,
y: attacker.y,
@ -4316,7 +4316,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('fireball',{
x: attacker.x,
y: attacker.y,
@ -4378,7 +4378,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('poisonwisp',{
x: attacker.x,
y: attacker.y,
@ -4399,7 +4399,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('poisonwisp',{
x: attacker.x,
y: attacker.y,
@ -4450,7 +4450,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('energyball',{
x: attacker.x,
y: attacker.y,
@ -4501,7 +4501,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('fireball',{
x: attacker.x,
y: attacker.y,
@ -4552,7 +4552,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('rock1',{
x: defender.x+15,
y: defender.y-50,
@ -4613,7 +4613,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('rock2',{
x: defender.x+15,
y: defender.y+70,
@ -4679,7 +4679,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('icicle',{
x: defender.x+15,
y: defender.y+70,
@ -4745,7 +4745,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('poisonwisp',{
x: defender.x+10,
y: defender.y+90,
@ -4787,7 +4787,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('fireball',{
x: attacker.x,
y: attacker.y,
@ -4893,7 +4893,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('wisp',{
x: defender.x-100,
y: defender.y,
@ -5012,7 +5012,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.backgroundEffect('#000000', 600, 0.1);
battle.showEffect('shadowball',{
x: attacker.x,
@ -5034,7 +5034,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('energyball',{
x: attacker.x,
y: attacker.y,
@ -5055,7 +5055,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('electroball',{
x: attacker.x,
y: attacker.y,
@ -5076,7 +5076,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('wisp',{
x: attacker.x,
y: attacker.y,
@ -5104,7 +5104,7 @@ var BattleMoveAnims = {
wish: {
anim: function(battle, args) {
var attacker = args[0];
battle.showEffect('wisp',{
x: attacker.x,
y: attacker.y,
@ -5118,7 +5118,7 @@ var BattleMoveAnims = {
},
residualAnim: function(battle, args) {
var attacker = args[0];
battle.showEffect('wisp',{
x: attacker.x,
y: attacker.y+130,
@ -5136,7 +5136,7 @@ var BattleMoveAnims = {
healingwish: {
anim: function(battle, args) {
var attacker = args[0];
battle.showEffect('wisp',{
x: attacker.x,
y: attacker.y,
@ -5152,7 +5152,7 @@ var BattleMoveAnims = {
},
residualAnim: function(battle, args) {
var attacker = args[0];
battle.showEffect('wisp',{
x: attacker.x,
y: attacker.y+130,
@ -5171,7 +5171,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('rock1',{
x: attacker.x,
y: attacker.y,
@ -5233,7 +5233,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('caltrop',{
x: attacker.x,
y: attacker.y,
@ -5281,7 +5281,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('poisoncaltrop',{
x: attacker.x,
y: attacker.y,
@ -5315,7 +5315,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('energyball',{
x: attacker.x,
y: attacker.y,
@ -5363,7 +5363,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('poisonwisp',{
x: defender.x+40,
y: defender.y,
@ -5402,7 +5402,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('energyball',{
x: defender.x+30,
y: defender.y+10,
@ -5430,7 +5430,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('wisp',{
x: defender.x+60,
y: defender.y+30,
@ -5496,7 +5496,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('wisp',{
x: defender.x+60,
y: defender.y-10,
@ -5547,7 +5547,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('shadowball',{
x: defender.x+40-40,
y: defender.y+80,
@ -5592,7 +5592,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('waterwisp',{
x: attacker.x,
y: attacker.y,
@ -5640,7 +5640,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('waterwisp',{
x: attacker.x,
y: attacker.y,
@ -5688,7 +5688,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('waterwisp',{
x: attacker.x,
y: attacker.y,
@ -5736,7 +5736,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('waterwisp',{
x: attacker.x,
y: attacker.y,
@ -5798,7 +5798,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('fireball',{
x: attacker.x,
y: attacker.y,
@ -5861,7 +5861,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.backgroundEffect('#9AB440', 700, 0.4);
battle.showEffect('energyball',{
x: attacker.x,
@ -5962,7 +5962,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.backgroundEffect('#009AA4', 700, 0.5);
battle.showEffect('icicle',{
x: attacker.x,
@ -6043,7 +6043,7 @@ var BattleMoveAnims = {
anim: function(battle, args) {
var attacker = args[0];
var defender = args[1];
battle.showEffect('fireball',{
x: attacker.x,
y: attacker.y,

View File

@ -452,7 +452,7 @@ exports.BattleMovedex = {
accuracy: 100,
basePower: 50,
basePowerCallback: function(pokemon, target) {
if (pokemon.volatiles.assurance && pokemon.volatiles.assurance.hurt) {
if (pokemon.volatiles.assurance && pokemon.volatiles.assurance.hurt) {
this.debug('Boosted for being damaged this turn');
return 100;
}

View File

@ -27,13 +27,13 @@ Out-of-game
p1 [user full]
p2 [user full]
Initialize a Side associated with [user], in the corresponding slot.
If [side full] is empty, remove the Side in that slot.
p3 [user full]
p4 [user full]
The same as p1 and p2. Can be ignored by clients that don't support 3-player and 4-player.
In 2v2, alliances are p1 and p3 against p2 and p4.
chat [user] [message full]
@ -59,7 +59,7 @@ poke [pokemon]
previewpoke [pokemon]
Initialize a pokemon for the purposes of Team Preview.
Two differences from `poke`: Will initialize a new pokemon even if a pokemon with that ID already exists, and the initialized pokemon will have an unknown name.
preview
@ -107,7 +107,7 @@ Effects
-start [pokemon] [effect] [source]
The effect [effect] starts on [pokemon].
Clients that track effects should keep in mind that some effects may end without a message.
-turnstart [pokemon] [effect] [source]
@ -115,28 +115,28 @@ Effects
-end [pokemon] [effect] [source]
The effect [effect] ends on [pokemon].
Generally not used for abilities ("-start" is called on the new ability, which replaces it).
Generally not used for items ("-take" or "-start" is called, depending on whether the item was replaced or removed).
-remove [pokemon] [effect] [source]
The effect [effect] ends on [pokemon], unnaturally.
Aside from animation and message differences, this is identical to using "-end".
-activate [pokemon] [effect] [source]
The effect [effect] activates on [pokemon].
This is usually just a message and/or an animation; the results of the effect activation are described later.
-use [pokemon] [effect] [source]
[pokemon] uses the item [effect].
Aside from animation and message differences, this is identical to using "-activate" followed by "-end".
-take [pokemon] [effect] [source]
[pokemon]'s item [effect] is taken from it.
Identical to -end, but usually comes with a different animation and message.
-sidestart [user] [effect] [source]
@ -147,7 +147,7 @@ Effects
-fieldstart [effect] [source]
The field effect [effect] starts.
-fieldstart [effect] [source]
The field effect [effect] ends.
@ -169,4 +169,3 @@ Boosts
-swapboost [pokemon] [pokemon2] [source]
Swap [pokemon]'s boosts and [pokemon2]'s boosts.

View File

@ -1,17 +1,17 @@
// var index = [];
//
//
// index = index.concat(Object.keys(BattlePokedex).map(function(x){return x+' pokemon'}))
// index = index.concat(Object.keys(BattleMovedex).map(function(x){return x+' move'}))
// index = index.concat(Object.keys(BattleItems).map(function(x){return x+' item'}))
// index = index.concat(Object.keys(BattleAbilities).map(function(x){return x+' ability'}))
// index = index.concat(Object.keys(BattleTypeChart).map(function(x){return toId(x)+' type'}))
// index = index.concat(['physical', 'special', 'status'].map(function(x){return toId(x)+' category'}))
//
//
// index.sort();
//
//
// BattleSearchIndex = index.map(function(x){return x.split(' ')[0]});
// BattleSearchIndexType = index.map(function(x){return x.split(' ')[1]});
//
//
// BattleSearchIndexOffset = BattleSearchIndex.map(function(id, i){
// var name='';
// switch (BattleSearchIndexType[i]) {

View File

@ -51,14 +51,14 @@
<!--[if lte IE 8]>
<script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<style>
/*
/*
CSS rules to use for styling the overlay:
.chromeFrameOverlayContent
.chromeFrameOverlayContent iframe
.chromeFrameOverlayCloseBar
.chromeFrameOverlayUnderlay
*/
</style>
</style>
<script>
CFInstall.check({mode: "overlay"});
</script>

View File

@ -297,7 +297,7 @@ function Pokemon(species) {
}
hpstring = hpstring.substr(parenIndex+1, hpstring.length-parenIndex-2);
}
var hp = hpstring.split(' ');
var status = hp[1];
hp = hp[0];
@ -2806,7 +2806,7 @@ function Battle(frame, logFrame, noPreload) {
kwargs = row[1];
animDelay = nextAnimDelay;
if (!kwargs.simult) nextAnimDelay++;
switch (args[0]) {
case '-damage':
var poke = this.getPokemon(args[1]);
@ -2815,7 +2815,7 @@ function Battle(frame, logFrame, noPreload) {
self.lastDamage = (damage[2] || 1); // not sure if this is used for anything
var range = poke.getDamageRange(damage);
self.damageAnim(poke, poke.getFormattedRange(range, 0, ' to '), animDelay);
if (kwargs.silent) {
// do nothing
} else if (kwargs.from) {
@ -2903,7 +2903,7 @@ function Battle(frame, logFrame, noPreload) {
if (damage === false) break;
var range = poke.getDamageRange(damage);
self.healAnim(poke, poke.getFormattedRange(range, 0, ' to '), animDelay);
if (kwargs.silent) {
// do nothing
} else if (kwargs.from) {
@ -2980,9 +2980,9 @@ function Battle(frame, logFrame, noPreload) {
actions += 'The battlers shared their pain!';
break;
}
break;
case '-boost':
var poke = this.getPokemon(args[1]);
var stat = args[2];
@ -2992,7 +2992,7 @@ function Battle(frame, logFrame, noPreload) {
}
poke.boosts[stat] += amount;
self.resultAnim(poke, poke.getBoost(stat), 'good', animDelay);
var amountString = '';
if (amount === 2) amountString = ' sharply';
if (amount >= 3) amountString = ' drastically';
@ -3023,7 +3023,7 @@ function Battle(frame, logFrame, noPreload) {
}
poke.boosts[stat] -= amount;
self.resultAnim(poke, poke.getBoost(stat), 'bad', animDelay);
var amountString = '';
if (amount === 2) amountString = ' harshly';
if (amount >= 3) amountString = ' severely';
@ -3053,7 +3053,7 @@ function Battle(frame, logFrame, noPreload) {
var ofpoke = this.getPokemon(kwargs.of);
poke.boosts[stat] = amount;
self.resultAnim(poke, poke.getBoost(stat), (amount>0?'good':'bad'), animDelay);
if (kwargs.silent) {
// do nothing
} else if (kwargs.from) {
@ -3082,7 +3082,7 @@ function Battle(frame, logFrame, noPreload) {
}
self.resultAnim(poke, 'Stats swapped', 'neutral', animDelay);
self.resultAnim(poke2, 'Stats swapped', 'neutral', animDelay);
if (kwargs.silent) {
// do nothing
} else if (effect.id) {
@ -3105,7 +3105,7 @@ function Battle(frame, logFrame, noPreload) {
if (poke.boosts[i] < 0) delete poke.boosts[i];
}
self.resultAnim(poke, 'Restored', 'good', animDelay);
if (kwargs.silent) {
// do nothing
}
@ -3121,7 +3121,7 @@ function Battle(frame, logFrame, noPreload) {
if (!poke.boosts[stats[i]]) delete poke.boosts[stats[i]];
}
//poke.boosts = $.extend({}, frompoke.boosts);
if (kwargs.silent) {
// do nothing
} else {
@ -3133,7 +3133,7 @@ function Battle(frame, logFrame, noPreload) {
var poke = this.getPokemon(args[1]);
poke.boosts = {};
self.resultAnim(poke, 'Stats reset', 'neutral', animDelay);
if (kwargs.silent) {
// do nothing
} else {
@ -3158,28 +3158,28 @@ function Battle(frame, logFrame, noPreload) {
actions += 'All stat changes were eliminated!';
}
break;
case '-crit':
var poke = this.getPokemon(args[1]);
for (var j=1; !poke && j<10; j++) poke = this.getPokemon(minors[i+j][0][1]);
if (poke) self.resultAnim(poke, 'Critical hit', 'bad', animDelay);
actions += "A critical hit! ";
break;
case '-supereffective':
var poke = this.getPokemon(args[1]);
for (var j=1; !poke && j<10; j++) poke = this.getPokemon(minors[i+j][0][1]);
if (poke) self.resultAnim(poke, 'Super-effective', 'bad', animDelay);
actions += "It's super effective! ";
break;
case '-resisted':
var poke = this.getPokemon(args[1]);
for (var j=1; !poke && j<10; j++) poke = this.getPokemon(minors[i+j][0][1]);
if (poke) self.resultAnim(poke, 'Resisted', 'neutral', animDelay);
actions += "It's not very effective... ";
break;
case '-immune':
var poke = this.getPokemon(args[1]);
var effect = Tools.getEffect(args[2]);
@ -3197,7 +3197,7 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-miss':
var user = this.getPokemon(args[1]);
var target = this.getPokemon(args[2]);
@ -3207,7 +3207,7 @@ function Battle(frame, logFrame, noPreload) {
actions += "" + user.getName() + "'s attack missed!";
}
break;
case '-fail':
var poke = this.getPokemon(args[1]);
var effect = Tools.getEffect(args[2]);
@ -3263,48 +3263,48 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-notarget':
actions += "But there was no target...";
break;
case '-ohko':
actions += "It's a one-hit KO!";
break;
case '-hitcount':
var hits = parseInt(args[2]);
if (self.multiHitMove && self.multiHitMove[3] === 0 && hits > 0) self.animMultiHitMove();
actions += 'Hit ' + hits + ' time(s)!';
break;
case '-nothing':
actions += "But nothing happened! ";
break;
case '-waiting':
var poke = this.getPokemon(args[1]);
var ofpoke = this.getPokemon(args[2]);
actions += "" + poke.getName() + " is waiting for " + ofpoke.getLowerName() + "'s move...";
break;
case '-combine':
actions += "The two moves are joined! It's a combined move!";
break;
case '-prepare':
var poke = this.getPokemon(args[1]);
var move = Tools.getMove(args[2]);
var target = this.getPokemon(args[3]);
self.prepareMove(poke, move, target);
break;
case '-status':
var poke = this.getPokemon(args[1]);
var effect = Tools.getEffect(kwargs.from);
poke.status = args[2];
poke.removeVolatile('yawn');
switch (args[2]) {
case 'brn':
self.resultAnim(poke, 'Burned', 'brn', animDelay);
@ -3337,13 +3337,13 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-curestatus':
var poke = this.getPokemon(args[1]);
var effect = Tools.getEffect(kwargs.from);
var ofpoke = this.getPokemon(kwargs.of);
poke.status = '';
if (effect.id) switch (effect.id) {
case 'psychoshift':
actions += '' + poke.getName() + ' moved its status onto ' + ofpoke.getLowerName() + '!';
@ -3385,13 +3385,13 @@ function Battle(frame, logFrame, noPreload) {
actions += "" + poke.getName() + "'s status cleared!";
}
break;
case '-cureteam':
var poke = this.getPokemon(args[1]);
for (var k = 0; k < poke.side.pokemon.length; k++) {
poke.side.pokemon[k].status = '';
}
self.resultAnim(poke, 'Team Cured', 'good', animDelay);
var effect = Tools.getEffect(kwargs.from);
switch (effect.id) {
@ -3406,7 +3406,7 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-item':
var poke = this.getPokemon(args[1]);
var item = Tools.getItem(args[2]);
@ -3415,7 +3415,7 @@ function Battle(frame, logFrame, noPreload) {
poke.item = item.name;
poke.removeVolatile('airballoon');
if (item.id === 'airballoon') poke.addVolatile('airballoon');
if (effect.id) switch (effect.id) {
case 'recycle':
case 'pickup':
@ -3453,7 +3453,7 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-enditem':
var poke = this.getPokemon(args[1]);
var item = Tools.getItem(args[2]);
@ -3461,7 +3461,7 @@ function Battle(frame, logFrame, noPreload) {
var ofpoke = this.getPokemon(kwargs.of);
poke.item = '';
poke.removeVolatile('airballoon');
if (kwargs.silent) {
// do nothing
} else if (kwargs.eat) {
@ -3525,14 +3525,14 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-ability':
var poke = this.getPokemon(args[1]);
var ability = Tools.getAbility(args[2]);
var effect = Tools.getEffect(kwargs.from);
var ofpoke = this.getPokemon(kwargs.of);
poke.ability = ability.name;
if (kwargs.silent) {
// do nothing
} else if (effect.id) switch (effect.id) {
@ -3572,13 +3572,13 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-endability':
var poke = this.getPokemon(args[1]);
var ability = Tools.getAbility(args[2]);
var effect = Tools.getEffect(kwargs.from);
poke.ability = '';
if (kwargs.silent) {
// do nothing
} else switch (effect.id) {
@ -3587,7 +3587,7 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-transform':
var poke = this.getPokemon(args[1]);
var tpoke = this.getPokemon(args[2]);
@ -3610,14 +3610,14 @@ function Battle(frame, logFrame, noPreload) {
poke.volatiles.formechange[2] = template.species;
poke.side.updateStatbar();
break;
case '-start':
var poke = this.getPokemon(args[1]);
var effect = Tools.getEffect(args[2]);
var ofpoke = this.getPokemon(kwargs.of);
var fromeffect = Tools.getEffect(kwargs.from);
poke.addVolatile(effect.id);
switch (effect.id) {
case 'typechange':
poke.volatiles.typechange[2] = args[3];
@ -3905,7 +3905,7 @@ function Battle(frame, logFrame, noPreload) {
var ofpoke = this.getPokemon(kwargs.of);
var fromeffect = Tools.getEffect(kwargs.from);
poke.addTurnstatus(effect.id);
switch (effect.id) {
case 'roost':
self.resultAnim(poke, 'Landed', 'neutral', animDelay);
@ -3949,7 +3949,7 @@ function Battle(frame, logFrame, noPreload) {
var ofpoke = this.getPokemon(kwargs.of);
var fromeffect = Tools.getEffect(kwargs.from);
poke.addMovestatus(effect.id);
switch (effect.id) {
case 'grudge':
actions += '' + poke.getName() + ' wants its target to bear a grudge!';
@ -3959,7 +3959,7 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-activate':
var poke = this.getPokemon(args[1]);
var effect = Tools.getEffect(args[2]);
@ -4010,7 +4010,7 @@ function Battle(frame, logFrame, noPreload) {
case 'mist':
actions += "" + poke.getName() + " is protected by the mist!";
break;
// move activations
case 'trick':
case 'switcheroo':
@ -4121,7 +4121,7 @@ function Battle(frame, logFrame, noPreload) {
case 'suctioncups':
actions += '' + poke.getName() + ' anchors itself!';
break;
// item activations
case 'custapberry':
case 'quickclaw':
@ -4135,12 +4135,12 @@ function Battle(frame, logFrame, noPreload) {
actions += "" + poke.getName() + "'s " + effect.name + " activated!";
}
break;
case '-sidestart':
var side = this.getSide(args[1]);
var effect = Tools.getEffect(args[2]);
side.addSideCondition(effect.name);
switch (effect.id) {
case 'stealthrock':
actions += "Pointed stones float in the air around " + side.getLowerTeamName() + "!";
@ -4189,7 +4189,7 @@ function Battle(frame, logFrame, noPreload) {
var from = Tools.getEffect(kwargs.from);
var ofpoke = this.getPokemon(kwargs.of);
side.removeSideCondition(effect.name);
switch (effect.id) {
case 'stealthrock':
actions += "The pointed stones disappeared from around " + side.getLowerTeamName() + "!";
@ -4232,18 +4232,18 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-weather':
var effect = Tools.getEffect(args[1]);
var poke = this.getPokemon(kwargs.of);
self.changeWeather(effect.name, poke, kwargs.upkeep);
break;
case '-fieldstart':
var effect = Tools.getEffect(args[1]);
var poke = this.getPokemon(kwargs.of);
self.addPseudoWeather(effect.name, poke);
switch (effect.id) {
case 'trickroom':
actions += "" + poke.getName() + ' twisted the dimensions!';
@ -4259,12 +4259,12 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-fieldend':
var effect = Tools.getEffect(args[1]);
var poke = this.getPokemon(kwargs.of);
self.removePseudoWeather(effect.name, poke);
switch (effect.id) {
case 'trickroom':
actions += 'The twisted dimensions returned to normal!';
@ -4280,7 +4280,7 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-fieldactivate':
var effect = Tools.getEffect(args[1]);
switch (effect.id) {
@ -4305,11 +4305,11 @@ function Battle(frame, logFrame, noPreload) {
break;
}
break;
case '-message':
actions += Tools.escapeHTML(args[1]);
break;
case '-anim':
var poke = self.getPokemon(args[1]);
var move = Tools.getMove(args[2]);
@ -4324,7 +4324,7 @@ function Battle(frame, logFrame, noPreload) {
case '-hint':
hiddenactions += '('+Tools.escapeHTML(args[1])+')';
break;
default:
self.logConsole('Unknown minor: ' + args[0]);
if (self.errorCallback) self.errorCallback(self);
@ -4653,7 +4653,7 @@ function Battle(frame, logFrame, noPreload) {
}
if (args[1] === 'triples' || args[1] === 'rotation') {
if (self.mySide.active.length < 3) self.mySide.active.push(null);
if (self.yourSide.active.length < 3) self.yourSide.active.push(null);
if (self.yourSide.active.length < 3) self.yourSide.active.push(null);
}
break;
case 'variation':

View File

@ -12,7 +12,7 @@ if (!window.exports) window.exports = window;
// 32930 to 73032
// subway
// 1:33.120 - 3:08.614
/*
/*
// PO importer
@ -709,7 +709,7 @@ var Tools = {
} while (template && template.species && !alreadyChecked[template.speciesid]);
return learnset;
},
getType: function(type) {
if (!type || typeof type === 'string') {
var id = toId(type);

View File

@ -446,7 +446,7 @@
if (this.battle.gameType === 'doubles') {
this.choice.count = 2;
}
if (this.battle.gameType === 'triples' || this.battle.gameType === 'rotation') {
if (this.battle.gameType === 'triples' || this.battle.gameType === 'rotation') {
this.choice.count = 3;
}
controls += 'How will you start the battle?</div>';

View File

@ -33,7 +33,7 @@
this.$chatAdd.html('<form class="chatbox"><label style="' + hashColor(userid) + '">' + Tools.escapeHTML(name) + ':</label> <textarea class="textbox" type="text" size="70" autocomplete="off"></textarea></form>');
this.$chatbox = this.$chatAdd.find('textarea');
this.$chatbox.autoResize({
animate: false,
animate: false,
extraSpace: 0
});
if (this === app.curSideRoom || this === app.curRoom) {

View File

@ -26,7 +26,7 @@
if (!format.searchShow || !format.rated) continue;
ladderButtons += '<li style="margin:5px"><button name="selectFormat" value="'+i+'" style="width:400px;height:30px;text-align:left;font:12pt Verdana">'+format.name+'</button></li>';
}
this.$el.html('<div class="ladder pad"><p>See a user\'s ranking with <code>/ranking <em>username</em></code></p>' +
this.$el.html('<div class="ladder pad"><p>See a user\'s ranking with <code>/ranking <em>username</em></code></p>' +
//'<p><strong style="color:red">I\'m really really sorry, but as a warning: we\'re going to reset the ladder again soon to fix some more ladder bugs.</strong></p>' +
'<p>(btw if you couldn\'t tell the ladder screens aren\'t done yet; they\'ll look nicer than this once I\'m done.)</p><ul>' +
ladderButtons +

View File

@ -1441,7 +1441,7 @@
text += ' / ';
}
text += ''+curSet.ivs[stat]+' '+BattlePOStatNames[stat];
}
}
}
}
if (!first) {

View File

@ -110,7 +110,7 @@
//
// Rendering functions
//
//
// These are all static!
//

View File

@ -1,11 +1,11 @@
function BattleChart()
{
var self = this;
this.firstResult = '';
this.exactResult = false;
this.lastSearch = '[init]';
// I know, I know, lots of memory
// but these are arrays of pointers, so it's not _horrible_
// and this let me cache sorting
@ -30,21 +30,21 @@ function BattleChart()
{
this.moves.push(BattleMovedex[i]);
}
this.lastPokemonSort = null;
this.lastItemSort = null;
this.lastAbilitySort = null;
this.lastMoveSort = null;
this.illegalBuckets = {
'Illegal': 'Illegal'
};
this.selectCallback = null;
this.select = function(x) {
if (self.selectCallback) self.selectCallback(x);
};
this.row = function(thing, attrs, match, isFirst) {
if (isFirst)
{
@ -69,11 +69,11 @@ function BattleChart()
};
this.pokemonRow = function(pokemon, attrs, match, isFirst) {
var text = '<li class="result'+(isFirst?' firstresult':'')+'"><a'+attrs+' data-name="'+Tools.escapeHTML(pokemon.species)+'">';
text += '<span class="col numcol">'+(pokemon.num)+'</span> ';
var name = Tools.escapeHTML(pokemon.name);
if (pokemon.forme && pokemon.baseSpecies) name = pokemon.baseSpecies;
if (match.name)
{
@ -91,7 +91,7 @@ function BattleChart()
name += '<small>-'+pokemon.forme+'</small>';
}
}
/* if (match.name)
{
name = name.substr(0, match.name.start)+'<b>'+name.substr(match.name.start, match.name.end-match.name.start)+'</b>'+name.substr(match.name.end);
@ -100,21 +100,21 @@ function BattleChart()
text += '<span style="'+Tools.getIcon(pokemon)+'"></span>';
text += '</span> ';
text += '<span class="col pokemonnamecol" style="white-space:nowrap">'+name+'</span> ';
if (self.illegalBuckets[match.bucket])
{
text += '<span class="col illegalcol"><em>'+self.illegalBuckets[match.bucket]+'</em></span> ';
text += '</a></li>';
return text;
}
text += '<span class="col typecol">';
for (var i=0; i<pokemon.types.length; i++)
{
text += Tools.getTypeIcon(pokemon.types[i], (match.type&&match.type[i]));
}
text += '</span> ';
text += '<span style="float:left;min-height:26px">';
if (pokemon.abilities['1'])
{
@ -128,7 +128,7 @@ function BattleChart()
{
var ability = pokemon.abilities[i];
if (!ability) continue;
if (i === '1') text += '<br />';
if (match.ability && match.ability[i])
{
@ -140,7 +140,7 @@ function BattleChart()
if (!pokemon.abilities['DW']) text += '</span><span class="col abilitycol">';
text += '</span>';
text += '</span>';
text += '<span style="float:left;min-height:26px">';
text += '<span class="col statcol"><em>HP</em><br />'+pokemon.baseStats.hp+'</span> ';
text += '<span class="col statcol"><em>Atk</em><br />'+pokemon.baseStats.atk+'</span> ';
@ -152,68 +152,68 @@ function BattleChart()
for (i in pokemon.baseStats) bst += pokemon.baseStats[i];
text += '<span class="col bstcol"><em>BST<br />'+bst+'</em></span> ';
text += '</span>';
text += '</a></li>';
return text;
};
this.itemRow = function(item, attrs, match, isFirst) {
var text = '<li class="result'+(isFirst?' firstresult':'')+'"><a'+attrs+' data-name="'+Tools.escapeHTML(item.name)+'">';
var url = item.name.toLowerCase().replace(/ /g, '-').replace(/[^a-z-]+/g, '');
url = '/sprites/itemicons/'+url+'.png';
text += '<span class="col itemiconcol">';
text += '<span style="'+Tools.getItemIcon(item)+'"></span>';
text += '</span> ';
var name = Tools.escapeHTML(item.name);
if (match.name)
{
name = name.substr(0, match.name.start)+'<b>'+name.substr(match.name.start, match.name.end-match.name.start)+'</b>'+name.substr(match.name.end);
}
text += '<span class="col namecol">'+name+'</span> ';
if (self.illegalBuckets[match.bucket])
{
text += '<span class="col illegalcol"><em>'+self.illegalBuckets[match.bucket]+'</em></span> ';
text += '</a></li>';
return text;
}
text += '<span class="col itemdesccol">'+Tools.escapeHTML(item.shortDesc || item.desc)+'</span> ';
text += '</a></li>';
return text;
};
this.abilityRow = function(ability, attrs, match, isFirst) {
var text = '<li class="result'+(isFirst?' firstresult':'')+'"><a'+attrs+' data-name="'+Tools.escapeHTML(ability.name)+'">';
var name = Tools.escapeHTML(ability.name);
if (match.name)
{
name = name.substr(0, match.name.start)+'<b>'+name.substr(match.name.start, match.name.end-match.name.start)+'</b>'+name.substr(match.name.end);
}
text += '<span class="col namecol">'+name+'</span> ';
if (self.illegalBuckets[match.bucket])
{
text += '<span class="col illegalcol"><em>'+self.illegalBuckets[match.bucket]+'</em></span> ';
text += '</a></li>';
return text;
}
text += '<span class="col abilitydesccol">'+Tools.escapeHTML(ability.shortDesc || ability.desc)+'</span> ';
text += '</a></li>';
return text;
};
this.moveRow = function(move, attrs, match, isFirst) {
var text = '<li class="result'+(isFirst?' firstresult':'')+'"><a'+attrs+' data-name="'+Tools.escapeHTML(move.name)+'">';
var name = Tools.escapeHTML(move.name);
var hplen = 'Hidden Power'.length;
if (name.substr(0, hplen) === 'Hidden Power') name = 'Hidden Power';
@ -234,27 +234,27 @@ function BattleChart()
}
}
text += '<span class="col movenamecol">'+name+'</span> ';
if (self.illegalBuckets[match.bucket])
{
text += '<span class="col illegalcol"><em>'+self.illegalBuckets[match.bucket]+'</em></span> ';
text += '</a></li>';
return text;
}
text += '<span class="col typecol">';
text += Tools.getTypeIcon(move.type, match.type);
text += '<img src="' + Tools.resourcePrefix + 'sprites/categories/'+move.category+'.png" alt="'+move.category+'" height="14" width="32"'+(match.category?' class="b"':'')+' />';
text += '</span> ';
text += '<span class="col labelcol">'+(move.category!=='Status'?('<em>Power</em><br />'+(move.basePower||'&mdash;')):'')+'</span> ';
text += '<span class="col widelabelcol"><em>Accuracy</em><br />'+(move.accuracy && move.accuracy!==true?move.accuracy+'%':'&mdash;')+'</span> ';
text += '<span class="col pplabelcol"><em>PP</em><br />'+(move.pp!==1?move.pp*8/5:move.pp)+'</span> ';
text += '<span class="col movedesccol">'+Tools.escapeHTML(move.shortDesc || move.desc)+'</span> ';
text += '</a></li>';
return text;
};
this.chart = function(searchTerm, type, init, thisArrange, thisSort) {
@ -262,7 +262,7 @@ function BattleChart()
else searchTerm = searchTerm.toLowerCase();
if (!init && searchTerm === self.lastSearch) return;
self.lastSearch = searchTerm;
var chartData = {
exact: {},
start: {},
@ -275,13 +275,13 @@ function BattleChart()
};
thisArrange = thisArrange || self.defaultArrange;
thisSort = thisSort || self.defaultSort;
self.firstResult = '';
self.exactResult = false;
var buckets = thisArrange();
var things = [];
switch (type)
{
case 'pokemon':
@ -317,23 +317,23 @@ function BattleChart()
things = self.moves;
break;
}
for (var i=0; i<things.length; i++)
{
var thing = things[i];
if (type==='pokemon' && !thing.species || thing.jp) continue;
// fill our buckets!
var bucket = thisArrange(thing);
var match = {thing: thing, thingType: type, bucket: bucket};
var matchType = 'other';
var index = -1;
if (searchTerm)
{
index = thing.name.toLowerCase().indexOf(searchTerm);
if (index === 0)
{
matchType = 'start';
@ -358,7 +358,7 @@ function BattleChart()
else if (type === 'pokemon')
{
index = thing.types[0].toLowerCase().indexOf(searchTerm);
if (index == 0)
{
matchType = 'fullstart';
@ -367,7 +367,7 @@ function BattleChart()
end: searchTerm.length
}};
}
if (thing.types[1])
{
index = thing.types[1].toLowerCase().indexOf(searchTerm);
@ -381,7 +381,7 @@ function BattleChart()
}};
}
}
index = thing.abilities['0'].toLowerCase().indexOf(searchTerm);
if (index == 0)
{
@ -391,7 +391,7 @@ function BattleChart()
end: searchTerm.length
}};
}
if (thing.abilities['1'])
{
index = thing.abilities['1'].toLowerCase().indexOf(searchTerm);
@ -404,7 +404,7 @@ function BattleChart()
}};
}
}
if (thing.abilities['DW'])
{
index = thing.abilities['DW'].toLowerCase().indexOf(searchTerm);
@ -421,7 +421,7 @@ function BattleChart()
else if (type === 'move')
{
index = thing.type.toLowerCase().indexOf(searchTerm);
if (index == 0)
{
matchType = 'fullstart';
@ -430,7 +430,7 @@ function BattleChart()
end: searchTerm.length
};
}
index = thing.category.toLowerCase().indexOf(searchTerm);
if (index == 0)
@ -443,7 +443,7 @@ function BattleChart()
}
}
}
if (self.illegalBuckets[bucket])
{
if (matchType === 'start' || matchType === 'contains' || matchType === 'fullstart')
@ -451,18 +451,18 @@ function BattleChart()
matchType = 'illegal'+matchType;
}
}
if (!chartData[matchType][bucket]) chartData[matchType][bucket] = [];
chartData[matchType][bucket].push(match);
}
// construct a chart from the filled buckets!
var text = '<ul class="utilichart">';
var firstMatch = true;
var noNameMatch = false;
var matchTypes = ['exact', 'start', 'contains', 'illegalstart', 'illegalcontains'];
for (var mtIndex = 0; mtIndex < 5; mtIndex++)
{
@ -482,16 +482,16 @@ function BattleChart()
}
}
}
if (searchTerm && firstMatch)
{
text += '<li><h3>Matches</h3></li><li><em>No matches</em></li>';
firstMatch = false;
noNameMatch = true;
}
firstMatch = true;
for (var i in chartData.fullstart)
{
if (!chartData.fullstart[i]) continue;
@ -520,7 +520,7 @@ function BattleChart()
firstMatch = false;
}
}
if (!searchTerm || init)
{
for (var i=0; i<buckets.length; i++)
@ -540,11 +540,11 @@ function BattleChart()
}
}
}
text += '</ul>';
return text;
};
this.defaultArrange = function(thing) {
if (!thing)
{

View File

@ -272,12 +272,12 @@ class NTBBLadder {
'userid' => $row['userid'],
'rating' => $row
);
if ($this->update($user)) {
$this->saveRating($user);
$needUpdate = true;
}
unset($row['rpdata']);
$top[] = $row;
}

View File

@ -13,9 +13,9 @@
<script src="/js/jquery-cookie.js"></script>
<script src="/js/jquery.json-2.3.min.js"></script>
<script src="/data/pokedex-mini.js"></script>
<script>var exports=this</script>
<script src="/data/pokedex.js"></script>
<script src="/data/moves.js"></script>
<script src="/data/items.js"></script>
@ -24,17 +24,17 @@
<script src="/js/battledata.js"></script>
<script src="/js/utilichart.js"></script>
<style>
body { text-align: left; }
</style>
</head>
<body>
<div style="padding:20px"><input id="searchTerm" type="text" onkeyup="update()" size="50" autofocus /></div>
<div id="results">
</div>
<script>
var timeout = null;
var prevSearch = 'init';

View File

@ -16,7 +16,7 @@ License: GPLv2
width: 640px;
height: 360px;
overflow: hidden;
font-family: Verdana, sans-serif;
font-size: 10pt;
}

View File

@ -45,7 +45,7 @@ body {
padding: 2px 3px;
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 9pt;
box-shadow: inset 0px 1px 2px #CCCCCC, 1px 1px 0 rgba(255,255,255,.6);
background: #F8FBFD;
}
@ -816,7 +816,7 @@ p.or:after {
padding: 1px 4px 2px 4px;
border: 1px solid #BBCCDD;
background: #F8FBFD;
border-radius: 4px;
text-decoration: none;
color: #336699;
@ -1582,13 +1582,13 @@ a.ilink:hover {
height: 127px;
width: 626px;
margin-top: 8px;
background-image: linear-gradient(top, rgb(218,229,240) 10%, rgb(203,214,225) 55%);
background-image: -o-linear-gradient(top, rgb(218,229,240) 10%, rgb(203,214,225) 55%);
background-image: -moz-linear-gradient(top, rgb(218,229,240) 10%, rgb(203,214,225) 55%);
background-image: -webkit-linear-gradient(top, rgb(218,229,240) 10%, rgb(203,214,225) 55%);
background-image: -ms-linear-gradient(top, rgb(218,229,240) 10%, rgb(203,214,225) 55%);
box-shadow: inset 1px 1px 0 rgba(255,255,255,.6);
}
.setcol {
@ -1633,7 +1633,7 @@ a.ilink:hover {
font-weight: bold;
color: #555555;
padding-left: 2px;
text-shadow: 1px 1px 0 rgba(255,255,255,.6);
}
.setchart-nickname label {
@ -1781,7 +1781,7 @@ a.ilink:hover {
font-size: 9pt;
width: 104px;
height: 20px;
box-shadow: inset 0px 1px 2px #CCCCCC, 1px 1px 0 rgba(255,255,255,.6);
background: #F8FBFD;
color: black;
@ -2040,7 +2040,7 @@ a.ilink:hover {
* <blink>
*********************************************************/
@-webkit-keyframes blinker {
@-webkit-keyframes blinker {
from { opacity: 1.0; }
to { opacity: 0.0; }
}
@ -2056,6 +2056,6 @@ blink {
animation-name: blinker;
animation-iteration-count: infinite;
animation-timing-function: cubic-bezier(1.0,0,0,1.0);
animation-duration: 1s;
animation-duration: 1s;
text-decoration: none;
}

View File

@ -40,14 +40,14 @@
<!--[if lte IE 8]>
<script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<style>
/*
/*
CSS rules to use for styling the overlay:
.chromeFrameOverlayContent
.chromeFrameOverlayContent iframe
.chromeFrameOverlayCloseBar
.chromeFrameOverlayUnderlay
*/
</style>
</style>
<script>
CFInstall.check({mode: "overlay"});
</script>