Advertisement
DrDhoom

[RGSS3] Replace Actor Victory

Oct 9th, 2014
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.02 KB | None | 0 0
  1. #==============================================================================
  2. #
  3. # • Replace Actor Victory v1.0
  4. # -- Author: DrDhoom
  5. # -- Last Updated: 2014.10.09
  6. # -- Level: Easy
  7. # -- Requires: None
  8. #
  9. #==============================================================================
  10.  
  11. module Dhoom
  12.   module ReplaceActorVictory
  13.     Replace_Actor = []
  14.     #Replace this actor id with => this actor id
  15.     Replace_Actor[1] = 4
  16.     Replace_Actor[3] = 6
  17.   end
  18. end
  19.  
  20. module BattleManager
  21.   class <<self; alias dhoom_rplcactor_btlman_process_victory process_victory; end
  22.   def self.process_victory
  23.     $game_party.replace_actors_victory
  24.     dhoom_rplcactor_btlman_process_victory
  25.   end  
  26. end
  27.  
  28. class Game_Party < Game_Unit
  29.   def replace_actors_victory
  30.     @actors.each_with_index do |actor,index|
  31.       if Dhoom::ReplaceActorVictory::Replace_Actor[actor]
  32.         @actors[index] = Dhoom::ReplaceActorVictory::Replace_Actor[actor]
  33.       end
  34.     end
  35.     $game_player.refresh
  36.     $game_map.need_refresh = true
  37.   end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement