class RPG::State def no_encounter @no_encounter ||= self.note =~ /<(?:no_encounter|禁止遇敌)>/ end end class Game_Party def no_encounter? members.any? {|a| a.states.any? {|s| s.no_encounter } } end end class Game_Player alias encounter_for_no_encounter_item encounter def encounter return false if $game_party.no_encounter? encounter_for_no_encounter_item end end
class RPG::State
def no_encounter
@no_encounter ||= self.note =~ /<(?:no_encounter|禁止遇敌)>/
end
end
class Game_Party
def no_encounter?
members.any? {|a| a.states.any? {|s| s.no_encounter } }
end
end
class Game_Player
alias encounter_for_no_encounter_item encounter
def encounter
return false if $game_party.no_encounter?
encounter_for_no_encounter_item
end
end
在状态备注栏写<禁止遇敌>,解除条件为100步
然后用物品添加状态就行了。 |