Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- #
- # YEA Victory Aftermath + Vlue's W/A Randomizer Compatibility Patch
- #
- #===============================================================================
- #
- # This compatibility patch will let you drop and display random items on/with
- # Yanfly's aftermath scene.
- #
- # ------------------------------------------------------------------------------
- #
- # Put it below YEA Victory Aftermath and Vlue's W/A Randomizer scripts
- # but above Main!
- #
- #===============================================================================
- module AM_Random
- # You can enable/disable the random drops for each item types here.
- Random_Items = false # Enable/disable random item drops.
- Random_Weapons = true # Enable/disable random weapon drops.
- Random_Armors = true # Enable/disable random armor drops.
- end
- #==============================================================================
- # ¡ BattleManager
- #==============================================================================
- module BattleManager
- #--------------------------------------------------------------------------
- # overwrite method: self.skip_aftermath - !!UPDATED!!
- #--------------------------------------------------------------------------
- def self.skip_aftermath
- $game_party.all_members.each do |actor|
- actor.gain_exp($game_troop.exp_total)
- end
- $game_party.gain_gold($game_troop.gold_total)
- $game_troop.make_drop_items.each do |item|
- if $imported[:Vlue_WARandom] && RANDOM_ENEMY_DROPS
- if item.is_a?(RPG::Weapon) && AM_Random::Random_Weapons == true
- item = $game_party.add_weapon(item.id, 1)
- elsif item.is_a?(RPG::Armor) && AM_Random::Random_Armors == true
- item = $game_party.add_armor(item.id, 1)
- elsif item.is_a?(RPG::Item) && AM_Random::Random_Items == true
- item = $game_party.add_item(item.id, 1)
- else
- $game_party.gain_item(item, 1)
- end
- else
- $game_party.gain_item(item, 1)
- end
- end
- close_windows
- SceneManager.return
- replay_bgm_and_bgs
- battle_end(0)
- end
- #--------------------------------------------------------------------------
- # overwrite method: self.gain_drop_items - !!UPDATED!!
- #--------------------------------------------------------------------------
- def self.gain_drop_items
- drops = []
- $game_troop.make_drop_items.each do |item|
- if $imported[:Vlue_WARandom] && RANDOM_ENEMY_DROPS
- if item.is_a?(RPG::Weapon) && AM_Random::Random_Weapons == true
- item = $game_party.add_weapon(item.id, 1)
- elsif item.is_a?(RPG::Armor) && AM_Random::Random_Armors == true
- item = $game_party.add_armor(item.id, 1)
- elsif item.is_a?(RPG::Item) && AM_Random::Random_Items == true
- item = $game_party.add_item(item.id, 1)
- else
- $game_party.gain_item(item, 1)
- end
- else
- $game_party.gain_item(item, 1)
- end
- drops.push(item)
- end
- SceneManager.scene.show_victory_spoils($game_troop.gold_total, drops)
- set_victory_text(@victory_actor, :drops)
- wait_for_message
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement