# €€€ XRXSv24. ƒAƒCƒeƒ€‘Ώې§Œΐ^ƒXƒLƒ‹Žg—pπŒ@€€€ # # publish 2010/ 3/18 # update@ - 5/ 4 # #============================================================================== # ƒJƒXƒ^ƒ}ƒCƒYƒ|ƒCƒ“ƒg #============================================================================== module XRXSV24 def skill_can_use?(skill) return false if skill and not note_check(skill.note) return super end def item_effective?(user, item) return false if not note_check(item.note) return super end def note_check(note) result = true note = note.dup note.gsub!(/\\needclass\[(.+?)\]/) do numbers = $1.split(/,/) if numbers.size >= 1 result = false for n in numbers result |= n.to_i == self.class_id end end end note.gsub!(/\\needskill\[([0-9]+?)\]/){ result &= self.skill_learn?($data_skills[$1.to_i]) } note.gsub!(/\\needlv\[([0-9]+?)\]/){ result &= $1.to_i <= self.level } note.gsub!(/\\needhp\[([0-9]+?)\]/){ result &= $1.to_i <= self.hp } note.gsub!(/\\needmp\[([0-9]+?)\]/){ result &= $1.to_i <= self.mp } note.gsub!(/\\needmhp\[([0-9]+?)\]/){ result &= $1.to_i <= self.maxhp } note.gsub!(/\\needmmp\[([0-9]+?)\]/){ result &= $1.to_i <= self.maxmp } note.gsub!(/\\needatk\[([0-9]+?)\]/){ result &= $1.to_i <= self.atk } note.gsub!(/\\needdef\[([0-9]+?)\]/){ result &= $1.to_i <= self.def } note.gsub!(/\\needspi\[([0-9]+?)\]/){ result &= $1.to_i <= self.spi } note.gsub!(/\\needagi\[([0-9]+?)\]/){ result &= $1.to_i <= self.agi } note.gsub!(/\\limitlv\[([0-9]+?)\]/){ result &= $1.to_i >= self.level } note.gsub!(/\\limithp\[([0-9]+?)\]/){ result &= $1.to_i >= self.hp } note.gsub!(/\\limitmp\[([0-9]+?)\]/){ result &= $1.to_i >= self.mp } note.gsub!(/\\limitmhp\[([0-9]+?)\]/){ result &= $1.to_i >= self.maxhp } note.gsub!(/\\limitmmp\[([0-9]+?)\]/){ result &= $1.to_i >= self.maxmp } note.gsub!(/\\limitatk\[([0-9]+?)\]/){ result &= $1.to_i >= self.atk } note.gsub!(/\\limitdef\[([0-9]+?)\]/){ result &= $1.to_i >= self.def } note.gsub!(/\\limitspi\[([0-9]+?)\]/){ result &= $1.to_i >= self.spi } note.gsub!(/\\limitagi\[([0-9]+?)\]/){ result &= $1.to_i >= self.agi } return result end end class Game_Actor < Game_Battler include XRXSV24 end