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

[Balance] Rogue ball increase catch chance tinted pokemon #4065

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

Conversation

Opaque02
Copy link
Collaborator

@Opaque02 Opaque02 commented Sep 6, 2024

What are the changes the user will see?

Rogue balls now have a 5x chance to catch pokemon instead of 3x if the pokemon has a tinted pokeball

Why am I making these changes?

Damo wanted it
image

What are the changes from a developer perspective?

The main thing is that the code to find out if a pokemon has a tinted pokeball has been moved to the pokemon class under ".isPokeballTinted()". With this change, it's now possible to call from within the pokeball class by adding a pokemon field to the getPokeballCatchMultiplier. I've also added a boolean to getPokeballCatchMultiplier which is used to get the description. This is an override that lets you get the boosted rate without having to enter a pokemon as an input, which is used in the shops for the description.

Lastly, I've moved some of the text around in the shop so that for pokeballs, the number of pokeballs you have shows under the pokeball so the description section can be open for the catch rate and description if needed. The locales PR is located here

Screenshots/Videos

This wurmple below as a tinted pokeball because I didn't have the non-shiny form of it:
image

As you can see, it has a catch rate of 5 with rogue balls:
image

The wurmple below has a tinted pokeball because I don't have the ability:
image

Once again, it has a boosted catch rate of 5:
image

Below is a wurmple that does not have a tinted pokeball:
image

As you can see, it has a normal catch rate of 3:
image

In the shop, this is now what you see for rogue balls:

image

How to test the changes?

Download the PR and change some overrides.

Firstly, the below override will let you add 5 rogue balls to the shop to test the wording on the screen. Add this to the top section of overrides:

const overrides = {
	ITEM_REWARD_OVERRIDE: [{ name: "ROGUE_BALL", count: 5 }],
} satisfies Partial<InstanceType<typeof DefaultOverrides>>;

Secondly, you can change the pokeball overrides section to something like this:

readonly POKEBALL_OVERRIDE: { active: boolean; pokeballs: PokeballCounts } = {
    active: true,
    pokeballs: {
      [PokeballType.POKEBALL]: 5,
      [PokeballType.GREAT_BALL]: 0,
      [PokeballType.ULTRA_BALL]: 0,
      [PokeballType.ROGUE_BALL]: 99,
      [PokeballType.MASTER_BALL]: 99,
    },
  };

This will give you master balls and rogue balls you can use to test the catch rate.

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?

@@ -2,7 +2,8 @@
"ModifierType": {
"AddPokeballModifierType": {
"name": "{{modifierCount}}x {{pokeballName}}",
"description": "Receive {{pokeballName}} x{{modifierCount}} (Inventory: {{pokeballAmount}}) \nCatch Rate: {{catchRate}}"
"description": "Receive {{pokeballName}} x{{modifierCount}} (Inventory: {{pokeballAmount}}) \nCatch Rate: {{catchRate}}",
"catchRateGenerator": "{{normalCatchRate}}x ({{boostedCatchRate}}x for uncaught Pokemon)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Uncaught is not quite the same as the tinted pokeball since the tinted pokeball relates to both the specific pokemon form's dex attributes (like having owned a male charizard but not a female one) as well as the root form's ability index

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, that's a very good point - what wording would we want to use instead? "{{boostedCatchRate}}x for tinted pokeballs? We're a little limited on space is the only issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Tempo-anon it should now be clearer - let me know what you think

@flx-sta flx-sta added the Game Balance Changes focused on game balance label Sep 6, 2024
@Opaque02 Opaque02 marked this pull request as ready for review September 19, 2024 08:17
@Opaque02 Opaque02 requested review from a team as code owners September 19, 2024 08:17
@Tempo-anon
Copy link
Contributor

How does this work with fresh start since theoretically this would mean the more full your dex is the technically harder fresh start would be

@Opaque02
Copy link
Collaborator Author

Opaque02 commented Sep 19, 2024

How does this work with fresh start since theoretically this would mean the more full your dex is the technically harder fresh start would be

As per Damo on discord, only for fresh start rogue balls should be at a constant 5x rate, but should be a new pr

Copy link
Contributor

@EnochG1 EnochG1 left a comment

Choose a reason for hiding this comment

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

If you modify, not add new text,
all translations become mistranslated if you do not modify the text in all locale files to changed English text.
(I thing wrong translation is worse than untranslated right English)
I would request to change all locales/{lang}/modifire-type.json.

@Opaque02
Copy link
Collaborator Author

If you modify, not add new text, all translations become mistranslated if you do not modify the text in all locale files to changed English text. (I thing wrong translation is worse than untranslated right English) I would request to change all locales/{lang}/modifire-type.json.

@EnochG1 - can you elaborate a bit more on what I should change? We don't need to put the new keys in manually these days, so just want to double check about what I should change for this one

@Tempo-anon
Copy link
Contributor

4307 has been merged in. You can keep the isTintedPokeball function but you can now refactor it based on the other helper function I added. (And can also update pokemon-info-container and battle-info to use the new isTintedPokeball)

As for a constant 5x for fresh start... I'm not sure. Sure it works but there's a bunch of edge cases for that. Would it really be that broken for them to be a constant 5x boost? Pokeballs in general feel pretty underpowered for the tiers they're in. (5 ultra balls is the equivalent of 10 pokeballs has to compete with things like reviver seeds, rare evo items, mints, competitive items and 5 rogue balls which is the equivalent of 15-25 pokeballs has to compete with form change items and really competitive items like leftovers, shell bell, king's rock, etc)

@Opaque02 Opaque02 requested a review from a team as a code owner October 19, 2024 07:34
Copy link
Contributor

@MokaStitcher MokaStitcher left a comment

Choose a reason for hiding this comment

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

Haven't reviewed the rest yet, but it seems Skorupi's sprite got accidentally modified during of the merges probably, please fix 🙏
1000069300

@chaosgrimmon
Copy link
Collaborator

Haven't reviewed the rest yet, but it seems Skorupi's sprite got accidentally modified during of the merges probably, please fix 🙏

Yeah, those had to be hotfixed for Main because they'd cause a crash when used as a fusion material. The preferable solution would be to keep the .pngs, and use the .json here instead

This one might be the download link directly:
https://cdn.discordapp.com/attachments/1290008413975351317/1290938913774501909/451.json?ex=671d434d&is=671bf1cd&hm=f289a034970205777c842f39687efa0e47c4f05c8caabf643a291eafd5099cac&

@MokaStitcher
Copy link
Contributor

The preferable solution would be to keep the .pngs, and use the .json here instead

Yeah but I don't think it should be part of this PR, I'd rather have a separate PR to fix Skorupi and just revert the changes from this PR

@DayKev
Copy link
Collaborator

DayKev commented Oct 26, 2024

The preferable solution would be to keep the .pngs, and use the .json here instead

Yeah but I don't think it should be part of this PR, I'd rather have a separate PR to fix Skorupi and just revert the changes from this PR

It's just a git history issue, the change isn't part of this PR (it's in the f7715d7 merge commit).

return i18next.t("modifierType:ModifierType.AddPokeballModifierType.description", {
"modifierCount": this.count,
"pokeballName": getPokeballName(this.pokeballType),
"catchRate": getPokeballCatchMultiplier(this.pokeballType) > -1 ? `${getPokeballCatchMultiplier(this.pokeballType)}x` : "100%",
"pokeballAmount": `${scene.pokeballCounts[this.pokeballType]}`,
"catchRate": catchRate,
Copy link
Contributor

Choose a reason for hiding this comment

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

The master ball's catch rate is no longer being displayed:

20241030 Master Catch Rate

@PigeonBar
Copy link
Contributor

ME's have their own copy of the capture attempt function, which probably also needs updating (Line 376):

export function trainerThrowPokeball(scene: BattleScene, pokemon: EnemyPokemon, pokeballType: PokeballType, ballTwitchRate?: number): Promise<boolean> {
const originalY: number = pokemon.y;
if (!ballTwitchRate) {
const _3m = 3 * pokemon.getMaxHp();
const _2h = 2 * pokemon.hp;
const catchRate = pokemon.species.catchRate;
const pokeballMultiplier = getPokeballCatchMultiplier(pokeballType);
const statusMultiplier = pokemon.status ? getStatusEffectCatchRateMultiplier(pokemon.status.effect) : 1;
const x = Math.round((((_3m - _2h) * catchRate * pokeballMultiplier) / _3m) * statusMultiplier);
ballTwitchRate = Math.round(65536 / Math.sqrt(Math.sqrt(255 / x)));
}

@Tempo-anon
Copy link
Contributor

I still think this change while is cool in theory, seems to be quite complicated as it involves changing a LOT of files, not to mention a lot of locale changes and thoughts on how to future proof it for various challenges.

Hell, just make rogue balls 5x or 10x across the board no matter what because they suck compared to the other things in the rogue tier.

@DayKev
Copy link
Collaborator

DayKev commented Oct 30, 2024

ME's have their own copy of the capture attempt function, which probably also needs updating (Line 376):

export function trainerThrowPokeball(scene: BattleScene, pokemon: EnemyPokemon, pokeballType: PokeballType, ballTwitchRate?: number): Promise<boolean> {
const originalY: number = pokemon.y;
if (!ballTwitchRate) {
const _3m = 3 * pokemon.getMaxHp();
const _2h = 2 * pokemon.hp;
const catchRate = pokemon.species.catchRate;
const pokeballMultiplier = getPokeballCatchMultiplier(pokeballType);
const statusMultiplier = pokemon.status ? getStatusEffectCatchRateMultiplier(pokemon.status.effect) : 1;
const x = Math.round((((_3m - _2h) * catchRate * pokeballMultiplier) / _3m) * statusMultiplier);
ballTwitchRate = Math.round(65536 / Math.sqrt(Math.sqrt(255 / x)));
}

Wait what? Why?

@PigeonBar
Copy link
Contributor

ME's have their own copy of the capture attempt function, which probably also needs updating (Line 376):

export function trainerThrowPokeball(scene: BattleScene, pokemon: EnemyPokemon, pokeballType: PokeballType, ballTwitchRate?: number): Promise<boolean> {
const originalY: number = pokemon.y;
if (!ballTwitchRate) {
const _3m = 3 * pokemon.getMaxHp();
const _2h = 2 * pokemon.hp;
const catchRate = pokemon.species.catchRate;
const pokeballMultiplier = getPokeballCatchMultiplier(pokeballType);
const statusMultiplier = pokemon.status ? getStatusEffectCatchRateMultiplier(pokemon.status.effect) : 1;
const x = Math.round((((_3m - _2h) * catchRate * pokeballMultiplier) / _3m) * statusMultiplier);
ballTwitchRate = Math.round(65536 / Math.sqrt(Math.sqrt(255 / x)));
}

Wait what? Why?

Right now, I think it's just used for Safari Zone

@MokaStitcher
Copy link
Contributor

MokaStitcher commented Oct 30, 2024

It's just a git history issue, the change isn't part of this PR (it's in the f7715d7 merge commit).

No, it's an issue with this branch.

Here's how the Skorupi sheet looks in beta (taller than it is wide)

Screenshot_20241030-225049~2

Here's how it is on Opaquer's branch (wider than it is tall. This is the one that got added then reverted some time ago. It shouldn't get back in as it is broken, and has nothing to do with this PR anyway. Something went wrong during one of the merges to this branch, it's fine as long as a new commit it made that reverts the changes)

Screenshot_20241030-225535~2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Game Balance Changes focused on game balance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants