Skip to content

Commit

Permalink
Quick Claw and Custap Berry should override Stall (#2709)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkerab authored and Marty-D committed Aug 23, 2016
1 parent 98eeba9 commit 5f8a608
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion data/abilities.js
Expand Up @@ -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",
Expand Down
14 changes: 6 additions & 8 deletions data/items.js
Expand Up @@ -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;
}
}
},
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion mods/gen3/items.js
Expand Up @@ -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;
}
},
},
Expand Down

0 comments on commit 5f8a608

Please sign in to comment.