mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 08:16:04 +00:00
[Enhancement/Item] Separate form change items into non-rare and rare (#3957)
* Separate form change items into non-rare and rare * Remove unnecessary !!
This commit is contained in:
parent
744c8f8845
commit
434b823112
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 405 B After Width: | Height: | Size: 405 B |
@ -66,34 +66,34 @@ export enum FormChangeItem {
|
||||
|
||||
BLUE_ORB = 50,
|
||||
RED_ORB,
|
||||
SHARP_METEORITE,
|
||||
HARD_METEORITE,
|
||||
SMOOTH_METEORITE,
|
||||
ADAMANT_CRYSTAL,
|
||||
LUSTROUS_GLOBE,
|
||||
GRISEOUS_CORE,
|
||||
REVEAL_GLASS,
|
||||
GRACIDEA,
|
||||
MAX_MUSHROOMS,
|
||||
DARK_STONE,
|
||||
LIGHT_STONE,
|
||||
PRISON_BOTTLE,
|
||||
N_LUNARIZER,
|
||||
N_SOLARIZER,
|
||||
RUSTED_SWORD,
|
||||
RUSTED_SHIELD,
|
||||
ICY_REINS_OF_UNITY,
|
||||
SHADOW_REINS_OF_UNITY,
|
||||
WELLSPRING_MASK,
|
||||
HEARTHFLAME_MASK,
|
||||
CORNERSTONE_MASK,
|
||||
ULTRANECROZIUM_Z,
|
||||
|
||||
SHARP_METEORITE = 100,
|
||||
HARD_METEORITE,
|
||||
SMOOTH_METEORITE,
|
||||
GRACIDEA,
|
||||
SHOCK_DRIVE,
|
||||
BURN_DRIVE,
|
||||
CHILL_DRIVE,
|
||||
DOUSE_DRIVE,
|
||||
ULTRANECROZIUM_Z,
|
||||
|
||||
FIST_PLATE = 100,
|
||||
N_SOLARIZER,
|
||||
N_LUNARIZER,
|
||||
WELLSPRING_MASK,
|
||||
HEARTHFLAME_MASK,
|
||||
CORNERSTONE_MASK,
|
||||
FIST_PLATE,
|
||||
SKY_PLATE,
|
||||
TOXIC_PLATE,
|
||||
EARTH_PLATE,
|
||||
@ -129,7 +129,7 @@ export enum FormChangeItem {
|
||||
DRAGON_MEMORY,
|
||||
DARK_MEMORY,
|
||||
FAIRY_MEMORY,
|
||||
BLANK_MEMORY // TODO: Find a potential use for this
|
||||
NORMAL_MEMORY // TODO: Find a potential use for this
|
||||
}
|
||||
|
||||
export type SpeciesFormChangeConditionPredicate = (p: Pokemon) => boolean;
|
||||
|
@ -604,6 +604,6 @@
|
||||
"DRAGON_MEMORY": "Drachen-Disc",
|
||||
"DARK_MEMORY": "Unlicht-Disc",
|
||||
"FAIRY_MEMORY": "Feen-Disc",
|
||||
"BLANK_MEMORY": "Leere-Disc"
|
||||
"NORMAL_MEMORY": "Normal-Disc"
|
||||
}
|
||||
}
|
@ -450,6 +450,6 @@
|
||||
"DRAGON_MEMORY": "Dragon Memory",
|
||||
"DARK_MEMORY": "Dark Memory",
|
||||
"FAIRY_MEMORY": "Fairy Memory",
|
||||
"BLANK_MEMORY": "Blank Memory"
|
||||
"NORMAL_MEMORY": "Normal Memory"
|
||||
}
|
||||
}
|
||||
|
@ -604,6 +604,6 @@
|
||||
"DRAGON_MEMORY": "Disco dragón",
|
||||
"DARK_MEMORY": "Disco siniestro",
|
||||
"FAIRY_MEMORY": "Disco hada",
|
||||
"BLANK_MEMORY": "Disco en blanco"
|
||||
"NORMAL_MEMORY": "Disco normal"
|
||||
}
|
||||
}
|
||||
|
@ -450,6 +450,6 @@
|
||||
"DRAGON_MEMORY": "ROM Dragon",
|
||||
"DARK_MEMORY": "ROM Ténèbres",
|
||||
"FAIRY_MEMORY": "ROM Fée",
|
||||
"BLANK_MEMORY": "ROM Vierge"
|
||||
"NORMAL_MEMORY": "ROM Normal"
|
||||
}
|
||||
}
|
||||
|
@ -604,6 +604,6 @@
|
||||
"DRAGON_MEMORY": "ROM Drago",
|
||||
"DARK_MEMORY": "ROM Buio",
|
||||
"FAIRY_MEMORY": "ROM Folletto",
|
||||
"BLANK_MEMORY": "ROM Vuota"
|
||||
"NORMAL_MEMORY": "ROM Normale"
|
||||
}
|
||||
}
|
@ -604,6 +604,6 @@
|
||||
"DRAGON_MEMORY": "드래곤메모리",
|
||||
"DARK_MEMORY": "다크메모리",
|
||||
"FAIRY_MEMORY": "페어리메모리",
|
||||
"BLANK_MEMORY": "빈메모리"
|
||||
"NORMAL_MEMORY": "일반메모리"
|
||||
}
|
||||
}
|
@ -604,6 +604,6 @@
|
||||
"DRAGON_MEMORY": "Memória do Dragão",
|
||||
"DARK_MEMORY": "Memória Sombria",
|
||||
"FAIRY_MEMORY": "Memória de Fada",
|
||||
"BLANK_MEMORY": "Memória Vazia"
|
||||
"NORMAL_MEMORY": "Memória Normal"
|
||||
}
|
||||
}
|
||||
|
@ -604,6 +604,6 @@
|
||||
"DRAGON_MEMORY": "龙存储碟",
|
||||
"DARK_MEMORY": "黑暗存储碟",
|
||||
"FAIRY_MEMORY": "妖精存储碟",
|
||||
"BLANK_MEMORY": "空白存储碟"
|
||||
"NORMAL_MEMORY": "一般存储碟"
|
||||
}
|
||||
}
|
@ -600,6 +600,6 @@
|
||||
"DRAGON_MEMORY": "龍記憶碟",
|
||||
"DARK_MEMORY": "黑暗記憶碟",
|
||||
"FAIRY_MEMORY": "妖精記憶碟",
|
||||
"BLANK_MEMORY": "空白記憶碟"
|
||||
"NORMAL_MEMORY": "一般記憶碟"
|
||||
}
|
||||
}
|
@ -1043,7 +1043,7 @@ class EvolutionItemModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
}
|
||||
|
||||
class FormChangeItemModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
constructor() {
|
||||
constructor(rare: boolean) {
|
||||
super((party: Pokemon[], pregenArgs?: any[]) => {
|
||||
if (pregenArgs && (pregenArgs.length === 1) && (pregenArgs[0] in FormChangeItem)) {
|
||||
return new FormChangeItemModifierType(pregenArgs[0] as FormChangeItem);
|
||||
@ -1083,7 +1083,8 @@ class FormChangeItemModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
}
|
||||
}
|
||||
return formChangeItemTriggers;
|
||||
}).flat().flatMap(fc => fc.item))];
|
||||
}).flat())
|
||||
].flat().flatMap(fc => fc.item).filter(i => (i && i < 100) === rare);
|
||||
// convert it into a set to remove duplicate values, which can appear when the same species with a potential form change is in the party.
|
||||
|
||||
if (!formChangeItemPool.length) {
|
||||
@ -1282,7 +1283,8 @@ export const modifierTypes = {
|
||||
|
||||
EVOLUTION_ITEM: () => new EvolutionItemModifierTypeGenerator(false),
|
||||
RARE_EVOLUTION_ITEM: () => new EvolutionItemModifierTypeGenerator(true),
|
||||
FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(),
|
||||
FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(false),
|
||||
RARE_FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(true),
|
||||
|
||||
MEGA_BRACELET: () => new ModifierType("modifierType:ModifierType.MEGA_BRACELET", "mega_bracelet", (type, _args) => new Modifiers.MegaEvolutionAccessModifier(type)),
|
||||
DYNAMAX_BAND: () => new ModifierType("modifierType:ModifierType.DYNAMAX_BAND", "dynamax_band", (type, _args) => new Modifiers.GigantamaxAccessModifier(type)),
|
||||
@ -1595,6 +1597,7 @@ const modifierPool: ModifierPool = {
|
||||
new WeightedModifierType(modifierTypes.PP_MAX, 3),
|
||||
new WeightedModifierType(modifierTypes.MINT, 4),
|
||||
new WeightedModifierType(modifierTypes.RARE_EVOLUTION_ITEM, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15) * 4, 32), 32),
|
||||
new WeightedModifierType(modifierTypes.FORM_CHANGE_ITEM, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 6, 24),
|
||||
new WeightedModifierType(modifierTypes.AMULET_COIN, skipInLastClassicWaveOrDefault(3)),
|
||||
new WeightedModifierType(modifierTypes.EVIOLITE, (party: Pokemon[]) => {
|
||||
if (!party[0].scene.gameMode.isFreshStartChallenge() && party[0].scene.gameData.unlocks[Unlockables.EVIOLITE]) {
|
||||
@ -1661,7 +1664,7 @@ const modifierPool: ModifierPool = {
|
||||
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
|
||||
new WeightedModifierType(modifierTypes.LOCK_CAPSULE, skipInLastClassicWaveOrDefault(3)),
|
||||
new WeightedModifierType(modifierTypes.SUPER_EXP_CHARM, skipInLastClassicWaveOrDefault(8)),
|
||||
new WeightedModifierType(modifierTypes.FORM_CHANGE_ITEM, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 6, 24),
|
||||
new WeightedModifierType(modifierTypes.RARE_FORM_CHANGE_ITEM, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 6, 24),
|
||||
new WeightedModifierType(modifierTypes.MEGA_BRACELET, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 9, 36),
|
||||
new WeightedModifierType(modifierTypes.DYNAMAX_BAND, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 9, 36),
|
||||
new WeightedModifierType(modifierTypes.VOUCHER_PLUS, (party: Pokemon[], rerollCount: integer) => !party[0].scene.gameMode.isDaily ? Math.max(3 - rerollCount * 1, 0) : 0, 3),
|
||||
|
Loading…
Reference in New Issue
Block a user