mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-27 01:06:09 +00:00
Merge branch 'fiery-fallout' of https://github.com/InnocentGameDev/PokeRogue-Events into fiery-fallout
This commit is contained in:
commit
f62af4ab68
@ -1038,8 +1038,7 @@ export abstract class BattleAnim {
|
||||
let t = 0;
|
||||
|
||||
for (const frame of frames) {
|
||||
let x = frame.x;
|
||||
let y = frame.y;
|
||||
let { x , y } = frame;
|
||||
const scaleX = (frame.zoomX / 100) * (!frame.mirror ? 1 : -1);
|
||||
const scaleY = (frame.zoomY / 100);
|
||||
x += targetInitialX;
|
||||
|
@ -36,7 +36,7 @@ const DAMAGE_PERCENTAGE: number = 20;
|
||||
export const FieryFalloutEncounter: IMysteryEncounter =
|
||||
MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.FIERY_FALLOUT)
|
||||
.withEncounterTier(MysteryEncounterTier.COMMON)
|
||||
.withSceneWaveRangeRequirement(40, 180) // waves 10 to 180
|
||||
.withSceneWaveRangeRequirement(40, 180)
|
||||
.withCatchAllowed(true)
|
||||
.withIntroSpriteConfigs([]) // Set in onInit()
|
||||
.withAnimations(EncounterAnim.MAGMA_BG, EncounterAnim.MAGMA_SPOUT)
|
||||
@ -186,7 +186,8 @@ export const FieryFalloutEncounter: IMysteryEncounter =
|
||||
// Burn random member
|
||||
const burnable = nonFireTypes.filter(p => isNullOrUndefined(p.status) || isNullOrUndefined(p.status.effect) || p.status?.effect === StatusEffect.BURN);
|
||||
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)) {
|
||||
// Burn applied
|
||||
encounter.setDialogueToken("burnedPokemon", chosenPokemon.name);
|
||||
|
@ -21,7 +21,7 @@ export class OverridesHelper {
|
||||
* @param percentage the encounter chance in %
|
||||
* @returns spy instance
|
||||
*/
|
||||
mysteryEncounterChance(percentage: number): MockInstance {
|
||||
mysteryEncounterChance(percentage: number) {
|
||||
const maxRate: number = 256; // 100%
|
||||
const rate = maxRate * (percentage / 100);
|
||||
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`
|
||||
* @returns spy instance
|
||||
*/
|
||||
startingWave(wave: number): MockInstance {
|
||||
startingWave(wave: number) {
|
||||
const spy = vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(wave);
|
||||
this.log(`Starting wave set to ${wave}!`);
|
||||
return spy;
|
||||
@ -88,7 +88,7 @@ export class OverridesHelper {
|
||||
* @param type weather type to set
|
||||
* @returns spy instance
|
||||
*/
|
||||
weather(type: WeatherType): MockInstance {
|
||||
weather(type: WeatherType) {
|
||||
const spy = vi.spyOn(Overrides, "WEATHER_OVERRIDE", "get").mockReturnValue(type);
|
||||
this.log(`Weather set to ${Weather[type]} (=${type})!`);
|
||||
return spy;
|
||||
@ -99,7 +99,7 @@ export class OverridesHelper {
|
||||
* @param seed the seed to set
|
||||
* @returns spy instance
|
||||
*/
|
||||
seed(seed: string): MockInstance {
|
||||
seed(seed: string) {
|
||||
const spy = vi.spyOn(this.game.scene, "resetSeed").mockImplementation(() => {
|
||||
this.game.scene.waveSeed = seed;
|
||||
Phaser.Math.RND.sow([seed]);
|
||||
|
Loading…
Reference in New Issue
Block a user