mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Merge branch 'hotfix-1.9.1' into revelation_dance
This commit is contained in:
commit
22826d1a30
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user