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

Allow PP Ups to be edited #10167

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

Conversation

dot-Comfey
Copy link
Contributor

Server-side change; will post more on the client-side.

Server-side change; will post more on the client-side.
Regarding uploading to the team database: I did not test it, but by inspecting the code, it doesn't seem like anything needs to be done as the values should be preserved.
Probably better to avoid unusual PP values this way.

Also changed the packed format to treat empty values as 3 PP Ups.
@smogon smogon deleted a comment from SerineMolecule Mar 1, 2025
@@ -20869,7 +20869,6 @@ export const Moves: import('../sim/dex-moves').MoveDataTable = {
isNonstandard: "Past",
name: "Trump Card",
pp: 5,
noPPBoosts: true,
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice if we could still default Trump Card to 0 unless overridden.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A simple implementation on the client side only would be to automatically set a move slot's PP Ups to 0 if Trump Card is selected. Otherwise, the import format would have to be edited to make an exception for Trump Card.

Copy link
Contributor

Choose a reason for hiding this comment

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

You could modify noPPBoosts to PPBoosts, allowing it to accept either a number or false, with false indicating things that can't be PP boosted. The default value would be 3.

Copy link
Contributor

@andrebastosdias andrebastosdias Mar 1, 2025

Choose a reason for hiding this comment

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

Although that is not really move data, so it's probably better to just add a condition for Trump Card.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added exceptions for Trump Card on the server and client-side. It should be backwards-compatible for all regular teambuilder usage, but it wouldn't be for direct usage of packed format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I don't think it would be backwards-compatible in general.

@Zarel
Copy link
Member

Zarel commented Mar 1, 2025

Client PR at smogon/pokemon-showdown-client#2222

sim/teams.ts Outdated
if (move.startsWith(`Hidden Power `) && move.charAt(13) !== '[') {
move = `Hidden Power [${move.slice(13)}]`;
}
out += `- ${move} \n`;
if (set.movePPUps && !isNaN(set.movePPUps[i]) && set.movePPUps[i] < 3) {
PPUps = ` (PP Ups: ${set.movePPUps[i]})`;
Copy link
Member

Choose a reason for hiding this comment

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

Hmm. How do I feel about this...

dot-Comfey and others added 4 commits March 1, 2025 07:45
sim/teams.ts Outdated
if (move.startsWith(`Hidden Power `) && move.charAt(13) !== '[') {
move = `Hidden Power [${move.slice(13)}]`;
}
out += `- ${move} \n`;
if (set.movePPUps && !isNaN(set.movePPUps[i]) && set.movePPUps[i] < 3) {
Copy link
Member

Choose a reason for hiding this comment

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

If someone puts 3 PP Ups on Trump Card, it's not gonna get exported properly here, unfortunately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have fixed this by changing the unpack format. Old teams will need to adjust Trump Card's PP Ups to be 0, but newly created teams will automatically set this; is this something that you're fine with? (Trump Card hasn't been usable since Gen 7, and it's otherwise an unviable move, so I doubt it will have much impact anyway.)

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with making tradeoffs if they're necessary, but this doesn't seem necessary to me...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made it so that the default PP Ups for Trump Card is 0, and I've also made changes to the client PR to match the code here.

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.

3 participants