Merge branch 'hotfix-1.9.1' into revelation_dance

This commit is contained in:
Lylian BALL 2025-05-05 19:38:56 +02:00 committed by GitHub
commit 22826d1a30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"id": 94,
"graphic": "PRAS- PsychicBG",
"graphic": "PRAS- Psychic BG",
"frames": [
[
{

View File

@ -944,7 +944,7 @@ export class MoveEffectPhase extends PokemonPhase {
const result = this.applyMoveDamage(user, target, effectiveness);
if (user.turnData.hitsLeft === 1 && target.isFainted()) {
if (user.turnData.hitsLeft === 1 || target.isFainted()) {
this.queueHitResultMessage(result);
}

View File

@ -118,15 +118,17 @@ export function getDataTypeKey(dataType: GameDataType, slotId = 0): string {
}
export function encrypt(data: string, bypassLogin: boolean): string {
return (bypassLogin ? (data: string) => btoa(data) : (data: string) => AES.encrypt(data, saveKey))(
data,
) as unknown as string; // TODO: is this correct?
return (bypassLogin
? (data: string) => btoa(encodeURIComponent(data))
: (data: string) => AES.encrypt(data, saveKey))(data) as unknown as string; // TODO: is this correct?
}
export function decrypt(data: string, bypassLogin: boolean): string {
return (bypassLogin ? (data: string) => atob(data) : (data: string) => AES.decrypt(data, saveKey).toString(enc.Utf8))(
data,
);
return (
bypassLogin
? (data: string) => decodeURIComponent(atob(data))
: (data: string) => AES.decrypt(data, saveKey).toString(enc.Utf8)
)(data);
}
export interface SystemSaveData {