Unsplicing no longer requires an item
This commit is contained in:
parent
dba93a21f0
commit
e8b5d7aa3e
|
@ -551,17 +551,6 @@ export class FusePokemonModifierType extends PokemonModifierType {
|
|||
}
|
||||
}
|
||||
|
||||
export class UnfusePokemonModifierType extends PokemonModifierType {
|
||||
constructor(name: string, iconImage?: string) {
|
||||
super(name, 'Removes the fusion aspects of a spliced Pokémon, but the second Pokémon is lost', (_type, args) => new Modifiers.UnfusePokemonModifier(this, (args[0] as PlayerPokemon).id),
|
||||
(pokemon: PlayerPokemon) => {
|
||||
if (!pokemon.isFusion())
|
||||
return PartyUiHandler.NoEffectMessage;
|
||||
return null;
|
||||
}, iconImage);
|
||||
}
|
||||
}
|
||||
|
||||
class AttackTypeBoosterModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
constructor() {
|
||||
super((party: Pokemon[], pregenArgs?: any[]) => {
|
||||
|
@ -886,7 +875,6 @@ export const modifierTypes = {
|
|||
IV_SCANNER: () => new ModifierType('IV Scanner', 'Allows scanning the IVs of wild Pokémon', (type, _args) => new Modifiers.IvScannerModifier(type), 'scanner'),
|
||||
|
||||
DNA_SPLICERS: () => new FusePokemonModifierType('DNA Splicers'),
|
||||
REVERSE_DNA_SPLICERS: () => new UnfusePokemonModifierType('Reverse DNA Splicers', 'dna_splicers'),
|
||||
|
||||
MINI_BLACK_HOLE: () => new TurnHeldItemTransferModifierType('Mini Black Hole'),
|
||||
|
||||
|
@ -995,7 +983,6 @@ const modifierPool: ModifierPool = {
|
|||
new WeightedModifierType(modifierTypes.BASE_STAT_BOOSTER, 3),
|
||||
new WeightedModifierType(modifierTypes.TERA_SHARD, 1),
|
||||
new WeightedModifierType(modifierTypes.DNA_SPLICERS, (party: Pokemon[]) => party[0].scene.gameMode.isSplicedOnly && party.filter(p => !p.fusionSpecies).length > 1 ? 4 : 0),
|
||||
new WeightedModifierType(modifierTypes.REVERSE_DNA_SPLICERS, (party: Pokemon[]) => party[0].scene.gameMode.isSplicedOnly && party.filter(p => p.fusionSpecies).length ? 6 : 0),
|
||||
].map(m => { m.setTier(ModifierTier.GREAT); return m; }),
|
||||
[ModifierTier.ULTRA]: [
|
||||
new WeightedModifierType(modifierTypes.ULTRA_BALL, 24),
|
||||
|
@ -1021,7 +1008,6 @@ const modifierPool: ModifierPool = {
|
|||
new WeightedModifierType(modifierTypes.EXP_SHARE, 12),
|
||||
new WeightedModifierType(modifierTypes.EXP_BALANCE, 4),
|
||||
new WeightedModifierType(modifierTypes.TERA_ORB, (party: Pokemon[]) => Math.min(Math.max(Math.floor(party[0].scene.currentBattle.waveIndex / 50) * 2, 1), 4), 4),
|
||||
new WeightedModifierType(modifierTypes.REVERSE_DNA_SPLICERS, (party: Pokemon[]) => !party[0].scene.gameMode.isSplicedOnly && party.filter(p => p.fusionSpecies).length ? 3 : 0, 3),
|
||||
new WeightedModifierType(modifierTypes.VOUCHER, (party: Pokemon[]) => !party[0].scene.gameMode.isDaily ? 3 : 0, 3),
|
||||
].map(m => { m.setTier(ModifierTier.ULTRA); return m; }),
|
||||
[ModifierTier.ROGUE]: [
|
||||
|
|
|
@ -1210,18 +1210,6 @@ export class FusePokemonModifier extends ConsumablePokemonModifier {
|
|||
}
|
||||
}
|
||||
|
||||
export class UnfusePokemonModifier extends ConsumablePokemonModifier {
|
||||
constructor(type: ModifierType, pokemonId: integer) {
|
||||
super(type, pokemonId);
|
||||
}
|
||||
|
||||
apply(args: any[]): boolean {
|
||||
(args[0] as PlayerPokemon).unfuse();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class MultipleParticipantExpBonusModifier extends PersistentModifier {
|
||||
constructor(type: ModifierType, stackCount?: integer) {
|
||||
super(type, stackCount);
|
||||
|
|
|
@ -38,9 +38,10 @@ export enum PartyOption {
|
|||
APPLY,
|
||||
TEACH,
|
||||
TRANSFER,
|
||||
SPLICE,
|
||||
SUMMARY,
|
||||
UNPAUSE_EVOLUTION,
|
||||
SPLICE,
|
||||
UNSPLICE,
|
||||
RELEASE,
|
||||
SCROLL_UP = 1000,
|
||||
SCROLL_DOWN = 1001,
|
||||
|
@ -232,7 +233,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||
}
|
||||
ui.playSelect();
|
||||
return true;
|
||||
} else if ((option !== PartyOption.SUMMARY && option !== PartyOption.UNPAUSE_EVOLUTION && option !== PartyOption.RELEASE && option !== PartyOption.CANCEL)
|
||||
} else if ((option !== PartyOption.SUMMARY && option !== PartyOption.UNPAUSE_EVOLUTION && option !== PartyOption.UNSPLICE && option !== PartyOption.RELEASE && option !== PartyOption.CANCEL)
|
||||
|| (option === PartyOption.RELEASE && this.partyUiMode === PartyUiMode.RELEASE)) {
|
||||
let filterResult: string;
|
||||
if (option !== PartyOption.TRANSFER && option !== PartyOption.SPLICE) {
|
||||
|
@ -299,6 +300,26 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||
ui.playSelect();
|
||||
pokemon.pauseEvolutions = false;
|
||||
this.showText(`Evolutions have been unpaused for ${pokemon.name}.`, null, () => this.showText(null, 0), null, true);
|
||||
} else if (option === PartyOption.UNSPLICE) {
|
||||
this.clearOptions();
|
||||
ui.playSelect();
|
||||
this.showText(`Do you really want to unsplice ${pokemon.fusionSpecies.name}\nfrom ${pokemon.name}? ${pokemon.fusionSpecies.name} will be lost.`, null, () => {
|
||||
ui.setModeWithoutClear(Mode.CONFIRM, () => {
|
||||
const fusionName = pokemon.name;
|
||||
pokemon.unfuse().then(() => {
|
||||
this.clearPartySlots();
|
||||
this.populatePartySlots();
|
||||
ui.setMode(Mode.PARTY);
|
||||
this.showText(`${fusionName} was reverted to ${pokemon.name}.`, null, () => {
|
||||
ui.setMode(Mode.PARTY);
|
||||
this.showText(null, 0);
|
||||
}, null, true);
|
||||
});
|
||||
}, () => {
|
||||
ui.setMode(Mode.PARTY);
|
||||
this.showText(null, 0);
|
||||
});
|
||||
});
|
||||
} else if (option === PartyOption.RELEASE) {
|
||||
this.clearOptions();
|
||||
ui.playSelect();
|
||||
|
@ -574,8 +595,12 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||
if (pokemon.pauseEvolutions && pokemonEvolutions.hasOwnProperty(pokemon.species.speciesId))
|
||||
this.options.push(PartyOption.UNPAUSE_EVOLUTION);
|
||||
|
||||
if (this.partyUiMode === PartyUiMode.SWITCH)
|
||||
if (this.partyUiMode === PartyUiMode.SWITCH) {
|
||||
if (pokemon.isFusion())
|
||||
this.options.push(PartyOption.UNSPLICE);
|
||||
this.options.push(PartyOption.RELEASE);
|
||||
} else if (this.partyUiMode === PartyUiMode.SPLICE && pokemon.isFusion())
|
||||
this.options.push(PartyOption.UNSPLICE);
|
||||
} else if (this.partyUiMode === PartyUiMode.MOVE_MODIFIER) {
|
||||
for (let m = 0; m < pokemon.moveset.length; m++)
|
||||
this.options.push(PartyOption.MOVE_1 + m);
|
||||
|
|
Loading…
Reference in New Issue