Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Script creado por FiaPlay para Pokémon Essentials 16.3. Créditos si se usa.
- #Para usar, simplemente pega todo esto en un nuevo script encima de Main y activa el interruptor SWITCH_PINCH.
- #Añade las claves Pinch(Start) y Pinch(End) para mi sistema MBD.
- PINCH_MUSIC="Boss Battle 2" #BGM de bajos PS
- SWITCH_PINCH=30 #Interruptor que activa el sistema
- PINCH_TRAINERS={PBTrainers::LEADER_Brock=>"Boss04",
- PBTrainers::LEADER_Misty=>"Boss02"}
- class PokeBattle_Battler
- alias pbInitPokemon_fp pbInitPokemon
- def pbInitPokemon(*args)
- pbInitPokemon_fp(*args)
- play_Pinch_BGM()
- end
- alias pbReduceHP_fp pbReduceHP
- def pbReduceHP(*args)
- pbReduceHP_fp(*args)
- play_Pinch_BGM()
- end
- alias pbRecoverHP_fp pbRecoverHP
- def pbRecoverHP(*args)
- pbRecoverHP_fp(*args)
- play_Pinch_BGM()
- end
- def get_Pinch_BGM(trainer)
- if trainer && PINCH_TRAINERS.include?(trainer.trainertype)
- return PINCH_TRAINERS[trainer.trainertype]
- else
- return PINCH_MUSIC
- end
- end
- def play_Pinch_BGM()
- return unless $game_switches[SWITCH_PINCH]
- if 25>(100*@hp/@totalhp)&& (100*@hp/@totalhp)!=0 &&@battle.pbBelongsToPlayer?(@index)
- pbBGMPlay(get_Pinch_BGM(@battle.opponent),80,100)
- @battle.fpShowText("Pinch(Start)") if PokeBattle_Battle.method_defined?(:fpShowText)
- elsif (100*@hp/@totalhp)>25 && @battle.pbBelongsToPlayer?(@index)
- if @battle.opponent
- pbBGMPlay(pbGetTrainerBattleBGM(@battle.opponent),80,100)
- else
- pbBGMPlay(pbGetWildBattleBGM(pbOpposing1),80,100)
- end
- @battle.fpShowText("Pinch(End)") if PokeBattle_Battle.method_defined?(:fpShowText)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement