Merge branch 'fiery-fallout' of https://github.com/InnocentGameDev/PokeRogue-Events into fiery-fallout

This commit is contained in:
ImperialSympathizer 2024-07-19 19:21:53 -04:00
commit f62af4ab68
3 changed files with 8 additions and 8 deletions

View File

@ -1038,8 +1038,7 @@ export abstract class BattleAnim {
let t = 0; let t = 0;
for (const frame of frames) { for (const frame of frames) {
let x = frame.x; let { x , y } = frame;
let y = frame.y;
const scaleX = (frame.zoomX / 100) * (!frame.mirror ? 1 : -1); const scaleX = (frame.zoomX / 100) * (!frame.mirror ? 1 : -1);
const scaleY = (frame.zoomY / 100); const scaleY = (frame.zoomY / 100);
x += targetInitialX; x += targetInitialX;

View File

@ -36,7 +36,7 @@ const DAMAGE_PERCENTAGE: number = 20;
export const FieryFalloutEncounter: IMysteryEncounter = export const FieryFalloutEncounter: IMysteryEncounter =
MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.FIERY_FALLOUT) MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.FIERY_FALLOUT)
.withEncounterTier(MysteryEncounterTier.COMMON) .withEncounterTier(MysteryEncounterTier.COMMON)
.withSceneWaveRangeRequirement(40, 180) // waves 10 to 180 .withSceneWaveRangeRequirement(40, 180)
.withCatchAllowed(true) .withCatchAllowed(true)
.withIntroSpriteConfigs([]) // Set in onInit() .withIntroSpriteConfigs([]) // Set in onInit()
.withAnimations(EncounterAnim.MAGMA_BG, EncounterAnim.MAGMA_SPOUT) .withAnimations(EncounterAnim.MAGMA_BG, EncounterAnim.MAGMA_SPOUT)
@ -186,7 +186,8 @@ export const FieryFalloutEncounter: IMysteryEncounter =
// Burn random member // Burn random member
const burnable = nonFireTypes.filter(p => isNullOrUndefined(p.status) || isNullOrUndefined(p.status.effect) || p.status?.effect === StatusEffect.BURN); const burnable = nonFireTypes.filter(p => isNullOrUndefined(p.status) || isNullOrUndefined(p.status.effect) || p.status?.effect === StatusEffect.BURN);
if (burnable?.length > 0) { if (burnable?.length > 0) {
const chosenPokemon = burnable[randSeedInt(burnable.length - 1)]; const roll = randSeedInt(burnable.length);
const chosenPokemon = burnable[roll];
if (chosenPokemon.trySetStatus(StatusEffect.BURN)) { if (chosenPokemon.trySetStatus(StatusEffect.BURN)) {
// Burn applied // Burn applied
encounter.setDialogueToken("burnedPokemon", chosenPokemon.name); encounter.setDialogueToken("burnedPokemon", chosenPokemon.name);

View File

@ -21,7 +21,7 @@ export class OverridesHelper {
* @param percentage the encounter chance in % * @param percentage the encounter chance in %
* @returns spy instance * @returns spy instance
*/ */
mysteryEncounterChance(percentage: number): MockInstance { mysteryEncounterChance(percentage: number) {
const maxRate: number = 256; // 100% const maxRate: number = 256; // 100%
const rate = maxRate * (percentage / 100); const rate = maxRate * (percentage / 100);
const spy = vi.spyOn(Overrides, "MYSTERY_ENCOUNTER_RATE_OVERRIDE", "get").mockReturnValue(rate); const spy = vi.spyOn(Overrides, "MYSTERY_ENCOUNTER_RATE_OVERRIDE", "get").mockReturnValue(rate);
@ -66,7 +66,7 @@ export class OverridesHelper {
* @param wave the wave (index) to set. Classic: `1`-`200` * @param wave the wave (index) to set. Classic: `1`-`200`
* @returns spy instance * @returns spy instance
*/ */
startingWave(wave: number): MockInstance { startingWave(wave: number) {
const spy = vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(wave); const spy = vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(wave);
this.log(`Starting wave set to ${wave}!`); this.log(`Starting wave set to ${wave}!`);
return spy; return spy;
@ -88,7 +88,7 @@ export class OverridesHelper {
* @param type weather type to set * @param type weather type to set
* @returns spy instance * @returns spy instance
*/ */
weather(type: WeatherType): MockInstance { weather(type: WeatherType) {
const spy = vi.spyOn(Overrides, "WEATHER_OVERRIDE", "get").mockReturnValue(type); const spy = vi.spyOn(Overrides, "WEATHER_OVERRIDE", "get").mockReturnValue(type);
this.log(`Weather set to ${Weather[type]} (=${type})!`); this.log(`Weather set to ${Weather[type]} (=${type})!`);
return spy; return spy;
@ -99,7 +99,7 @@ export class OverridesHelper {
* @param seed the seed to set * @param seed the seed to set
* @returns spy instance * @returns spy instance
*/ */
seed(seed: string): MockInstance { seed(seed: string) {
const spy = vi.spyOn(this.game.scene, "resetSeed").mockImplementation(() => { const spy = vi.spyOn(this.game.scene, "resetSeed").mockImplementation(() => {
this.game.scene.waveSeed = seed; this.game.scene.waveSeed = seed;
Phaser.Math.RND.sow([seed]); Phaser.Math.RND.sow([seed]);