Skip to content
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

[Move] Spectral Thief Full Implementation #4891

Draft
wants to merge 14 commits into
base: beta
Choose a base branch
from

Conversation

geeilhan
Copy link
Contributor

@geeilhan geeilhan commented Nov 17, 2024

What are the changes the user will see?

Spectral Thief now steals the stat changes correctly.

Why am I making these changes?

(#3503)

What are the changes from a developer perspective?

Added a SpectralThiefAttr which extends a new StatChangeBeforeDmgCalcAttr that applies Stat Stage changes before damage calculation.

Ability Attributes such as Contrary and Simple are applied correctly since the stat changes happen through the StatStageChangePhase.

I would also like a message to pop up if stats are stolen correctly. I added the english text here public/locales/en/move-trigger.json. Do I need to push it for the other languages too?

target.scene.queueMessage(i18next.t("moveTriggers:stolePositiveStatChanges", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target) }));

https://github.com/geeilhan/pokerogueFork/blob/590f66e09f61f2163534d265d21b84048175cfe2/src/data/move.ts#L4367-L4368

Screenshots/Videos

Before Spectral Thief implementation:

spectral-thief-implementation-before.webm

After Spectral Thief implementation:

spectral-thief-implementation-after.webm

How to test the changes?

added automated tests for

  • Basic Use
  • Substitute Interaction
  • Protect Interaction
  • Clear Body, White Smoke and Hyper Cutter Interaction
  • Simple Interaction
  • Contrary Interaction
  • Check if Dmg is calculated after stat changes

Checklist

  • I'm using beta as my base branch
  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • Have I considered writing automated tests for the issue?
  • If I have text, did I make it translatable and add a key in the English locale file(s)?
  • Have I tested the changes (manually)?
    • Are all unit tests still passing? (npm run test)
  • Are the changes visual?
    • Have I provided screenshots/videos of the changes?

@geeilhan geeilhan requested a review from a team as a code owner November 17, 2024 00:01
@geeilhan geeilhan marked this pull request as draft November 17, 2024 00:42
@geeilhan geeilhan changed the title [Move] Spectral Thief Full Implementation [Move] Spectral Thief Partial Implementation Nov 17, 2024
@geeilhan geeilhan changed the title [Move] Spectral Thief Partial Implementation [Move] Spectral Thief Full Implementation Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant