mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 15:22:19 +02:00
Merge branch 'beta' into fix-cycle-shiny
This commit is contained in:
commit
274c95ec00
@ -9384,7 +9384,7 @@ export function initMoves() {
|
|||||||
.attr(BypassBurnDamageReductionAttr),
|
.attr(BypassBurnDamageReductionAttr),
|
||||||
new AttackMove(Moves.FOCUS_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3)
|
new AttackMove(Moves.FOCUS_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3)
|
||||||
.attr(MessageHeaderAttr, (user, move) => i18next.t("moveTriggers:isTighteningFocus", { pokemonName: getPokemonNameWithAffix(user) }))
|
.attr(MessageHeaderAttr, (user, move) => i18next.t("moveTriggers:isTighteningFocus", { pokemonName: getPokemonNameWithAffix(user) }))
|
||||||
.attr(PreUseInterruptAttr, i18next.t("moveTriggers:lostFocus"), user => !!user.turnData.attacksReceived.find(r => r.damage))
|
.attr(PreUseInterruptAttr, (user, target, move) => i18next.t("moveTriggers:lostFocus", { pokemonName: getPokemonNameWithAffix(user) }), user => !!user.turnData.attacksReceived.find(r => r.damage))
|
||||||
.punchingMove(),
|
.punchingMove(),
|
||||||
new AttackMove(Moves.SMELLING_SALTS, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 10, -1, 0, 3)
|
new AttackMove(Moves.SMELLING_SALTS, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 10, -1, 0, 3)
|
||||||
.attr(MovePowerMultiplierAttr, (user, target, move) => target.status?.effect === StatusEffect.PARALYSIS ? 2 : 1)
|
.attr(MovePowerMultiplierAttr, (user, target, move) => target.status?.effect === StatusEffect.PARALYSIS ? 2 : 1)
|
||||||
|
@ -147,7 +147,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler {
|
|||||||
itemIcon.setScale(3 * this.scale);
|
itemIcon.setScale(3 * this.scale);
|
||||||
this.optionSelectIcons.push(itemIcon);
|
this.optionSelectIcons.push(itemIcon);
|
||||||
|
|
||||||
this.optionSelectContainer.add(itemIcon);
|
this.optionSelectTextContainer.add(itemIcon);
|
||||||
|
|
||||||
itemIcon.setPositionRelative(this.optionSelectText, 36 * this.scale, 7 + i * (114 * this.scale - 3));
|
itemIcon.setPositionRelative(this.optionSelectText, 36 * this.scale, 7 + i * (114 * this.scale - 3));
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler {
|
|||||||
itemOverlayIcon.setScale(3 * this.scale);
|
itemOverlayIcon.setScale(3 * this.scale);
|
||||||
this.optionSelectIcons.push(itemOverlayIcon);
|
this.optionSelectIcons.push(itemOverlayIcon);
|
||||||
|
|
||||||
this.optionSelectContainer.add(itemOverlayIcon);
|
this.optionSelectTextContainer.add(itemOverlayIcon);
|
||||||
|
|
||||||
itemOverlayIcon.setPositionRelative(this.optionSelectText, 36 * this.scale, 7 + i * (114 * this.scale - 3));
|
itemOverlayIcon.setPositionRelative(this.optionSelectText, 36 * this.scale, 7 + i * (114 * this.scale - 3));
|
||||||
|
|
||||||
|
@ -602,6 +602,14 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.battleForms = [];
|
this.battleForms = [];
|
||||||
|
|
||||||
const species = this.species;
|
const species = this.species;
|
||||||
|
|
||||||
|
let formKey = this.species?.forms.length > 0 ? this.species.forms[this.formIndex].formKey : "";
|
||||||
|
this.isFormGender = formKey === "male" || formKey === "female";
|
||||||
|
if (this.isFormGender && ((this.savedStarterAttributes.female === true && formKey === "male") || (this.savedStarterAttributes.female === false && formKey === "female"))) {
|
||||||
|
this.formIndex = (this.formIndex + 1) % 2;
|
||||||
|
formKey = this.species.forms[this.formIndex].formKey;
|
||||||
|
}
|
||||||
|
|
||||||
const formIndex = this.formIndex ?? 0;
|
const formIndex = this.formIndex ?? 0;
|
||||||
|
|
||||||
this.starterId = this.getStarterSpeciesId(this.species.speciesId);
|
this.starterId = this.getStarterSpeciesId(this.species.speciesId);
|
||||||
@ -635,12 +643,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.eggMoves = speciesEggMoves[this.starterId] ?? [];
|
this.eggMoves = speciesEggMoves[this.starterId] ?? [];
|
||||||
this.hasEggMoves = Array.from({ length: 4 }, (_, em) => (globalScene.gameData.starterData[this.starterId].eggMoves & (1 << em)) !== 0);
|
this.hasEggMoves = Array.from({ length: 4 }, (_, em) => (globalScene.gameData.starterData[this.starterId].eggMoves & (1 << em)) !== 0);
|
||||||
|
|
||||||
const formKey = this.species?.forms.length > 0 ? this.species.forms[this.formIndex].formKey : "";
|
|
||||||
this.tmMoves = speciesTmMoves[species.speciesId]?.filter(m => Array.isArray(m) ? (m[0] === formKey ? true : false ) : true)
|
this.tmMoves = speciesTmMoves[species.speciesId]?.filter(m => Array.isArray(m) ? (m[0] === formKey ? true : false ) : true)
|
||||||
.map(m => Array.isArray(m) ? m[1] : m).sort((a, b) => allMoves[a].name > allMoves[b].name ? 1 : -1) ?? [];
|
.map(m => Array.isArray(m) ? m[1] : m).sort((a, b) => allMoves[a].name > allMoves[b].name ? 1 : -1) ?? [];
|
||||||
|
|
||||||
this.isFormGender = formKey === "male" || formKey === "female";
|
|
||||||
|
|
||||||
const passiveId = starterPassiveAbilities.hasOwnProperty(species.speciesId) ? species.speciesId :
|
const passiveId = starterPassiveAbilities.hasOwnProperty(species.speciesId) ? species.speciesId :
|
||||||
starterPassiveAbilities.hasOwnProperty(this.starterId) ? this.starterId : pokemonPrevolutions[this.starterId];
|
starterPassiveAbilities.hasOwnProperty(this.starterId) ? this.starterId : pokemonPrevolutions[this.starterId];
|
||||||
const passives = starterPassiveAbilities[passiveId];
|
const passives = starterPassiveAbilities[passiveId];
|
||||||
|
@ -986,7 +986,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
this.updateScroll();
|
this.updateScroll();
|
||||||
const proportion = this.filterBarCursor / Math.max(1, this.filterBar.numFilters - 1);
|
const proportion = this.filterBarCursor / Math.max(1, this.filterBar.numFilters - 1);
|
||||||
const targetCol = Math.min(8, proportion < 0.5 ? Math.floor(proportion * 8) : Math.ceil(proportion * 8));
|
const targetCol = Math.min(8, proportion < 0.5 ? Math.floor(proportion * 8) : Math.ceil(proportion * 8));
|
||||||
this.setCursor(Math.min(targetCol, numberOfStarters));
|
this.setCursor(Math.min(targetCol, numberOfStarters - 1));
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1108,7 +1108,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Button.DOWN:
|
case Button.DOWN:
|
||||||
if (currentRow < numOfRows - 1) { // not last row
|
if ((currentRow < numOfRows - 1) && (this.cursor + 9 < this.filteredPokemonData.length)) { // not last row
|
||||||
if (currentRow - this.scrollCursor === 8) { // last row of visible pokemon
|
if (currentRow - this.scrollCursor === 8) { // last row of visible pokemon
|
||||||
this.scrollCursor++;
|
this.scrollCursor++;
|
||||||
this.updateScroll();
|
this.updateScroll();
|
||||||
@ -1577,6 +1577,37 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
container.icon.setTint(0);
|
container.icon.setTint(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.eggMove1) {
|
||||||
|
container.eggMove1Icon.setVisible(true);
|
||||||
|
} else {
|
||||||
|
container.eggMove1Icon.setVisible(false);
|
||||||
|
}
|
||||||
|
if (data.eggMove2) {
|
||||||
|
container.eggMove2Icon.setVisible(true);
|
||||||
|
} else {
|
||||||
|
container.eggMove2Icon.setVisible(false);
|
||||||
|
}
|
||||||
|
if (data.tmMove1) {
|
||||||
|
container.tmMove1Icon.setVisible(true);
|
||||||
|
} else {
|
||||||
|
container.tmMove1Icon.setVisible(false);
|
||||||
|
}
|
||||||
|
if (data.tmMove2) {
|
||||||
|
container.tmMove2Icon.setVisible(true);
|
||||||
|
} else {
|
||||||
|
container.tmMove2Icon.setVisible(false);
|
||||||
|
}
|
||||||
|
if (data.passive1) {
|
||||||
|
container.passive1Icon.setVisible(true);
|
||||||
|
} else {
|
||||||
|
container.passive1Icon.setVisible(false);
|
||||||
|
}
|
||||||
|
if (data.passive2) {
|
||||||
|
container.passive2Icon.setVisible(true);
|
||||||
|
} else {
|
||||||
|
container.passive2Icon.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.showDecorations) {
|
if (this.showDecorations) {
|
||||||
|
|
||||||
if (this.pokerusSpecies.includes(data.species)) {
|
if (this.pokerusSpecies.includes(data.species)) {
|
||||||
|
@ -140,6 +140,6 @@ describe("Moves - Focus Punch", () => {
|
|||||||
await game.phaseInterceptor.to("MessagePhase", false);
|
await game.phaseInterceptor.to("MessagePhase", false);
|
||||||
const consoleSpy = vi.spyOn(console, "log");
|
const consoleSpy = vi.spyOn(console, "log");
|
||||||
await game.phaseInterceptor.to("MoveEndPhase", true);
|
await game.phaseInterceptor.to("MoveEndPhase", true);
|
||||||
expect(consoleSpy).nthCalledWith(1, i18next.t("moveTriggers:lostFocus"));
|
expect(consoleSpy).nthCalledWith(1, i18next.t("moveTriggers:lostFocus", { pokemonName: "Charizard" }));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user