Merge branch 'hotfix-1.9.1' into revelation_dance

This commit is contained in:
Lylian BALL 2025-05-04 22:58:14 +02:00 committed by GitHub
commit a94030f23d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 18 additions and 21 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "pokemon-rogue-battle", "name": "pokemon-rogue-battle",
"version": "1.9.0", "version": "1.9.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "pokemon-rogue-battle", "name": "pokemon-rogue-battle",
"version": "1.9.0", "version": "1.9.1",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@material/material-color-utilities": "^0.2.7", "@material/material-color-utilities": "^0.2.7",

View File

@ -1,7 +1,7 @@
{ {
"name": "pokemon-rogue-battle", "name": "pokemon-rogue-battle",
"private": true, "private": true,
"version": "1.9.0", "version": "1.9.1",
"type": "module", "type": "module",
"scripts": { "scripts": {
"start": "vite", "start": "vite",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -2454,13 +2454,14 @@ export class StatusEffectAttr extends MoveEffectAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true); const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true);
const statusCheck = moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance; const statusCheck = moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance;
const quiet = move.category !== MoveCategory.STATUS;
if (statusCheck) { if (statusCheck) {
const pokemon = this.selfTarget ? user : target; const pokemon = this.selfTarget ? user : target;
if (user !== target && move.category === MoveCategory.STATUS && !target.canSetStatus(this.effect, false, false, user, true)) { if (user !== target && move.category === MoveCategory.STATUS && !target.canSetStatus(this.effect, quiet, false, user, true)) {
return false; return false;
} }
if (((!pokemon.status || this.overrideStatus) || (pokemon.status.effect === this.effect && moveChance < 0)) if (((!pokemon.status || this.overrideStatus) || (pokemon.status.effect === this.effect && moveChance < 0))
&& pokemon.trySetStatus(this.effect, true, user, this.turnsRemaining, null, this.overrideStatus, false)) { && pokemon.trySetStatus(this.effect, true, user, this.turnsRemaining, null, this.overrideStatus, quiet)) {
applyPostAttackAbAttrs(ConfusionOnStatusEffectAbAttr, user, target, move, null, false, this.effect); applyPostAttackAbAttrs(ConfusionOnStatusEffectAbAttr, user, target, move, null, false, this.effect);
return true; return true;
} }

View File

@ -224,18 +224,19 @@ export const trainerPartyTemplates = {
*/ */
export function getEvilGruntPartyTemplate(): TrainerPartyTemplate { export function getEvilGruntPartyTemplate(): TrainerPartyTemplate {
const waveIndex = globalScene.currentBattle?.waveIndex; const waveIndex = globalScene.currentBattle?.waveIndex;
switch (waveIndex) { if (waveIndex <= ClassicFixedBossWaves.EVIL_GRUNT_1){
case ClassicFixedBossWaves.EVIL_GRUNT_1: return trainerPartyTemplates.TWO_AVG;
return trainerPartyTemplates.TWO_AVG;
case ClassicFixedBossWaves.EVIL_GRUNT_2:
return trainerPartyTemplates.THREE_AVG;
case ClassicFixedBossWaves.EVIL_GRUNT_3:
return trainerPartyTemplates.TWO_AVG_ONE_STRONG;
case ClassicFixedBossWaves.EVIL_ADMIN_1:
return trainerPartyTemplates.GYM_LEADER_4; // 3avg 1 strong 1 stronger
default:
return trainerPartyTemplates.GYM_LEADER_5; // 3 avg 2 strong 1 stronger
} }
if (waveIndex <= ClassicFixedBossWaves.EVIL_GRUNT_2){
return trainerPartyTemplates.THREE_AVG;
}
if (waveIndex <= ClassicFixedBossWaves.EVIL_GRUNT_3){
return trainerPartyTemplates.TWO_AVG_ONE_STRONG;
}
if (waveIndex <= ClassicFixedBossWaves.EVIL_ADMIN_1){
return trainerPartyTemplates.GYM_LEADER_4; // 3avg 1 strong 1 stronger
}
return trainerPartyTemplates.GYM_LEADER_5; // 3 avg 2 strong 1 stronger
} }
export function getWavePartyTemplate(...templates: TrainerPartyTemplate[]) { export function getWavePartyTemplate(...templates: TrainerPartyTemplate[]) {

View File

@ -15,11 +15,6 @@ const migratePartyData: SessionSaveMigrator = {
migrate: (data: SessionSaveData): void => { migrate: (data: SessionSaveData): void => {
// this stuff is copied straight from the constructor fwiw // this stuff is copied straight from the constructor fwiw
const mapParty = (pkmnData: PokemonData) => { const mapParty = (pkmnData: PokemonData) => {
pkmnData.status &&= new Status(
pkmnData.status.effect,
pkmnData.status.toxicTurnCount,
pkmnData.status.sleepTurnsRemaining,
);
// remove empty moves from moveset // remove empty moves from moveset
pkmnData.moveset = (pkmnData.moveset ?? [new PokemonMove(Moves.TACKLE), new PokemonMove(Moves.GROWL)]) pkmnData.moveset = (pkmnData.moveset ?? [new PokemonMove(Moves.TACKLE), new PokemonMove(Moves.GROWL)])
.filter(m => !!m) .filter(m => !!m)