mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 16:32:16 +02:00
Merge beta
This commit is contained in:
commit
e40b78cc46
@ -4231,7 +4231,7 @@ export class FormBlockDamageAbAttr extends ReceivedMoveDamageMultiplierAbAttr {
|
|||||||
(args[0] as Utils.NumberHolder).value = this.multiplier;
|
(args[0] as Utils.NumberHolder).value = this.multiplier;
|
||||||
pokemon.removeTag(this.tagType);
|
pokemon.removeTag(this.tagType);
|
||||||
if (this.recoilDamageFunc) {
|
if (this.recoilDamageFunc) {
|
||||||
pokemon.damageAndUpdate(this.recoilDamageFunc(pokemon), HitResult.OTHER);
|
pokemon.damageAndUpdate(this.recoilDamageFunc(pokemon), HitResult.OTHER, false, false, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -12,7 +12,6 @@ import { type PokeballCounts } from "./battle-scene";
|
|||||||
import { Gender } from "./data/gender";
|
import { Gender } from "./data/gender";
|
||||||
import { allSpecies } from "./data/pokemon-species"; // eslint-disable-line @typescript-eslint/no-unused-vars
|
import { allSpecies } from "./data/pokemon-species"; // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||||
import { Variant } from "./data/variant";
|
import { Variant } from "./data/variant";
|
||||||
import { Stat } from "./enums/stat";
|
|
||||||
import { type ModifierOverride } from "./modifier/modifier-type";
|
import { type ModifierOverride } from "./modifier/modifier-type";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,9 +29,7 @@ import { type ModifierOverride } from "./modifier/modifier-type";
|
|||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
const overrides = {
|
const overrides = {} satisfies Partial<InstanceType<typeof DefaultOverrides>>;
|
||||||
ITEM_REWARD_OVERRIDE: [{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }, { name: "BASE_STAT_BOOSTER" }, { name: "DIRE_HIT" }]
|
|
||||||
} satisfies Partial<InstanceType<typeof DefaultOverrides>>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If you need to add Overrides values for local testing do that inside {@linkcode overrides}
|
* If you need to add Overrides values for local testing do that inside {@linkcode overrides}
|
||||||
|
@ -207,4 +207,18 @@ describe("Abilities - Disguise", () => {
|
|||||||
|
|
||||||
expect(mimikyu1.formIndex).toBe(disguisedForm);
|
expect(mimikyu1.formIndex).toBe(disguisedForm);
|
||||||
}, TIMEOUT);
|
}, TIMEOUT);
|
||||||
|
|
||||||
|
it("doesn't faint twice when fainting due to Disguise break damage, nor prevent faint from Disguise break damage if using Endure", async () => {
|
||||||
|
game.override.enemyMoveset(Array(4).fill(Moves.ENDURE));
|
||||||
|
await game.startBattle();
|
||||||
|
|
||||||
|
const mimikyu = game.scene.getEnemyPokemon()!;
|
||||||
|
mimikyu.hp = 1;
|
||||||
|
|
||||||
|
game.move.select(Moves.SHADOW_SNEAK);
|
||||||
|
await game.toNextWave();
|
||||||
|
|
||||||
|
expect(game.scene.getCurrentPhase()?.constructor.name).toBe("CommandPhase");
|
||||||
|
expect(game.scene.currentBattle.waveIndex).toBe(2);
|
||||||
|
}, TIMEOUT);
|
||||||
});
|
});
|
||||||
|
@ -131,6 +131,8 @@ const starterCandyCosts: { passive: integer, costReduction: [integer, integer],
|
|||||||
{ passive: 10, costReduction: [5, 15], egg: 10 }, // 10 Cost
|
{ passive: 10, costReduction: [5, 15], egg: 10 }, // 10 Cost
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const valueReductionMax = 2;
|
||||||
|
|
||||||
// Position of UI elements
|
// Position of UI elements
|
||||||
const filterBarHeight = 17;
|
const filterBarHeight = 17;
|
||||||
const speciesContainerX = 109; // if team on the RIGHT: 109 / if on the LEFT: 143
|
const speciesContainerX = 109; // if team on the RIGHT: 109 / if on the LEFT: 143
|
||||||
@ -1009,11 +1011,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
const starterData = this.scene.gameData.starterData[speciesId];
|
const starterData = this.scene.gameData.starterData[speciesId];
|
||||||
|
|
||||||
return starterData.candyCount >= getValueReductionCandyCounts(speciesStarters[speciesId])[starterData.valueReduction]
|
return starterData.candyCount >= getValueReductionCandyCounts(speciesStarters[speciesId])[starterData.valueReduction]
|
||||||
&& starterData.valueReduction < 2;
|
&& starterData.valueReduction < valueReductionMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if an same species egg can be baught for the given species ID
|
* Determines if an same species egg can be bought for the given species ID
|
||||||
* @param speciesId The ID of the species to check the value reduction of
|
* @param speciesId The ID of the species to check the value reduction of
|
||||||
* @returns true if the user has enough candies
|
* @returns true if the user has enough candies
|
||||||
*/
|
*/
|
||||||
@ -1062,15 +1064,18 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
],};
|
],};
|
||||||
|
|
||||||
const passiveAvailable = this.isPassiveAvailable(species.speciesId);
|
const isPassiveAvailable = this.isPassiveAvailable(species.speciesId);
|
||||||
// 'Only Passives' mode
|
const isValueReductionAvailable = this.isValueReductionAvailable(species.speciesId);
|
||||||
|
const isSameSpeciesEggAvailable = this.isSameSpeciesEggAvailable(species.speciesId);
|
||||||
|
|
||||||
|
// 'Passives Only' mode
|
||||||
if (this.scene.candyUpgradeNotification === 1) {
|
if (this.scene.candyUpgradeNotification === 1) {
|
||||||
if (passiveAvailable) {
|
if (isPassiveAvailable) {
|
||||||
this.scene.tweens.chain(tweenChain).paused = startPaused;
|
this.scene.tweens.chain(tweenChain).paused = startPaused;
|
||||||
}
|
}
|
||||||
// 'On' mode
|
// 'On' mode
|
||||||
} else if (this.scene.candyUpgradeNotification === 2) {
|
} else if (this.scene.candyUpgradeNotification === 2) {
|
||||||
if (passiveAvailable || this.isValueReductionAvailable(species.speciesId)) {
|
if (isPassiveAvailable || isValueReductionAvailable || isSameSpeciesEggAvailable) {
|
||||||
this.scene.tweens.chain(tweenChain).paused = startPaused;
|
this.scene.tweens.chain(tweenChain).paused = startPaused;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1089,16 +1094,19 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const passiveAvailable = this.isPassiveAvailable(species.speciesId);
|
const isPassiveAvailable = this.isPassiveAvailable(species.speciesId);
|
||||||
// 'Only Passive Unlocks' mode
|
const isValueReductionAvailable = this.isValueReductionAvailable(species.speciesId);
|
||||||
|
const isSameSpeciesEggAvailable = this.isSameSpeciesEggAvailable(species.speciesId);
|
||||||
|
|
||||||
|
// 'Passive Only' mode
|
||||||
if (this.scene.candyUpgradeNotification === 1) {
|
if (this.scene.candyUpgradeNotification === 1) {
|
||||||
starter.candyUpgradeIcon.setVisible(slotVisible && passiveAvailable);
|
starter.candyUpgradeIcon.setVisible(slotVisible && isPassiveAvailable);
|
||||||
starter.candyUpgradeOverlayIcon.setVisible(slotVisible && starter.candyUpgradeIcon.visible);
|
starter.candyUpgradeOverlayIcon.setVisible(slotVisible && starter.candyUpgradeIcon.visible);
|
||||||
|
|
||||||
// 'On' mode
|
// 'On' mode
|
||||||
} else if (this.scene.candyUpgradeNotification === 2) {
|
} else if (this.scene.candyUpgradeNotification === 2) {
|
||||||
starter.candyUpgradeIcon.setVisible(
|
starter.candyUpgradeIcon.setVisible(
|
||||||
slotVisible && ( passiveAvailable || this.isValueReductionAvailable(species.speciesId)));
|
slotVisible && ( isPassiveAvailable || isValueReductionAvailable || isSameSpeciesEggAvailable ));
|
||||||
starter.candyUpgradeOverlayIcon.setVisible(slotVisible && starter.candyUpgradeIcon.visible);
|
starter.candyUpgradeOverlayIcon.setVisible(slotVisible && starter.candyUpgradeIcon.visible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1630,7 +1638,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
const valueReduction = starterData.valueReduction;
|
const valueReduction = starterData.valueReduction;
|
||||||
if (valueReduction < 2) {
|
if (valueReduction < valueReductionMax) {
|
||||||
const reductionCost = getValueReductionCandyCounts(speciesStarters[this.lastSpecies.speciesId])[valueReduction];
|
const reductionCost = getValueReductionCandyCounts(speciesStarters[this.lastSpecies.speciesId])[valueReduction];
|
||||||
options.push({
|
options.push({
|
||||||
label: `x${reductionCost} ${i18next.t("starterSelectUiHandler:reduceCost")}`,
|
label: `x${reductionCost} ${i18next.t("starterSelectUiHandler:reduceCost")}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user