Merge pull request #4237 from ben-lear/mystery-encounters

update ME tsdocs with links
This commit is contained in:
ImperialSympathizer 2024-09-13 21:52:04 -04:00 committed by GitHub
commit bb21de335f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 17 additions and 17 deletions

View File

@ -44,7 +44,7 @@ export default class MysteryEncounterOption implements IMysteryEncounterOption {
/** /**
* Dialogue object containing all the dialogue, messages, tooltips, etc. for this option * Dialogue object containing all the dialogue, messages, tooltips, etc. for this option
* Will be populated on MysteryEncounter initialization * Will be populated on {@linkcode MysteryEncounter} initialization
*/ */
dialogue?: OptionTextDisplay; dialogue?: OptionTextDisplay;

View File

@ -87,7 +87,7 @@ export default class MysteryEncounter implements IMysteryEncounter {
*/ */
encounterAnimations?: EncounterAnim[]; encounterAnimations?: EncounterAnim[];
/** /**
* If specified, defines any game modes where the MysteryEncounter should *NOT* spawn * If specified, defines any game modes where the {@linkcode MysteryEncounter} should *NOT* spawn
*/ */
disabledGameModes?: GameModes[]; disabledGameModes?: GameModes[];
/** /**
@ -268,7 +268,7 @@ export default class MysteryEncounter implements IMysteryEncounter {
} }
/** /**
* Checks if the current scene state meets the requirements for the MysteryEncounter to spawn * Checks if the current scene state meets the requirements for the {@linkcode MysteryEncounter} to spawn
* This is used to filter the pool of encounters down to only the ones with all requirements met * This is used to filter the pool of encounters down to only the ones with all requirements met
* @param scene * @param scene
* @returns * @returns
@ -491,7 +491,7 @@ export default class MysteryEncounter implements IMysteryEncounter {
/** /**
* Maintains seed offset for RNG consistency * Maintains seed offset for RNG consistency
* Increments if the same MysteryEncounter has multiple option select cycles * Increments if the same {@linkcode MysteryEncounter} has multiple option select cycles
* @param scene * @param scene
*/ */
updateSeedOffset(scene: BattleScene) { updateSeedOffset(scene: BattleScene) {
@ -534,7 +534,7 @@ export class MysteryEncounterBuilder implements Partial<IMysteryEncounter> {
/** /**
* @statif Defines the type of encounter which is used as an identifier, should be tied to a unique MysteryEncounterType * @statif Defines the type of encounter which is used as an identifier, should be tied to a unique MysteryEncounterType
* NOTE: if new functions are added to MysteryEncounter class * NOTE: if new functions are added to {@linkcode MysteryEncounter} class
* @param encounterType * @param encounterType
* @returns this * @returns this
*/ */

View File

@ -594,7 +594,7 @@ export function selectOptionThenPokemon(scene: BattleScene, options: OptionSelec
* @param scene - Battle Scene * @param scene - Battle Scene
* @param customShopRewards - adds a shop phase with the specified rewards / reward tiers * @param customShopRewards - adds a shop phase with the specified rewards / reward tiers
* @param eggRewards * @param eggRewards
* @param preRewardsCallback - can execute an arbitrary callback before the new phases if necessary (useful for updating items/party/injecting new phases before MysteryEncounterRewardsPhase) * @param preRewardsCallback - can execute an arbitrary callback before the new phases if necessary (useful for updating items/party/injecting new phases before {@linkcode MysteryEncounterRewardsPhase})
*/ */
export function setEncounterRewards(scene: BattleScene, customShopRewards?: CustomModifierSettings, eggRewards?: IEggOptions[], preRewardsCallback?: Function) { export function setEncounterRewards(scene: BattleScene, customShopRewards?: CustomModifierSettings, eggRewards?: IEggOptions[], preRewardsCallback?: Function) {
scene.currentBattle.mysteryEncounter!.doEncounterRewards = (scene: BattleScene) => { scene.currentBattle.mysteryEncounter!.doEncounterRewards = (scene: BattleScene) => {
@ -771,7 +771,7 @@ export function transitionMysteryEncounterIntroVisuals(scene: BattleScene, hide:
/** /**
* Will queue moves for any pokemon to use before the first CommandPhase of a battle * Will queue moves for any pokemon to use before the first CommandPhase of a battle
* Mostly useful for allowing MysteryEncounter enemies to "cheat" and use moves before the first turn * Mostly useful for allowing {@linkcode MysteryEncounter} enemies to "cheat" and use moves before the first turn
* @param scene * @param scene
*/ */
export function handleMysteryEncounterBattleStartEffects(scene: BattleScene) { export function handleMysteryEncounterBattleStartEffects(scene: BattleScene) {

View File

@ -1,12 +1,12 @@
export enum MysteryEncounterMode { export enum MysteryEncounterMode {
/** MysteryEncounter will always begin in this mode, but will always swap modes when an option is selected */ /** {@linkcode MysteryEncounter} will always begin in this mode, but will always swap modes when an option is selected */
DEFAULT, DEFAULT,
/** If the MysteryEncounter battle is a trainer type battle */ /** If the {@linkcode MysteryEncounter} battle is a trainer type battle */
TRAINER_BATTLE, TRAINER_BATTLE,
/** If the MysteryEncounter battle is a wild type battle */ /** If the {@linkcode MysteryEncounter} battle is a wild type battle */
WILD_BATTLE, WILD_BATTLE,
/** Enables special boss music during encounter */ /** Enables special boss music during encounter */
BOSS_BATTLE, BOSS_BATTLE,
/** If there is no battle in the MysteryEncounter or option selected */ /** If there is no battle in the {@linkcode MysteryEncounter} or option selected */
NO_BATTLE NO_BATTLE
} }

View File

@ -15,11 +15,11 @@ import { VictoryPhase } from "#app/phases/victory-phase";
import { MessagePhase } from "#app/phases/message-phase"; import { MessagePhase } from "#app/phases/message-phase";
/** /**
* Runs a MysteryEncounter to either the start of a battle, or to the MysteryEncounterRewardsPhase, depending on the option selected * Runs a {@linkcode MysteryEncounter} to either the start of a battle, or to the {@linkcode MysteryEncounterRewardsPhase}, depending on the option selected
* @param game * @param game
* @param optionNo - human number, not index * @param optionNo Human number, not index
* @param secondaryOptionSelect - * @param secondaryOptionSelect
* @param isBattle - if selecting option should lead to battle, set to true * @param isBattle If selecting option should lead to battle, set to `true`
*/ */
export async function runMysteryEncounterToEnd(game: GameManager, optionNo: number, secondaryOptionSelect?: { pokemonNo: number, optionNo?: number }, isBattle: boolean = false) { export async function runMysteryEncounterToEnd(game: GameManager, optionNo: number, secondaryOptionSelect?: { pokemonNo: number, optionNo?: number }, isBattle: boolean = false) {
vi.spyOn(EncounterPhaseUtils, "selectPokemonForOption"); vi.spyOn(EncounterPhaseUtils, "selectPokemonForOption");
@ -157,7 +157,7 @@ async function handleSecondaryOptionSelect(game: GameManager, pokemonNo: number,
} }
/** /**
* For any MysteryEncounter that has a battle, can call this to skip battle and proceed to MysteryEncounterRewardsPhase * For any {@linkcode MysteryEncounter} that has a battle, can call this to skip battle and proceed to {@linkcode MysteryEncounterRewardsPhase}
* @param game * @param game
* @param runRewardsPhase * @param runRewardsPhase
*/ */

View File

@ -363,7 +363,7 @@ describe("The Winstrate Challenge - Mystery Encounter", () => {
}); });
/** /**
* For any MysteryEncounter that has a battle, can call this to skip battle and proceed to MysteryEncounterRewardsPhase * For any {@linkcode MysteryEncounter} that has a battle, can call this to skip battle and proceed to MysteryEncounterRewardsPhase
* @param game * @param game
* @param isFinalBattle * @param isFinalBattle
*/ */