mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-20 22:18:18 -05:00
Fix Secret Power interaction with Parental Bond
This commit is contained in:
parent
f8e27d3b3a
commit
6603f9703a
|
|
@ -11727,31 +11727,23 @@ exports.BattleMovedex = {
|
|||
pp: 20,
|
||||
priority: 0,
|
||||
flags: {protect: 1, mirror: 1},
|
||||
onHit: function (target, source, move) {
|
||||
if (this.isTerrain('')) return;
|
||||
move.secondaries = [];
|
||||
if (this.isTerrain('electricterrain')) {
|
||||
move.secondaries.push({
|
||||
chance: 30,
|
||||
status: 'par',
|
||||
});
|
||||
} else if (this.isTerrain('grassyterrain')) {
|
||||
move.secondaries.push({
|
||||
chance: 30,
|
||||
status: 'slp',
|
||||
});
|
||||
} else if (this.isTerrain('mistyterrain')) {
|
||||
move.secondaries.push({
|
||||
chance: 30,
|
||||
boosts: {
|
||||
spa: -1,
|
||||
},
|
||||
});
|
||||
}
|
||||
onHit: function (target, pokemon) {
|
||||
pokemon.addVolatile('secretpower');
|
||||
},
|
||||
secondary: {
|
||||
chance: 30,
|
||||
status: 'par',
|
||||
effect: {
|
||||
duration: 1,
|
||||
onAfterMoveSecondarySelf: function (source, target, move) {
|
||||
if (this.random(10) < 3) {
|
||||
if (this.isTerrain('') || this.isTerrain('electricterrain')) {
|
||||
target.trySetStatus('par', source, move);
|
||||
} else if (this.isTerrain('grassyterrain')) {
|
||||
target.trySetStatus('slp', source, move);
|
||||
} else if (this.isTerrain('mistyterrain')) {
|
||||
this.boost({spa: -1}, target, source);
|
||||
}
|
||||
}
|
||||
source.removeVolatile('secretpower');
|
||||
},
|
||||
},
|
||||
target: "normal",
|
||||
type: "Normal",
|
||||
|
|
|
|||
|
|
@ -734,11 +734,13 @@ exports.BattleMovedex = {
|
|||
},
|
||||
secretpower: {
|
||||
inherit: true,
|
||||
onHit: function () {},
|
||||
secondary: {
|
||||
chance: 30,
|
||||
boosts: {
|
||||
accuracy: -1,
|
||||
effect: {
|
||||
duration: 1,
|
||||
onAfterMoveSecondarySelf: function (source, target, move) {
|
||||
if (this.random(10) < 3) {
|
||||
this.boost({accuracy: -1}, target, source);
|
||||
}
|
||||
source.removeVolatile('secretpower');
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user