Skip to content

Commit

Permalink
Fix Merge Conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
xsn34kzx committed Aug 23, 2024
2 parents f0cbe8b + 3baa140 commit 863f52c
Show file tree
Hide file tree
Showing 44 changed files with 333 additions and 134 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: patapancakes
2 changes: 2 additions & 0 deletions src/battle-scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ import { SwitchPhase } from "./phases/switch-phase";
import { TitlePhase } from "./phases/title-phase";
import { ToggleDoublePositionPhase } from "./phases/toggle-double-position-phase";
import { TurnInitPhase } from "./phases/turn-init-phase";
import { ShopCursorTarget } from "./enums/shop-cursor-target";

export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";

Expand Down Expand Up @@ -127,6 +128,7 @@ export default class BattleScene extends SceneBase {
public gameSpeed: integer = 1;
public damageNumbersMode: integer = 0;
public reroll: boolean = false;
public shopCursorTarget: number = ShopCursorTarget.CHECK_TEAM;
public showMovesetFlyout: boolean = true;
public showArenaFlyout: boolean = true;
public showTimeOfDayWidget: boolean = true;
Expand Down
22 changes: 18 additions & 4 deletions src/data/ability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3288,11 +3288,25 @@ export class PostTurnLootAbAttr extends PostTurnAbAttr {
}
}

/**
* Attribute used for {@linkcode Abilities.MOODY}
*/
export class MoodyAbAttr extends PostTurnAbAttr {
constructor() {
super(true);
}

/**
* Randomly increases one BattleStat by 2 stages and decreases a different BattleStat by 1 stage
* @param {Pokemon} pokemon Pokemon that has this ability
* @param passive N/A
* @param simulated true if applying in a simulated call.
* @param args N/A
* @returns true
*
* Any BattleStats at +6 or -6 are excluded from being increased or decreased, respectively
* If the pokemon already has all BattleStats raised to stage 6, it will only decrease one BattleStat by 1 stage
* If the pokemon already has all BattleStats lowered to stage -6, it will only increase one BattleStat by 2 stages
*/
applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean {
const increaseStatArray = EFFECTIVE_STATS.filter(s => pokemon.getStatStage(s) < 6);
let decreaseStatArray = EFFECTIVE_STATS.filter(s => pokemon.getStatStage(s) > -6);
Expand All @@ -3303,7 +3317,7 @@ export class MoodyAbAttr extends PostTurnAbAttr {
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [increaseStat], 2));
}
if (!simulated && decreaseStatArray.length > 0) {
const decreaseStat = EFFECTIVE_STATS[Utils.randInt(EFFECTIVE_STATS.length)];
const decreaseStat = decreaseStatArray[Utils.randInt(EFFECTIVE_STATS.length)];
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [decreaseStat], -1));
}
return true;
Expand Down Expand Up @@ -4579,7 +4593,7 @@ export function initAbilities() {
.ignorable(),
new Ability(Abilities.CLOUD_NINE, 3)
.attr(SuppressWeatherEffectAbAttr, true)
.attr(PostSummonUnnamedMessageAbAttr, "The effects of the weather disappeared."),
.attr(PostSummonUnnamedMessageAbAttr, i18next.t("abilityTriggers:weatherEffectDisappeared")),
new Ability(Abilities.COMPOUND_EYES, 3)
.attr(StatMultiplierAbAttr, Stat.ACC, 1.3),
new Ability(Abilities.INSOMNIA, 3)
Expand Down Expand Up @@ -4774,7 +4788,7 @@ export function initAbilities() {
.ignorable(),
new Ability(Abilities.AIR_LOCK, 3)
.attr(SuppressWeatherEffectAbAttr, true)
.attr(PostSummonUnnamedMessageAbAttr, "The effects of the weather disappeared."),
.attr(PostSummonUnnamedMessageAbAttr, i18next.t("abilityTriggers:weatherEffectDisappeared")),
new Ability(Abilities.TANGLED_FEET, 4)
.conditionalAttr(pokemon => !!pokemon.getTag(BattlerTagType.CONFUSED), StatMultiplierAbAttr, Stat.EVA, 2)
.ignorable(),
Expand Down
22 changes: 22 additions & 0 deletions src/data/pokemon-species.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3317,6 +3317,28 @@ export function getStarterValueFriendshipCap(value: integer): integer {
}
}

/**
* Method to get the daily list of starters with Pokerus.
* @param scene {@linkcode BattleScene} used as part of RNG
* @returns A list of starters with Pokerus
*/
export function getPokerusStarters(scene: BattleScene): PokemonSpecies[] {
const pokerusStarters: PokemonSpecies[] = [];
const date = new Date();
const starterCount = 3; //for easy future adjustment!
date.setUTCHours(0, 0, 0, 0);
scene.executeWithSeedOffset(() => {
while (pokerusStarters.length < starterCount) {
const randomSpeciesId = parseInt(Utils.randSeedItem(Object.keys(speciesStarters)), 10);
const species = getPokemonSpecies(randomSpeciesId);
if (!pokerusStarters.includes(species)) {
pokerusStarters.push(species);
}
}
}, 0, date.getTime().toString());
return pokerusStarters;
}

export const starterPassiveAbilities = {
[Species.BULBASAUR]: Abilities.GRASSY_SURGE,
[Species.CHARMANDER]: Abilities.BEAST_BOOST,
Expand Down
4 changes: 2 additions & 2 deletions src/data/trainer-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1577,11 +1577,11 @@ export const trainerConfigs: TrainerConfigs = {
})),

[TrainerType.RIVAL]: new TrainerConfig((t = TrainerType.RIVAL)).setName("Finn").setHasGenders("Ivy").setHasCharSprite().setTitle("Rival").setStaticParty().setEncounterBgm(TrainerType.RIVAL).setBattleBgm("battle_rival").setMixedBattleBgm("battle_rival").setPartyTemplates(trainerPartyTemplates.RIVAL)
.setModifierRewardFuncs(() => modifierTypes.SUPER_EXP_CHARM, () => modifierTypes.EXP_SHARE, () => modifierTypes.SHINY_CHARM, () => modifierTypes.ABILITY_CHARM)
.setModifierRewardFuncs(() => modifierTypes.SUPER_EXP_CHARM, () => modifierTypes.EXP_SHARE)
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE, Species.CHIKORITA, Species.CYNDAQUIL, Species.TOTODILE, Species.TREECKO, Species.TORCHIC, Species.MUDKIP, Species.TURTWIG, Species.CHIMCHAR, Species.PIPLUP, Species.SNIVY, Species.TEPIG, Species.OSHAWOTT, Species.CHESPIN, Species.FENNEKIN, Species.FROAKIE, Species.ROWLET, Species.LITTEN, Species.POPPLIO, Species.GROOKEY, Species.SCORBUNNY, Species.SOBBLE, Species.SPRIGATITO, Species.FUECOCO, Species.QUAXLY], TrainerSlot.TRAINER, true))
.setPartyMemberFunc(1, getRandomPartyMemberFunc([Species.PIDGEY, Species.HOOTHOOT, Species.TAILLOW, Species.STARLY, Species.PIDOVE, Species.FLETCHLING, Species.PIKIPEK, Species.ROOKIDEE, Species.WATTREL], TrainerSlot.TRAINER, true)),
[TrainerType.RIVAL_2]: new TrainerConfig(++t).setName("Finn").setHasGenders("Ivy").setHasCharSprite().setTitle("Rival").setStaticParty().setMoneyMultiplier(1.25).setEncounterBgm(TrainerType.RIVAL).setBattleBgm("battle_rival").setMixedBattleBgm("battle_rival").setPartyTemplates(trainerPartyTemplates.RIVAL_2)
.setModifierRewardFuncs(() => modifierTypes.EXP_SHARE, () => modifierTypes.SHINY_CHARM)
.setModifierRewardFuncs(() => modifierTypes.EXP_SHARE)
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.IVYSAUR, Species.CHARMELEON, Species.WARTORTLE, Species.BAYLEEF, Species.QUILAVA, Species.CROCONAW, Species.GROVYLE, Species.COMBUSKEN, Species.MARSHTOMP, Species.GROTLE, Species.MONFERNO, Species.PRINPLUP, Species.SERVINE, Species.PIGNITE, Species.DEWOTT, Species.QUILLADIN, Species.BRAIXEN, Species.FROGADIER, Species.DARTRIX, Species.TORRACAT, Species.BRIONNE, Species.THWACKEY, Species.RABOOT, Species.DRIZZILE, Species.FLORAGATO, Species.CROCALOR, Species.QUAXWELL], TrainerSlot.TRAINER, true))
.setPartyMemberFunc(1, getRandomPartyMemberFunc([Species.PIDGEOTTO, Species.HOOTHOOT, Species.TAILLOW, Species.STARAVIA, Species.TRANQUILL, Species.FLETCHINDER, Species.TRUMBEAK, Species.CORVISQUIRE, Species.WATTREL], TrainerSlot.TRAINER, true))
.setPartyMemberFunc(2, getSpeciesFilterRandomPartyMemberFunc((species: PokemonSpecies) => !pokemonEvolutions.hasOwnProperty(species.speciesId) && !pokemonPrevolutions.hasOwnProperty(species.speciesId) && species.baseTotal >= 450)),
Expand Down
13 changes: 13 additions & 0 deletions src/enums/shop-cursor-target.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Determines the cursor target when entering the shop phase.
*/
export enum ShopCursorTarget {
/** Cursor points to Reroll */
REROLL,
/** Cursor points to Items */
ITEMS,
/** Cursor points to Shop */
SHOP,
/** Cursor points to Check Team */
CHECK_TEAM
}
1 change: 1 addition & 0 deletions src/locales/ca_ES/ability-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const abilityTriggers: SimpleTranslationEntries = {
"postFaintContactDamage": "{{pokemonNameWithAffix}}'s {{abilityName}}\nhurt its attacker!",
"postFaintHpDamage": "{{pokemonNameWithAffix}}'s {{abilityName}}\nhurt its attacker!",
"postSummonPressure": "{{pokemonNameWithAffix}} is exerting its Pressure!",
"weatherEffectDisappeared": "The effects of the weather disappeared.",
"postSummonMoldBreaker": "{{pokemonNameWithAffix}} breaks the mold!",
"postSummonAnticipation": "{{pokemonNameWithAffix}} shuddered!",
"postSummonTurboblaze": "{{pokemonNameWithAffix}} is radiating a blazing aura!",
Expand Down
10 changes: 4 additions & 6 deletions src/locales/ca_ES/dialogue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2573,8 +2573,7 @@ export const PGMdialogue: DialogueTranslationEntries = {
1: `@c{shock}Wow… You cleaned me out.\nAre you actually a beginner?
$@c{smile}Maybe it was a bit of luck but…\nWho knows you might just be able to go all the way.
$By the way, the professor asked me to give you these items. They look pretty cool.
$@c{serious_smile_fists}Good luck out there!
$@c{smile}Oh- and I hope you enjoy the event!`
$@c{serious_smile_fists}Good luck out there!`
},
},
"rival_female": {
Expand All @@ -2588,8 +2587,7 @@ export const PGMdialogue: DialogueTranslationEntries = {
1: `@c{shock}You just started and you're already this strong?!@d{96}\n@c{angry}You totally cheated, didn't you?
$@c{smile_wave_wink}Just kidding!@d{64} @c{smile_eclosed}I lost fair and square… I have a feeling you're going to do really well out there.
$@c{smile}By the way, the professor wanted me to give you some items. Hopefully they're helpful!
$@c{smile_wave}Do your best like always! I believe in you!
$@c{smile}Oh- and I hope you enjoy the event!`
$@c{smile_wave}Do your best like always! I believe in you!`
},
},
"rival_2": {
Expand All @@ -2605,7 +2603,7 @@ export const PGMdialogue: DialogueTranslationEntries = {
$@c{smile}That's alright, though. I figured this might happen.\n@c{serious_mopen_fists}It just means I need to try harder for next time!\n
$@c{smile}Oh, not that you really need the help, but I had an extra one of these lying around and figured you might want it.\n
$@c{serious_smile_fists}Don't expect another one after this, though!\nI can't keep giving my opponent an advantage after all.
$@c{smile}Anyway, take care, and enjoy the event!`
$@c{smile}Anyway, take care!`
},
},
"rival_2_female": {
Expand All @@ -2621,7 +2619,7 @@ export const PGMdialogue: DialogueTranslationEntries = {
$@c{smile}Aw well. That just means I'll have to train even harder for next time!
$@c{smile_wave}I also got you another one of these!\n@c{smile_wave_wink}No need to thank me~.
$@c{angry_mopen}This is the last one, though! You won't be getting anymore freebies from me after this!
$@c{smile_wave}Keep at it, and enjoy the event!`
$@c{smile_wave}Keep at it!`
},
"defeat": {
1: "It's OK to lose sometimes…"
Expand Down
7 changes: 6 additions & 1 deletion src/locales/ca_ES/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,10 @@ export const settings: SimpleTranslationEntries = {
"controller": "Controller",
"gamepadSupport": "Gamepad Support",
"showBgmBar": "Show Music Names",
"shopOverlayOpacity": "Shop Overlay Opacity"
"shopOverlayOpacity": "Shop Overlay Opacity",
"shopCursorTarget": "Shop Cursor Target",
"items": "Items",
"reroll": "Reroll",
"shop": "Shop",
"checkTeam": "Check Team"
} as const;
1 change: 1 addition & 0 deletions src/locales/de/ability-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const abilityTriggers: SimpleTranslationEntries = {
"postFaintContactDamage": "{{abilityName}} von {{pokemonNameWithAffix}} schadet seinem Angreifer!",
"postFaintHpDamage": "{{abilityName}} von {{pokemonNameWithAffix}} schadet seinem Angreifer!",
"postSummonPressure": "{{pokemonNameWithAffix}} setzt Gegner mit Erzwinger unter Druck!",
"weatherEffectDisappeared": "Jegliche wetterbedingten Effekte wurden aufgehoben!",
"postSummonMoldBreaker": "{{pokemonNameWithAffix}} gelingt es, gegnerische Fähigkeiten zu überbrücken!",
"postSummonAnticipation": "{{pokemonNameWithAffix}} erschaudert!",
"postSummonTurboblaze": "{{pokemonNameWithAffix}} strahlt eine lodernde Aura aus!",
Expand Down
10 changes: 4 additions & 6 deletions src/locales/de/dialogue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2641,8 +2641,7 @@ export const PGMdialogue: DialogueTranslationEntries = {
$@c{smile}Vielleicht war es einfach etwas Glück, aber…\nWer weiß, vielleicht schaffst du es irgendwann
$ja wirklich ganz groß raus zu kommen.
$Übrigens, der Professor hat mich gebeten dir diese Items zu geben. Die sehen wirklich cool aus.
$@c{serious_smile_fists}Viel Glück da draußen!
$@c{smile}Oh-und genieße das Event!`
$@c{serious_smile_fists}Viel Glück da draußen!`
},
},
"rival_female": {
Expand All @@ -2657,8 +2656,7 @@ export const PGMdialogue: DialogueTranslationEntries = {
1: `@c{shock}Du hast gerade erst angefangen und bist schon so stark?!@d{96} @c{angry}Du hast sowas von betrogen, oder?
$@c{smile_wave_wink}Ich mach nur Spaß!@d{64} @c{smile_eclosed}Ich habe ehrlich verloren… Ich habe das Gefühl, dass du es dort draußen weit bringen wirst.
$@c{smile}Übrigens, der Professor hat mich gebeten dir diese Items zu geben. Ich hoffe sie sind hilfreich!
$@c{smile_wave}Gib wie immer dein Bestes! Ich glaube an dich!
$@c{smile}Oh-und genieße das Event!`
$@c{smile_wave}Gib wie immer dein Bestes! Ich glaube an dich!`
},
},
"rival_2": {
Expand All @@ -2676,7 +2674,7 @@ export const PGMdialogue: DialogueTranslationEntries = {
$@c{smile}Nicht, dass du wirklich Hilfe benötigen würdest, aber ich habe hier noch eins von diesen Dingern herumliegen.
$Du kannst es haben.\n
$@c{serious_smile_fists}Erwarte aber nicht, dass ich dir noch mehr gebe!\nIch kann meinen Rivalen doch keine Vorteile verschaffen.
$@c{smile}Egal, pass auf dich auf und genieße das Event!`
$@c{smile}Egal, pass auf dich auf!`
},
},
"rival_2_female": {
Expand All @@ -2692,7 +2690,7 @@ export const PGMdialogue: DialogueTranslationEntries = {
$@c{smile}Na gut. Das bedeutet ich muss noch härter tranieren!
$@c{smile_wave}Ich habe noch eins von diesen Dingern!\n@c{smile_wave_wink}Kein Grund mir zu danken~.
$@c{angry_mopen}Das ist aber das Letzte! Du bekommst ab jett keine Geschenke mehr von mir!
$@c{smile_wave}Bleib stark und genieße das Event!`
$@c{smile_wave}Bleib stark!`
},
"defeat": {
1: "Es ist Ok manchmal zu verlieren…"
Expand Down
5 changes: 5 additions & 0 deletions src/locales/de/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,9 @@ export const settings: SimpleTranslationEntries = {
"showBgmBar": "Musiknamen anzeigen",
"moveTouchControls": "Bewegung Touch Steuerung",
"shopOverlayOpacity": "Shop Overlay Deckkraft",
"shopCursorTarget": "Shop Cursor Target",
"items": "Items",
"reroll": "Reroll",
"shop": "Shop",
"checkTeam": "Check Team"
} as const;
1 change: 1 addition & 0 deletions src/locales/en/ability-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const abilityTriggers: SimpleTranslationEntries = {
"postFaintContactDamage": "{{pokemonNameWithAffix}}'s {{abilityName}}\nhurt its attacker!",
"postFaintHpDamage": "{{pokemonNameWithAffix}}'s {{abilityName}}\nhurt its attacker!",
"postSummonPressure": "{{pokemonNameWithAffix}} is exerting its Pressure!",
"weatherEffectDisappeared": "The effects of the weather disappeared.",
"postSummonMoldBreaker": "{{pokemonNameWithAffix}} breaks the mold!",
"postSummonAnticipation": "{{pokemonNameWithAffix}} shuddered!",
"postSummonTurboblaze": "{{pokemonNameWithAffix}} is radiating a blazing aura!",
Expand Down
14 changes: 6 additions & 8 deletions src/locales/en/dialogue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2574,8 +2574,7 @@ export const PGMdialogue: DialogueTranslationEntries = {
1: `@c{shock}Wow… You cleaned me out.\nAre you actually a beginner?
$@c{smile}Maybe it was a bit of luck but…\nWho knows you might just be able to go all the way.
$By the way, the professor asked me to give you these items. They look pretty cool.
$@c{serious_smile_fists}Good luck out there!
$@c{smile}Oh- and I hope you enjoy the event!`
$@c{serious_smile_fists}Good luck out there!`
},
},
"rival_female": {
Expand All @@ -2589,8 +2588,7 @@ export const PGMdialogue: DialogueTranslationEntries = {
1: `@c{shock}You just started and you're already this strong?!@d{96}\n@c{angry}You totally cheated, didn't you?
$@c{smile_wave_wink}Just kidding!@d{64} @c{smile_eclosed}I lost fair and square… I have a feeling you're going to do really well out there.
$@c{smile}By the way, the professor wanted me to give you some items. Hopefully they're helpful!
$@c{smile_wave}Do your best like always! I believe in you!
$@c{smile}Oh- and I hope you enjoy the event!`
$@c{smile_wave}Do your best like always! I believe in you!`
},
},
"rival_2": {
Expand All @@ -2604,9 +2602,9 @@ export const PGMdialogue: DialogueTranslationEntries = {
"victory": {
1: `@c{neutral_eclosed}Oh. I guess I was overconfident.
$@c{smile}That's alright, though. I figured this might happen.\n@c{serious_mopen_fists}It just means I need to try harder for next time!\n
$@c{smile}Oh, not that you really need the help, but I had an extra one of each of these lying around and figured you might want them.\n
$@c{smile}Oh, not that you really need the help, but I had an extra one of these lying around and figured you might want it.\n
$@c{serious_smile_fists}Don't expect another one after this, though!\nI can't keep giving my opponent an advantage after all.
$@c{smile}Anyway, take care, and enjoy the event!`
$@c{smile}Anyway, take care!`
},
},
"rival_2_female": {
Expand All @@ -2620,9 +2618,9 @@ export const PGMdialogue: DialogueTranslationEntries = {
"victory": {
1: `@c{neutral}I… wasn't supposed to lose that time…
$@c{smile}Aw well. That just means I'll have to train even harder for next time!
$@c{smile_wave}I also got you another two of these!\n@c{smile_wave_wink}No need to thank me~.
$@c{smile_wave}I also got you another one of these!\n@c{smile_wave_wink}No need to thank me~.
$@c{angry_mopen}This is the last one, though! You won't be getting anymore freebies from me after this!
$@c{smile_wave}Keep at it, and enjoy the event!`
$@c{smile_wave}Keep at it!`
},
"defeat": {
1: "It's OK to lose sometimes…"
Expand Down
7 changes: 6 additions & 1 deletion src/locales/en/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,10 @@ export const settings: SimpleTranslationEntries = {
"gamepadSupport": "Gamepad Support",
"showBgmBar": "Show Music Names",
"moveTouchControls": "Move Touch Controls",
"shopOverlayOpacity": "Shop Overlay Opacity"
"shopOverlayOpacity": "Shop Overlay Opacity",
"shopCursorTarget": "Shop Cursor Target",
"items": "Items",
"reroll": "Reroll",
"shop": "Shop",
"checkTeam": "Check Team"
} as const;
1 change: 1 addition & 0 deletions src/locales/es/ability-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const abilityTriggers: SimpleTranslationEntries = {
"postFaintContactDamage": "{{pokemonNameWithAffix}}'s {{abilityName}}\nhurt its attacker!",
"postFaintHpDamage": "{{pokemonNameWithAffix}}'s {{abilityName}}\nhurt its attacker!",
"postSummonPressure": "{{pokemonNameWithAffix}} is exerting its Pressure!",
"weatherEffectDisappeared": "El tiempo atmosférico ya no ejerce ninguna influencia.",
"postSummonMoldBreaker": "{{pokemonNameWithAffix}} breaks the mold!",
"postSummonAnticipation": "{{pokemonNameWithAffix}} shuddered!",
"postSummonTurboblaze": "{{pokemonNameWithAffix}} is radiating a blazing aura!",
Expand Down
Loading

0 comments on commit 863f52c

Please sign in to comment.