House of Int: No More Integers

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
This commit is contained in:
AJ Fontaine 2024-09-30 14:22:42 -04:00 committed by GitHub
parent f470d6496e
commit e28e33b335
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 11 deletions

View File

@ -4,14 +4,14 @@
* RATE is defined as 1/x
*/
/** Encounterable properties */
// #region Encounterable properties
/** `64/65536 -> 1/1024` */
export const BASE_SHINY_CHANCE = 64;
/** `256/65536 -> 1/256` */
export const BASE_HIDDEN_ABILITY_CHANCE = 256;
/** Egg properties */
// #region Egg properties
// Rates for specific random properties in 1/x
export const GACHA_DEFAULT_SHINY_RATE = 128;
export const GACHA_SHINY_UP_SHINY_RATE = 64;

View File

@ -3,8 +3,8 @@ import { Species } from "#enums/species";
export const POKERUS_STARTER_COUNT = 5;
export function getStarterValueFriendshipCap(value: integer): integer {
switch (value) {
export function getStarterValueFriendshipCap(starterCost: number): number {
switch (starterCost) {
case 1:
return 20;
case 2:
@ -1197,7 +1197,7 @@ export const starterPassiveAbilities = {
[Species.BLOODMOON_URSALUNA]: Abilities.BERSERK
};
const starterCandyCosts: { passive: integer; costReduction: [integer, integer]; egg: integer; }[] = [
const starterCandyCosts: { passive: number; costReduction: [number, number]; egg: number; }[] = [
{ 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
@ -1210,15 +1210,15 @@ const starterCandyCosts: { passive: integer; costReduction: [integer, integer];
{ passive: 10, costReduction: [5, 15], egg: 10 }, // 10 Cost
];
export function getPassiveCandyCount(baseValue: integer): integer {
return starterCandyCosts[baseValue - 1].passive;
export function getPassiveCandyCount(starterCost: number): number {
return starterCandyCosts[starterCost - 1].passive;
}
export function getValueReductionCandyCounts(baseValue: integer): [integer, integer] {
return starterCandyCosts[baseValue - 1].costReduction;
export function getValueReductionCandyCounts(starterCost: number): [number, number] {
return starterCandyCosts[starterCost - 1].costReduction;
}
export function getSameSpeciesEggCandyCounts(baseValue: integer): integer {
return starterCandyCosts[baseValue - 1].egg;
export function getSameSpeciesEggCandyCounts(starterCost: number): number {
return starterCandyCosts[starterCost - 1].egg;
}