[Balance] Candy friendship changes (#4947)
Changes: - Increase default value for friendship gain from winning a battle (from 2 to 3) - Increase Classic candy friendship multiplier (from 2 to 3) - Increase Rare Candy friendship gain (from 5 to 6) - Decrease value for friendship decrease from losing a battle (from 10 to 5) - Update Candy friendship thresholds for getting candy for some starter costs. - Change Soothe Bell from Rogue to Great (Weight: 2 in Great) - Adjust Map weight to account for change (Weight: 1 to 2) - Clowning around ME: When shuffling items, soothe bells will get replaced by a random Ultra Tier item - Clowning around ME: When shuffling items, no item will get replaced by a Soothe Bell Commit history: * Candy friendship changes Update default value for friendship gain from battle and adjust Soothe Bell tier to Great * Update modifier-type.ts * Update friendship constants * Clowning around encounter no longer consider soothe bell rogue tier * Expert Breeder ME test will no longer fail if candy gain per battle is changed --------- Co-authored-by: Starkrieg <starkieg.art@gmail.com> Co-authored-by: damocleas <damocleas25@gmail.com> Co-authored-by: Moka <millennium.stitcher@gmail.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
eef0183761
commit
d1294caeb6
|
@ -3,10 +3,10 @@ import { Species } from "#enums/species";
|
||||||
export const POKERUS_STARTER_COUNT = 5;
|
export const POKERUS_STARTER_COUNT = 5;
|
||||||
|
|
||||||
// #region Friendship constants
|
// #region Friendship constants
|
||||||
export const CLASSIC_CANDY_FRIENDSHIP_MULTIPLIER = 2;
|
export const CLASSIC_CANDY_FRIENDSHIP_MULTIPLIER = 3;
|
||||||
export const FRIENDSHIP_GAIN_FROM_BATTLE = 2;
|
export const FRIENDSHIP_GAIN_FROM_BATTLE = 3;
|
||||||
export const FRIENDSHIP_GAIN_FROM_RARE_CANDY = 5;
|
export const FRIENDSHIP_GAIN_FROM_RARE_CANDY = 6;
|
||||||
export const FRIENDSHIP_LOSS_FROM_FAINT = 10;
|
export const FRIENDSHIP_LOSS_FROM_FAINT = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to get the cumulative friendship threshold at which a candy is earned
|
* Function to get the cumulative friendship threshold at which a candy is earned
|
||||||
|
@ -16,19 +16,19 @@ export const FRIENDSHIP_LOSS_FROM_FAINT = 10;
|
||||||
export function getStarterValueFriendshipCap(starterCost: number): number {
|
export function getStarterValueFriendshipCap(starterCost: number): number {
|
||||||
switch (starterCost) {
|
switch (starterCost) {
|
||||||
case 1:
|
case 1:
|
||||||
return 20;
|
return 25;
|
||||||
case 2:
|
case 2:
|
||||||
return 40;
|
return 50;
|
||||||
case 3:
|
case 3:
|
||||||
return 60;
|
return 75;
|
||||||
case 4:
|
case 4:
|
||||||
return 100;
|
return 100;
|
||||||
case 5:
|
case 5:
|
||||||
return 140;
|
return 150;
|
||||||
case 6:
|
case 6:
|
||||||
return 200;
|
return 200;
|
||||||
case 7:
|
case 7:
|
||||||
return 280;
|
return 300;
|
||||||
case 8:
|
case 8:
|
||||||
case 9:
|
case 9:
|
||||||
return 450;
|
return 450;
|
||||||
|
|
|
@ -276,6 +276,8 @@ export const ClowningAroundEncounter: MysteryEncounter =
|
||||||
generateItemsOfTier(scene, mostHeldItemsPokemon, numBerries, "Berries");
|
generateItemsOfTier(scene, mostHeldItemsPokemon, numBerries, "Berries");
|
||||||
|
|
||||||
// Shuffle Transferable held items in the same tier (only shuffles Ultra and Rogue atm)
|
// Shuffle Transferable held items in the same tier (only shuffles Ultra and Rogue atm)
|
||||||
|
// For the purpose of this ME, Soothe Bells and Lucky Eggs are counted as Ultra tier
|
||||||
|
// And Golden Eggs as Rogue tier
|
||||||
let numUltra = 0;
|
let numUltra = 0;
|
||||||
let numRogue = 0;
|
let numRogue = 0;
|
||||||
items.filter(m => m.isTransferable && !(m instanceof BerryModifier))
|
items.filter(m => m.isTransferable && !(m instanceof BerryModifier))
|
||||||
|
@ -285,7 +287,7 @@ export const ClowningAroundEncounter: MysteryEncounter =
|
||||||
if (type.id === "GOLDEN_EGG" || tier === ModifierTier.ROGUE) {
|
if (type.id === "GOLDEN_EGG" || tier === ModifierTier.ROGUE) {
|
||||||
numRogue += m.stackCount;
|
numRogue += m.stackCount;
|
||||||
scene.removeModifier(m);
|
scene.removeModifier(m);
|
||||||
} else if (type.id === "LUCKY_EGG" || tier === ModifierTier.ULTRA) {
|
} else if (type.id === "LUCKY_EGG" || type.id === "SOOTHE_BELL" || tier === ModifierTier.ULTRA) {
|
||||||
numUltra += m.stackCount;
|
numUltra += m.stackCount;
|
||||||
scene.removeModifier(m);
|
scene.removeModifier(m);
|
||||||
}
|
}
|
||||||
|
@ -456,7 +458,6 @@ function generateItemsOfTier(scene: BattleScene, pokemon: PlayerPokemon, numItem
|
||||||
[ modifierTypes.LEFTOVERS, 4 ],
|
[ modifierTypes.LEFTOVERS, 4 ],
|
||||||
[ modifierTypes.SHELL_BELL, 4 ],
|
[ modifierTypes.SHELL_BELL, 4 ],
|
||||||
[ modifierTypes.SOUL_DEW, 10 ],
|
[ modifierTypes.SOUL_DEW, 10 ],
|
||||||
[ modifierTypes.SOOTHE_BELL, 3 ],
|
|
||||||
[ modifierTypes.SCOPE_LENS, 1 ],
|
[ modifierTypes.SCOPE_LENS, 1 ],
|
||||||
[ modifierTypes.BATON, 1 ],
|
[ modifierTypes.BATON, 1 ],
|
||||||
[ modifierTypes.FOCUS_BAND, 5 ],
|
[ modifierTypes.FOCUS_BAND, 5 ],
|
||||||
|
|
|
@ -1702,7 +1702,8 @@ const modifierPool: ModifierPool = {
|
||||||
new WeightedModifierType(modifierTypes.EVOLUTION_ITEM, (party: Pokemon[]) => {
|
new WeightedModifierType(modifierTypes.EVOLUTION_ITEM, (party: Pokemon[]) => {
|
||||||
return Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15), 8);
|
return Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15), 8);
|
||||||
}, 8),
|
}, 8),
|
||||||
new WeightedModifierType(modifierTypes.MAP, (party: Pokemon[]) => party[0].scene.gameMode.isClassic && party[0].scene.currentBattle.waveIndex < 180 ? 1 : 0, 1),
|
new WeightedModifierType(modifierTypes.MAP, (party: Pokemon[]) => party[0].scene.gameMode.isClassic && party[0].scene.currentBattle.waveIndex < 180 ? 2 : 0, 2),
|
||||||
|
new WeightedModifierType(modifierTypes.SOOTHE_BELL, 2),
|
||||||
new WeightedModifierType(modifierTypes.TM_GREAT, 3),
|
new WeightedModifierType(modifierTypes.TM_GREAT, 3),
|
||||||
new WeightedModifierType(modifierTypes.MEMORY_MUSHROOM, (party: Pokemon[]) => {
|
new WeightedModifierType(modifierTypes.MEMORY_MUSHROOM, (party: Pokemon[]) => {
|
||||||
if (!party.find(p => p.getLearnableLevelMoves().length)) {
|
if (!party.find(p => p.getLearnableLevelMoves().length)) {
|
||||||
|
@ -1800,7 +1801,6 @@ const modifierPool: ModifierPool = {
|
||||||
new WeightedModifierType(modifierTypes.SOUL_DEW, 7),
|
new WeightedModifierType(modifierTypes.SOUL_DEW, 7),
|
||||||
//new WeightedModifierType(modifierTypes.OVAL_CHARM, 6),
|
//new WeightedModifierType(modifierTypes.OVAL_CHARM, 6),
|
||||||
new WeightedModifierType(modifierTypes.CATCHING_CHARM, (party: Pokemon[]) => !party[0].scene.gameMode.isFreshStartChallenge() && party[0].scene.gameData.getSpeciesCount(d => !!d.caughtAttr) > 100 ? 4 : 0, 4),
|
new WeightedModifierType(modifierTypes.CATCHING_CHARM, (party: Pokemon[]) => !party[0].scene.gameMode.isFreshStartChallenge() && party[0].scene.gameData.getSpeciesCount(d => !!d.caughtAttr) > 100 ? 4 : 0, 4),
|
||||||
new WeightedModifierType(modifierTypes.SOOTHE_BELL, 4),
|
|
||||||
new WeightedModifierType(modifierTypes.ABILITY_CHARM, skipInClassicAfterWave(189, 6)),
|
new WeightedModifierType(modifierTypes.ABILITY_CHARM, skipInClassicAfterWave(189, 6)),
|
||||||
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
|
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
|
||||||
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
|
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
|
||||||
|
|
|
@ -266,6 +266,9 @@ describe("Clowning Around - Mystery Encounter", () => {
|
||||||
// 5 Lucky Egg on lead (ultra)
|
// 5 Lucky Egg on lead (ultra)
|
||||||
itemType = generateModifierType(scene, modifierTypes.LUCKY_EGG) as PokemonHeldItemModifierType;
|
itemType = generateModifierType(scene, modifierTypes.LUCKY_EGG) as PokemonHeldItemModifierType;
|
||||||
await addItemToPokemon(scene, scene.getPlayerParty()[0], 5, itemType);
|
await addItemToPokemon(scene, scene.getPlayerParty()[0], 5, itemType);
|
||||||
|
// 3 Soothe Bell on lead (great tier, but counted as ultra by this ME)
|
||||||
|
itemType = generateModifierType(scene, modifierTypes.SOOTHE_BELL) as PokemonHeldItemModifierType;
|
||||||
|
await addItemToPokemon(scene, scene.getPlayerParty()[0], 3, itemType);
|
||||||
// 5 Soul Dew on lead (rogue)
|
// 5 Soul Dew on lead (rogue)
|
||||||
itemType = generateModifierType(scene, modifierTypes.SOUL_DEW) as PokemonHeldItemModifierType;
|
itemType = generateModifierType(scene, modifierTypes.SOUL_DEW) as PokemonHeldItemModifierType;
|
||||||
await addItemToPokemon(scene, scene.getPlayerParty()[0], 5, itemType);
|
await addItemToPokemon(scene, scene.getPlayerParty()[0], 5, itemType);
|
||||||
|
@ -286,7 +289,7 @@ describe("Clowning Around - Mystery Encounter", () => {
|
||||||
const rogueCountAfter = leadItemsAfter
|
const rogueCountAfter = leadItemsAfter
|
||||||
.filter(m => m.type.tier === ModifierTier.ROGUE)
|
.filter(m => m.type.tier === ModifierTier.ROGUE)
|
||||||
.reduce((a, b) => a + b.stackCount, 0);
|
.reduce((a, b) => a + b.stackCount, 0);
|
||||||
expect(ultraCountAfter).toBe(10);
|
expect(ultraCountAfter).toBe(13);
|
||||||
expect(rogueCountAfter).toBe(7);
|
expect(rogueCountAfter).toBe(7);
|
||||||
|
|
||||||
const secondItemsAfter = scene.getPlayerParty()[1].getHeldItems();
|
const secondItemsAfter = scene.getPlayerParty()[1].getHeldItems();
|
||||||
|
|
|
@ -18,6 +18,7 @@ import { TheExpertPokemonBreederEncounter } from "#app/data/mystery-encounters/e
|
||||||
import { TrainerType } from "#enums/trainer-type";
|
import { TrainerType } from "#enums/trainer-type";
|
||||||
import { EggTier } from "#enums/egg-type";
|
import { EggTier } from "#enums/egg-type";
|
||||||
import { PostMysteryEncounterPhase } from "#app/phases/mystery-encounter-phases";
|
import { PostMysteryEncounterPhase } from "#app/phases/mystery-encounter-phases";
|
||||||
|
import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#app/data/balance/starters";
|
||||||
|
|
||||||
const namespace = "mysteryEncounters/theExpertPokemonBreeder";
|
const namespace = "mysteryEncounters/theExpertPokemonBreeder";
|
||||||
const defaultParty = [ Species.LAPRAS, Species.GENGAR, Species.ABRA ];
|
const defaultParty = [ Species.LAPRAS, Species.GENGAR, Species.ABRA ];
|
||||||
|
@ -182,7 +183,10 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => {
|
||||||
await game.phaseInterceptor.to(PostMysteryEncounterPhase);
|
await game.phaseInterceptor.to(PostMysteryEncounterPhase);
|
||||||
|
|
||||||
const friendshipAfter = scene.currentBattle.mysteryEncounter!.misc.pokemon1.friendship;
|
const friendshipAfter = scene.currentBattle.mysteryEncounter!.misc.pokemon1.friendship;
|
||||||
expect(friendshipAfter).toBe(friendshipBefore + 20 + 2); // +2 extra for friendship gained from winning battle
|
// 20 from ME + extra from winning battle (that extra is not accurate to what happens in game.
|
||||||
|
// The Pokemon normally gets FRIENDSHIP_GAIN_FROM_BATTLE 3 times, once for each defeated Pokemon
|
||||||
|
// but due to how skipBattleRunMysteryEncounterRewardsPhase is implemented, it only receives it once)
|
||||||
|
expect(friendshipAfter).toBe(friendshipBefore + 20 + FRIENDSHIP_GAIN_FROM_BATTLE);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -261,7 +265,7 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => {
|
||||||
await game.phaseInterceptor.to(PostMysteryEncounterPhase);
|
await game.phaseInterceptor.to(PostMysteryEncounterPhase);
|
||||||
|
|
||||||
const friendshipAfter = scene.currentBattle.mysteryEncounter!.misc.pokemon2.friendship;
|
const friendshipAfter = scene.currentBattle.mysteryEncounter!.misc.pokemon2.friendship;
|
||||||
expect(friendshipAfter).toBe(friendshipBefore + 20 + 2); // +2 extra for friendship gained from winning battle
|
expect(friendshipAfter).toBe(friendshipBefore + 20 + FRIENDSHIP_GAIN_FROM_BATTLE); // 20 from ME + extra for friendship gained from winning battle
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -340,7 +344,7 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => {
|
||||||
await game.phaseInterceptor.to(PostMysteryEncounterPhase);
|
await game.phaseInterceptor.to(PostMysteryEncounterPhase);
|
||||||
|
|
||||||
const friendshipAfter = scene.currentBattle.mysteryEncounter!.misc.pokemon3.friendship;
|
const friendshipAfter = scene.currentBattle.mysteryEncounter!.misc.pokemon3.friendship;
|
||||||
expect(friendshipAfter).toBe(friendshipBefore + 20 + 2); // +2 extra for friendship gained from winning battle
|
expect(friendshipAfter).toBe(friendshipBefore + 20 + FRIENDSHIP_GAIN_FROM_BATTLE); // 20 + extra for friendship gained from winning battle
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue