pokerogue
pokerogue copied to clipboard
Transfer items from released Pokémon to the one that replaces it
First pass at transferring items from a forcibly released Pokémon to the one that replaces it, as described on the feature board. A message indicating the items were transferred would probably improve the experience, but I wasn't that familiar with the UI code.
Before: https://github.com/pagefaultgames/pokerogue/assets/9343160/edf77a71-e140-45af-aeb5-40601e3a6c81
After: https://github.com/pagefaultgames/pokerogue/assets/9343160/8e6560a5-e5e6-4ee0-8b68-8c9030aeea51
How does this interact with stack limits? I understand you're using the try transfer items function but have you checked if that gets interrupted e.g. there is an item already at stack limit on one or both pokemon.
How does this interact with stack limits? I understand you're using the try transfer items function but have you checked if that gets interrupted e.g. there is an item already at stack limit on one or both pokemon.
Ah that's a good point. The tryTransferHeldItemModifier()
function does appear to handle that at a glance but I didn't think to test it, I can try it out tomorrow
How does this interact with stack limits? I understand you're using the try transfer items function but have you checked if that gets interrupted e.g. there is an item already at stack limit on one or both pokemon.
Ah that's a good point. The
tryTransferHeldItemModifier()
function does appear to handle that at a glance but I didn't think to test it, I can try it out tomorrow
This appears to work as expected, tried catching a Pokemon with a few different values of Sitrus Berries and replacing a Pokemon with max stacks and the new Pokemon always had max stacks afterwards. Example below (you can see Bulbasaur has 10 Sitrus, incoming Mankey has just 1, ends up with 10)
https://github.com/pagefaultgames/pokerogue/assets/9343160/62fbfb36-4014-4b3d-9119-fe99e4da407e
I added a new message to indicate the items were transferred after all: https://github.com/pagefaultgames/pokerogue/assets/9343160/0aec63b9-c9e3-4ac0-8ab6-e69734813ce6
No action within more than a month. Considered stale.
Feel free to re-open it when you are still working on it/want to work on it again