Merge pull request #16 from PokeRogue-Projects/main

Patch beta
This commit is contained in:
RedstonewolfX 2024-09-02 16:29:40 -04:00 committed by GitHub
commit 4c9c2e15a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 44 additions and 18 deletions

View File

@ -7,11 +7,11 @@ This program is for Windows - it does not have installers for Mac or Linux right
(You can still do run validation without this mod, of course) (You can still do run validation without this mod, of course)
## Feature progress ## Feature progress
- [ ] Logs all the steps you take while playing - [x] Logs all the steps you take while playing
- [x] Logs the wild Pokémon you encounter and their stats - [x] Logs the wild Pokémon you encounter and their stats
- [x] Logs the category of trainers you encounter - [x] Logs the category of trainers you encounter
- [x] In-Game GUI to export logs - [x] In-Game GUI to export logs
- [ ] Show damage values for attacks (present, but incomplete) - [x] Show damage values for attacks (present, but incomplete)
- [x] Show catch rates - [x] Show catch rates
- [x] Show attributes of wild Pokémon (max IVs, nature, abilities) - [x] Show attributes of wild Pokémon (max IVs, nature, abilities)

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1,6 +1,6 @@
import { Type } from "./type"; import { Type } from "./type";
import * as Utils from "../utils"; import * as Utils from "../utils";
import {pokemonEvolutions, SpeciesFormEvolution} from "./pokemon-evolutions"; import { pokemonEvolutions, SpeciesFormEvolution } from "./pokemon-evolutions";
import i18next from "i18next"; import i18next from "i18next";
import { Biome } from "#enums/biome"; import { Biome } from "#enums/biome";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
@ -46,7 +46,7 @@ export const biomeLinks: BiomeLinks = {
[Biome.SEABED]: [ Biome.CAVE, [ Biome.VOLCANO, 3 ] ], [Biome.SEABED]: [ Biome.CAVE, [ Biome.VOLCANO, 3 ] ],
[Biome.MOUNTAIN]: [ Biome.VOLCANO, [ Biome.WASTELAND, 2 ], [ Biome.SPACE, 3 ] ], [Biome.MOUNTAIN]: [ Biome.VOLCANO, [ Biome.WASTELAND, 2 ], [ Biome.SPACE, 3 ] ],
[Biome.BADLANDS]: [ Biome.DESERT, Biome.MOUNTAIN ], [Biome.BADLANDS]: [ Biome.DESERT, Biome.MOUNTAIN ],
[Biome.CAVE]: [ Biome.BADLANDS, Biome.LAKE [ Biome.LABORATORY, 2 ] ], [Biome.CAVE]: [ Biome.BADLANDS, Biome.LAKE, [ Biome.LABORATORY, 2 ] ],
[Biome.DESERT]: [ Biome.RUINS, [ Biome.CONSTRUCTION_SITE, 2 ] ], [Biome.DESERT]: [ Biome.RUINS, [ Biome.CONSTRUCTION_SITE, 2 ] ],
[Biome.ICE_CAVE]: Biome.SNOWY_FOREST, [Biome.ICE_CAVE]: Biome.SNOWY_FOREST,
[Biome.MEADOW]: [ Biome.PLAINS, Biome.FAIRY_CAVE ], [Biome.MEADOW]: [ Biome.PLAINS, Biome.FAIRY_CAVE ],

View File

@ -945,7 +945,7 @@ export function initSpecies() {
new PokemonSpecies(Species.METAPOD, 1, false, false, false, "Cocoon Pokémon", Type.BUG, null, 0.7, 9.9, Abilities.SHED_SKIN, Abilities.NONE, Abilities.SHED_SKIN, 205, 50, 20, 55, 25, 25, 30, 120, 50, 72, GrowthRate.MEDIUM_FAST, 50, false), new PokemonSpecies(Species.METAPOD, 1, false, false, false, "Cocoon Pokémon", Type.BUG, null, 0.7, 9.9, Abilities.SHED_SKIN, Abilities.NONE, Abilities.SHED_SKIN, 205, 50, 20, 55, 25, 25, 30, 120, 50, 72, GrowthRate.MEDIUM_FAST, 50, false),
new PokemonSpecies(Species.BUTTERFREE, 1, false, false, false, "Butterfly Pokémon", Type.BUG, Type.FLYING, 1.1, 32, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.TINTED_LENS, 395, 60, 45, 50, 90, 80, 70, 45, 50, 198, GrowthRate.MEDIUM_FAST, 50, true, true, new PokemonSpecies(Species.BUTTERFREE, 1, false, false, false, "Butterfly Pokémon", Type.BUG, Type.FLYING, 1.1, 32, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.TINTED_LENS, 395, 60, 45, 50, 90, 80, 70, 45, 50, 198, GrowthRate.MEDIUM_FAST, 50, true, true,
new PokemonForm("Normal", "", Type.BUG, Type.FLYING, 1.1, 32, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.TINTED_LENS, 395, 60, 45, 50, 90, 80, 70, 45, 50, 198, true, null, true), new PokemonForm("Normal", "", Type.BUG, Type.FLYING, 1.1, 32, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.TINTED_LENS, 395, 60, 45, 50, 90, 80, 70, 45, 50, 198, true, null, true),
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.BUG, Type.FLYING, 17, 32, Abilities.TINTED_LENS, Abilities.TINTED_LENS, Abilities.TINTED_LENS, 495, 85, 35, 80, 120, 90, 85, 45, 50, 198, true), new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.BUG, Type.FLYING, 17, 32, Abilities.COMPOUND_EYES, Abilities.COMPOUND_EYES, Abilities.COMPOUND_EYES, 495, 85, 35, 80, 120, 90, 85, 45, 50, 198, true),
), ),
new PokemonSpecies(Species.WEEDLE, 1, false, false, false, "Hairy Bug Pokémon", Type.BUG, Type.POISON, 0.3, 3.2, Abilities.SHIELD_DUST, Abilities.NONE, Abilities.RUN_AWAY, 195, 40, 35, 30, 20, 20, 50, 255, 70, 39, GrowthRate.MEDIUM_FAST, 50, false), new PokemonSpecies(Species.WEEDLE, 1, false, false, false, "Hairy Bug Pokémon", Type.BUG, Type.POISON, 0.3, 3.2, Abilities.SHIELD_DUST, Abilities.NONE, Abilities.RUN_AWAY, 195, 40, 35, 30, 20, 20, 50, 255, 70, 39, GrowthRate.MEDIUM_FAST, 50, false),
new PokemonSpecies(Species.KAKUNA, 1, false, false, false, "Cocoon Pokémon", Type.BUG, Type.POISON, 0.6, 10, Abilities.SHED_SKIN, Abilities.NONE, Abilities.SHED_SKIN, 205, 45, 25, 50, 25, 25, 35, 120, 70, 72, GrowthRate.MEDIUM_FAST, 50, false), new PokemonSpecies(Species.KAKUNA, 1, false, false, false, "Cocoon Pokémon", Type.BUG, Type.POISON, 0.6, 10, Abilities.SHED_SKIN, Abilities.NONE, Abilities.SHED_SKIN, 205, 45, 25, 50, 25, 25, 35, 120, 70, 72, GrowthRate.MEDIUM_FAST, 50, false),

View File

@ -373,7 +373,7 @@ export class LoadingScene extends SceneBase {
} else { } else {
this.loadAtlas("types", ""); this.loadAtlas("types", "");
} }
const availableLangs = ["en", "de", "it", "fr", "ja", "ko", "es", "pt_BR", "zh_CN"]; const availableLangs = ["en", "de", "it", "fr", "ja", "ko", "es", "pt-BR", "zh-CN"];
if (lang && availableLangs.includes(lang)) { if (lang && availableLangs.includes(lang)) {
this.loadImage("september-update-"+lang, "events"); this.loadImage("september-update-"+lang, "events");
} else { } else {

View File

@ -55,7 +55,7 @@ SECTIONS
/** The number of enemy actions to log. */ /** The number of enemy actions to log. */
export const EnemyEventLogCount = 3 export const EnemyEventLogCount = 3
/** The current DRPD version. */ /** The current DRPD version. */
export const DRPD_Version = "1.1.0a" export const DRPD_Version = "1.1.0b"
/** (Unused / reference only) All the log versions that this mod can keep updated. /** (Unused / reference only) All the log versions that this mod can keep updated.
* @see updateLog * @see updateLog
*/ */
@ -64,6 +64,7 @@ export const acceptedVersions = [
"1.0.0a", "1.0.0a",
"1.1.0", "1.1.0",
"1.1.0a", "1.1.0a",
"1.1.0b",
] ]
// Value holders // Value holders
@ -608,6 +609,18 @@ function updateLog(drpd: DRPD): DRPD {
drpd.maxluck = 14 drpd.maxluck = 14
drpd.minSafeLuckFloor = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] drpd.minSafeLuckFloor = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
} // 1.1.0 → 1.1.0a } // 1.1.0 → 1.1.0a
if (drpd.version == "1.1.0a") {
drpd.version = "1.1.0b"
for (var i = 0; i < drpd.waves.length; i++) {
if (drpd.waves[i] && drpd.waves[i].pokemon) {
for (var j = 0; j < drpd.waves[i].pokemon!.length; j++) {
drpd.waves[i].pokemon![j].iv_raw = drpd.waves[i].pokemon![j].ivs!
drpd.waves[i].pokemon![j].ivs = undefined
drpd.waves[i].pokemon![j].iv = formatIVs(drpd.waves[i].pokemon![j].ivs!)
}
}
}
} // 1.1.0a → 1.1.0b
return drpd; return drpd;
} }
// #endregion // #endregion
@ -1026,7 +1039,11 @@ export interface PokeData {
/** The Pokémon's IVs. Influences its base stats. /** The Pokémon's IVs. Influences its base stats.
* @see IVData * @see IVData
*/ */
ivs: IVData, iv_raw: IVData,
/** The Pokémon's IVs, printed as ordered text. */
iv: string[],
/** @deprecated */
ivs?: IVData,
/** The Pokémon that was used to generate this `PokeData`. Not exported. /** The Pokémon that was used to generate this `PokeData`. Not exported.
* @see Pokemon * @see Pokemon
*/ */
@ -1051,7 +1068,8 @@ export function exportPokemon(pokemon: Pokemon, encounterRarity?: string): PokeD
captured: false, captured: false,
level: pokemon.level, level: pokemon.level,
items: pokemon.getHeldItems().map((item, idx) => exportItem(item)), items: pokemon.getHeldItems().map((item, idx) => exportItem(item)),
ivs: exportIVs(pokemon.ivs) iv_raw: exportIVs(pokemon.ivs),
iv: formatIVs(pokemon.ivs)
} }
} }
/** /**
@ -1111,7 +1129,7 @@ function printPoke(inData: string, indent: string, pokemon: PokeData) {
} }
} }
inData += ",\n" + indent + " \"ivs\": " inData += ",\n" + indent + " \"ivs\": "
inData = printIV(inData, indent + " ", pokemon.ivs) inData = printIV(inData, indent + " ", pokemon.iv_raw)
//inData += ",\n" + indent + " \"rarity\": " + pokemon.rarity //inData += ",\n" + indent + " \"rarity\": " + pokemon.rarity
inData += "\n" + indent + "}" inData += "\n" + indent + "}"
return inData; return inData;
@ -1228,6 +1246,16 @@ export function exportIVs(ivs: integer[]): IVData {
speed: ivs[5] speed: ivs[5]
} }
} }
export function formatIVs(ivs: integer[] | IVData): string[] {
return [
`HP: ${Array.isArray(ivs) ? ivs[0] : ivs.hp}`,
`Attack: ${Array.isArray(ivs) ? ivs[1] : ivs.hp}`,
`Defense: ${Array.isArray(ivs) ? ivs[2] : ivs.hp}`,
`Sp. Atk: ${Array.isArray(ivs) ? ivs[3] : ivs.hp}`,
`Sp. Def: ${Array.isArray(ivs) ? ivs[4] : ivs.hp}`,
`Speed: ${Array.isArray(ivs) ? ivs[5] : ivs.hp}`,
]
}
/** /**
* Prints a Pokemon's IV data as a string, for saving a DRPD to your device. * Prints a Pokemon's IV data as a string, for saving a DRPD to your device.
* @param inData The data to add on to. * @param inData The data to add on to.

View File

@ -33,7 +33,7 @@ const timedEvents: TimedEvent[] = [
xPosition: 19, xPosition: 19,
yPosition: 115, yPosition: 115,
scale: 0.30, scale: 0.30,
availableLangs: ["en", "de", "it", "fr", "ja", "ko", "es", "pt_BR", "zh_CN"] availableLangs: ["en", "de", "it", "fr", "ja", "ko", "es", "pt-BR", "zh-CN"]
} }
]; ];

View File

@ -8,17 +8,15 @@ import * as Utils from "../utils";
import Move, * as MoveData from "../data/move"; import Move, * as MoveData from "../data/move";
import i18next from "i18next"; import i18next from "i18next";
import {Button} from "#enums/buttons"; import {Button} from "#enums/buttons";
import Battle from "#app/battle.js";
import { Stat } from "#app/data/pokemon-stat.js"; import { Stat } from "#app/data/pokemon-stat.js";
import { Abilities } from "#app/enums/abilities.js";
import { WeatherType } from "#app/data/weather.js"; import { WeatherType } from "#app/data/weather.js";
import { Moves } from "#app/enums/moves.js"; import { Moves } from "#app/enums/moves.js";
import { AddSecondStrikeAbAttr, AllyMoveCategoryPowerBoostAbAttr, AlwaysHitAbAttr, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreDefendAbAttrsNoApply, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, ConditionalCritAbAttr, DamageBoostAbAttr, FieldMoveTypePowerBoostAbAttr, FieldPriorityMoveImmunityAbAttr, IgnoreOpponentEvasionAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, MoveTypeChangeAttr, MultCritAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, StabBoostAbAttr, TypeImmunityAbAttr, UserFieldMoveTypePowerBoostAbAttr, VariableMovePowerAbAttr, WonderSkinAbAttr } from "#app/data/ability.js"; import { AddSecondStrikeAbAttr, AllyMoveCategoryPowerBoostAbAttr, AlwaysHitAbAttr, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreDefendAbAttrsNoApply, BattleStatMultiplierAbAttr, BlockCritAbAttr, BypassBurnDamageReductionAbAttr, ConditionalCritAbAttr, DamageBoostAbAttr, FieldMoveTypePowerBoostAbAttr, FieldPriorityMoveImmunityAbAttr, IgnoreOpponentEvasionAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, MultCritAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, StabBoostAbAttr, TypeImmunityAbAttr, UserFieldMoveTypePowerBoostAbAttr, VariableMovePowerAbAttr, WonderSkinAbAttr } from "#app/data/ability.js";
import { ArenaTagType } from "#app/enums/arena-tag-type.js"; import { ArenaTagType } from "#app/enums/arena-tag-type.js";
import { ArenaTagSide, WeakenMoveScreenTag, WeakenMoveTypeTag } from "#app/data/arena-tag.js"; import { ArenaTagSide, WeakenMoveScreenTag, WeakenMoveTypeTag } from "#app/data/arena-tag.js";
import { BattlerTagLapseType, HelpingHandTag, SemiInvulnerableTag, TypeBoostTag } from "#app/data/battler-tags.js"; import { HelpingHandTag, SemiInvulnerableTag, TypeBoostTag } from "#app/data/battler-tags.js";
import { TerrainType } from "#app/data/terrain.js"; import { TerrainType } from "#app/data/terrain.js";
import { AttackTypeBoosterModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, EnemyEndureChanceModifier, PokemonMoveAccuracyBoosterModifier, PokemonMultiHitModifier, TempBattleStatBoosterModifier } from "#app/modifier/modifier.js"; import { AttackTypeBoosterModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, PokemonMoveAccuracyBoosterModifier, PokemonMultiHitModifier, TempBattleStatBoosterModifier } from "#app/modifier/modifier.js";
import { BattlerTagType } from "#app/enums/battler-tag-type.js"; import { BattlerTagType } from "#app/enums/battler-tag-type.js";
import { TempBattleStat } from "#app/data/temp-battle-stat.js"; import { TempBattleStat } from "#app/data/temp-battle-stat.js";
import { StatusEffect } from "#app/data/status-effect.js"; import { StatusEffect } from "#app/data/status-effect.js";
@ -185,12 +183,11 @@ export default class FightUiHandler extends UiHandler {
const typeChangeMovePowerMultiplier = new Utils.NumberHolder(1); const typeChangeMovePowerMultiplier = new Utils.NumberHolder(1);
MoveData.applyMoveAttrs(MoveData.VariableMoveTypeAttr, user, target, move); MoveData.applyMoveAttrs(MoveData.VariableMoveTypeAttr, user, target, move);
applyPreAttackAbAttrs(MoveTypeChangeAttr, user, target, move, true, typeChangeMovePowerMultiplier);
const types = target.getTypes(true, true); const types = target.getTypes(true, true);
const cancelled = new Utils.BooleanHolder(false); const cancelled = new Utils.BooleanHolder(false);
const typeless = move.hasAttr(MoveData.TypelessAttr); const typeless = move.hasAttr(MoveData.TypelessAttr);
const typeMultiplier = new Utils.NumberHolder(!typeless && (moveCategory !== MoveData.MoveCategory.STATUS || move.getAttrs(MoveData.StatusMoveTypeImmunityAttr).find(attr => types.includes(attr.immuneType))) const typeMultiplier = new Utils.NumberHolder(!typeless && (moveCategory !== MoveData.MoveCategory.STATUS)
? target.getAttackTypeEffectiveness(move.type, user, false, false) ? target.getAttackTypeEffectiveness(move.type, user, false, false)
: 1); : 1);
MoveData.applyMoveAttrs(MoveData.VariableMoveTypeMultiplierAttr, user, target, move, typeMultiplier); MoveData.applyMoveAttrs(MoveData.VariableMoveTypeMultiplierAttr, user, target, move, typeMultiplier);

View File

@ -551,6 +551,7 @@ export default class MenuUiHandler extends MessageUiHandler {
break; break;
case MenuOptions.LINKS: case MenuOptions.LINKS:
ui.setOverlayMode(Mode.MENU_OPTION_SELECT, this.legalLinksConfig); ui.setOverlayMode(Mode.MENU_OPTION_SELECT, this.legalLinksConfig);
break;
case MenuOptions.RUN_HISTORY: case MenuOptions.RUN_HISTORY:
ui.setOverlayMode(Mode.RUN_HISTORY); ui.setOverlayMode(Mode.RUN_HISTORY);
success = true; success = true;