-
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
Fix interaction of Ruin Abilities with themselves #9328
Conversation
data/abilities.ts
Outdated
@@ -357,7 +357,7 @@ export const Abilities: {[abilityid: string]: AbilityData} = { | |||
}, | |||
onAnyModifySpD(spd, target, source, move) { | |||
const abilityHolder = this.effectState.target; | |||
if (abilityHolder === target) return; | |||
if (abilityHolder === target || target.hasAbility('Beads of Ruin')) return; |
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.
we can probably just shorten these to just the hasAbility check right? since that must return true on the ability holder
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.
That feels correct
data/abilities.ts
Outdated
@@ -4437,7 +4437,7 @@ export const Abilities: {[abilityid: string]: AbilityData} = { | |||
}, | |||
onAnyModifyDef(def, target, source, move) { | |||
const abilityHolder = this.effectState.target; | |||
if (abilityHolder === target) return; | |||
if (abilityHolder === target || target.hasAbility('Sword of Ruin')) return; | |||
if (!move.ruinedDef?.hasAbility('Sword of Ruin')) move.ruinedDef = abilityHolder; | |||
if (move.ruinedDef !== abilityHolder && move.ruinedDef !== target) return; |
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.
if (move.ruinedDef !== abilityHolder && move.ruinedDef !== target) return; | |
if (move.ruinedDef !== abilityHolder) return; |
This part of the check is redundant now.
data/abilities.ts
Outdated
@@ -357,7 +357,7 @@ export const Abilities: {[abilityid: string]: AbilityData} = { | |||
}, | |||
onAnyModifySpD(spd, target, source, move) { | |||
const abilityHolder = this.effectState.target; | |||
if (abilityHolder === target) return; | |||
if (abilityHolder === target || target.hasAbility('Beads of Ruin')) return; | |||
if (!move.ruinedSpD?.hasAbility('Beads of Ruin')) move.ruinedSpD = abilityHolder; | |||
if (move.ruinedSpD !== abilityHolder && move.ruinedSpD !== target) return; |
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.
if (move.ruinedSpD !== abilityHolder && move.ruinedSpD !== target) return; | |
if (move.ruinedSpD !== abilityHolder) return; |
Implemented all suggestions, thanks! |
Thank you! |
if (!move.ruinedSpD?.hasAbility('Beads of Ruin')) move.ruinedSpD = abilityHolder; | ||
if (move.ruinedSpD !== abilityHolder && move.ruinedSpD !== target) return; | ||
if (move.ruinedSpD !== abilityHolder) return; |
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.
(Although with the new mechanics couldn't ruinedSpD
et. al. just be boolean?)
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.
Oh, Def and SpD are harder because of spread moves. Never mind then.
https://www.smogon.com/forums/threads/bug-reports-v4-read-original-post-before-posting.3663703/page-104#post-9468014