#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #_/¡¡¡¡¡ß¹«±â °³Á¶ - KGC_WeaponAlter¡ß #_/---------------------------------------------------------------------------- #_/¡¡¹«±â¸¦ °³Á¶ÇØ , Ư¼ö È¿°ú¸¦ ºÎ°¡ÇÏ´Â ±â´ÉÀ» Ãß°¡ÇÕ´Ï´Ù. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #============================================================================== # ¡Ú Ä¿½ºÅ͸¶ÀÌÁî Ç׸ñ ¡Ú #============================================================================== module KGC # ¡ß°³Á¶ ¹«±â ÃÖ´ë¼ö WA_WEAPON_MAX = 100 # ¡ß°³Á¶ ȸ¼ö¸¦ ºÎ°¡ # true ¸¦ ÁöÁ¤Çϸé(ÀÚ) , ¹«±â¸í¿¡ +1 µî ÀÌ ºÙ´Â´Ù. WA_SHOW_ALTER_COUNT = true # ¡ß°³Á¶ ȸ¼öÀÇ ¼­½Ä # ¡¼{n}¡¦°³Á¶ ȸ¼ö¡½ WA_ALTER_COUNT_FORMAT = "+{n}" # ¡ßÆÑÅÍ À϶÷ # ¡ì"¸íĪ", "ÇïÇÁ", ŸÀÔ, ID, ºñ¿ë, [»ç¿ë ¾ÆÀÌÅÛID, °³¼ö], ...¡í # ¡¼Å¸ÀÔ¡½0..°ø°Ý ¼Ó¼º 1..½ºÅ×ÀÌÆ®[+] 2..½ºÅ×ÀÌÆ®[-] # ¡¼ ºñ¿ë ¡½¹«±âÀÇ °¡°Ý¿¡ ´ëÇÑ ºñÀ²(%) WA_FACTORS = [ # ¼Ó¼º ["[È­-æú]°ø°Ý", "¹«±â·Î æú(¿°) ¼Ó¼ºÀ» ºÎ°¡ÇÕ´Ï´Ù. ", 0, 1, 15, [16, 1]], ["[ºù-Þ¼]°ø°Ý", "¹«±â·Î Þ¼(ºù) ¼Ó¼ºÀ» ºÎ°¡ÇÕ´Ï´Ù. ", 0, 2, 15, [17, 1]], ["[³ú-Òâ]°ø°Ý", "¹«±â·Î Òâ(³ú) ¼Ó¼ºÀ» ºÎ°¡ÇÕ´Ï´Ù. ", 0, 3, 15, [18, 1]], ["[¹°-â©]°ø°Ý", "¹«±â·Î â©(¼ö) ¼Ó¼ºÀ» ºÎ°¡ÇÕ´Ï´Ù. ", 0, 4, 15, [19, 1]], ["[Åä-÷Ï]°ø°Ý", "¹«±â·Î ÷Ï(Åä) ¼Ó¼ºÀ» ºÎ°¡ÇÕ´Ï´Ù. ", 0, 5, 15, [20, 1]], ["[dz-ù¦]°ø°Ý", "¹«±â·Î ù¦(dz) ¼Ó¼ºÀ» ºÎ°¡ÇÕ´Ï´Ù. ", 0, 6, 15, [21, 1]], ["[±¤-ÎÃ]°ø°Ý", "¹«±â·Î ÎÃ(±¤) ¼Ó¼ºÀ» ºÎ°¡ÇÕ´Ï´Ù. ", 0, 7, 15, [22, 1]], ["[¾Ï-äÞ]°ø°Ý", "¹«±â·Î äÞ(¾Ï) ¼Ó¼ºÀ» ºÎ°¡ÇÕ´Ï´Ù. ", 0, 8, 15, [23, 1]], # ½ºÅ×ÀÌÆ® # (±ÍÂú¾Æ¼­ À̸¸Å­) ] # ¡ß°¡°Ý 0 ÀÇ ¹«±â °¡°Ý °è»ê½Ä # ¡¼atk¡¦°ø°Ý·Â pdef¡¦¹°¸® ¹æ¾î mdef¡¦¸¶¹ý ¹æ¾î str_p¡¦¿Ï·Â+ # dex_p¡¦¼ÕÀçÁÖ°¡ ÀÖÀ½+ agi_p¡¦¹ÎøÇÔ+ int_p¡¦¸¶·Â+¡½ # °³Á¶ ºñ¿ë »êÃâ¿¡ »ç¿ë. WA_COST_FORMULA = "(atk + str_p + dex_p + agi_p + int_p) * 30" end class Window_WeaponAlterCommand < Window_Selectable # ¡ß¡¸°³Á¶¡¹¸íĪ WA_COMMAND_ALTER = "°³Á¶" # ¡ß¡¸Æı⡹¸íĪ WA_COMMAND_DISPOSE = "Æıâ" # ¡ß¡¸°³Á¶¡¹ÇïÇÁ WA_HELP_ALTER = "¼ÒÁöÇÏ°í ÀÖ´Â ¹«±â¸¦ °³Á¶ÇÕ´Ï´Ù. " # ¡ß¡¸Æı⡹ÇïÇÁ WA_HELP_DISPOSE = "°³Á¶ÇÑ ¹«±â¸¦ ÆıâÇÕ´Ï´Ù. " end class Window_WeaponAlterLeft < Window_Selectable # ¡ß°³Á¶ ¹«±â ¸®½ºÆ® °ø³­ÀÇ Ç¥½Ã ij¸¯ÅÍ ¶óÀÎ WA_TEXT_NO_WEAPON = "- No weapon -" end class Window_WeaponAlterStatus < Window_Base # ¡ßºÎ°¡ ¼Ó¼ºÀ» Ç¥½ÃÇÏ´Â ¹üÀ§ WA_ELEMENT_RANGE = 1..8 # ¡ßºÎ°¡/ÇØÁ¦ ½ºÅ×ÀÌÆ®¸¦ Ç¥½ÃÇÏ´Â ¹üÀ§ WA_STATE_RANGE = 1...$data_states.size end class Scene_WeaponAlter # ¡ß¹«±â °³Á¶ È®ÀÎ Ä¿¸àµå WA_ALTER_COMMAND = ["°³Á¶Çϱâ", "±×¸¸µÎ±â"] # ¡ß¹«±â Æıâ È®ÀÎ Ä¿¸àµå WA_DISPOSE_COMMAND = ["ÆıâÇϱâ", "±×¸¸µÎ±â"] # ¡ßÆÑÅÍ ºÎ°¡ È®ÀÎ Ä¿¸àµå WA_FACTOR_COMMAND = ["ºÎ°¡Çϱâ", "±×¸¸µÎ±â"] # ¡Ø¡è3Ç׸ñÀº , Ä¿¸àµå¼ö¸¦ º¯°æÇϸé(ÀÚ) ¹ö±×. end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú # µµÀÔÀÌ ³¡³­ Ç÷¡±×¸¦ ¿Â $imported["WeaponAlter"] = true class Object include KGC end #-------------------------------------------------------------------------- # ¡Ü ¹«±â °³Á¶ È­¸é È£Ãâ #-------------------------------------------------------------------------- def call_equip_alter # Ç÷¹À̾îÀÇ ÀÚ¼¼¸¦ ±³Á¤ $game_player.straighten # È®Àå Àåºñ È­¸éÀ¸·Î ÀüȯÇÏ°í $scene = Scene_WeaponAlter.new end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú #============================================================================== # ¡á RPG::Weapon2 #============================================================================== class RPG::Weapon2 < RPG::Weapon #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize super @original_id = 0 @original_price = 0 @alter_count = 0 end #-------------------------------------------------------------------------- # ¡Ü °³Á¶ ºñ¿ë »êÃâ #-------------------------------------------------------------------------- def alter_cost(factor) if @original_price == 0 formula = WA_COST_FORMULA.dup formula.gsub!(/atk/i) {"@atk"} formula.gsub!(/pdef/i) {"@pdef"} formula.gsub!(/mdef/i) {"@mdef"} formula.gsub!(/str_p/i) {"@str_plus"} formula.gsub!(/dex_p/i) {"@dex_plus"} formula.gsub!(/agi_p/i) {"@agi_plus"} formula.gsub!(/int_p/i) {"@int_plus"} cost = eval(formula) else cost = @original_price end cost = cost * factor[4] / 100 return cost end #-------------------------------------------------------------------------- # ¡Ü ÆÑÅÍ ºÎ°¡ °¡ºÎ #-------------------------------------------------------------------------- def can_add_factor?(factor) # °¡°Ý ÆÇÁ¤ if $game_party.gold < self.alter_cost(factor) return false end # ¾ÆÀÌÅÛ ¼ÒÁö ÆÇÁ¤ for i in 5...factor.size if $game_party.item_number(factor[i][0]) < factor[i][1] return false end end # ºÎ°¡°¡ ³¡³­ ÆÇÁ¤ case factor[2] when 0 # ¼Ó¼º if @element_set.include?(factor[3]) return false end when 1 # ½ºÅ×ÀÌÆ® ºÎ°¡ if @plus_state_set.include?(factor[3]) return false end when 2 # ½ºÅ×ÀÌÆ® ÇØÁ¦ if @minus_state_set.include?(factor[3]) return false end end return true end #-------------------------------------------------------------------------- # ¡Ü ÆÑÅÍ ºÎ°¡ #-------------------------------------------------------------------------- def add_factor(factor) # ±Ý¼Òºñ $game_party.lose_gold(self.alter_cost(factor)) # ¾ÆÀÌÅÛ ¼Òºñ for i in 5...factor.size $game_party.lose_item(factor[i][0], factor[i][1]) end # ÆÑÅ͸¦ ºÎ°¡ case factor[2] when 0 # ¼Ó¼º @element_set.push(factor[3]) @element_set.sort! when 1 # ½ºÅ×ÀÌÆ® ºÎ°¡ @plus_state_set.push(factor[3]) @plus_state_set.sort! when 2 # ½ºÅ×ÀÌÆ® ÇØÁ¦ @minus_state_set.push(factor[3]) @minus_state_set.sort! end # °³Á¶ ȸ¼ö °¡»ê self.add_alter_count end #-------------------------------------------------------------------------- # ¡Ü ¹«±â Á¤º¸¸¦ Ä«ÇÇ #-------------------------------------------------------------------------- def copy_weapon(id) weapon = $data_weapons[id] @original_id = id @name = weapon.name.dup if WA_SHOW_ALTER_COUNT @name += WA_ALTER_COUNT_FORMAT.gsub(/{n}/i) {"#{@alter_count}"} end @icon_name = weapon.icon_name.dup @description = weapon.description.dup @animation1_id = weapon.animation1_id @animation2_id = weapon.animation2_id @price = 0 @original_price = weapon.price @atk = weapon.atk @pdef = weapon.pdef @mdef = weapon.mdef @str_plus = weapon.str_plus @dex_plus = weapon.dex_plus @agi_plus = weapon.agi_plus @int_plus = weapon.int_plus @element_set = weapon.element_set.dup @plus_state_set = weapon.plus_state_set.dup @minus_state_set = weapon.minus_state_set.dup # Àåºñ °¡´ÉÀÚ¸¦ ¼³Á¤ for i in 1...$data_classes.size actor_class = $data_classes[i] # °³Á¶ ´ë»óÀÇ ¹«±â¸¦ Àåºñ ÇÒ ¼ö Àִ Ŭ·¡½ºÀÇ °æ¿ì if actor_class.weapon_set.include?(id) # Àåºñ °¡´É ¹«±â·Î Ãß°¡ actor_class.weapon_set.push(@id) else # Àåºñ ÇÒ ¼ö ¾ø´Â °æ¿ì´Â Àåºñ °¡´É ¹«±â·ÎºÎÅÍ »èÁ¦ actor_class.weapon_set.delete(@id) end end end #-------------------------------------------------------------------------- # ¡Ü ¿À¸®Áö³¯ ¹«±âIDÃëµæ #-------------------------------------------------------------------------- def original_id return @original_id end #-------------------------------------------------------------------------- # ¡Ü °³Á¶ ȸ¼ö Ãëµæ #-------------------------------------------------------------------------- def alter_count @alter_count = 0 if @alter_count == nil return @alter_count end #-------------------------------------------------------------------------- # ¡Ü °³Á¶ ȸ¼ö °¡»ê #-------------------------------------------------------------------------- def add_alter_count @alter_count = 0 if @alter_count == nil @alter_count += 1 @name = $data_weapons[@original_id].name.dup if WA_SHOW_ALTER_COUNT @name += WA_ALTER_COUNT_FORMAT.gsub(/{n}/i) {"#{@alter_count}"} end end end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú #============================================================================== # ¡á Game_Party #------------------------------------------------------------------------------ # ¡¡ÆÄƼ¸¦ Ãë±ÞÇϴ Ŭ·¡½ºÀÔ´Ï´Ù. °ñµå³ª ¾ÆÀÌÅÛµîÀÇ Á¤º¸°¡ Æ÷ÇԵ˴ϴÙ. ÀÌ Äí # ¶ó½ºÀÇ ÀνºÅϽº´Â $game_party À¸·Î ÂüÁ¶µË´Ï´Ù. #============================================================================== class Game_Party #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- alias initialize_KGC_WeaponAlter initialize def initialize # ¿øÀÇ Ã³¸®¸¦ ½ÇÇà initialize_KGC_WeaponAlter @alter_weapons = [] end #-------------------------------------------------------------------------- # ¡Ü °³Á¶ ¹«±â Ãëµæ #-------------------------------------------------------------------------- def alter_weapons @alter_weapons = [] if @alter_weapons == nil return @alter_weapons end #-------------------------------------------------------------------------- # ¡Ü °³Á¶ ¹«±â ¼³Á¤ #-------------------------------------------------------------------------- def alter_weapons=(ary) @alter_weapons = [] if @alter_weapons == nil @alter_weapons = ary end end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú #============================================================================== # ¡á Window_WeaponAlterCommand #------------------------------------------------------------------------------ # ¡¡¹«±â °³Á¶ È­¸é¿¡¼­ , Á¶ÀÛÀ» ¼±ÅÃÇÏ´Â À©µµ¿ìÀÔ´Ï´Ù. #============================================================================== class Window_WeaponAlterCommand < Window_Selectable #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize super(0, 64, 640, 64) self.contents = Bitmap.new(width - 32, height - 32) @commands = [WA_COMMAND_ALTER, WA_COMMAND_DISPOSE] @item_max = @commands.size @column_max = @commands.size @item_width = (width - 32) / @commands.size self.z = 1000 self.index = 0 refresh end #-------------------------------------------------------------------------- # ¡Ü ¸®ÇÁ·¹½¬ #-------------------------------------------------------------------------- def refresh for i in 0...@commands.size rect = Rect.new(@item_width * i, 0, @item_width, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.font.color = system_color self.contents.draw_shadow_text(rect, @commands[i], 1) end end #-------------------------------------------------------------------------- # ¡Ü Ä¿¼­ÀÇ ±¸Çü °»½Å #-------------------------------------------------------------------------- def update_cursor_rect if index != -1 self.cursor_rect.set(@item_width * index, 0, @item_width, 32) end end #-------------------------------------------------------------------------- # ¡Ü ÇïÇÁ ÅؽºÆ® °»½Å #-------------------------------------------------------------------------- def update_help case self.index when 0 @help_window.set_text(WA_HELP_ALTER) when 1 @help_window.set_text(WA_HELP_DISPOSE) end end end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú #============================================================================== # ¡á Window_WeaponAlterLeft #------------------------------------------------------------------------------ # ¡¡¹«±â °³Á¶ È­¸é¿¡¼­ , °³Á¶ÇÏ´Â ¹«±â ½½·ÔÀÇ À϶÷À» Ç¥½ÃÇÏ´Â À©µµ¿ìÀÔ´Ï´Ù. #============================================================================== class Window_WeaponAlterLeft < Window_Selectable #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize super(0, 128, 320, 352) self.active = false self.index = -1 self.back_opacity = 160 @column_max = 1 refresh end #-------------------------------------------------------------------------- # ¡Ü ¹«±âÀÇ Ãëµæ #-------------------------------------------------------------------------- def weapon return @data[self.index] end #-------------------------------------------------------------------------- # ¡Ü ¸®ÇÁ·¹½¬ #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] # ½½·Ô À϶÷À» ÀÛ¼º for i in 0...WA_WEAPON_MAX weapon = $game_party.alter_weapons[i] @data.push(weapon) end # ºñÆ® ¸ÊÀ» ÀÛ¼ºÇØ , Àü Ç׸ñÀ» ¹¦È­ @item_max = @data.size 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) weapon = @data[index] x = 36 y = index * 32 self.contents.font.color = text_color(6) self.contents.draw_shadow_text(x - 32, y, 32, 32, (index + 1).to_s, 1) if weapon != nil if $game_party.weapon_number(weapon.id) > 0 self.contents.font.color = normal_color opacity = 255 else self.contents.font.color = disabled_color opacity = 160 end icon = RPG::Cache.icon(weapon.icon_name) self.contents.blt(x, y + 4, icon, icon.rect, opacity) self.contents.draw_shadow_text(x + 28, y, 224, 32, weapon.name) else self.contents.font.color = disabled_color self.contents.draw_shadow_text(x, y, 256, 32, WA_TEXT_NO_WEAPON, 1) end end #-------------------------------------------------------------------------- # ¡Ü ÇïÇÁ ÅؽºÆ® °»½Å #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.weapon == nil ? "" : self.weapon.description) end end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú #============================================================================== # ¡á Window_WeaponAlterRight #------------------------------------------------------------------------------ # ¡¡¹«±â °³Á¶ È­¸é¿¡¼­ , ¼ÒÁöÇÏ°í ÀÖ´Â ¹«±â À϶÷À» Ç¥½ÃÇÏ´Â À©µµ¿ìÀÔ´Ï´Ù. #============================================================================== class Window_WeaponAlterRight < Window_Selectable #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize super(320, 128, 320, 352) self.active = false self.visible = false self.index = 0 self.back_opacity = 160 @column_max = 1 refresh end #-------------------------------------------------------------------------- # ¡Ü ¹«±âÀÇ Ãëµæ #-------------------------------------------------------------------------- def weapon return @data[self.index] end #-------------------------------------------------------------------------- # ¡Ü ¸®ÇÁ·¹½¬ #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] # ¼ÒÁöÇÏ°í ÀÖ´Â ¹«±â¸¦ Ãß°¡ for i in 1...$alter_weapon_start if $game_party.weapon_number(i) > 0 && @data.push($data_weapons[i]) end end # °³¼ö°¡ 0 ÀÇ °æ¿ì´Â nil À» Ãß°¡ @data.push(nil) if @data.size == 0 # ºñÆ® ¸ÊÀ» ÀÛ¼ºÇØ , Àü Ç׸ñÀ» ¹¦È­ @item_max = @data.size 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) weapon = @data[index] return if weapon == nil x = 4 y = index * 32 icon = RPG::Cache.icon(weapon.icon_name) self.contents.blt(x, y + 4, icon, icon.rect) self.contents.font.color = normal_color self.contents.draw_shadow_text(x + 28, y, 216, 32, weapon.name) number = $game_party.weapon_number(weapon.id) self.contents.draw_shadow_text(x + 244, y, 16, 32, ":", 1) self.contents.draw_shadow_text(x + 260, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # ¡Ü ÇïÇÁ ÅؽºÆ® °»½Å #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.weapon == nil ? "" : self.weapon.description) end end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú #============================================================================== # ¡á Window_WeaponAlterStatus #------------------------------------------------------------------------------ # ¡¡¹«±â °³Á¶ È­¸é¿¡¼­ , ¼±ÅÃÇÑ ¹«±âÀÇ ´É·ÂÀ» Ç¥½ÃÇÏ´Â À©µµ¿ìÀÔ´Ï´Ù. #============================================================================== class Window_WeaponAlterStatus < Window_Base #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize super(320, 128, 320, 352) self.contents = Bitmap.new(width - 32, height - 32) self.back_opacity = 160 self.z = 500 refresh(nil) end #-------------------------------------------------------------------------- # ¡Ü ¸®ÇÁ·¹½¬ #-------------------------------------------------------------------------- def refresh(weapon, factor = nil) self.contents.clear if factor == nil # ¾ÆÀÌÅÛ ½ºÅ×ÀÌÅͽº return if weapon == nil || weapon.name == "" # Ç׸ñ ¹¦È­ self.contents.font.size = 20 self.contents.font.color = system_color self.contents.draw_shadow_text(4, 0, 80, 32, $data_system.words.atk) self.contents.draw_shadow_text(148, 0, 80, 32, $data_system.words.pdef) self.contents.draw_shadow_text(4, 32, 80, 32, $data_system.words.mdef) self.contents.draw_shadow_text(148, 32, 80, 32, $data_system.words.str) self.contents.draw_shadow_text(4, 64, 80, 32, $data_system.words.dex) self.contents.draw_shadow_text(148, 64, 80, 32, $data_system.words.agi) self.contents.draw_shadow_text(4, 96, 80, 32, $data_system.words.int) self.contents.font.color = normal_color self.contents.draw_shadow_text(84, 0, 48, 32, weapon.atk.to_s, 2) self.contents.draw_shadow_text(228, 0, 48, 32, weapon.pdef.to_s, 2) self.contents.draw_shadow_text(84, 32, 48, 32, weapon.mdef.to_s, 2) self.contents.draw_shadow_text(228, 32, 48, 32, weapon.str_plus.to_s, 2) self.contents.draw_shadow_text(84, 64, 48, 32, weapon.dex_plus.to_s, 2) self.contents.draw_shadow_text(228, 64, 48, 32, weapon.agi_plus.to_s, 2) self.contents.draw_shadow_text(84, 96, 48, 32, weapon.int_plus.to_s, 2) # ºÎ°¡ ¼Ó¼º ¹¦È­ ix, iy = 4, 148 self.contents.font.size = 18 self.contents.font.color = system_color self.contents.draw_shadow_text(32, 128, 160, 20, "¼Ó¼º") self.contents.font.color = normal_color if weapon.element_set.size > 0 for i in 0...weapon.element_set.size element = weapon.element_set[i] if element < WA_ELEMENT_RANGE.first || element > WA_ELEMENT_RANGE.last next end text = "[#{$data_system.elements[element]}]" cx = self.contents.text_size(text).width self.contents.draw_shadow_text(ix, iy, cx + 8, 20, text) ix += cx if ix >= 264 ix = 4 iy += 20 if iy >= 192 break end end end end # ºÎ°¡ ½ºÅ×ÀÌÆ® ¹¦È­ ix, iy = 4, 212 self.contents.font.color = system_color self.contents.draw_shadow_text(32, 192, 160, 20, "ºÎ°¡ ½ºÅ×ÀÌÆ®") self.contents.font.color = normal_color self.contents.font.size = 18 if weapon.element_set.size > 0 for i in 0...weapon.plus_state_set.size state = weapon.plus_state_set[i] if state < WA_STATE_RANGE.first || state > WA_STATE_RANGE.last next end text = "[#{$data_states[state].name}]" cx = self.contents.text_size(text).width self.contents.draw_shadow_text(ix, iy, cx + 8, 20, text) ix += cx if ix >= 264 ix = 4 iy += 24 if iy >= 256 break end end end end # ÇØÁ¦ ½ºÅ×ÀÌÆ® ¹¦È­ ix, iy = 4, 276 self.contents.font.color = system_color self.contents.draw_shadow_text(32, 256, 160, 20, "ÇØÁ¦ ½ºÅ×ÀÌÆ®") self.contents.font.color = normal_color self.contents.font.size = 18 if weapon.element_set.size > 0 for i in 0...weapon.minus_state_set.size state = weapon.minus_state_set[i] if state < WA_STATE_RANGE.first || state > WA_STATE_RANGE.last next end text = "[#{$data_states[state].name}]" cx = self.contents.text_size(text).width self.contents.draw_shadow_text(ix, iy, cx + 8, 20, text) ix += cx if ix >= 264 ix = 4 iy += 24 if iy >= 320 break end end end end else # ¼ÒÀç ¾ÆÀÌÅÛ¼ö return if factor == nil self.contents.font.size = 22 self.contents.font.color = system_color self.contents.draw_shadow_text(4, 0, 128, 32, "°³Á¶ ºñ¿ë") self.contents.draw_shadow_text(232, 0, 48, 32, $data_system.words.gold) self.contents.font.color = normal_color self.contents.draw_shadow_text(104, 0, 128, 32, weapon.alter_cost(factor).to_s, 2) self.contents.font.color = system_color self.contents.draw_shadow_text(4, 32, 128, 32, "¼ÒÁö±Ý") self.contents.draw_shadow_text(232, 32, 48, 32, $data_system.words.gold) self.contents.font.color = normal_color self.contents.draw_shadow_text(104, 32, 128, 32, $game_party.gold.to_s, 2) self.contents.font.color = system_color self.contents.draw_shadow_text(4, 64, 128, 32, "¼Òºñ ¾ÆÀÌÅÛ") for i in 5...factor.size self.contents.font.color = system_color self.contents.draw_shadow_text(4, 128 + (i - 5) * 64, 80, 32, "ÇÊ¿ä¼ö") self.contents.draw_shadow_text(144, 128 + (i - 5) * 64, 80, 32, "¼ÒÁö¼ö") self.contents.font.color = normal_color text = $data_items[factor[i][0]].name icon = RPG::Cache.icon($data_items[factor[i][0]].icon_name) self.contents.blt(4, 100 + (i - 5) * 64, icon, icon.rect) self.contents.draw_shadow_text(32, 96 + (i - 5) * 64, 256, 32, text) self.contents.draw_shadow_text(84, 128 + (i - 5) * 64, 48, 32, factor[i][1].to_s, 2) self.contents.draw_shadow_text(224, 128 + (i - 5) * 64, 48, 32, $game_party.item_number(factor[i][0]).to_s, 2) end end end end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú #============================================================================== # ¡á Window_WeaponAlterFactor #------------------------------------------------------------------------------ # ¡¡¹«±â °³Á¶ È­¸é¿¡¼­ , ºÎ°¡ ¿ä¼Ò À϶÷À» Ç¥½ÃÇÏ´Â À©µµ¿ìÀÔ´Ï´Ù. #============================================================================== class Window_WeaponAlterFactor < Window_Selectable #-------------------------------------------------------------------------- # ¡Ü ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize super(320, 128, 320, 352) @column_max = 1 self.active = false self.visible = false self.index = 0 self.back_opacity = 160 end #-------------------------------------------------------------------------- # ¡Ü ÆÑÅÍÀÇ Ãëµæ #-------------------------------------------------------------------------- def factor return @data[self.index] end #-------------------------------------------------------------------------- # ¡Ü ¸®ÇÁ·¹½¬ #-------------------------------------------------------------------------- def refresh(weapon) if self.contents != nil self.contents.dispose self.contents = nil end @weapon = weapon @data = [] # ºÎ°¡ÇÒ ¼ö ÀÖ´Â ÆÑÅ͸¦ Ãß°¡ for i in 0...WA_FACTORS.size factor = WA_FACTORS[i] next if factor == nil @data.push(factor) end # °³¼ö°¡ 0 ÀÇ °æ¿ì´Â nil À» Ãß°¡ @data.push(nil) if @data.size == 0 # ºñÆ® ¸ÊÀ» ÀÛ¼ºÇØ , Àü Ç׸ñÀ» ¹¦È­ @item_max = @data.size 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) factor = @data[index] return if factor == nil x = 4 y = index * 32 if @weapon.can_add_factor?(factor) self.contents.font.color = normal_color else self.contents.font.color = disabled_color end self.contents.draw_shadow_text(x, y, 280, 32, factor[0], 0) end #-------------------------------------------------------------------------- # ¡Ü ÇïÇÁ ÅؽºÆ® °»½Å #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.factor == nil ? "" : self.factor[1]) end end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú #============================================================================== # ¡á Scene_Title #------------------------------------------------------------------------------ # ¡¡Å¸ÀÌƲ È­¸éÀÇ Ã³¸®¸¦ ½Ç½ÃÇϴ Ŭ·¡½ºÀÔ´Ï´Ù. #============================================================================== class Scene_Title #-------------------------------------------------------------------------- # ¡Ü Ä¿¸àµå : ´º °ÔÀÓ #-------------------------------------------------------------------------- alias command_new_game_KGC_WeaponAlter command_new_game def command_new_game # ¿øÀÇ Ã³¸®¸¦ ½ÇÇà command_new_game_KGC_WeaponAlter # °³Á¶ ¹«±â¸¦ ÃʱâÈ­ $alter_weapon_start = $data_weapons.size for i in 0...WA_WEAPON_MAX $data_weapons[$alter_weapon_start + i] = RPG::Weapon2.new end end end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú #============================================================================== # ¡á Scene_Load #------------------------------------------------------------------------------ # ¡¡·Îµå È­¸éÀÇ Ã³¸®¸¦ ½Ç½ÃÇϴ Ŭ·¡½ºÀÔ´Ï´Ù. #============================================================================== class Scene_Load < Scene_File #-------------------------------------------------------------------------- # ¡Ü °áÁ¤½ÃÀÇ Ã³¸® #-------------------------------------------------------------------------- alias on_decision_KGC_WeaponAlter on_decision def on_decision(filename) # ¿øÀÇ Ã³¸®¸¦ ½ÇÇà on_decision_KGC_WeaponAlter(filename) # °³Á¶ ¹«±â¸¦ Ãëµæ $alter_weapon_start = $data_weapons.size for i in 0...WA_WEAPON_MAX if $game_party.alter_weapons[i] == nil $data_weapons[$alter_weapon_start + i] = RPG::Weapon2.new else $data_weapons[$alter_weapon_start + i] = $game_party.alter_weapons[i] weapon = $game_party.alter_weapons[i] # Àåºñ °¡´ÉÀÚ¸¦ ¼³Á¤ for i in 1...$data_classes.size actor_class = $data_classes[i] # °³Á¶ ´ë»óÀÇ ¹«±â¸¦ Àåºñ ÇÒ ¼ö Àִ Ŭ·¡½ºÀÇ °æ¿ì if actor_class.weapon_set.include?(weapon.original_id) # Àåºñ °¡´É ¹«±â·Î Ãß°¡ actor_class.weapon_set.push(weapon.id) else # Àåºñ ÇÒ ¼ö ¾ø´Â °æ¿ì´Â Àåºñ °¡´É ¹«±â·ÎºÎÅÍ »èÁ¦ actor_class.weapon_set.delete(weapon.id) end end end end end end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú #============================================================================== # ¡á Scene_WeaponAlter #------------------------------------------------------------------------------ # ¡¡¹«±â °³Á¶ È­¸éÀÇ Ã³¸®¸¦ ½Ç½ÃÇϴ Ŭ·¡½ºÀÔ´Ï´Ù. #============================================================================== class Scene_WeaponAlter #-------------------------------------------------------------------------- # ¡Ü ¸ÞÀΠó¸® #-------------------------------------------------------------------------- def main @spriteset = Spriteset_Map.new # À©µµ¿ì¸¦ ÀÛ¼º if $imported["HelpExtension"] @help_window = Window_HelpExtension.new else @help_window = Window_Help.new end @help_window.back_opacity = 160 @command_window = Window_WeaponAlterCommand.new @left_window = Window_WeaponAlterLeft.new @right_window = Window_WeaponAlterRight.new @factor_window = Window_WeaponAlterFactor.new @status_window = Window_WeaponAlterStatus.new # ÇïÇÁ À©µµ¿ì¸¦ °ü·ÃÁþ°í @command_window.help_window = @help_window @left_window.help_window = @help_window @right_window.help_window = @help_window @factor_window.help_window = @help_window # Ä¿¼­ À§Ä¡¸¦ ¼³Á¤ @left_window.index = 0 @status_window.refresh(@left_window.weapon) # Æ®¶õÁö¼Ç ½ÇÇà Graphics.transition # ¸ÞÀÎ ·çÇÁ loop do # °ÔÀÓ È­¸éÀ» °»½Å Graphics.update # ÀÔ·Â Á¤º¸¸¦ °»½Å Input.update # ÇÁ·¹ÀÓ °»½Å update # È­¸éÀÌ ¹Ù²î¸é(ÀÚ) ·çÇÁ¸¦ Áß´Ü if $scene != self break end end # Æ®¶õÁö¼Ç Áغñ Graphics.freeze # À©µµ¿ì¸¦ Çعæ @help_window.dispose @command_window.dispose @left_window.dispose @right_window.dispose @factor_window.dispose @status_window.dispose @left_command_window.dispose if @left_command_window != nil @right_command_window.dispose if @right_command_window != nil @factor_command_window.dispose if @factor_command_window != nil @spriteset.dispose end #-------------------------------------------------------------------------- # ¡Ü ¸®ÇÁ·¹½¬ #-------------------------------------------------------------------------- def refresh @command_window.refresh @left_window.refresh @right_window.refresh @factor_window.refresh(nil) @status_window.refresh(nil) end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å #-------------------------------------------------------------------------- def update # À©µµ¿ì¸¦ °»½Å @command_window.update @left_window.update @right_window.update @factor_window.update # Ä¿¸àµå À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì: update_command ¸¦ ºÎ¸£´Â if @command_window.active update_command return end # ·¹ÇÁÆ® À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì: update_left ¸¦ ºÎ¸£´Â if @left_window.active @status_window.x = 320 update_left return end # ¶óÀÌÆ® À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì: update_right ¸¦ ºÎ¸£´Â if @right_window.active @status_window.x = 0 update_right return end # ÆÑÅÍ Ãß°¡ À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì: update_factor ¸¦ ºÎ¸£´Â if @factor_window.active @status_window.x = 0 update_factor return end # ·¹ÇÁÆ® Ä¿¸àµå À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì: update_left_command ¸¦ ºÎ¸£´Â if @left_command_window != nil && @left_command_window.active update_left_command return end # ¶óÀÌÆ® Ä¿¸àµå À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì: update_right_command ¸¦ ºÎ¸£´Â if @right_command_window != nil && @right_command_window.active update_right_command return end # ÆÑÅÍ Ä¿¸àµå À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì: update_factor_command ¸¦ ºÎ¸£´Â if @factor_command_window != nil && @factor_command_window.active update_factor_command return end end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (Ä¿¸àµå À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì) #-------------------------------------------------------------------------- def update_command # B ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::B) # ĵ½½ SE À» ¿¬ÁÖ $game_system.se_play($data_system.cancel_se) # ¸Ê È­¸éÀ¸·Î ÀüȯÇÏ°í $scene = Scene_Map.new return end # C ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::C) # °áÁ¤ SE À» ¿¬ÁÖ $game_system.se_play($data_system.decision_se) # ·¹ÇÁÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @command_window.active = false @command_window.visible = false @left_window.active = true return end end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (·¹ÇÁÆ® À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì) #-------------------------------------------------------------------------- def update_left # ¼±Åà Ç׸ñÀÌ º¯°æµÇ¾úÀ» °æ¿ì if @now_sel_left != @left_window.index # ½ºÅ×ÀÌÅͽº À©µµ¿ì¸¦ ¸®ÇÁ·¹½¬ @status_window.refresh(@left_window.weapon) @now_sel_left = @left_window.index end # B ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::B) # ĵ½½ SE À» ¿¬ÁÖ $game_system.se_play($data_system.cancel_se) # Ä¿¸àµå À©µµ¿ì·Î ÀüȯÇÏ°í @command_window.active = true @command_window.visible = true @left_window.active = false @now_sel_left = nil return end # C ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::C) # Ä¿¸àµå À©µµ¿ìÀÇ ¼±ÅûçÇ×À¸·Î ºÐ±â case @command_window.index when 0 # ¹«±â °³Á¶ÀÇ °æ¿ì # °áÁ¤ SE À» ¿¬ÁÖ $game_system.se_play($data_system.decision_se) # ÀÌ¹Ì °³Á¶ ¹«±â°¡ ÀÖ´Â °æ¿ì if @left_window.weapon != nil # ÆÑÅÍ Ãß°¡ À©µµ¿ì¸¦ ¸®ÇÁ·¹½¬ @factor_window.refresh(@left_window.weapon) # ÆÑÅÍ Ãß°¡ À©µµ¿ì·Î ÀüȯÇÏ°í @left_window.active = false @factor_window.active = true @factor_window.visible = true else # ½ºÅ×ÀÌÅͽº À©µµ¿ì¸¦ ¸®ÇÁ·¹½¬ @status_window.refresh(@right_window.weapon) # ¶óÀÌÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @left_window.active = false @right_window.active = true @right_window.visible = true end @now_sel_left = nil when 1 # °³Á¶ ¹«±â ÆıâÀÇ °æ¿ì # ÀÌ¹Ì °³Á¶ ¹«±â°¡ ÀÖ´Â °æ¿ì if @left_window.weapon != nil && $game_party.weapon_number(@left_window.weapon.id) >= 1 # °áÁ¤ SE À» ¿¬ÁÖ $game_system.se_play($data_system.decision_se) # ·¹ÇÁÆ® Ä¿¸àµå À©µµ¿ì ÀÛ¼º @left_command_window = Window_Command.new(256, WA_DISPOSE_COMMAND) @left_command_window.back_opacity = 160 @left_command_window.x = 320 - @left_command_window.width / 2 @left_command_window.y = 240 - @left_command_window.height / 2 @left_command_window.z = 1000 @left_command_window.index = 1 # ·¹ÇÁÆ® Ä¿¸àµå À©µµ¿ì·Î ÀüȯÇÏ°í @left_command_window.active = true @left_window.active = false @now_sel_left = nil else # ¹öÀú SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.buzzer_se) end when 2 # À̸§ º¯°æÀÇ °æ¿ì # ÀÌ¹Ì °³Á¶ ¹«±â°¡ ÀÖ´Â °æ¿ì if @left_window.weapon != nil # °áÁ¤ SE À» ¿¬ÁÖ $game_system.se_play($data_system.decision_se) # À̸§ ÀԷ ó¸® $game_temp.name_type = 1 $game_temp.name_weapon = @left_window.weapon $game_temp.name_actor_id = 16 $game_temp.name_max_char = 16 $game_actors[16].name = @left_window.weapon.name # À̸§ ÀԷ ȣÃâ Ç÷¡±×¸¦ ¼¼Æ® $game_temp.name_calling = true # À繦ȭ ºÒÇã°¡ $game_temp.screen_redraw = false # Æ®¶õÁö¼Ç Áغñ Graphics.freeze # ¸ÊÀ¸·Î ÀüȯÇÏ°í $scene = Scene_Map.new else # ¹öÀú SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.buzzer_se) end end return end end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (¶óÀÌÆ® À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì) #-------------------------------------------------------------------------- def update_right # ¼±Åà Ç׸ñÀÌ º¯°æµÇ¾úÀ» °æ¿ì if @now_sel_right != @right_window.index # ½ºÅ×ÀÌÅͽº À©µµ¿ì¸¦ ¸®ÇÁ·¹½¬ @status_window.refresh(@right_window.weapon) @now_sel_right = @right_window.index end # B ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::B) # ĵ½½ SE À» ¿¬ÁÖ $game_system.se_play($data_system.cancel_se) # ½ºÅ×ÀÌÅͽº À©µµ¿ì¸¦ ¸®ÇÁ·¹½¬ @status_window.refresh(@left_window.weapon) # ·¹ÇÁÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @left_window.active = true @right_window.active = false @right_window.visible = false @right_window.index = 0 @now_sel_right = nil # ÇïÇÁ À©µµ¿ì ij¸¯ÅÍ ¶óÀÎÀ» ¼Ò°Å @help_window.set_text("") return end # C ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::C) # °áÁ¤ SE À» ¿¬ÁÖ $game_system.se_play($data_system.decision_se) # ¶óÀÌÆ® Ä¿¸àµå À©µµ¿ì ÀÛ¼º @right_command_window = Window_Command.new(256, WA_ALTER_COMMAND) @right_command_window.back_opacity = 160 @right_command_window.x = 320 - @right_command_window.width / 2 @right_command_window.y = 240 - @right_command_window.height / 2 @right_command_window.z = 1000 # ¶óÀÌÆ® Ä¿¸àµå À©µµ¿ì·Î ÀüȯÇÏ°í @right_command_window.active = true @right_window.active = false @now_sel_right = nil return end end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (ÆÑÅÍ Ãß°¡ À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì) #-------------------------------------------------------------------------- def update_factor # ¼±Åà Ç׸ñÀÌ º¯°æµÇ¾úÀ» °æ¿ì if @now_sel_factor != @factor_window.index # ½ºÅ×ÀÌÅͽº À©µµ¿ì¸¦ ¸®ÇÁ·¹½¬ @status_window.refresh(@left_window.weapon, @factor_window.factor) @now_sel_factor = @factor_window.index end # B ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::B) # ĵ½½ SE À» ¿¬ÁÖ $game_system.se_play($data_system.cancel_se) # ½ºÅ×ÀÌÅͽº À©µµ¿ì¸¦ ¸®ÇÁ·¹½¬ @status_window.refresh(@left_window.weapon) # ·¹ÇÁÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @left_window.active = true @factor_window.active = false @factor_window.visible = false @factor_window.index = 0 @now_sel_factor = nil return end # C ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::C) factor = @factor_window.factor # nil üũ impossible = factor == nil # ÆÑÅÍ ºÎ°¡ ÆÇÁ¤ impossible |= !@left_window.weapon.can_add_factor?(factor) # ºÎ°¡ÇÒ ¼ö ¾ø´Â °æ¿ì if impossible # ¹öÀú SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.buzzer_se) return end # °áÁ¤ SE À» ¿¬ÁÖ $game_system.se_play($data_system.decision_se) # ÆÑÅÍ Ä¿¸àµå À©µµ¿ì ÀÛ¼º @factor_command_window = Window_Command.new(256, WA_FACTOR_COMMAND) @factor_command_window.back_opacity = 160 @factor_command_window.x = 320 - @factor_command_window.width / 2 @factor_command_window.y = 240 - @factor_command_window.height / 2 @factor_command_window.z = 1000 @factor_command_window.index = 1 # ÆÑÅÍ Ä¿¸àµå À©µµ¿ì·Î ÀüȯÇÏ°í @factor_command_window.active = true @factor_window.active = false @now_sel_factor = nil return end end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (·¹ÇÁÆ® Ä¿¸àµå À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì) #-------------------------------------------------------------------------- def update_left_command @left_command_window.update # B ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::B) # ĵ½½ SE À» ¿¬ÁÖ $game_system.se_play($data_system.cancel_se) # ·¹ÇÁÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @left_command_window.dispose @left_command_window = nil @left_window.active = true return end # C ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::C) case @left_command_window.index when 0 # Àåºñ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.equip_se) # ¼±ÅÃÇÑ °³Á¶ ¹«±â¸¦ »èÁ¦ id = @left_window.weapon.id $game_party.alter_weapons[@left_window.index] = nil $data_weapons[id] = RPG::Weapon2.new $game_party.lose_weapon(id, 99) # ¸®ÇÁ·¹½¬ @left_window.refresh # ·¹ÇÁÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @left_command_window.dispose @left_command_window = nil @left_window.active = true when 1 # °áÁ¤ SE À» ¿¬ÁÖ $game_system.se_play($data_system.decision_se) # ·¹ÇÁÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @left_command_window.dispose @left_command_window = nil @left_window.active = true end return end end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (¶óÀÌÆ® Ä¿¸àµå À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì) #-------------------------------------------------------------------------- def update_right_command @right_command_window.update # B ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::B) # ĵ½½ SE À» ¿¬ÁÖ $game_system.se_play($data_system.cancel_se) # ¶óÀÌÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @right_command_window.dispose @right_command_window = nil @right_window.active = true return end # C ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::C) case @right_command_window.index when 0 # Àåºñ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.equip_se) # °³Á¶ÇÏ´Â ¹«±â¸¦ ¼³Á¤ id = @left_window.index + $alter_weapon_start # ¹«±âÀÇ ³»¿ëÀ» ¼³Á¤ $game_party.alter_weapons[@left_window.index] = RPG::Weapon2.new weapon = $game_party.alter_weapons[@left_window.index] weapon.id = id weapon.copy_weapon(@right_window.weapon.id) $data_weapons[id] = $game_party.alter_weapons[@left_window.index] # °³Á¶ ¹«±â¸¦ 1 °³ Ãëµæ $game_party.gain_weapon(id, 1) # °³Á¶ ´ë»óÀÇ ¹«±â¸¦ »èÁ¦ $game_party.lose_weapon(@right_window.weapon.id, 1) # À©µµ¿ì¸¦ ¸®ÇÁ·¹½¬ @left_window.refresh @right_window.refresh @status_window.refresh(@left_window.weapon) # ·¹ÇÁÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @right_command_window.dispose @right_command_window = nil @left_window.active = true @right_window.active = false @right_window.visible = false @right_window.index = 0 # ÇïÇÁ À©µµ¿ì ij¸¯ÅÍ ¶óÀÎÀ» ¼Ò°Å @help_window.set_text("") when 1 # °áÁ¤ SE À» ¿¬ÁÖ $game_system.se_play($data_system.decision_se) # ¶óÀÌÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @right_command_window.dispose @right_command_window = nil @right_window.active = true end return end end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (ÆÑÅÍ Ä¿¸àµå À©µµ¿ì°¡ ¾×ƼºêÀÇ °æ¿ì) #-------------------------------------------------------------------------- def update_factor_command @factor_command_window.update # B ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::B) # ĵ½½ SE À» ¿¬ÁÖ $game_system.se_play($data_system.cancel_se) # ÆÑÅÍ À©µµ¿ì·Î ÀüȯÇÏ°í @factor_command_window.dispose @factor_command_window = nil @factor_window.active = true return end # C ¹öÆ°ÀÌ ¹Ð·ÈÀ» °æ¿ì if Input.trigger?(Input::C) case @factor_command_window.index when 0 # Àåºñ SE ¸¦ ¿¬ÁÖ $game_system.se_play($data_system.equip_se) # ¹«±â¸¦ °³Á¶ $game_party.alter_weapons[@left_window.index].add_factor(@factor_window.factor) # À©µµ¿ì¸¦ ¸®ÇÁ·¹½¬ @left_window.refresh @status_window.refresh(@left_window.weapon) # ·¹ÇÁÆ® À©µµ¿ì·Î ÀüȯÇÏ°í @factor_command_window.dispose @factor_command_window = nil @left_window.active = true @factor_window.active = false @factor_window.visible = false @factor_window.index = 0 # ÇïÇÁ À©µµ¿ì ij¸¯ÅÍ ¶óÀÎÀ» ¼Ò°Å @help_window.set_text("") when 1 # °áÁ¤ SE À» ¿¬ÁÖ $game_system.se_play($data_system.decision_se) # ÆÑÅÍ À©µµ¿ì·Î ÀüȯÇÏ°í @factor_command_window.dispose @factor_command_window = nil @factor_window.active = true end return end end end