- 8
- Posts
- 5
- Years
- Seen Apr 2, 2020
Hey,
i've always been annoyed by the micro management that comes with berries, balloons etc. Never used them actually, although it would be cool to have a excadrill that carries his balloon to every fight.
Thus this script checks the items of all party pokemon at the start of each fight and restores them at the end:
simply add above main
known bugs:
- rotation battle does not seem to work
- if for some reason your pokemon change during trainer battle (e.g. by catching AND keeping it) your item maybe lost or duplicated
i've always been annoyed by the micro management that comes with berries, balloons etc. Never used them actually, although it would be cool to have a excadrill that carries his balloon to every fight.
Thus this script checks the items of all party pokemon at the start of each fight and restores them at the end:
Spoiler:
Code:
#adds "consumableitem" as a pokemon property
class PokeBattle_Pokemon
attr_accessor :consumableitem
alias initialize_Restore_items initialize
def initialize(species,level,player=nil,withMoves=true)
@consumableitem = 0
initialize_Restore_items(species,level,player,withMoves)
end
end
################################################################################
# Changes in Main battle class.
################################################################################
class PokeBattle_Battle
alias Remember_items pbStartBattleCore
def pbStartBattleCore(canlose)
for i in $Trainer.party
i.consumableitem = i.item
#pbDisplay(_INTL("{1}",i.consumableitem))
end
Remember_items(canlose)
end
alias Restore_items pbEndOfBattle
def pbEndOfBattle(canlose=false)
Restore_items(canlose)
for i in $Trainer.party
i.item = i.consumableitem
end
end
end
simply add above main
known bugs:
- rotation battle does not seem to work
- if for some reason your pokemon change during trainer battle (e.g. by catching AND keeping it) your item maybe lost or duplicated