exports.BattleAbilities = { "drizzle": { inherit: true, onStart: function(source) { this.setWeather('raindance', source, null); } }, "drought": { inherit: true, onStart: function(source) { this.setWeather('sunnyday', source, null); } }, "snowwarning": { inherit: true, onStart: function(source) { this.setWeather('hail', source, null); } }, "sandstream": { inherit: true, onStart: function(source) { this.setWeather('sandstorm', source, null); } }, "forecast": { inherit: true, onModifyMove: function(move) { if (move.weather) { var weather = move.weather; move.weather = null; move.onHit = function(target, source) { this.setWeather(weather, source, this.getAbility('forecast')); this.weatherData.duration = 0; }; move.target = 'self'; } } }, "thickfat": { inherit:true, onImmunity: function(type, pokemon) { if (type === 'hail') return false; }, }, "flowergift": { inherit: true, onModifyMove: function(move) { if (move.id === 'sunnyday') { var weather = move.weather; move.weather = null; move.onHit = function(target, source) { this.setWeather(weather, source, this.getAbility('flowergift')); this.weatherData.duration = 0; }; move.target = 'self'; move.sideCondition = 'flowergift'; } }, onModifyStats: function(stats, pokemon) { if (this.isWeather('sunnyday')) { if (pokemon.isActive && pokemon.speciesid === 'cherrim' && this.effectData.forme !== 'Sunny') { this.effectData.forme = 'Sunny'; this.add('-formechange', pokemon, 'Cherrim-Sunny'); this.add('-message', pokemon.name+' transformed! (placeholder)'); this.boost({spd:1}); } } else if (pokemon.isActive && pokemon.speciesid === 'cherrim' && this.effectData.forme) { delete this.effectData.forme; this.add('-formechange', pokemon, 'Cherrim'); this.add('-message', pokemon.name+' transformed! (placeholder)'); } }, effect: { onSwitchInPriority: 1, onSwitchIn: function(target) { if (!target.fainted) { this.boost({spd:1}, target, target, this.getAbility('flowergift')); } target.side.removeSideCondition('flowergift'); } } }, "slowstart": { inherit: true, effect: { duration: 3, onStart: function(target) { this.add('-start', target, 'Slow Start'); }, onModifyStats: function(stats) { stats.atk /= 2; stats.spe /= 2; }, onEnd: function(target) { this.add('-end', target, 'Slow Start'); } } }, "compoundeyes": { desc: "The accuracy of this Pokemon's moves receives a 60% increase; for example, a 50% accurate move becomes 80% accurate.", shortDesc: "This Pokemon's moves have their Accuracy boosted to 1.6x.", onModifyMove: function(move) { if (typeof move.accuracy !== 'number') return; this.debug('compoundeyes - enhancing accuracy'); move.accuracy *= 1.6; }, id: "compoundeyes", name: "Compoundeyes", rating: 3.5, num: 14 }, "solidrock": { inherit: true, onFoeBasePower: function(basePower, attacker, defender, move) { if (this.getEffectiveness(move.type, defender) > 0) { this.debug('Solid Rock neutralize'); return basePower * 1/2; } } }, "filter": { inherit: true, onFoeBasePower: function(basePower, attacker, defender, move) { if (this.getEffectiveness(move.type, defender) > 0) { this.debug('Solid Rock neutralize'); return basePower * 1/2; } } }, "telepathy": { inherit: true, onSwitchOut: function() {} } };