-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cheek pouch fixes #2375
Cheek pouch fixes #2375
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -282,7 +282,17 @@ exports.BattleAbilities = { | |
desc: "If this Pokemon eats a Berry, it restores 1/3 of its maximum HP, rounded down, in addition to the Berry's effect.", | ||
shortDesc: "If this Pokemon eats a Berry, it restores 1/3 of its max HP after the Berry's effect.", | ||
onEatItem: function (item, pokemon) { | ||
this.heal(pokemon.maxhp / 3); | ||
let targets = pokemon.side.foe.active; | ||
let unnervecheck = false; | ||
for (let i = 0; i < targets.length; i++) { | ||
if (!targets[i] || targets[i].fainted) continue; | ||
if (targets[i].ability.toString() === 'unnerve') { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And what if they have Gastro Acid? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (This is the entire reason |
||
unnervecheck = true; | ||
} | ||
} | ||
if (unnervecheck === false) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you understand how booleans work? Why is this not just |
||
this.heal(pokemon.maxhp / 3); | ||
} | ||
}, | ||
id: "cheekpouch", | ||
name: "Cheek Pouch", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnervecheck
is a bad variable name that doesn't conform to our standards, anyway.I would normally suggest
foeHasUnnerve