Merge pull request #294 from Joimer/gen1-special-visual

Implement Special visual for gen 1
This commit is contained in:
Guangcong Luo
2014-12-28 20:43:01 -06:00
2 changed files with 7 additions and 2 deletions

View File

@@ -156,7 +156,7 @@ var BattleBackdrops = [
'bg-route.png'
];
var BattleStats = {
atk: 'Attack', def: 'Defense', spa: 'Special Attack', spd: 'Special Defense', spe: 'Speed', accuracy: 'accuracy', evasion: 'evasiveness'
atk: 'Attack', def: 'Defense', spa: 'Special Attack', spd: 'Special Defense', spe: 'Speed', accuracy: 'accuracy', evasion: 'evasiveness', spc: 'Special'
};
var BattleItems = {
};

View File

@@ -577,7 +577,8 @@ var Pokemon = (function () {
spd: 'SpD',
spe: 'Spe',
accuracy: 'Accuracy',
evasion: 'Evasion'
evasion: 'Evasion',
spc: 'Spc'
};
if (!this.boosts[boostStat]) {
return '1× ' + boostStatTable[boostStat];
@@ -3300,6 +3301,8 @@ var Battle = (function () {
case '-boost':
var poke = this.getPokemon(args[1]);
var stat = args[2];
if (this.gen === 1 && stat === 'spd') break;
if (this.gen === 1 && stat === 'spa') stat = 'spc';
var amount = parseInt(args[3]);
if (!poke.boosts[stat]) {
poke.boosts[stat] = 0;
@@ -3331,6 +3334,8 @@ var Battle = (function () {
case '-unboost':
var poke = this.getPokemon(args[1]);
var stat = args[2];
if (this.gen === 1 && stat === 'spd') break;
if (this.gen === 1 && stat === 'spa') stat = 'spc';
var amount = parseInt(args[3]);
if (!poke.boosts[stat]) {
poke.boosts[stat] = 0;