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] Tera Blast Added Ability To Ignore Held Items And Abilities During Stat Calculation #4984

Open
wants to merge 6 commits into
base: beta
Choose a base branch
from

Conversation

geeilhan
Copy link
Contributor

@geeilhan geeilhan commented Dec 10, 2024

What are the changes the user will see?

There are no superficial changes.

What are the changes from a developer perspective?

I added the variable ignoreHeldItems: boolean = false to getEffectiveStat() in order to skip held items during the effective stats calculation.

Also added ability ignore and held items ignore parameter in TeraMoveCategoryAttr so abilities and held items are properly ignored.

Added tests to tera_blast.test.ts to check if my implementation works properly and some more.

Removed .partial()

Screenshots/Videos

No Visual changes are available but I have screenshots of my console (I added some console.logcomments)

Cubone: ATK: 10, SPATK: 11, Held Items: Thick Club (Doubles Cubone's ATK)
Before Implementation:
Screenshot from 2024-12-10 13-17-50

After Implementation:
Screenshot from 2024-12-10 13-17-18

(Automated tests cover the same for abilities instead of held items)

How to test the changes?

const overrides = {
  OPP_SPECIES_OVERRIDE: Species.SNORLAX,
  OPP_MOVESET_OVERRIDE: [ Moves.SPLASH ],
  OPP_ABILITY_OVERRIDE: Abilities.ROUGH_SKIN,
  OPP_LEVEL_OVERRIDE: 20,
  STARTER_SPECIES_OVERRIDE: Species.CUBONE,
  MOVESET_OVERRIDE: [ Moves.TERA_BLAST ],
  STARTING_HELD_ITEMS_OVERRIDE: [
    { name: "SPECIES_STAT_BOOSTER", type: "THICK_CLUB" },
    { name: "TERA_SHARD", type: Type.FIRE }
  ],
} satisfies Partial<InstanceType<typeof DefaultOverrides>>;

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 tested the changes manually?
  • Are all unit tests still passing? (npm run test)
    • Have I created new automated tests (npm run create-test) or updated existing tests related to the PR's changes?
  • Have I provided screenshots/videos of the changes (if applicable)?
    • Have I made sure that any UI change works for both UI themes (default and legacy)?

@geeilhan geeilhan requested a review from a team as a code owner December 10, 2024 12:35
@geeilhan geeilhan changed the title [Move] Added Ability To Ignore Held Items And Abilities During Stat Calculation [Move] Tera Blast Added Ability To Ignore Held Items And Abilities During Stat Calculation Dec 13, 2024
@Madmadness65 Madmadness65 added the Move Affects a move label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Move Affects a move
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants