mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
Fixed various issues after merge
This commit is contained in:
parent
0f8ea02c85
commit
93b4364880
@ -12,10 +12,10 @@ import type { ArenaData } from "#system/arena-data";
|
|||||||
import type { ChallengeData } from "#system/challenge-data";
|
import type { ChallengeData } from "#system/challenge-data";
|
||||||
import type { EggData } from "#system/egg-data";
|
import type { EggData } from "#system/egg-data";
|
||||||
import type { GameStats } from "#system/game-stats";
|
import type { GameStats } from "#system/game-stats";
|
||||||
import type { ModifierData } from "#system/modifier-data";
|
|
||||||
import type { PokemonData } from "#system/pokemon-data";
|
import type { PokemonData } from "#system/pokemon-data";
|
||||||
import type { TrainerData } from "#system/trainer-data";
|
import type { TrainerData } from "#system/trainer-data";
|
||||||
import type { DexData } from "./dex-data";
|
import type { DexData } from "./dex-data";
|
||||||
|
import type { TrainerItemSaveData } from "./trainer-item-data-types";
|
||||||
|
|
||||||
export interface SystemSaveData {
|
export interface SystemSaveData {
|
||||||
trainerId: number;
|
trainerId: number;
|
||||||
@ -41,8 +41,8 @@ export interface SessionSaveData {
|
|||||||
gameMode: GameModes;
|
gameMode: GameModes;
|
||||||
party: PokemonData[];
|
party: PokemonData[];
|
||||||
enemyParty: PokemonData[];
|
enemyParty: PokemonData[];
|
||||||
modifiers: ModifierData[];
|
trainerItems: TrainerItemSaveData;
|
||||||
enemyModifiers: ModifierData[];
|
enemyTrainerItems: TrainerItemSaveData;
|
||||||
arena: ArenaData;
|
arena: ArenaData;
|
||||||
pokeballCounts: PokeballCounts;
|
pokeballCounts: PokeballCounts;
|
||||||
money: number;
|
money: number;
|
||||||
|
@ -25,7 +25,7 @@ import type { MysteryEncounter } from "#mystery-encounters/mystery-encounter";
|
|||||||
import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter";
|
import { MysteryEncounterBuilder } from "#mystery-encounters/mystery-encounter";
|
||||||
import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option";
|
import { MysteryEncounterOptionBuilder } from "#mystery-encounters/mystery-encounter-option";
|
||||||
import { PokemonData } from "#system/pokemon-data";
|
import { PokemonData } from "#system/pokemon-data";
|
||||||
import type { OptionSelectItem } from "#ui/abstract-option-select-ui-handler";
|
import type { OptionSelectItem } from "#ui/handlers/abstract-option-select-ui-handler";
|
||||||
import { isNullOrUndefined, randSeedShuffle } from "#utils/common";
|
import { isNullOrUndefined, randSeedShuffle } from "#utils/common";
|
||||||
import { getEnumValues } from "#utils/enums";
|
import { getEnumValues } from "#utils/enums";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -28,7 +28,6 @@ import { UiMode } from "#enums/ui-mode";
|
|||||||
import type { PlayerPokemon, Pokemon } from "#field/pokemon";
|
import type { PlayerPokemon, Pokemon } from "#field/pokemon";
|
||||||
import { EnemyPokemon } from "#field/pokemon";
|
import { EnemyPokemon } from "#field/pokemon";
|
||||||
import { Trainer } from "#field/trainer";
|
import { Trainer } from "#field/trainer";
|
||||||
import type { HeldItemConfiguration } from "#items/held-item-data-types";
|
|
||||||
import type { CustomRewardSettings } from "#items/reward-pool-utils";
|
import type { CustomRewardSettings } from "#items/reward-pool-utils";
|
||||||
import { PokemonMove } from "#moves/pokemon-move";
|
import { PokemonMove } from "#moves/pokemon-move";
|
||||||
import { showEncounterText } from "#mystery-encounters/encounter-dialogue-utils";
|
import { showEncounterText } from "#mystery-encounters/encounter-dialogue-utils";
|
||||||
@ -37,6 +36,7 @@ import type { Variant } from "#sprites/variant";
|
|||||||
import type { PokemonData } from "#system/pokemon-data";
|
import type { PokemonData } from "#system/pokemon-data";
|
||||||
import type { TrainerConfig } from "#trainers/trainer-config";
|
import type { TrainerConfig } from "#trainers/trainer-config";
|
||||||
import { trainerConfigs } from "#trainers/trainer-config";
|
import { trainerConfigs } from "#trainers/trainer-config";
|
||||||
|
import type { HeldItemConfiguration } from "#types/held-item-data-types";
|
||||||
import type { OptionSelectConfig, OptionSelectItem } from "#ui/handlers/abstract-option-select-ui-handler";
|
import type { OptionSelectConfig, OptionSelectItem } from "#ui/handlers/abstract-option-select-ui-handler";
|
||||||
import type { PartyOption, PokemonSelectFilter } from "#ui/handlers/party-ui-handler";
|
import type { PartyOption, PokemonSelectFilter } from "#ui/handlers/party-ui-handler";
|
||||||
import { PartyUiMode } from "#ui/handlers/party-ui-handler";
|
import { PartyUiMode } from "#ui/handlers/party-ui-handler";
|
||||||
|
@ -2,7 +2,7 @@ import type { RewardId } from "#enums/reward-id";
|
|||||||
import type { RarityTier } from "#enums/reward-tier";
|
import type { RarityTier } from "#enums/reward-tier";
|
||||||
import type { PlayerPokemon } from "#field/pokemon";
|
import type { PlayerPokemon } from "#field/pokemon";
|
||||||
import type { Exact } from "#types/type-helpers";
|
import type { Exact } from "#types/type-helpers";
|
||||||
import type { PokemonMoveSelectFilter, PokemonSelectFilter } from "#ui/party-ui-handler";
|
import type { PokemonMoveSelectFilter, PokemonSelectFilter } from "#ui/handlers/party-ui-handler";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,8 +2,8 @@ import { globalScene } from "#app/global-scene";
|
|||||||
import { allTrainerItems } from "#data/data-lists";
|
import { allTrainerItems } from "#data/data-lists";
|
||||||
import { RarityTier } from "#enums/reward-tier";
|
import { RarityTier } from "#enums/reward-tier";
|
||||||
import type { TrainerItemId } from "#enums/trainer-item-id";
|
import type { TrainerItemId } from "#enums/trainer-item-id";
|
||||||
import type { TrainerItemPool, TrainerItemTieredPool } from "#items/trainer-item-data-types";
|
|
||||||
import type { TrainerItemManager } from "#items/trainer-item-manager";
|
import type { TrainerItemManager } from "#items/trainer-item-manager";
|
||||||
|
import type { TrainerItemPool, TrainerItemTieredPool } from "#types/trainer-item-data-types";
|
||||||
import { isNullOrUndefined, pickWeightedIndex } from "#utils/common";
|
import { isNullOrUndefined, pickWeightedIndex } from "#utils/common";
|
||||||
|
|
||||||
export const enemyBuffTokenPool: TrainerItemTieredPool = {};
|
export const enemyBuffTokenPool: TrainerItemTieredPool = {};
|
||||||
|
@ -16,7 +16,6 @@ import type { EndCardPhase } from "#phases/end-card-phase";
|
|||||||
import { achvs, ChallengeAchv } from "#system/achv";
|
import { achvs, ChallengeAchv } from "#system/achv";
|
||||||
import { ArenaData } from "#system/arena-data";
|
import { ArenaData } from "#system/arena-data";
|
||||||
import { ChallengeData } from "#system/challenge-data";
|
import { ChallengeData } from "#system/challenge-data";
|
||||||
import type { SessionSaveData } from "#system/game-data";
|
|
||||||
import { PokemonData } from "#system/pokemon-data";
|
import { PokemonData } from "#system/pokemon-data";
|
||||||
import { RibbonData, type RibbonFlag } from "#system/ribbons/ribbon-data";
|
import { RibbonData, type RibbonFlag } from "#system/ribbons/ribbon-data";
|
||||||
import { awardRibbonsToSpeciesLine } from "#system/ribbons/ribbon-methods";
|
import { awardRibbonsToSpeciesLine } from "#system/ribbons/ribbon-methods";
|
||||||
|
@ -25,8 +25,8 @@ import { FusePokemonReward } from "#items/rewards/fuse";
|
|||||||
import { RememberMoveReward } from "#items/rewards/remember-move";
|
import { RememberMoveReward } from "#items/rewards/remember-move";
|
||||||
import { TmReward } from "#items/rewards/tm";
|
import { TmReward } from "#items/rewards/tm";
|
||||||
import { BattlePhase } from "#phases/battle-phase";
|
import { BattlePhase } from "#phases/battle-phase";
|
||||||
|
import { PartyOption, PartyUiHandler, PartyUiMode, type PokemonMoveSelectFilter } from "#ui/handlers/party-ui-handler";
|
||||||
import { type RewardSelectUiHandler, SHOP_OPTIONS_ROW_LIMIT } from "#ui/handlers/reward-select-ui-handler";
|
import { type RewardSelectUiHandler, SHOP_OPTIONS_ROW_LIMIT } from "#ui/handlers/reward-select-ui-handler";
|
||||||
import { PartyOption, PartyUiHandler, PartyUiMode, type PokemonMoveSelectFilter } from "#ui/party-ui-handler";
|
|
||||||
import { isNullOrUndefined, NumberHolder } from "#utils/common";
|
import { isNullOrUndefined, NumberHolder } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -55,7 +55,6 @@ import {
|
|||||||
import { VoucherType, vouchers } from "#system/voucher";
|
import { VoucherType, vouchers } from "#system/voucher";
|
||||||
import { trainerConfigs } from "#trainers/trainer-config";
|
import { trainerConfigs } from "#trainers/trainer-config";
|
||||||
import type { DexData, DexEntry } from "#types/dex-data";
|
import type { DexData, DexEntry } from "#types/dex-data";
|
||||||
import type { TrainerItemConfiguration, TrainerItemSaveData } from "#types/trainer-item-data-types";
|
|
||||||
import type {
|
import type {
|
||||||
AchvUnlocks,
|
AchvUnlocks,
|
||||||
DexAttrProps,
|
DexAttrProps,
|
||||||
@ -69,6 +68,7 @@ import type {
|
|||||||
VoucherCounts,
|
VoucherCounts,
|
||||||
VoucherUnlocks,
|
VoucherUnlocks,
|
||||||
} from "#types/save-data";
|
} from "#types/save-data";
|
||||||
|
import type { TrainerItemConfiguration } from "#types/trainer-item-data-types";
|
||||||
import { RUN_HISTORY_LIMIT } from "#ui/handlers/run-history-ui-handler";
|
import { RUN_HISTORY_LIMIT } from "#ui/handlers/run-history-ui-handler";
|
||||||
import { applyChallenges } from "#utils/challenge-utils";
|
import { applyChallenges } from "#utils/challenge-utils";
|
||||||
import { executeIf, fixedInt, isLocal, NumberHolder, randInt, randSeedItem } from "#utils/common";
|
import { executeIf, fixedInt, isLocal, NumberHolder, randInt, randSeedItem } from "#utils/common";
|
||||||
@ -1047,14 +1047,14 @@ export class GameData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
globalScene.trainerItems.clearItems();
|
globalScene.trainerItems.clearItems();
|
||||||
globalScene.assignTrainerItemsFromSaveData(sessionData.trainerItems, true);
|
globalScene.assignTrainerItemsFromSaveData(fromSession.trainerItems, true);
|
||||||
|
|
||||||
globalScene.arena.positionalTagManager.tags = fromSession.arena.positionalTags.map(tag =>
|
globalScene.arena.positionalTagManager.tags = fromSession.arena.positionalTags.map(tag =>
|
||||||
loadPositionalTag(tag),
|
loadPositionalTag(tag),
|
||||||
);
|
);
|
||||||
|
|
||||||
globalScene.enemyTrainerItems.clearItems();
|
globalScene.enemyTrainerItems.clearItems();
|
||||||
globalScene.assignTrainerItemsFromSaveData(sessionData.enemyTrainerItems, false);
|
globalScene.assignTrainerItemsFromSaveData(fromSession.enemyTrainerItems, false);
|
||||||
|
|
||||||
Promise.all(loadPokemonAssets).then(() => resolve(true));
|
Promise.all(loadPokemonAssets).then(() => resolve(true));
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ import { UiMode } from "#enums/ui-mode";
|
|||||||
import type { Pokemon } from "#field/pokemon";
|
import type { Pokemon } from "#field/pokemon";
|
||||||
import { getMoveTargets } from "#moves/move-utils";
|
import { getMoveTargets } from "#moves/move-utils";
|
||||||
import { UiHandler } from "#ui/handlers/ui-handler";
|
import { UiHandler } from "#ui/handlers/ui-handler";
|
||||||
|
import type { ItemBar } from "#ui/item-bar-ui";
|
||||||
import { fixedInt, isNullOrUndefined } from "#utils/common";
|
import { fixedInt, isNullOrUndefined } from "#utils/common";
|
||||||
import type { ItemBar } from "./item-bar-ui";
|
|
||||||
|
|
||||||
export type TargetSelectCallback = (targets: BattlerIndex[]) => void;
|
export type TargetSelectCallback = (targets: BattlerIndex[]) => void;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
"#events/*": ["./src/events/*.ts"],
|
"#events/*": ["./src/events/*.ts"],
|
||||||
"#field/*": ["./src/field/*.ts"],
|
"#field/*": ["./src/field/*.ts"],
|
||||||
"#inputs/*": ["./src/configs/inputs/*.ts"],
|
"#inputs/*": ["./src/configs/inputs/*.ts"],
|
||||||
"#items/*": ["./src/items/held-items/*.ts", "./items/*.ts"],
|
"#items/*": ["./src/items/held-items/*.ts", "./src/items/*.ts"],
|
||||||
"#moves/*": ["./src/data/moves/*.ts"],
|
"#moves/*": ["./src/data/moves/*.ts"],
|
||||||
"#mystery-encounters/*": [
|
"#mystery-encounters/*": [
|
||||||
"./src/data/mystery-encounters/utils/*.ts",
|
"./src/data/mystery-encounters/utils/*.ts",
|
||||||
@ -54,7 +54,7 @@
|
|||||||
"#utils/*": ["./src/utils/*.ts"],
|
"#utils/*": ["./src/utils/*.ts"],
|
||||||
"#data/*": ["./src/data/pokemon-forms/*.ts", "./src/data/pokemon/*.ts", "./src/data/*.ts"],
|
"#data/*": ["./src/data/pokemon-forms/*.ts", "./src/data/pokemon/*.ts", "./src/data/*.ts"],
|
||||||
"#test/*": ["./test/*.ts"],
|
"#test/*": ["./test/*.ts"],
|
||||||
"#test/test-utils/*": ["../test/test-utils/utils/*.ts", "../test/test-utils/*.ts"],
|
"#test/test-utils/*": ["./test/test-utils/utils/*.ts", "./test/test-utils/*.ts"],
|
||||||
"#app/*": ["./src/*.ts"]
|
"#app/*": ["./src/*.ts"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user