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, "id": 94,
"graphic": "PRAS- PsychicBG", "graphic": "PRAS- Psychic BG",
"frames": [ "frames": [
[ [
{ {

View File

@ -944,7 +944,7 @@ export class MoveEffectPhase extends PokemonPhase {
const result = this.applyMoveDamage(user, target, effectiveness); const result = this.applyMoveDamage(user, target, effectiveness);
if (user.turnData.hitsLeft === 1 && target.isFainted()) { if (user.turnData.hitsLeft === 1 || target.isFainted()) {
this.queueHitResultMessage(result); 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 { export function encrypt(data: string, bypassLogin: boolean): string {
return (bypassLogin ? (data: string) => btoa(data) : (data: string) => AES.encrypt(data, saveKey))( return (bypassLogin
data, ? (data: string) => btoa(encodeURIComponent(data))
) as unknown as string; // TODO: is this correct? : (data: string) => AES.encrypt(data, saveKey))(data) as unknown as string; // TODO: is this correct?
} }
export function decrypt(data: string, bypassLogin: boolean): string { export function decrypt(data: string, bypassLogin: boolean): string {
return (bypassLogin ? (data: string) => atob(data) : (data: string) => AES.decrypt(data, saveKey).toString(enc.Utf8))( return (
data, bypassLogin
); ? (data: string) => decodeURIComponent(atob(data))
: (data: string) => AES.decrypt(data, saveKey).toString(enc.Utf8)
)(data);
} }
export interface SystemSaveData { export interface SystemSaveData {