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

Support Super Fang & Ruination #576

Open
wants to merge 69 commits into
base: master
Choose a base branch
from

Conversation

ForwardFeed
Copy link
Contributor

And i've paid attention to round down if the HP are odd

@shrianshChari
Copy link
Contributor

Nature's Madness seems to already be implemented, but you should also have this apply to Ruination as well because that move works the same way as Super Fang and Nature's Madness.

Additionally, Super Fang can hit Ghost types in Gen 1, so make sure that also gets implemented.

@ForwardFeed
Copy link
Contributor Author

I'll work on it

@ForwardFeed
Copy link
Contributor Author

Also two question, why aren't the genders fully implemented, i mean is there a specific reason for that? Also i plan to integrate Psywave & Magnitude, but i have no clue how to format the data, should i just show "Lowest BP Roll - Median BP roll - highest BP Roll ", or do like with multi-hits move where there is a menu on the BP rolls and the damage shows normally from there? thanks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be missing something but if defender.curHP() === 1, doesn't that mean lostHP === 0?

Super Fang should always do 1 damage at least, and will knock out a Pokemon with 1 HP.

Copy link
Collaborator

@thejetou thejetou Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but Math.floor(1 / 2) || 1 equals to 0 || 1 which evaluates to 1.

@@ -74,7 +74,13 @@ export function calculateRBYGSC(
}
}


//in gen 1, Super fang can hit ghosts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//in gen 1, Super fang can hit ghosts
// In Gen 1, Super Fang can hit Ghost types

const lostHP = Math.floor(defender.curHP() / 2) || 1;
result.damage = lostHP;
return result;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Gen 2, you should check if the opposing Pokemon can be hit by Super Fang (probably by getMoveEffectiveness) and run the calculation if so.

And also check if the opposing Pokemon has Protect up just like it's done in gen789.ts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In gen 2 the check for Super fang pass after the check of type effectiveness.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same goes for the field.defenderSide.isProtected check, so as far i can tell, there is no issue with that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In gen 2 the check for Super fang pass after the check of type effectiveness.

In Gen 2 Super Fang doesn't seem to be ran though.

The same goes for the field.defenderSide.isProtected check, so as far i can tell, there is no issue with that.

Yeah there is no issue there. My bad.

calc/src/mechanics/gen3.ts Show resolved Hide resolved
@thejetou thejetou changed the title included damages for super fang Support Super Fang & Ruination Sep 29, 2023
@thejetou
Copy link
Collaborator

thejetou commented Sep 29, 2023

Also two question, why aren't the genders fully implemented, i mean is there a specific reason for that? Also i plan to integrate Psywave & Magnitude, but i have no clue how to format the data, should i just show "Lowest BP Roll - Median BP roll - highest BP Roll ", or do like with multi-hits move where there is a menu on the BP rolls and the damage shows normally from there? thanks

I'm not sure why the genders aren't full implemented either honestly, lol.

About Psywave & Magnitude, probably just format it "Lowest roll - Highest roll" and include each possible roll? I think that's sufficient.

@ForwardFeed
Copy link
Contributor Author

ForwardFeed commented Oct 13, 2023

Also for the gender, i was thinking more about the addSets and ExportPokemon in the front end. Rivalry and gender in the UI is well implemented, my bad i missexplained.
Also i slided a fix for something that has nothing to do about Halving HP moves, i have a doubt about if this is wrong.

shrianshChari and others added 28 commits October 28, 2023 10:54
Fixes Spectral Thief stealing negative stat changes, as reported https://www.smogon.com/forums/posts/9748441.

Additionally, fixes Spectral Thief not removing positive boosts (particularly Defense boosts) from the target.
In Generation 4, if a Pokemon with the ability Klutz holds
an Iron Ball it should still get its Speed dropped. However, Klutz
Pokemon holding an Iron Ball won't be grounded.

Fixes smogon#560
Duplicate Palafin's sets into Palafin-Hero.

Fixes smogon#558
The smoke tester runs PS battles and compares the damage rolls to the
calc's. If they don't match, it will print the output to `logs/`.
The smoke tester can then be re-ran with the log filename as a CLI
argument and it will report each failure in detail.

This is still a WIP as can be seen by the TODO comments but it works
decently enough now that I decided to commit it to the repo.
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.20.12 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.2 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

10 participants