Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===========================================================================
- # Non-Combatant Party Member/Guest Party Member
- #===========================================================================
- # Okay, so put a tag in the actor notebox like this: <in_battle_switch: x>
- # (x is the switch ID). If you do this, the member won't participate in fights
- # until the switch is turned on.
- #===========================================================================
- # ■ DataManager
- #===========================================================================
- module DataManager
- class << self; alias_method(:krx_ibp_dm_ld, :load_database);end
- def self.load_database
- krx_ibp_dm_ld
- load_ibp_notetags
- end
- #--------------------------------------------------------------------------
- def self.load_ibp_notetags
- groups = [$data_actors]
- for group in groups
- for obj in group
- next if obj.nil?
- obj.load_ibp_notetags
- end
- end
- end
- end
- #===========================================================================
- # ■ RPG::Actor
- #===========================================================================
- class RPG::Actor < RPG::BaseItem
- attr_reader :in_battle_switch
- #--------------------------------------------------------------------------
- def load_ibp_notetags
- @note.split(/[\r\n]+/).each do |line|
- case line
- when /<in_battle_switch:[ ]*(\d+)>/i
- @in_battle_switch = $1.to_i
- end
- end
- end
- end
- #==============================================================================
- # ■ Game_Actor
- #==============================================================================
- class Game_Actor < Game_Battler
- def battle_participant?
- if self.actor.in_battle_switch
- return $game_switches[self.actor.in_battle_switch]
- end
- true
- end
- end
- #==============================================================================
- # ■ Game_Party
- #==============================================================================
- class Game_Party < Game_Unit
- def battle_members
- all_members[0, max_battle_members].select {|actor|
- actor.exist? && actor.battle_participant?
- }
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement