#½ºÅ³ µµ°¨ # #±âº»ÀûÀ¸·Î ¼³Á¤ ¹æ¹ý¹ýÀº ¾ÆÀÌÅÛ µµ°¨°ú °°½À´Ï´Ù. #½ºÅ³ÀÇ Ä«Å×°í¸®¸íÀ» @skill_kind_name ·Î ¼³Á¤. #@kind_row ·Î ¼³Á¤ÇÑ Ä«Å×°í¸®¸íÀ» ´Ã¾î³õ°í ½ÍÀº Â÷·Ê·Î ¼³Á¤. #@skill_kind_element_name ¿¡´Â @skill_kind_name ¿¡ ´ëÀÀÇß´Ù #Ä«Å×°í¸® ÆÇÁ¤¿ëÀÇ ¼Ó¼º¸íÀ» ¼³Á¤ÇØ ÁÖ¼¼¿ä. # #À̺¥Æ® Ä¿¸àµå ¡¸½ºÅ©¸³Æ®¡¹·Î #skill_book_max ·Î ÃÖ´ë µî·Ï¼ö #skill_book_now ·Î ÇöÀç µî·Ï¼ö #skill_book_comp·Î ¿Ï¼ºÀ²(¼Ò¼öÁ¡ ÀÌÇÏ À߶ó¹ö¸²) #(À»)¸¦ ÃëµæÇÒ ¼ö ÀÖ½À´Ï´Ù. #¶Ç, skill_book_max("Ä«Å×°í¸®¸í")¿Í °°ÀÌ #Ä«Å×°í¸®¸íÀ» Àμö¿¡ °Ç³×ÁÖ¸é, ±× Ä«Å×°í¸®ÀÇ #ÃÖ´ë µî·Ï¼ö¸¦ ÃëµæÇÒ ¼ö ÀÖ½À´Ï´Ù. #ÇöÀç µî·Ï¼ö, ¿Ï¼ºÀ²µµ °°½À´Ï´Ù. # #2005.2.21 #¡¤¸ô·¡ ¹ö±× ¼öÁ¤ÀÔ´Ï´Ù. #º¯°æÁ¡ skill_book_category_now # #2005.3.9 #¡¤À§·Â 0¶§´Â ¡¸£­¡¹À̶ó°í Ç¥±âÇÒ±î ¼±ÅÃÇÒ ¼ö ÀÖµµ·Ï(µíÀÌ). # #2005.11.26 #¡¤·¹ÀÌÆà 0ÀÇ ½ºÅ×ÀÌÆ®¸¦ Ç¥½ÃÇÏÁö ¾Ê°Ô ¼±Åà °¡´ÉÇÏ°Ô. module Skill_Book_Config SHOW_COMPLETE_TYPE = 3 #µµ°¨ ¿Ï¼ºÀ²ÀÇ Ç¥½Ã ¹æ¹ý #0:Ç¥½Ã ¾øÀ½ 1:ÇöÀç¼ö/ÃÖ´ë¼ö 2:%Ç¥½Ã 3:¾çÂÊ ¸ðµÎ DRAW_POW_ZERO = false #À§·Â 0 ¶§ ±×´ë·Î Ç¥½ÃÇÒÁö #true:ÇÏ´Â false:ÇÏÁö ¾Ê´Â´Ù ZERO_POW_TEXT = "£­" #À§·Â 0¶§ Ç¥½ÃÇÏÁö ¾Ê´Â °æ¿ì ´ë½Å¿¡ Ç¥½ÃÇÏ´Â ¸» SHOW_ZERO_RATING_STATE = false #·¹ÀÌÆà 0ÀÇ ½ºÅ×ÀÌÆ®µµ Ç¥½ÃÇØ? #true:ÇÏ´Â false:ÇÏÁö ¾Ê´Â´Ù end class Window_SkillBook_Info < Window_Selectable include Skill_Book_Config end class Data_SkillBook attr_reader :skill_kind_name attr_reader :kind_row attr_reader :skill_id_data attr_reader :skill_kind_element_name #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize # ¡éÀÌÇÏ, ¼³Á¤¿ëÀÇ ¿©·¯ °¡Áö @skill_kind_name = ["±â¼ú", "¸¶¼ú", "±× ¿Ü"] @kind_row = ["±â¼ú", "¸¶¼ú", "±× ¿Ü"] @skill_kind_element_name = ["¹°¸® ½ºÅ³", "¸¶¼ú ½ºÅ³", "±× ¿Ü ½ºÅ³"] # ¡èÄÚÄÚ±îÁö @skill_id_data = skill_book_id_set end #-------------------------------------------------------------------------- # ¡Ü ÁöÁ¤µÈ Á¾·ù Ç¥½Ã¸íÀÇ Á¤º¸¸¦ µ¹·ÁÁØ´Ù #-------------------------------------------------------------------------- def kind_search(name) if @skill_kind_name.include?(name) return [0, @skill_kind_name.index(name)] end end #-------------------------------------------------------------------------- # ¡Ü µµ°¨¿ë µî·Ï ¹«½Ã ¼Ó¼º Ãëµæ #-------------------------------------------------------------------------- def no_add_element no_add = 0 # µî·Ï ¹«½ÃÀÇ ¼Ó¼º ID¸¦ Ãëµæ for i in 1...$data_system.elements.size if $data_system.elements[i] =~ /µµ°¨ µî·Ï ¹«È¿/ no_add = i break end end return no_add end #-------------------------------------------------------------------------- # ¡Ü ÁöÁ¤µÈ ¼Ó¼º¸íÀÇ ID¸¦ µ¹·ÁÁØ´Ù #-------------------------------------------------------------------------- def element_search(element_name) return nil if element_name == nil for i in 1...$data_system.elements.size if $data_system.elements[i] =~ /^#{element_name}/ return i end end end #-------------------------------------------------------------------------- # ¡Ü µµ°¨¿ë ½ºÅ³ ID¼³Á¤ #-------------------------------------------------------------------------- def skill_book_id_set data = [] no_add = no_add_element if @skill_kind_element_name.size == 0 data[0] = [0] for i in 1...$data_skills.size skill = $data_skills[i] next if skill.name == "" next if skill.element_set.include?(no_add) data[0].push(skill.id) end else for i in 0...@skill_kind_element_name.size data[i] = [0] element_id = element_search(@skill_kind_element_name[i]) for j in 1...$data_skills.size skill = $data_skills[j] next if skill.name == "" next if skill.element_set.include?(no_add) if skill.element_set.include?(element_id) data[i].push(skill.id) end end end end return data end end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ¡Ü ½ºÅ³À» ±â¾ïÇÑ´Ù # skill_id : ½ºÅ³ ID #-------------------------------------------------------------------------- alias game_actor_skill_book_learn_skill learn_skill def learn_skill(skill_id) game_actor_skill_book_learn_skill(skill_id) $game_system.add_skill_count(skill_id) end end class Window_Base < Window #-------------------------------------------------------------------------- # ¡Ü ±âº» ¼Ó¼º Ç¥½Ã #-------------------------------------------------------------------------- def draw_attack_element(x, y, element_set) elem_temp = [] for i in element_set elem = $data_system.elements[i] elem_temp.push("ºÒ±æ") if elem == "¿°" elem_temp.push("¾óÀ½") if elem == "¾óÀ½" elem_temp.push("¹ø°³") if elem == "¹ø°³" elem_temp.push("¹°") if elem == "¼ö" elem_temp.push("Èë") if elem == "Èë" elem_temp.push("¹Ù¶÷") if elem == "dz" elem_temp.push("±¤") if elem == "ºû" elem_temp.push("¾îµÒ") if elem == "¾îµÒ" end if elem_temp.size == 0 self.contents.draw_text(x, y, 64, 32, "¾øÀ½") return end ox = 0 for name in elem_temp cx = self.contents.text_size(name).width self.contents.draw_text(x+ox, y, cx, 32, name) ox += cx+8 end end #-------------------------------------------------------------------------- # ¡Ü ¹«±â ¼Ó¼º Ç¥½Ã #-------------------------------------------------------------------------- def draw_attack_wp_element(x, y, element_set) elem_temp = [] for i in element_set elem = $data_system.elements[i] elem_temp.push("Âü") if elem == "Âü" elem_temp.push("Ÿ") if elem == "Ÿ" elem_temp.push("µ¹") if elem == "µ¹" elem_temp.push("½î¾Æ ¸ÂÇô") if elem == "½î¾Æ ¸ÂÇô" elem_temp.push("¸¶") if elem == "¸¶" end if elem_temp.size == 0 self.contents.draw_text(x, y, 64, 32, "¾øÀ½") return end ox = 0 for name in elem_temp cx = self.contents.text_size(name).width self.contents.draw_text(x+ox, y, cx, 32, name) ox += cx+8 end end #-------------------------------------------------------------------------- # ¡Ü Ư°ø ¼Ó¼º Ç¥½Ã #-------------------------------------------------------------------------- def draw_attack_weak_element(x, y, element_set) elem_temp = [] for i in element_set elem = $data_system.elements[i] elem_temp.push("ºÒ»ç") if elem == "´ë ºÒ»ç" elem_temp.push("¹ì") if elem == "´ë ¹ì" elem_temp.push("¼ö¼­") if elem == "´ë ¼ö¼­" elem_temp.push("Áü½Â") if elem == "´ë Áü½Â" elem_temp.push("±Í½Å") if elem == "´ë ±Í½Å" elem_temp.push("»õ") if elem == "´ë »õ" elem_temp.push("¾Ç¸¶") if elem == "´ë ¾Ç¸¶" elem_temp.push("õ»ç") if elem == "´ë õ»ç" end if elem_temp.size == 0 self.contents.draw_text(x, y, 64, 32, "¾øÀ½") return end ox = 0 for name in elem_temp cx = self.contents.text_size(name).width self.contents.draw_text(x+ox, y, cx, 32, name) ox += cx+8 end end #-------------------------------------------------------------------------- # ¡Ü ½ºÅ×ÀÌÆ® ºÎ¿© Ç¥½Ã #-------------------------------------------------------------------------- def draw_attack_add_state(x, y, plus_state_set) state_temp = [] for i in plus_state_set state = $data_states[i] if state.name != "" and (Skill_Book_Config::SHOW_ZERO_RATING_STATE or state.rating >= 1) state_temp.push(state.name) end end if state_temp.size == 0 self.contents.draw_text(x, y, 64, 32, "¾øÀ½") return end ox = 0 oy = 0 for name in state_temp cx = self.contents.text_size(name).width if ox + cx + 4 >= self.contents.width - 128 ox = 0 oy += 1 end self.contents.draw_text(x+ox, y+oy*32, cx, 32, name) ox += cx+8 end end #-------------------------------------------------------------------------- # ¡Ü È¿°ú ¹üÀ§¸¦ µ¹·ÁÁØ´Ù #-------------------------------------------------------------------------- def draw_scope(scope) case scope when 0 return "¾øÀ½" when 1 return "Àû´Üü" when 2 return "ÀûÀüü" when 3 return "¾Æ±º ´Üü" when 4 return "¾Æ±º Àüü" when 5 return "¾Æ±º ´Üü" when 6 return "¾Æ±º Àüü" when 7 return "»ç¿ëÀÚ" end end end class Game_Temp attr_accessor :skill_book_data alias temp_skill_book_data_initialize initialize def initialize temp_skill_book_data_initialize @skill_book_data = Data_SkillBook.new end end class Game_System attr_accessor :skill_count # ÀÔ¼ö ½ºÅ³ Á¤º¸(µµ°¨¿ë) #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- alias game_system_skill_book_initialize initialize def initialize game_system_skill_book_initialize @skill_count = {} end #-------------------------------------------------------------------------- # ¡Ü ½ºÅ³ÀÇ È¹µæ Á¤º¸ÀÇ Ãß°¡(µµ°¨¿ë) # 0:¹«È¹µæ 1:ȹµæÁ¦ #-------------------------------------------------------------------------- def add_skill_count(skill_id, type=0) if type == -1 @skill_count[skill_id] = 0 else @skill_count[skill_id] = 1 end end #-------------------------------------------------------------------------- # ¡Ü ½ºÅ³ µµ°¨ÀÇ ÃÖ´ë µî·Ï¼ö¸¦ Ãëµæ #-------------------------------------------------------------------------- def skill_book_max kind_data = $game_temp.skill_book_data.skill_kind_name size = 0 for kind in kind_data size += skill_book_category_max(kind) end return size end #-------------------------------------------------------------------------- # ¡Ü ½ºÅ³ µµ°¨ÀÇ ÇöÀç µî·Ï¼ö¸¦ Ãëµæ #-------------------------------------------------------------------------- def skill_book_now kind_data = $game_temp.skill_book_data.skill_kind_name size = 0 for kind in kind_data size += skill_book_category_now(kind) end return size end #-------------------------------------------------------------------------- # ¡Ü ½ºÅ³ µµ°¨ÀÇ ¿Ï¼ºÀ²À» Ãëµæ #-------------------------------------------------------------------------- def skill_book_complete_percentage s_max = skill_book_max.to_f s_now = skill_book_now.to_f comp = s_now / s_max * 100 end #-------------------------------------------------------------------------- # ¡Ü ½ºÅ³ µµ°¨ÀÇ Ä«Å×°í¸®º° ÃÖ´ë µî·Ï¼ö¸¦ Ãëµæ # category:Ä«Å×°í¸®¸í #-------------------------------------------------------------------------- def skill_book_category_max(category) id_data = $game_temp.skill_book_data.skill_id_data.dup index = $game_temp.skill_book_data.kind_search(category)[1] size = id_data[index].size - 1 return size end #-------------------------------------------------------------------------- # ¡Ü ½ºÅ³ µµ°¨ÀÇ Ä«Å×°í¸®º° ÇöÀç µî·Ï¼ö¸¦ Ãëµæ # category:Ä«Å×°í¸®¸í #-------------------------------------------------------------------------- def skill_book_category_now(category) now_skill_info = @skill_count.keys index = $game_temp.skill_book_data.kind_search(category)[1] # µî·Ï ¹«½ÃÀÇ ¼Ó¼º ID¸¦ Ãëµæ no_add = $game_temp.skill_book_data.no_add_element elename = $game_temp.skill_book_data.skill_kind_element_name[index] element_id = $game_temp.skill_book_data.element_search(elename) new_skill_info = [] for i in now_skill_info skill = $data_skills[i] next if skill == nil next if skill.name == "" next if skill.element_set.include?(no_add) if element_id == nil or skill.element_set.include?(element_id) new_skill_info.push(skill.id) end end return new_skill_info.size end #-------------------------------------------------------------------------- # ¡Ü ½ºÅ³ µµ°¨ÀÇ Ä«Å×°í¸®º° ¿Ï¼ºÀ²À» Ãëµæ # category:Ä«Å×°í¸®¸í #-------------------------------------------------------------------------- def skill_book_category_complete_percentage(category) s_max = skill_book_category_max(category).to_f s_now = skill_book_category_now(category).to_f comp = s_now / s_max * 100 end end class Interpreter def skill_book_max(category=nil) if category == nil return $game_system.skill_book_max else return $game_system.skill_book_category_max(category) end end def skill_book_now(category=nil) if category == nil return $game_system.skill_book_now else return $game_system.skill_book_category_now(category) end end def skill_book_comp(category=nil) if category == nil return $game_system.skill_book_complete_percentage else return $game_system.skill_book_category_complete_percentage(category) end end end class Window_SkillBook < Window_Selectable attr_reader :data attr_reader :item_kind attr_reader :item_index #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize(index=0) super(0, 64, 640, 416) @column_max = 2 @book_data = $game_temp.skill_book_data @data = data_set(index) @data.shift #@data.sort! @item_max = @data.size @item_kind = index self.index = 0 #refresh end def new_data_set(index) @data = data_set(index) @data.shift #@data.sort! @item_max = @data.size end #-------------------------------------------------------------------------- # ¡Ü ÀÔ¼ö µ¥ÀÌÅ͸¦ Ãëµæ #-------------------------------------------------------------------------- def data_set(index) kind_row_data = @book_data.kind_search(@book_data.kind_row[index]) @item_kind = kind_row_data[0] @item_index = kind_row_data[1] data = [] case @item_kind when 0 data = @book_data.skill_id_data[@item_index].dup end return data end #-------------------------------------------------------------------------- # ¡Ü Ç¥½Ã Çã°¡ Ãëµæ #-------------------------------------------------------------------------- def show?(kind, id) case kind when 0 if $game_system.skill_count[id] == 0 or $game_system.skill_count[id] == nil return false else return true end end end #-------------------------------------------------------------------------- # ¡Ü ¾ÆÀÌÅÛ Ãëµæ #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # ¡Ü ¸®ÇÁ·¹½¬ #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end #Ç׸ñ¼ö°¡ 0 ÀÌ ¾Æ´Ï¸é ºñÆ® ¸ÊÀ» ÀÛ¼ºÇØ, ÀüÇ׸ñÀ» ¹¦È­ return if @item_max == 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # ¡Ü Ç׸ñÀÇ ¹¦È­ # index : Ç׸ñ ¹øÈ£ #-------------------------------------------------------------------------- def draw_item(index) case @item_kind when 0 item = $data_skills[@data[index]] id = @book_data.skill_id_data[@item_index].index(item.id) end return if item == nil x = 4 + index % 2 * (288 + 32) y = index / 2 * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.font.color = normal_color self.contents.draw_text(x, y, 32, 32, id.to_s) if show?(@item_kind, item.id) bitmap = RPG::Cache.icon(item.icon_name) opacity = 255 self.contents.blt(x+48, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x+48 + 28, y, 212, 32, item.name, 0) else self.contents.draw_text(x+48 + 28, y, 212, 32, "£­£­£­£­£­", 0) return end end end class Window_SkillBook_Info < Window_Selectable #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize super(0, 0+64+64, 640, 480-64-64) @book_data = $game_temp.skill_book_data self.contents = Bitmap.new(width - 32, height - 32) self.index = -1 end #-------------------------------------------------------------------------- # ¡Ü ¸®ÇÁ·¹½¬ #-------------------------------------------------------------------------- def refresh(item_id, item_kind, item_index) self.contents.clear self.contents.font.size = 22 case item_kind when 0 draw_skill_info(item_id, item_index) end end #-------------------------------------------------------------------------- # ¡Ü ½ºÅ³ ¹¦È­ #-------------------------------------------------------------------------- def draw_skill_info(item_id, item_index) item = $data_skills[item_id] rect = Rect.new(4, 0, 160, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = 255 self.contents.blt(4+48, 0 + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.font.color = normal_color id = @book_data.skill_id_data[item_index].index(item.id) self.contents.draw_text(4, 0, 32, 32, id.to_s) self.contents.draw_text(4+48 + 28, 0, 212, 32, item.name, 0) cost = item.sp_cost.to_s self.contents.draw_text(4+48 + 28 + 232, 0, 48, 32, cost.to_s, 2) #skill_kind = skill_kind_name(item.element_set) #self.contents.draw_text(320+96, 0, 160, 32, skill_kind, 0) self.contents.font.color = text_color(2) self.contents.draw_text(4, 32, 48, 32, "À§·Â", 0) self.contents.font.color = normal_color if item.power == 0 and DRAW_POW_ZERO == false pow = ZERO_POW_TEXT else pow = item.power.to_s end self.contents.draw_text(4+48, 32, 48, 32, pow, 2) self.contents.font.color = system_color self.contents.draw_text(4, 64, 48, 32, "¹üÀ§", 0) self.contents.font.color = normal_color self.contents.draw_text(4+96+16, 64, 128, 32, draw_scope(item.scope), 0) self.contents.font.color = system_color self.contents.draw_text(4, 96, 96, 32, "±âº» ¼Ó¼º") self.contents.draw_text(4, 128, 96, 32, "Ư°ø ¼Ó¼º") self.contents.draw_text(4, 160, 96, 32, "ºÎ¿© ½ºÅ×ÀÌÆ®") self.contents.font.color = normal_color draw_attack_element(4+96+16, 96, item.element_set) draw_attack_weak_element(4+96+16, 128, item.element_set) draw_attack_add_state(4+96+16, 160, item.plus_state_set) @help_window.set_text(item.description) end #-------------------------------------------------------------------------- # ¡Ü ÇïÇÁ ÅؽºÆ® °»½Å #-------------------------------------------------------------------------- def update_help #´õ¹Ì end end class Scene_SkillBook include Skill_Book_Config #-------------------------------------------------------------------------- # ¡Ü ¸ÞÀΠó¸® #-------------------------------------------------------------------------- def main # À©µµ¿ì¸¦ ÀÛ¼º @title_window = Window_Base.new(0, 0, 640, 64) @title_window.contents = Bitmap.new(640 - 32, 64 - 32) @title_window.contents.draw_text(4, 0, 320, 32, "½ºÅ³ µµ°¨", 0) draw_comp @main_window = Window_SkillBook.new @main_window.active = false @main_window.index = -1 @help_window = Window_Help.new @help_window.z = 110 @help_window.y = 64 @help_window.visible = false command = $game_temp.skill_book_data.kind_row @kind_window = Window_Command.new(160, command) @kind_window.z = 110 @kind_window.x = 320 - @kind_window.width / 2 @kind_window.y = 240 - @kind_window.height / 2 @kind_window.active = true # ÀÎÆ÷¸ÞÀÌ¼Ç À©µµ¿ì¸¦ ÀÛ¼º (ºÒ°¡½Ã¡¤ºñ¾×ƼºêÇÏ°Ô ¼³Á¤) @info_window = Window_SkillBook_Info.new @info_window.z = 110 @info_window.visible = false @info_window.active = false # ÇïÇÁ À©µµ¿ì¸¦ °ü·ÃÁö¾î @info_window.help_window = @help_window @visible_index = 0 @now_kind = nil # Æ®¶õÁö¼Ç ½ÇÇà Graphics.transition # ¸ÞÀÎ ·çÇÁ loop do # °ÔÀÓ È­¸éÀ» °»½Å Graphics.update # ÀÔ·Â Á¤º¸¸¦ °»½Å Input.update # ÇÁ·¹ÀÓ °»½Å update # È­¸éÀÌ ¹Ù²î¸é ·çÇÁ¸¦ Áß´Ü if $scene != self break end end # Æ®¶õÁö¼Ç Áغñ Graphics.freeze # À©µµ¿ì¸¦ Çعæ @title_window.dispose @help_window.dispose @main_window.dispose @kind_window.dispose @info_window.dispose end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å #-------------------------------------------------------------------------- def update # À©µµ¿ì¸¦ °»½Å #@help_window.update @main_window.update @kind_window.update @info_window.update if @info_window.active update_info return end # ¸ÞÀÎ À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì: update_target ¸¦ ºÎ¸¥´Ù if @main_window.active update_main return end # Á¾·ù À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì: update_kind ¸¦ ºÎ¸¥´Ù if @kind_window.active update_kind return end end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (Á¾·ù À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì) #-------------------------------------------------------------------------- def update_kind # C ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::C) # °áÁ¤ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.decision_se) if @now_kind != @kind_window.index @main_window.new_data_set(@kind_window.index) @main_window.refresh @now_kind = @kind_window.index end subtitle = $game_temp.skill_book_data.kind_row[@kind_window.index] title = "½ºÅ³ µµ°¨:"+subtitle @title_window.contents.clear @title_window.contents = Bitmap.new(640 - 32, 64 - 32) @title_window.contents.draw_text(4, 0, 320, 32, title, 0) draw_comp(subtitle) @kind_window.active = false @kind_window.visible = false @main_window.active = true @main_window.index = 0 return end # B ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::B) # ĵ½½ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (¸ÞÀÎ À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì) #-------------------------------------------------------------------------- def update_main # B ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::B) # ĵ½½ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.cancel_se) @main_window.active = false @kind_window.active = true @kind_window.visible = true @main_window.index = -1 @title_window.contents.clear @title_window.contents = Bitmap.new(640 - 32, 64 - 32) @title_window.contents.draw_text(4, 0, 320, 32, "½ºÅ³ µµ°¨", 0) draw_comp return end # C ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::C) if @main_window.item == nil or @main_window.show?(@main_window.item_kind, @main_window.item) == false # ¹öÀú SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.buzzer_se) return end # °áÁ¤ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.decision_se) @main_window.active = false @info_window.active = true @info_window.visible = true @visible_index = @main_window.index @info_window.refresh(@main_window.item, @main_window.item_kind, @main_window.item_index) return end end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (ÀÎÆ÷¸ÞÀÌ¼Ç À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì) #-------------------------------------------------------------------------- def update_info # B ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::B) # ĵ½½ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.cancel_se) @main_window.active = true @info_window.active = false @info_window.visible = false @help_window.visible = false return end # C ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::C) # °áÁ¤ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.decision_se) return end if Input.trigger?(Input::L) # °áÁ¤ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.decision_se) loop_end = false while loop_end == false if @visible_index != 0 @visible_index -= 1 else @visible_index = @main_window.data.size - 1 end loop_end = true if @main_window.show?(@main_window.item_kind,@main_window.data[@visible_index]) end id = @main_window.data[@visible_index] @info_window.refresh(id, @main_window.item_kind, @main_window.item_index) return end if Input.trigger?(Input::R) # °áÁ¤ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.decision_se) loop_end = false while loop_end == false if @visible_index != @main_window.data.size - 1 @visible_index += 1 else @visible_index = 0 end loop_end = true if @main_window.show?(@main_window.item_kind,@main_window.data[@visible_index]) end id = @main_window.data[@visible_index] @info_window.refresh(id, @main_window.item_kind, @main_window.item_index) return end end def draw_comp(category=nil) if SHOW_COMPLETE_TYPE != 0 if category == nil case SHOW_COMPLETE_TYPE when 1 s_now = $game_system.skill_book_now s_max = $game_system.skill_book_max text = s_now.to_s + "/" + s_max.to_s when 2 comp = $game_system.skill_book_complete_percentage text = comp.to_s + "%" when 3 s_now = $game_system.skill_book_now s_max = $game_system.skill_book_max comp = $game_system.skill_book_complete_percentage text = s_now.to_s + "/" + s_max.to_s + "¡¡" + comp.to_s + "%" end else case SHOW_COMPLETE_TYPE when 1 s_now = $game_system.skill_book_category_now(category) s_max = $game_system.skill_book_category_max(category) text = s_now.to_s + "/" + s_max.to_s when 2 comp = $game_system.skill_book_category_complete_percentage(category) text = comp.to_s + "%" when 3 s_now = $game_system.skill_book_category_now(category) s_max = $game_system.skill_book_category_max(category) comp = $game_system.skill_book_category_complete_percentage(category) text = s_now.to_s + "/" + s_max.to_s + "¡¡" + comp.to_s + "%" end end if text != nil @title_window.contents.draw_text(320, 0, 288, 32, text, 2) end end end end