[Balance] Egg and Starter Adjustments (increase HA chance, decrease candy costs) (#3419)

* [Balance] Egg Adjustments

* Reduced Cost of Same-Species Eggs

* Update egg.ts

* check errors

* Candy per Species-Egg Adjusted

* Set egg cost back to 10 for 9/10 cost mons

* 8-10 Legendaries made to 8 cost Eggs

* Updated some Passive Costs and Cost Reductions

* Change HA rate of eggs to 192

Also clean up the if to make it more readable

* Changed HA Rate from Same-Species Eggs up 1/4 -> 1/8

* Rename "voucher*" variables to "gacha*"

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
damocleas 2024-08-12 16:27:33 -04:00 committed by GitHub
parent 9669735d4c
commit 6d515d58b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 19 deletions

View File

@ -15,9 +15,10 @@ export const EGG_SEED = 1073741824;
// Rates for specific random properties in 1/x
const DEFAULT_SHINY_RATE = 128;
const GACHA_SHINY_UP_SHINY_RATE = 64;
const SAME_SPECIES_EGG_SHINY_RATE = 32;
const SAME_SPECIES_EGG_HA_RATE = 16;
const SAME_SPECIES_EGG_SHINY_RATE = 24;
const SAME_SPECIES_EGG_HA_RATE = 8;
const MANAPHY_EGG_MANAPHY_RATE = 8;
const GACHA_EGG_HA_RATE = 192;
// 1/x for legendary eggs, 1/x*2 for epic eggs, 1/x*4 for rare eggs, and 1/x*8 for common eggs
const DEFAULT_RARE_EGGMOVE_RATE = 6;
@ -211,11 +212,12 @@ export class Egg {
pokemonSpecies = getPokemonSpecies(Utils.randSeedInt(MANAPHY_EGG_MANAPHY_RATE) ? Species.PHIONE : Species.MANAPHY);
}
// Sets the hidden ability if a hidden ability exists and the override is set
// or if the same species egg hits the chance
// Sets the hidden ability if a hidden ability exists and
// the override is set or the egg hits the chance
let abilityIndex: number | undefined = undefined;
if (pokemonSpecies.abilityHidden && (this._overrideHiddenAbility
|| (this._sourceType === EggSourceType.SAME_SPECIES_EGG && !Utils.randSeedInt(SAME_SPECIES_EGG_HA_RATE)))) {
const sameSpeciesEggHACheck = (this._sourceType === EggSourceType.SAME_SPECIES_EGG && !Utils.randSeedInt(SAME_SPECIES_EGG_HA_RATE));
const gachaEggHACheck = (!(this._sourceType === EggSourceType.SAME_SPECIES_EGG) && !Utils.randSeedInt(GACHA_EGG_HA_RATE));
if (pokemonSpecies.abilityHidden && (this._overrideHiddenAbility || sameSpeciesEggHACheck || gachaEggHACheck)) {
abilityIndex = 2;
}
@ -396,8 +398,7 @@ export class Egg {
* 2 cost mons get 1.5x
* 4, 6, 8 cost mons get 1.75x
* 3, 5, 7, 9 cost mons get 1x
* Alolan, Galarian, and Paldean mons get 0.5x
* Hisui mons get 0.125x
* Alolan, Galarian, Hisui, and Paldean mons get 0.5x
*
* The total weight is also being calculated EACH time there is an egg hatch instead of being generated once
* and being the same each time
@ -408,7 +409,7 @@ export class Egg {
let weight = Math.floor((((maxStarterValue - speciesStarters[speciesId]) / ((maxStarterValue - minStarterValue) + 1)) * 1.5 + 1) * 100);
const species = getPokemonSpecies(speciesId);
if (species.isRegional()) {
weight = Math.floor(weight / (species.isRareRegional() ? 8 : 2));
weight = Math.floor(weight / 2);
}
speciesWeights.push(totalWeight + weight);
totalWeight += weight;

View File

@ -118,16 +118,16 @@ const languageSettings: { [key: string]: LanguageSetting } = {
};
const starterCandyCosts: { passive: integer, costReduction: [integer, integer], egg: integer }[] = [
{ passive: 50, costReduction: [30, 75], egg: 35 }, // 1
{ passive: 45, costReduction: [25, 60], egg: 35 }, // 2
{ passive: 40, costReduction: [20, 50], egg: 35 }, // 3
{ passive: 30, costReduction: [15, 40], egg: 30 }, // 4
{ passive: 25, costReduction: [12, 35], egg: 25 }, // 5
{ passive: 20, costReduction: [10, 30], egg: 20 }, // 6
{ passive: 15, costReduction: [8, 20], egg: 15 }, // 7
{ passive: 10, costReduction: [5, 15], egg: 10 }, // 8
{ passive: 10, costReduction: [3, 10], egg: 10 }, // 9
{ passive: 10, costReduction: [3, 10], egg: 10 }, // 10
{ passive: 40, costReduction: [25, 60], egg: 30 }, // 1 Cost
{ passive: 40, costReduction: [25, 60], egg: 30 }, // 2 Cost
{ passive: 35, costReduction: [20, 50], egg: 25 }, // 3 Cost
{ passive: 30, costReduction: [15, 40], egg: 20 }, // 4 Cost
{ passive: 25, costReduction: [12, 35], egg: 18 }, // 5 Cost
{ passive: 20, costReduction: [10, 30], egg: 15 }, // 6 Cost
{ passive: 15, costReduction: [8, 20], egg: 12 }, // 7 Cost
{ passive: 10, costReduction: [5, 15], egg: 8 }, // 8 Cost
{ passive: 10, costReduction: [5, 15], egg: 8 }, // 9 Cost
{ passive: 10, costReduction: [5, 15], egg: 8 }, // 10 Cost
];
// Position of UI elements