module Disable_Encounters
# switch_id => true or false, ...
Switches_That_Disable = {}
# variable_id => value, ...
Variables_That_Disable = {}
# weapon_id, ...
Weapons_That_Disable = []
# armor_id, ..
Armors_That_Disable = []
def self.encounters_disabled?
Switches_That_Disable.each do |s_id, boolean|
if $game_switches[s_id] == boolean
return true
end
end
Variables_That_Disable.each do |v_id, n|
if $game_variables[v_id] == n
return true
end
end
$game_party.actors.each do |actor|
if Weapons_That_Disable.include?(actor.weapon_id) ||
Armors_That_Disable.include?(actor.armor1_id) ||
Armors_That_Disable.include?(actor.armor2_id) ||
Armors_That_Disable.include?(actor.armor3_id) ||
Armors_That_Disable.include?(actor.armor4_id)
return true
end
end
end
end
class Game_System
alias seph_noenc_gmsys_ecndis encounter_disabled
def encounter_disabled
if Disable_Encounters.encounters_disabled?
return true
end
return self.seph_noenc_gmsys_ecndis
end
end