Merge branch 'beta' into mystery-encounters-translations

This commit is contained in:
Lugiad 2024-09-16 20:04:58 +02:00 committed by GitHub
commit 85a6d95dac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 9 deletions

View File

@ -6952,7 +6952,7 @@ export function initMoves() {
.makesContact(false), .makesContact(false),
new AttackMove(Moves.EARTHQUAKE, Type.GROUND, MoveCategory.PHYSICAL, 100, 100, 10, -1, 0, 1) new AttackMove(Moves.EARTHQUAKE, Type.GROUND, MoveCategory.PHYSICAL, 100, 100, 10, -1, 0, 1)
.attr(HitsTagAttr, BattlerTagType.UNDERGROUND, true) .attr(HitsTagAttr, BattlerTagType.UNDERGROUND, true)
.attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.GRASSY ? 0.5 : 1) .attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.GRASSY && target.isGrounded() ? 0.5 : 1)
.makesContact(false) .makesContact(false)
.target(MoveTarget.ALL_NEAR_OTHERS), .target(MoveTarget.ALL_NEAR_OTHERS),
new AttackMove(Moves.FISSURE, Type.GROUND, MoveCategory.PHYSICAL, 200, 30, 5, -1, 0, 1) new AttackMove(Moves.FISSURE, Type.GROUND, MoveCategory.PHYSICAL, 200, 30, 5, -1, 0, 1)
@ -7346,7 +7346,7 @@ export function initMoves() {
new AttackMove(Moves.MAGNITUDE, Type.GROUND, MoveCategory.PHYSICAL, -1, 100, 30, -1, 0, 2) new AttackMove(Moves.MAGNITUDE, Type.GROUND, MoveCategory.PHYSICAL, -1, 100, 30, -1, 0, 2)
.attr(PreMoveMessageAttr, magnitudeMessageFunc) .attr(PreMoveMessageAttr, magnitudeMessageFunc)
.attr(MagnitudePowerAttr) .attr(MagnitudePowerAttr)
.attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.GRASSY ? 0.5 : 1) .attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.GRASSY && target.isGrounded() ? 0.5 : 1)
.attr(HitsTagAttr, BattlerTagType.UNDERGROUND, true) .attr(HitsTagAttr, BattlerTagType.UNDERGROUND, true)
.makesContact(false) .makesContact(false)
.target(MoveTarget.ALL_NEAR_OTHERS), .target(MoveTarget.ALL_NEAR_OTHERS),
@ -8221,7 +8221,7 @@ export function initMoves() {
.target(MoveTarget.ALL_NEAR_ENEMIES), .target(MoveTarget.ALL_NEAR_ENEMIES),
new AttackMove(Moves.BULLDOZE, Type.GROUND, MoveCategory.PHYSICAL, 60, 100, 20, 100, 0, 5) new AttackMove(Moves.BULLDOZE, Type.GROUND, MoveCategory.PHYSICAL, 60, 100, 20, 100, 0, 5)
.attr(StatStageChangeAttr, [ Stat.SPD ], -1) .attr(StatStageChangeAttr, [ Stat.SPD ], -1)
.attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.GRASSY ? 0.5 : 1) .attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.GRASSY && target.isGrounded() ? 0.5 : 1)
.makesContact(false) .makesContact(false)
.target(MoveTarget.ALL_NEAR_OTHERS), .target(MoveTarget.ALL_NEAR_OTHERS),
new AttackMove(Moves.FROST_BREATH, Type.ICE, MoveCategory.SPECIAL, 60, 90, 10, 100, 0, 5) new AttackMove(Moves.FROST_BREATH, Type.ICE, MoveCategory.SPECIAL, 60, 90, 10, 100, 0, 5)

View File

@ -26,16 +26,16 @@ describe("Arena - Grassy Terrain", () => {
game.override game.override
.battleType("single") .battleType("single")
.disableCrits() .disableCrits()
.enemyLevel(30) .enemyLevel(1)
.enemySpecies(Species.SNORLAX) .enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.STURDY)
.enemyMoveset(Moves.SPLASH) .enemyMoveset(Moves.FLY)
.moveset([Moves.GRASSY_TERRAIN, Moves.EARTHQUAKE]) .moveset([Moves.GRASSY_TERRAIN, Moves.EARTHQUAKE])
.ability(Abilities.BALL_FETCH); .ability(Abilities.NO_GUARD);
}); });
it("halves the damage of Earthquake", async () => { it("halves the damage of Earthquake", async () => {
await game.classicMode.startBattle([Species.FEEBAS]); await game.classicMode.startBattle([Species.TAUROS]);
const eq = allMoves[Moves.EARTHQUAKE]; const eq = allMoves[Moves.EARTHQUAKE];
vi.spyOn(eq, "calculateBattlePower"); vi.spyOn(eq, "calculateBattlePower");
@ -53,4 +53,19 @@ describe("Arena - Grassy Terrain", () => {
expect(eq.calculateBattlePower).toHaveReturnedWith(50); expect(eq.calculateBattlePower).toHaveReturnedWith(50);
}, TIMEOUT); }, TIMEOUT);
it("Does not halve the damage of Earthquake if opponent is not grounded", async () => {
await game.classicMode.startBattle([Species.NINJASK]);
const eq = allMoves[Moves.EARTHQUAKE];
vi.spyOn(eq, "calculateBattlePower");
game.move.select(Moves.GRASSY_TERRAIN);
await game.toNextTurn();
game.move.select(Moves.EARTHQUAKE);
await game.phaseInterceptor.to("BerryPhase");
expect(eq.calculateBattlePower).toHaveReturnedWith(100);
}, TIMEOUT);
}); });