Quick Claw and Custap Berry should override Stall (#2709)

This commit is contained in:
urkerab 2016-08-23 15:35:41 +01:00 committed by Marty-D
parent 98eeba9f22
commit 5f8a608270
3 changed files with 8 additions and 10 deletions

View File

@ -2668,7 +2668,7 @@ exports.BattleAbilities = {
"stall": {
shortDesc: "This Pokemon moves last among Pokemon using the same or greater priority moves.",
onModifyPriority: function (priority) {
return priority - 0.1;
return Math.round(priority) - 0.1;
},
id: "stall",
name: "Stall",

View File

@ -955,12 +955,13 @@ exports.BattleItems = {
basePower: 100,
type: "Ghost",
},
onModifyPriorityPriority: -1,
onModifyPriority: function (priority, pokemon) {
if (pokemon.hp <= pokemon.maxhp / 4 || (pokemon.hp <= pokemon.maxhp / 2 && pokemon.hasAbility('gluttony'))) {
if (pokemon.eatItem()) {
this.add('-activate', pokemon, 'Custap Berry');
pokemon.removeVolatile('custapberry');
return priority + 0.1;
return Math.round(priority) + 0.1;
}
}
},
@ -1592,9 +1593,7 @@ exports.BattleItems = {
basePower: 10,
},
onModifyPriority: function (priority, pokemon) {
if (!pokemon.hasAbility('stall')) {
return priority - 0.1;
}
return Math.round(priority) - 0.1;
},
num: 316,
gen: 4,
@ -2231,9 +2230,7 @@ exports.BattleItems = {
basePower: 10,
},
onModifyPriority: function (priority, pokemon) {
if (!pokemon.hasAbility('stall')) {
return priority - 0.1;
}
return Math.round(priority) - 0.1;
},
num: 279,
gen: 4,
@ -3510,10 +3507,11 @@ exports.BattleItems = {
},
"quickclaw": {
id: "quickclaw",
onModifyPriorityPriority: -1,
onModifyPriority: function (priority, pokemon) {
if (this.random(5) === 0) {
this.add('-activate', pokemon, 'item: Quick Claw');
return priority + 0.1;
return Math.round(priority) + 0.1;
}
},
name: "Quick Claw",

View File

@ -161,7 +161,7 @@ exports.BattleItems = {
inherit: true,
onModifyPriority: function (priority, pokemon) {
if (this.random(5) === 0) {
return priority + 0.1;
return Math.round(priority) + 0.1;
}
},
},