Make transfer option free

This commit is contained in:
Flashfyre 2024-03-04 23:59:15 -05:00
parent 6886108ee8
commit 5efec5906a
3 changed files with 4 additions and 11 deletions

View File

@ -3684,18 +3684,11 @@ export class SelectModifierPhase extends BattlePhase {
} else {
this.scene.ui.setModeWithoutClear(Mode.PARTY, PartyUiMode.MODIFIER_TRANSFER, -1, (fromSlotIndex: integer, itemIndex: integer, toSlotIndex: integer) => {
if (toSlotIndex !== undefined && fromSlotIndex < 6 && toSlotIndex < 6 && fromSlotIndex !== toSlotIndex && itemIndex > -1) {
this.scene.ui.setMode(Mode.MODIFIER_SELECT, this.isPlayer()).then(() => {
this.scene.ui.setMode(Mode.MODIFIER_SELECT, this.isPlayer(), typeOptions, modifierSelectCallback, this.getRerollCost()).then(() => {
const itemModifiers = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier
&& (m as PokemonHeldItemModifier).getTransferrable(true) && (m as PokemonHeldItemModifier).pokemonId === party[fromSlotIndex].id) as PokemonHeldItemModifier[];
const itemModifier = itemModifiers[itemIndex];
this.scene.tryTransferHeldItemModifier(itemModifier, party[toSlotIndex], true, true).then(success => {
if (success) {
this.scene.ui.clearText();
this.scene.ui.setMode(Mode.MESSAGE);
super.end();
} else
this.scene.ui.setMode(Mode.MODIFIER_SELECT, this.isPlayer(), typeOptions, modifierSelectCallback, this.getRerollCost());
});
this.scene.tryTransferHeldItemModifier(itemModifier, party[toSlotIndex], true, true);
});
} else
this.scene.ui.setMode(Mode.MODIFIER_SELECT, this.isPlayer(), typeOptions, modifierSelectCallback, this.getRerollCost());

View File

@ -119,7 +119,7 @@ export const achvs = {
_1000_HEAL: new HealAchv('Big Healer', 1000, 'super_potion', 25).setSecret(true),
_2500_HEAL: new HealAchv('Cleric', 2500, 'hyper_potion', 50).setSecret(true),
_10000_HEAL: new HealAchv('Recovery Master', 10000, 'max_potion', 100).setSecret(true),
LV_100: new LevelAchv('But Wait, There\'s More!', 50, 'rare_candy', 25).setSecret(),
LV_100: new LevelAchv('But Wait, There\'s More!', 100, 'rare_candy', 25).setSecret(),
LV_250: new LevelAchv('Elite', 250, 'rarer_candy', 50).setSecret(true),
LV_1000: new LevelAchv('To Go Even Further Beyond', 1000, 'candy_jar', 100).setSecret(true),
TRANSFER_MAX_BATTLE_STAT: new Achv('Teamwork', 'Baton pass to another party member with at least one stat maxed out', 'stick', 20),

View File

@ -49,7 +49,7 @@ const tutorialHandlers = {
$These range from consumables, to Pokémon held items, to passive permanent items.
$Most non-consumable item effects will stack in various ways.
$Some items will only show up if they can be used, such as evolution items.
$You may also choose to transfer a held item (and any duplicates) between Pokémon instead of choosing an item.
$You can also transfer held items between Pokémon using the transfer option.
$The transfer option will appear in the bottom right once you have obtained a held item.
$You may purchase consumable items with money, and a larger variety will be available the further you get.
$Be sure to buy these before you pick your random item, as it will progress to the next battle once you do.`, null, () => scene.ui.showText('', null, () => scene.ui.setModeWithoutClear(Mode.MODIFIER_SELECT).then(() => resolve())), null, true);