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

Draft
wants to merge 13 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.

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
Collaborator

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?

@flx-sta flx-sta added the Game Balance Changes that heavily impact the game label Sep 6, 2024
/* making rogue balls have a higher chance to catch pokemon if they have a tinted pokeball (i.e. at least one thing is new for them)
* you can also get the boosted type for a description (i.e. for modifier-type)
*/
if (pokemon?.isTintedPokeball() || description) {
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
if (pokemon?.isTintedPokeball() || description) {
if (enemyPokemon?.isTintedPokeball() || getBoostedDescription) {

Comment on lines 53 to 54
const pokemon = enemyPokemon ?? null;
const description = getBoostedDescription ?? false;
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
const pokemon = enemyPokemon ?? null;
const description = getBoostedDescription ?? false;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would doing it the way I've already got it not be safer for things as a just in case? Or would it not make a difference in this case with how I've got it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

null and undefined are both treated the same way in this scenario (for enemyPokemon), and both also evaluate to false when used in an if statement (for getBoostedDescription).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Perfect! I think I was in the mindset of fixing the challenges which used a similar change to what I did here - let me push a change through now!

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

Successfully merging this pull request may close these issues.

5 participants