赞 | 8 |
VIP | 0 |
好人卡 | 2 |
积分 | 75 |
经验 | 16755 |
最后登录 | 2024-11-21 |
在线时间 | 1111 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7493
- 在线时间
- 1111 小时
- 注册时间
- 2006-7-18
- 帖子
- 578
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
找了一下,发现站里似乎没有,就发个上来,日文不多,所以对着翻译工具一会儿就翻译完了!
原地址:http://www4.plala.or.jp/findias/ ... ce_rgss3/index.html
- #==============================================================================
- # ■ VXAce-RGSS-44 调试++ [Ver.1.1.0] by Claimh 汉化:雷影
- #------------------------------------------------------------------------------
- =begin
- 调试画面的机能扩张
- [追加機能]
- ・自助开关的操作(現在地图上的全部活动)
- ・道具/武器/防具所持数变更
- ・队伍変更
- ・角色编辑
- - 状态编辑
- - 技能的习得,遗忘
- ・地图移動(移動地点可指定)
- ・音乐播放(BGM/BGS/ME/SE)
- ・其它情報操作
- - 所持金、存档回数、战斗次数の変更
- - 存档禁止、菜单禁止、遇敌禁止、排序禁止の操作
- - 天候の操作
- - 解像度の変更
- [和其它他脚本联动的机能]
- ・熟练度系统
- - 熟练度等级変更、得意属性・不得意属性の操作
- ・用語辞典
- - 全初期化、表示設定変更
- ・世界地图
- - 全初期化、表示設定変更
- ・任务系统
- - 全初期化、任务状態変更、任务Rank変更
- ・精霊系统
- - 精霊の加入状態の変更、精霊の状态編集
- =end
- #==============================================================================
- module DebugPP
- # 項目有効/無効
- SPEC = {
- "开关" => true,
- "変数" => true,
- "独立开关" => true,
- "道具" => true,
- "武器" => true,
- "防具" => true,
- "队伍" => true,
- "状态" => true,
- "技能" => true,
- "MAP移動" => true,
- "音乐" => true,
- "系统" => true,
- "熟练度" => true, # 「熟练度系统」未導入時は無効化される
- "用語辞典" => true, # 「用語辞典」未導入時は無効化される
- "WorldMap" => true, # 「世界地图」未導入時は無効化される
- "任务" => true, # 「任务系统」未導入時は無効化される
- "精霊" => true, # 「精霊系统」未導入時は無効化される
- }
- # MAP移動時の位置(設定無し時は中央)
- MAP = {
- # 地图ID => [x座標, y座標]
- 1 => [5, 5],
- 3 => [10, 5]
- }
- # 音乐でRTPも含む
- RTP_MUSIC = true
- end
- module DebugPP
- # DebugPP.spec(n)
- def self.spec(n)
- return false if SPEC[n].nil?
- SPEC[n]
- end
- end
- class Game_System
- #--------------------------------------------------------------------------
- # ● 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_writer :save_count # 存档回数
- end
- #==============================================================================
- # ■ Window_DebugCommand
- #==============================================================================
- class Window_DebugCommand < Window_Command
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(height)
- @window_height = height
- super(0, 0)
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウ高さの取得
- #--------------------------------------------------------------------------
- def window_height
- h = super
- h > @window_height ? @window_height : h
- end
- #--------------------------------------------------------------------------
- # ● 表示行数の取得
- #--------------------------------------------------------------------------
- def visible_line_number
- n = (@window_height - standard_padding * 2) / item_height
- n > item_max ? item_max : n
- end
- #--------------------------------------------------------------------------
- # ● コマンドリストの作成
- #--------------------------------------------------------------------------
- def make_command_list
- add_main_commands
- add_original_commands
- add_command("系统", :ok, true, system_text) if DebugPP.spec("系统")
- end
- #--------------------------------------------------------------------------
- # ● 主要コマンドをリストに追加
- # ハンドラは全て:okで登録する
- #--------------------------------------------------------------------------
- def add_main_commands
- add_command("开关", :ok, true, switch_text) if DebugPP.spec("开关")
- add_command("変数", :ok, true, variable_text) if DebugPP.spec("変数")
- add_command("独立开关", :ok, true, self_sw_text) if DebugPP.spec("独立开关")
- add_command(Vocab::item, :ok, true, item_text) if DebugPP.spec("道具")
- add_command(Vocab::weapon, :ok, true, weapon_text) if DebugPP.spec("武器")
- add_command(Vocab::armor, :ok, true, armor_text) if DebugPP.spec("防具")
- add_command("队伍", :ok, true, party_text) if DebugPP.spec("队伍")
- add_command(Vocab::status, :ok, true, actor_text) if DebugPP.spec("状态")
- add_command(Vocab::skill, :ok, true, skill_text) if DebugPP.spec("技能")
- add_command("MAP移動", :ok, true, map_text) if DebugPP.spec("MAP移動")
- add_command("音乐", :ok, true, music_text) if DebugPP.spec("音乐")
- end
- #--------------------------------------------------------------------------
- # ● 独自コマンドの追加用
- #--------------------------------------------------------------------------
- def add_original_commands
- add_command("熟练度", :ok, true, expert_text) if defined?(SysUpdate) and DebugPP.spec("熟练度")
- add_command("用語辞典", :ok, true, dictionary_text) if defined?(Dictionary) and DebugPP.spec("用語辞典")
- add_command("World Map", :ok, true, world_map_text) if defined?(WorldMap) and DebugPP.spec("WorldMap")
- add_command("任务", :ok, true, quest_text) if defined?(Quest) and DebugPP.spec("任务")
- add_command("精霊", :ok, true, spirit_text) if defined?(Spirits) and DebugPP.spec("精霊")
- end
- #--------------------------------------------------------------------------
- # ● 説明文
- #--------------------------------------------------------------------------
- def switch_text
- ["开关的状态变更", "C (Enter) : ON / OFF"]
- end
- def variable_text
- ["变量值变更", "↑ : +1 / ↓ : +1 / ← → 移動"]
- end
- def self_sw_text
- ["独立开关的状态变更", "C (Enter) : ON / OFF"]
- end
- def item_text
- ["道具所持数変更", "↑ : +1 / ↓ : +1 / ← → 移動"]
- end
- def weapon_text
- ["武器所持数变更。", "↑ : +1 / ↓ : +1 / ← → 移動"]
- end
- def armor_text
- ["防具所持数变更。", "↑ : +1 / ↓ : +1 / ← → 移動"]
- end
- def party_text
- ["加入成员变更。", "C (Enter) : 加入 / 脱离"]
- end
- def actor_text
- ["角色的状态变更。", "↑ : +1 / ↓ : +1 / ← → 移動"]
- end
- def skill_text
- ["角色的習得技能变更。", "C (Enter) : 習得 / 忘却"]
- end
- def map_text
- ["进行地图移動。", "C (Enter) : 移動"]
- end
- def music_text
- ["音楽变更。", "Z (Enter)--播放 / S--停止 / X--返回"]
- end
- def system_text
- ["其它、各种各样的变更。", "Z (Enter) : 変更"]
- end
- #--------------------------------------------------------------------------
- # ● 説明文(拡張)
- #--------------------------------------------------------------------------
- def expert_text
- ["角色熟练度变更。", "↑ : +1 / ↓ : +1 / ← → 移動 / X : 喜好変更"]
- end
- def dictionary_text
- ["用語表示状態变更。", "C (Enter) : ON / OFF"]
- end
- def world_map_text
- ["場所表示状態变更。", "X : Region / C (Enter) : Town --> ON / OFF"]
- end
- def quest_text
- ["任务状態变更。", "C (Enter) : 変更"]
- end
- def spirit_text
- ["精霊加入状態变更。", "C (Enter) : 加入 / 脱退"]
- end
- #--------------------------------------------------------------------------
- # ● ヘルプウィンドウの更新
- #--------------------------------------------------------------------------
- def update_help
- call_handler(:update)
- ext = current_ext
- text = ext.nil? ? "" : (ext[0] + "\n" + ext[1])
- @help_window.set_text(text)
- end
- end
- #==============================================================================
- # ■ Window_DebugInputNum
- #==============================================================================
- class Window_DebugInputNum < Window_HorzCommand
- #--------------------------------------------------------------------------
- # ● 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_reader :item_window
- attr_accessor :max
- attr_accessor :min
- attr_accessor :sign
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect, num=0)
- @num_max = 8
- @num = []
- [url=home.php?mod=space&uid=25307]@Max[/url] = 99999999
- @sign = false
- @pm_sign = true
- [url=home.php?mod=space&uid=25749]@min[/url] = 0
- super(rect.x, rect.y)
- area(rect)
- self.num = num
- deactivate.hide
- end
- #--------------------------------------------------------------------------
- # ● エリア変更
- #--------------------------------------------------------------------------
- def area(rect)
- @area = rect
- self.x = @area.x + (@area.width - window_width ) / 2
- self.y = @area.y + (@area.height - window_height) / 2
- self
- end
- #--------------------------------------------------------------------------
- # ● 項目数変更(Windowサイズ更新)
- #--------------------------------------------------------------------------
- def num_max=(n)
- return if n == @num_max or n == 0
- @num_max = n
- self.x = @area.x + (@area.width - window_width ) / 2
- self.width = window_width
- create_contents
- clac_maxmin
- self.num = 0
- unselect
- end
- #--------------------------------------------------------------------------
- # ● 数字更新
- #--------------------------------------------------------------------------
- def num=(n)
- @num.clear
- @pm_sign = (n >= 0) if @sign
- n = n.abs
- @num_max.times do |i|
- @num[@num_max-1-i] = n % 10
- n = (n / 10).truncate
- end
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 最大値計算
- #--------------------------------------------------------------------------
- def clac_maxmin
- @max = @min = 0
- @num_max.times {|i| @max += 9 * exp(i)}
- end
- #--------------------------------------------------------------------------
- # ● 10のべき乗計算
- #--------------------------------------------------------------------------
- def exp(n)
- r = 1
- n.times {|i| r *= 10}
- r
- end
- #--------------------------------------------------------------------------
- # ● 数字
- #--------------------------------------------------------------------------
- def num
- r = 0
- @num_max.times {|i| r += @num[@num_max-1-i] * exp(i)}
- r *= -1 if @sign and !@pm_sign
- r
- end
- #--------------------------------------------------------------------------
- # ● 項目の幅を取得
- #--------------------------------------------------------------------------
- def item_width
- 15
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウ幅の取得
- #--------------------------------------------------------------------------
- def window_width
- (item_width + spacing) * col_max + standard_padding * 2
- end
- #--------------------------------------------------------------------------
- # ● ?数の取得
- #--------------------------------------------------------------------------
- def col_max
- @sign ? (@num_max + 1) : @num_max
- end
- #--------------------------------------------------------------------------
- # ● 符号除くindex
- #--------------------------------------------------------------------------
- def s_index(index = @index)
- @sign ? (index-1) : index
- end
- #--------------------------------------------------------------------------
- # ● 横に項目が並ぶときの空白の幅を取得
- #--------------------------------------------------------------------------
- def spacing
- 2
- end
- #--------------------------------------------------------------------------
- # ● 終端選択
- #--------------------------------------------------------------------------
- def select_last
- select(col_max - 1)
- self
- end
- #--------------------------------------------------------------------------
- # ● カーソルを下に移動
- #--------------------------------------------------------------------------
- def cursor_down(wrap = false)
- if @sign and @index == 0
- @pm_sign = !@pm_sign
- else
- @num[s_index] = (@num[s_index] + 10 - 1) % 10
- end
- redraw_current_item
- Sound.play_cursor
- end
- #--------------------------------------------------------------------------
- # ● カーソルを上に移動
- #--------------------------------------------------------------------------
- def cursor_up(wrap = false)
- if @sign and @index == 0
- @pm_sign = !@pm_sign
- else
- @num[s_index] = (@num[s_index] + 1) % 10
- end
- redraw_current_item
- Sound.play_cursor
- end
- #--------------------------------------------------------------------------
- # ● コマンドリストの作成
- #--------------------------------------------------------------------------
- def make_command_list
- add_command(0, :sign) if @sign
- @num_max.times {|i| add_command(0, :num)}
- end
- #--------------------------------------------------------------------------
- # ● 選択項目の有効状態を取得
- #--------------------------------------------------------------------------
- def current_item_enabled?
- n = self.num
- n >= @min and n <= @max
- end
- #--------------------------------------------------------------------------
- # ● 背景色 1 の取得
- #--------------------------------------------------------------------------
- def back_color
- Color.new(0, 0, 0, 64)
- end
- #--------------------------------------------------------------------------
- # ● 背景の描画
- #--------------------------------------------------------------------------
- def draw_back(rect)
- contents.fill_rect(rect, back_color)
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- rect = item_rect(index)
- draw_back(rect)
- change_color(normal_color, command_enabled?(index))
- if @sign and index == 0
- draw_text(rect, (@pm_sign ? " " : "-"), 2)
- else
- draw_text(rect, @num[s_index(index)], 2)
- end
- end
- #--------------------------------------------------------------------------
- # ● 道具ウィンドウの設定
- #--------------------------------------------------------------------------
- def item_window=(item_window)
- @item_window = item_window
- n = item_window.nil? ? 0 : item_window.num_max
- s = item_window.nil? ? false : item_window.sign
- if @sign != s
- @num_max = 0
- @sign = s
- end
- self.num_max = n
- update
- end
- end
- #==============================================================================
- # ■ Window_DebugBase
- #==============================================================================
- class Window_DebugBase < Window_Selectable
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @max_n = max_n
- super(rect.x, rect.y, rect.width, rect.height)
- refresh
- deactivate.hide
- end
- #--------------------------------------------------------------------------
- # ● 決定やキャンセルなどのハンドリング処理
- #--------------------------------------------------------------------------
- def process_handling
- return unless open? && active
- return process_ok if ok_enabled? && Input.trigger?(:C)
- return process_cancel if cancel_enabled? && Input.trigger?(:B)
- return process_pagedown if handle?(:pagedown) && Input.trigger?(:R)
- return process_pageup if handle?(:pageup) && Input.trigger?(:L)
- return process_a if handle?(:a) && Input.trigger?(:A)
- return process_x if handle?(:x) && Input.trigger?(:X)
- end
- def process_a
- Sound.play_ok
- call_handler(:a)
- end
- def process_x
- Sound.play_ok
- call_handler(:x)
- end
- #--------------------------------------------------------------------------
- # ● 光标往右移動(前进10格)
- #--------------------------------------------------------------------------
- def cursor_right(wrap = false)
- if col_max >= 2 && (index < item_max - 1 || (wrap && horizontal?))
- select((index + 1) % item_max)
- elsif col_max == 1 && index >= 0
- if (index + 10) > (item_max - 1)
- select(item_max - 1)
- else
- select((index + 10) % item_max)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 光标往左移動(后退10格)
- #--------------------------------------------------------------------------
- def cursor_left(wrap = false)
- if col_max >= 2 && (index > 0 || (wrap && horizontal?))
- select((index - 1 + item_max) % item_max)
- elsif col_max == 1 && index >= 0
- if (index - 10) < 0
- select(0)
- else
- select((index - 10 + item_max) % item_max)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- 0
- end
- #--------------------------------------------------------------------------
- # ● 選択項目の有効状態を取得
- #--------------------------------------------------------------------------
- def current_item_enabled?
- !citem.nil?
- end
- #--------------------------------------------------------------------------
- # ● IDの取得
- #--------------------------------------------------------------------------
- def id(i)
- i + 1
- end
- def cid; id(@index); end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- nil
- end
- def citem; item(@index); end
- #--------------------------------------------------------------------------
- # ● 道具名の取得
- #--------------------------------------------------------------------------
- def name(i)
- ""
- end
- def cname; name(@index); end
- #--------------------------------------------------------------------------
- # ● 道具状態の取得
- #--------------------------------------------------------------------------
- def status(i)
- item(i)
- end
- def cstatus; status(@index); end
- #--------------------------------------------------------------------------
- # ● 状态テキスト
- #--------------------------------------------------------------------------
- def status_text(i)
- status(i) ? "[ON]" : "[OFF]"
- end
- #--------------------------------------------------------------------------
- # ● 名前の描画
- #--------------------------------------------------------------------------
- def draw_index_name(rect, index)
- draw_text(rect, name(index))
- end
- #--------------------------------------------------------------------------
- # ● 状态の描画
- #--------------------------------------------------------------------------
- def draw_index_status(rect, index)
- draw_text(rect, status_text(index), 2)
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画 id : name
- #--------------------------------------------------------------------------
- def draw_item_id_name(index)
- id_text = sprintf("%04d:", id(index))
- id_width = text_size(id_text).width
- rect = item_rect_for_text(index)
-
- change_color(normal_color)
- draw_text(rect, id_text)
-
- rect.x += id_width
- rect.width -= id_width + 60
- draw_index_name(rect, index)
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画 id : name [ON/OFF]
- #--------------------------------------------------------------------------
- def draw_item_id_name_sw(index)
- id_text = sprintf("%04d:", id(index))
- id_width = text_size(id_text).width
- rect = item_rect_for_text(index)
-
- change_color(normal_color)
- draw_text(rect, id_text)
-
- rect.x += id_width
- rect.width -= id_width + 60
- draw_index_name(rect, index)
-
- rect.width += 60
- draw_index_status(rect, index)
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画 id : name num
- #--------------------------------------------------------------------------
- def draw_item_id_name_num(index)
- id_text = sprintf("%04d:", id(index))
- id_width = text_size(id_text).width
- rect = item_rect_for_text(index)
-
- change_color(normal_color)
- draw_text(rect, id_text)
-
- rect.x += id_width
- rect.width -= id_width + 60
- draw_index_name(rect, index)
-
- rect.width += 60
- draw_text(rect, number(index), 2)
- end
- #--------------------------------------------------------------------------
- # ● 数値の最大?数取得
- #--------------------------------------------------------------------------
- def num_max
- 8
- end
- def max_n
- num_max
- end
- #--------------------------------------------------------------------------
- # ● 数値の符号
- #--------------------------------------------------------------------------
- def sign
- false
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change(n=0)
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理
- #--------------------------------------------------------------------------
- def ok
- change
- redraw_current_item
- end
- #--------------------------------------------------------------------------
- # ● 数値の取得/設定
- #--------------------------------------------------------------------------
- def number(i=@index)
- item(i)
- end
- def number=(n)
- change(n)
- redraw_current_item
- end
- end
- #==============================================================================
- # ■ Window_DebugBaseCommand
- #==============================================================================
- class Window_DebugBaseCommand < Window_Command
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @area = rect
- super(rect.x, rect.y)
- refresh
- deactivate.hide.unselect
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウ幅の取得
- #--------------------------------------------------------------------------
- def window_width
- @area.width
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウ高さの取得
- #--------------------------------------------------------------------------
- def window_height
- @area.height
- end
- #--------------------------------------------------------------------------
- # ● 決定やキャンセルなどのハンドリング処理
- #--------------------------------------------------------------------------
- def process_handling
- return unless open? && active
- return process_ok if ok_enabled? && Input.trigger?(:C)
- return process_cancel if cancel_enabled? && Input.trigger?(:B)
- return process_pagedown if handle?(:pagedown) && Input.trigger?(:R)
- return process_pageup if handle?(:pageup) && Input.trigger?(:L)
- return process_a if handle?(:a) && Input.trigger?(:A)
- return process_x if handle?(:x) && Input.trigger?(:X)
- end
- def process_a
- Sound.play_ok
- call_handler(:a)
- end
- def process_x
- Sound.play_ok
- call_handler(:x)
- end
- #--------------------------------------------------------------------------
- # ● カーソルを右に移動
- #--------------------------------------------------------------------------
- def cursor_right(wrap = false)
- if col_max >= 2 && (index < item_max - 1 || (wrap && horizontal?))
- select((index + 1) % item_max)
- elsif col_max == 1 && index >= 0
- if (index + 100) > (item_max - 1)
- select(item_max - 1)
- else
- select((index + 100) % item_max)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● カーソルを左に移動
- #--------------------------------------------------------------------------
- def cursor_left(wrap = false)
- if col_max >= 2 && (index > 0 || (wrap && horizontal?))
- select((index - 1 + item_max) % item_max)
- elsif col_max == 1 && index >= 0
- if (index - 100) < 0
- select(0)
- else
- select((index - 100 + item_max) % item_max)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 数値の最大?数取得
- #--------------------------------------------------------------------------
- def num_max
- 0
- end
- #--------------------------------------------------------------------------
- # ● 数値の符号
- #--------------------------------------------------------------------------
- def sign
- false
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理
- #--------------------------------------------------------------------------
- def ok
- change
- redraw_current_item
- end
- end
- #==============================================================================
- # ■ Window_DebugBaseHorzCommand
- #==============================================================================
- class Window_DebugBaseHorzCommand < Window_HorzCommand
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @window_width = rect.width
- super(rect.x, rect.y)
- refresh
- deactivate.hide.unselect
- end
- #--------------------------------------------------------------------------
- # ● ?数の取得
- #--------------------------------------------------------------------------
- def col_max
- item_max
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウ幅の取得
- #--------------------------------------------------------------------------
- def window_width
- @window_width
- end
- #--------------------------------------------------------------------------
- # ● 数値の最大?数取得
- #--------------------------------------------------------------------------
- def num_max
- 0
- end
- #--------------------------------------------------------------------------
- # ● 数値の符号
- #--------------------------------------------------------------------------
- def sign
- false
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理
- #--------------------------------------------------------------------------
- def ok
- change
- redraw_current_item
- end
- end
- #==============================================================================
- # ■ Window_DebugSwitch
- #==============================================================================
- class Window_DebugSwitch < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- $data_system.switches.size-1
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $game_switches[id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 道具名の取得
- #--------------------------------------------------------------------------
- def name(i)
- $data_system.switches[id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name_sw(index)
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change
- $game_switches[cid] = !$game_switches[cid]
- end
- end
- #==============================================================================
- # ■ Window_DebugVariable
- #==============================================================================
- class Window_DebugVariable < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- $data_system.variables.size-1
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $game_variables[id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 道具名の取得
- #--------------------------------------------------------------------------
- def name(i)
- $data_system.variables[id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name_num(index)
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change(n)
- $game_variables[cid] = n
- end
- #--------------------------------------------------------------------------
- # ● 数値のmaxmin値取得
- #--------------------------------------------------------------------------
- def min
- -99999999
- end
- def max
- 99999999
- end
- #--------------------------------------------------------------------------
- # ● 数値の符号
- #--------------------------------------------------------------------------
- def sign
- min < 0
- end
- #--------------------------------------------------------------------------
- # ● 数値の符号
- #--------------------------------------------------------------------------
- def sign
- true
- end
- end
- #==============================================================================
- # ■ Window_DebugMapSelfSw
- #==============================================================================
- class Window_DebugMapSelfSw < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect, map_id=$game_map.map_id)
- @map_id = map_id
- @map = load_data(sprintf("Data/Map%03d.rvdata2", @map_id))
- super(rect)
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- @map.events.size
- end
- #--------------------------------------------------------------------------
- # ● 活动ID
- #--------------------------------------------------------------------------
- def id(i)
- @map.events.keys[i]
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- @map.events[id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def name(i)
- @map.events[id(i)].name
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name(index)
- end
- #--------------------------------------------------------------------------
- # ● ヘルプウィンドウの更新
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_event(@map_id, cid)
- end
- end
- #==============================================================================
- # ■ Window_DebugSelfSwitch
- #==============================================================================
- class Window_DebugSelfSwitch < Window_DebugBaseHorzCommand
- KEY = ["A", "B", "C", "D"]
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect, map_id=$game_map.map_id, ev_id=1)
- @map_id = map_id
- @ev_id = ev_id
- super(rect)
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- KEY.size
- end
- #--------------------------------------------------------------------------
- # ● ハッシュキー
- #--------------------------------------------------------------------------
- def key(i)
- [@map_id, @ev_id, KEY[i]]
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $game_self_switches[key(i)]
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change
- k = key(@index)
- $game_self_switches[k] = !$game_self_switches[k]
- end
- #--------------------------------------------------------------------------
- # ● 道具名の取得
- #--------------------------------------------------------------------------
- def name(i)
- KEY[i]
- end
- #--------------------------------------------------------------------------
- # ● コマンド名の取得
- #--------------------------------------------------------------------------
- def command_name(index)
- @list[index][:name] + (item(index) ? "[ON]" : "[OFF]")
- end
- #--------------------------------------------------------------------------
- # ● コマンドの有効状態を取得
- #--------------------------------------------------------------------------
- def command_enabled?(index)
- item(index)
- end
- #--------------------------------------------------------------------------
- # ● コマンドリストの作成
- #--------------------------------------------------------------------------
- def make_command_list
- item_max.times {|i| add_command(name(i), :ok) }
- end
- #--------------------------------------------------------------------------
- # ● 活动の設定
- #--------------------------------------------------------------------------
- def set_event(map_id, ev_id)
- @map_id = map_id
- @ev_id = ev_id
- refresh
- end
- end
- #==============================================================================
- # ■ Window_DebugItem
- #==============================================================================
- class Window_DebugItem < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- $data_items.size-1
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $data_items[id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change(n)
- d = citem
- n -= $game_party.item_number(d)
- $game_party.gain_item(d, n)
- end
- #--------------------------------------------------------------------------
- # ● 名前の描画
- #--------------------------------------------------------------------------
- def draw_index_name(rect, index)
- draw_item_name(item(index), rect.x, rect.y)
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name(index)
- draw_item_number(item_rect_for_text(index), item(index))
- end
- #--------------------------------------------------------------------------
- # ● 道具個数を描画
- #--------------------------------------------------------------------------
- def draw_item_number(rect, item)
- draw_text(rect, sprintf(":%#{@max_n}d", $game_party.item_number(item)), 2)
- end
- #--------------------------------------------------------------------------
- # ● 数値の最大?数取得
- #--------------------------------------------------------------------------
- def num_max
- Math.log10(max).to_i + 1
- end
- #--------------------------------------------------------------------------
- # ● 数値のmaxmin値取得
- #--------------------------------------------------------------------------
- def min
- 0
- end
- def max
- $game_party.max_item_number(citem)
- end
- def max_n
- m = []
- 0..item_max.times {|i| m.push(Math.log10($game_party.max_item_number(item(i))).to_i + 1)}
- m.max
- end
- #--------------------------------------------------------------------------
- # ● 数値の取得/設定
- #--------------------------------------------------------------------------
- def number
- $game_party.item_number(citem)
- end
- def number=(n)
- change(n)
- redraw_current_item
- end
- end
- #==============================================================================
- # ■ Window_DebugWeapon
- #==============================================================================
- class Window_DebugWeapon < Window_DebugItem
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- $data_weapons.size-1
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $data_weapons[id(i)]
- end
- end
- #==============================================================================
- # ■ Window_DebugArmor
- #==============================================================================
- class Window_DebugArmor < Window_DebugItem
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- $data_armors.size-1
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $data_armors[id(i)]
- end
- end
- #==============================================================================
- # ■ Window_DebugParty
- #==============================================================================
- class Window_DebugParty < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● 歩行グラフィックの描画
- #--------------------------------------------------------------------------
- def draw_line_character(character_name, character_index, x, y, enabled=true)
- return unless character_name
- bitmap = Cache.character(character_name)
- sign = character_name[/^[\!\$]./]
- if sign && sign.include?(')
- cw = bitmap.width / 3
- ch = bitmap.height / 4
- else
- cw = bitmap.width / 12
- ch = bitmap.height / 8
- end
- y += (line_height - ch) / 2 if ch < line_height
- n = character_index
- src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, [ch, line_height].min)
- contents.blt(x, y, bitmap, src_rect, enabled ? 255 : translucent_alpha)
- cw
- end
- #--------------------------------------------------------------------------
- # ● 角色の歩行グラフィック描画
- #--------------------------------------------------------------------------
- def draw_actor_line_graphic(actor, x, y, enabled=true)
- draw_line_character(actor.character_name, actor.character_index, x, y, enabled)
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得<精霊系统あり用>
- #--------------------------------------------------------------------------
- def item_max_actors
- $data_actors.inject(0) {|r, a| r + (a.nil? ? 0 : (Spirits.spirit?(a.id) ? 0 : 1)) }
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- return item_max_actors if defined?(Spirits)
- $data_actors.size - 1
- end
- #--------------------------------------------------------------------------
- # ● 角色IDの取得<精霊系统あり用>
- #--------------------------------------------------------------------------
- def aid(i)
- $data_actors.select {|a| !a.nil? and !Spirits.spirit?(a.id)}[i].id
- end
- #--------------------------------------------------------------------------
- # ● 角色IDの取得
- #--------------------------------------------------------------------------
- def id(i)
- return aid(i) if defined?(Spirits)
- i + 1
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $game_actors[id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change
- if status(@index)
- $game_party.remove_actor(cid)
- else
- $game_party.add_actor(cid)
- end
- end
- #--------------------------------------------------------------------------
- # ● 道具状態の取得
- #--------------------------------------------------------------------------
- def status(i)
- $game_party.members.include?(item(i))
- end
- def cstate; status(@index); end
- #--------------------------------------------------------------------------
- # ● 状态テキスト
- #--------------------------------------------------------------------------
- def status_text(index)
- status(index) ? "[加入]" : "[未加入]"
- end
- #--------------------------------------------------------------------------
- # ● 名前の描画
- #--------------------------------------------------------------------------
- def draw_index_name(rect, index)
- draw_actor_line_graphic(item(index), rect.x, rect.y)
- draw_actor_name(item(index), rect.x + 34, rect.y, rect.width)
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name_sw(index)
- end
- end
- #==============================================================================
- # ■ Window_DebugActor
- #==============================================================================
- class Window_DebugActor < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- r = rect.dup
- r.width = 160
- super(r)
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- $data_actors.size - 1
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $game_actors[i+1]
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- actor = item(index)
- rect = item_rect_for_text(index)
- if defined?(Spirits) and actor.spirit?
- draw_spirit_name(actor, rect.x, rect.y, rect.width)
- else
- draw_actor_name(actor, rect.x, rect.y, rect.width)
- end
- end
- #--------------------------------------------------------------------------
- # ● ヘルプウィンドウの更新
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_actor(citem) unless @index < 0
- end
- end
- #==============================================================================
- # ■ Window_DebugActorStatus
- #==============================================================================
- class Window_DebugActorStatus < Window_DebugBaseCommand
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @actor = $game_actors[1]
- super(rect)
- end
- #--------------------------------------------------------------------------
- # ● 角色設定
- #--------------------------------------------------------------------------
- def set_actor(actor)
- return if @actor == actor
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # ● コマンドリストの作成
- #--------------------------------------------------------------------------
- def make_command_list
- add_command(Vocab::level, :ok, true, 2) # 等级
- add_command(Vocab::param(0), :ok, true, 4) # 最大HP
- add_command(Vocab::param(1), :ok, true, 4) # 最大MP
- add_command(Vocab::param(2), :ok, true, 3) # 攻撃力
- add_command(Vocab::param(3), :ok, true, 3) # 防御力
- add_command(Vocab::param(4), :ok, true, 3) # 魔法力
- add_command(Vocab::param(5), :ok, true, 3) # 魔法防御
- add_command(Vocab::param(6), :ok, true, 3) # 敏捷性
- add_command(Vocab::param(7), :ok, true, 3) # 運
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- super
- draw_text(item_rect_for_text(index), status_val(index), 2)
- end
- def status_val(index)
- return 0 if @actor.nil?
- case index
- when 0; return @actor.level
- else; return @actor.param(index-1)
- end
- end
- #--------------------------------------------------------------------------
- # ● 数値の最大?数取得
- #--------------------------------------------------------------------------
- def num_max
- current_ext
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change(n=0)
- case index
- when 0; @actor.change_level(n, false)
- else; @actor.add_param(index-1, n - status_val(index))
- end
- end
- #--------------------------------------------------------------------------
- # ● 数値の取得/設定
- #--------------------------------------------------------------------------
- def number
- status_val(@index)
- end
- def number=(n)
- change(n)
- if @index == 0
- contents.clear
- draw_all_items
- else
- redraw_current_item
- end
- end
- end
- #==============================================================================
- # ■ Window_DebugActorSkill
- #==============================================================================
- class Window_DebugActorSkill < Window_DebugActorStatus
- #--------------------------------------------------------------------------
- # ● 角色設定
- #--------------------------------------------------------------------------
- def set_actor(actor)
- return if @actor == actor
- @actor = actor
- refresh_enabled
- end
- #--------------------------------------------------------------------------
- # ● 半透明描画用のアルファ値を取得
- #--------------------------------------------------------------------------
- def translucent_alpha
- return 80
- end
- #--------------------------------------------------------------------------
- # ● 許可状態だけ変更
- #--------------------------------------------------------------------------
- def refresh_enabled
- item_max.times do |i|
- next if @actor.nil?
- enabled = @actor.skill_learn?(item(i))
- if @list[i][:enabled] != enabled
- @list[i][:enabled] = enabled
- redraw_item(i)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 選択項目の有効状態を取得
- #--------------------------------------------------------------------------
- def current_item_enabled?
- !citem.nil?
- end
- #--------------------------------------------------------------------------
- # ● 道具取得
- #--------------------------------------------------------------------------
- def item(i)
- $data_skills[i+1]
- end
- def citem; item(@index); end
- #--------------------------------------------------------------------------
- # ● コマンドリストの作成
- #--------------------------------------------------------------------------
- def make_command_list
- n = ($data_skills.size - 1)
- n.times {|i| add_command(item(i).id, :ok, @actor.skill_learn?(item(i)))}
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- enabled = command_enabled?(index)
- change_color(normal_color, enabled)
- rect = item_rect_for_text(index)
- draw_item_name(item(index), rect.x, rect.y, enabled, rect.width-24)
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change
- if command_enabled?(@index)
- @actor.forget_skill(citem.id)
- else
- @actor.learn_skill(citem.id)
- end
- @list[@index][:enabled] = @actor.skill_learn?(citem)
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理
- #--------------------------------------------------------------------------
- def ok
- change
- redraw_current_item
- end
- end
- #==============================================================================
- # ■ Window_DebugMap
- #==============================================================================
- class Window_DebugMap < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @map = $data_mapinfos.sort {|a,b| a[1].order - b[1].order}
- super(rect)
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- @map.size
- end
- #--------------------------------------------------------------------------
- # ● 地图IDの取得
- #--------------------------------------------------------------------------
- def id(i)
- @map[i][0]
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- @map[i][1]
- end
- #--------------------------------------------------------------------------
- # ● 道具名の取得
- #--------------------------------------------------------------------------
- def name(i)
- item(i).name
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name(index)
- end
- #--------------------------------------------------------------------------
- # ● 決定ハンドラの呼び出し
- #--------------------------------------------------------------------------
- def call_ok_handler
- ok
- super
- end
- #--------------------------------------------------------------------------
- # ● 移動位置
- #--------------------------------------------------------------------------
- def move_point(i)
- pos = DebugPP::MAP[id(i)]
- return pos unless pos.nil?
- data = load_data(sprintf("Data/Map%03d.rvdata2", id(i)))
- [(data.width / 2).truncate, (data.height / 2).truncate]
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理
- #--------------------------------------------------------------------------
- def ok
- pos = move_point(@index)
- $game_player.reserve_transfer(cid, pos[0], pos[1], $game_player.direction)
- $game_temp.fade_type = 1 # 白
- end
- end
- #==============================================================================
- # ■ Window_DebugMusicCtg
- #==============================================================================
- class Window_DebugMusicCtg < Window_DebugBaseHorzCommand
- #--------------------------------------------------------------------------
- # ● コマンドリストの作成
- #--------------------------------------------------------------------------
- def make_command_list
- ["BGM", "BGS", "ME", "SE"].each {|n| add_command(n, :ok) }
- end
- #--------------------------------------------------------------------------
- # ● ヘルプウィンドウの更新
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_ctg(@index)
- end
- end
- #==============================================================================
- # ■ Window_DebugMusic
- #==============================================================================
- class Window_DebugMusic < Window_DebugBase
- BGM=0;BGS=1;ME=2;SE=3
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @ctg = BGM
- data_refresh
- super(rect)
- end
- #--------------------------------------------------------------------------
- # ● データ初期化
- #--------------------------------------------------------------------------
- def data_refresh
- @list = []
- 4.times do |i|
- @list[i] = rtp_audio(i) + audio_grep(i)
- end
- end
- #--------------------------------------------------------------------------
- # ● データ初期化
- #--------------------------------------------------------------------------
- def set_ctg(ctg)
- return if @ctg == ctg
- @ctg = ctg
- create_contents
- draw_all_items
- self.top_row = 0
- unselect
- end
- #--------------------------------------------------------------------------
- # ● RTP-Audio
- #--------------------------------------------------------------------------
- def rtp_audio(i)
- return [] unless DebugPP::RTP_MUSIC
- case i
- when BGM
- return ["Airship.ogg","Battle1.ogg","Battle2.ogg","Battle3.ogg",
- "Battle4.ogg","Battle5.ogg","Battle6.ogg","Battle7.ogg",
- "Battle8.ogg","Battle9.ogg",
- "Dungeon1.ogg","Dungeon2.ogg","Dungeon3.ogg","Dungeon4.ogg",
- "Dungeon5.ogg","Dungeon6.ogg","Dungeon7.ogg","Dungeon8.ogg",
- "Dungeon9.ogg",
- "Field1.ogg","Field2.ogg","Field3.ogg","Field4.ogg",
- "Scene1.ogg","Scene2.ogg","Scene3.ogg","Scene4.ogg",
- "Scene5.ogg","Scene6.ogg","Ship.ogg",
- "Theme1.ogg","Theme2.ogg","Theme3.ogg","Theme4.ogg","Theme5.ogg",
- "Town1.ogg","Town2.ogg","Town3.ogg","Town4.ogg","Town5.ogg",
- "Town6.ogg","Town7.ogg"]
- when BGS
- return ["Clock.ogg","Darkness.ogg","Drips.ogg","Fire.ogg","Quake.ogg",
- "Rain.ogg","River.ogg","Sea.ogg","Storm.ogg","Wind.ogg"]
- when ME
- return ["Fanfare1.ogg","Fanfare2.ogg","Fanfare3.ogg","Gag.ogg",
- "Gameover1.ogg","Gameover2.ogg","Inn.ogg","Item.ogg","Mystery.ogg",
- "Organ.ogg","Shock.ogg","Victory1.ogg","Victory2.ogg"]
- when SE
- return ["Absorb1.ogg","Absorb2.ogg","Applause1.ogg","Applause2.ogg",
- "Attack1.ogg","Attack2.ogg","Attack3.ogg","Autodoor.ogg",
- "Barrier.ogg","Battle1.ogg","Battle2.ogg","Battle3.ogg",
- "Bell1.ogg","Bell2.ogg","Bell3.ogg","Bite.ogg","Blind.ogg",
- "Blow1.ogg","Blow2.ogg","Blow3.ogg","Blow4.ogg","Blow5.ogg",
- "Blow6.ogg","Blow7.ogg","Blow8.ogg","Book1.ogg","Book2.ogg",
- "Bow1.ogg","Bow2.ogg","Bow3.ogg","Bow4.ogg","Break.ogg",
- "Breath.ogg","Buzzer1.ogg","Buzzer2.ogg",
- "Cancel1.ogg","Cancel2.ogg","Cat.ogg","Chest.ogg",
- "Chicken.ogg","Chime1.ogg","Chime2.ogg",
- "Close1.ogg","Close2.ogg","Close3.ogg","Coin.ogg",
- "Collapse1.ogg","Collapse2.ogg","Collapse3.ogg","Collapse4.ogg",
- "Confuse.ogg","Cow.ogg","Crash.ogg","Crossbow.ogg","Crow.ogg",
- "Cry1.ogg","Cry2.ogg","Cursor1.ogg","Cursor2.ogg",
- "Damage1.ogg","Damage2.ogg","Damage3.ogg","Damage4.ogg","Damage5.ogg",
- "Darkness1.ogg","Darkness2.ogg","Darkness3.ogg","Darkness4.ogg",
- "Darkness5.ogg","Darkness6.ogg","Darkness7.ogg","Darkness8.ogg",
- "Decision1.ogg","Decision2.ogg","Decision3.ogg",
- "Devil1.ogg","Devil2.ogg","Devil3.ogg","Disappointment.ogg",
- "Dive.ogg","Dog.ogg","Down1.ogg","Down2.ogg","Down3.ogg","Down4.ogg",
- "Earth1.ogg","Earth2.ogg","Earth3.ogg","Earth4.ogg","Earth5.ogg",
- "Earth6.ogg","Earth7.ogg","Earth8.ogg", "Earth9.ogg",
- "Equip1.ogg","Equip2.ogg","Equip3.ogg","Evasion1.ogg","Evasion2.ogg",
- "Explosion1.ogg","Explosion2.ogg","Explosion3.ogg","Explosion4.ogg",
- "Explosion5.ogg","Explosion6.ogg","Explosion7.ogg","Fall.ogg",
- "Fire1.ogg","Fire2.ogg","Fire3.ogg","Fire4.ogg","Fire5.ogg",
- "Fire6.ogg","Fire7.ogg","Fire8.ogg","Fire9.ogg",
- "Flash1.ogg","Flash2.ogg","Flash3.ogg","Fog1.ogg","Fog2.ogg",
- "Frog.ogg","Gun1.ogg","Gun2.ogg",
- "Hammer.ogg","Heal1.ogg","Heal2.ogg","Heal3.ogg","Heal4.ogg",
- "Heal5.ogg","Heal6.ogg","Heal7.ogg","Horse.ogg",
- "Ice1.ogg","Ice2.ogg","Ice3.ogg","Ice4.ogg","Ice5.ogg","Ice6.ogg",
- "Ice7.ogg","Ice8.ogg","Ice9.ogg","Ice10.ogg","Ice11.ogg",
- "Item1.ogg","Item2.ogg","Item3.ogg","Jump1.ogg","Jump2.ogg",
- "Key.ogg","Knock.ogg","Laser.ogg","Load.ogg",
- "Machine.ogg","Magic1.ogg","Magic2.ogg","Magic3.ogg",
- "Magic4.ogg","Magic5.ogg","Magic6.ogg","Magic7.ogg","Miss.ogg",
- "Monster1.ogg","Monster2.ogg","Monster3.ogg","Monster4.ogg",
- "Monster5.ogg","Monster6.ogg","Monster7.ogg","Move.ogg",
- "Noise.ogg","Open1.ogg","Open2.ogg","Open3.ogg","Open4.ogg","Open5.ogg",
- "Paralyze1.ogg","Paralyze2.ogg","Paralyze3.ogg","Parry.ogg",
- "Phone.ogg","Poison.ogg","Pollen.ogg","Powerup.ogg","Push.ogg",
- "Raise1.ogg","Raise2.ogg","Raise3.ogg","Recovery.ogg",
- "Reflection.ogg","Resonance.ogg","Run.ogg",
- "Saint1.ogg","Saint2.ogg","Saint3.ogg","Saint4.ogg","Saint5.ogg",
- "Saint6.ogg","Saint7.ogg","Saint8.ogg","Saint9.ogg","Sand.ogg",
- "Save.ogg","Scream.ogg","Sheep.ogg","Shop.ogg",
- "Shot1.ogg","Shot2.ogg","Shot3.ogg","Silence.ogg",
- "Skill1.ogg","Skill2.ogg","Skill3.ogg",
- "Slash1.ogg","Slash2.ogg","Slash3.ogg","Slash4.ogg","Slash5.ogg",
- "Slash6.ogg","Slash7.ogg","Slash8.ogg","Slash9.ogg",
- "Slash10.ogg","Slash11.ogg","Slash12.ogg","Sleep.ogg",
- "Sound1.ogg","Sound2.ogg","Sound3.ogg","Stare.ogg","Starlight.ogg",
- "Switch1.ogg","Switch2.ogg","Switch3.ogg",
- "Sword1.ogg","Sword2.ogg","Sword3.ogg","Sword4.ogg","Sword5.ogg",
- "Teleport.ogg","Thunder1.ogg","Thunder2.ogg","Thunder3.ogg",
- "Thunder4.ogg","Thunder5.ogg","Thunder6.ogg","Thunder7.ogg",
- "Thunder8.ogg","Thunder9.ogg","Thunder10.ogg",
- "Thunder11.ogg","Thunder12.ogg","Twine.ogg",
- "Up1.ogg","Up2.ogg","Up3.ogg","Up4.ogg",
- "Water1.ogg","Water2.ogg","Water3.ogg","Water4.ogg",
- "Water5.ogg","Water6.ogg",
- "Wind1.ogg","Wind2.ogg","Wind3.ogg","Wind4.ogg","Wind5.ogg",
- "Wind6.ogg","Wind7.ogg","Wind8.ogg","Wind9.ogg","Wind10.ogg",
- "Wind11.ogg","Wolf.ogg"]
- end
- return []
- end
- #--------------------------------------------------------------------------
- # ● Audioフォルダのパス
- #--------------------------------------------------------------------------
- def path(i)
- case i
- when BGM; return "Audio/BGM/"
- when BGS; return "Audio/BGS/"
- when ME; return "Audio/ME/"
- when SE; return "Audio/SE/"
- end
- end
- def filter(i)
- case i
- when BGM; return "*.{ogg,wma,mp3,wav,mid}"
- when BGS; return "*.{ogg,wma,mp3,wav}"
- when ME; return "*.{ogg,wma,mp3,wav,mid}"
- when SE; return "*.{ogg,wma,mp3,wav}"
- end
- end
- #--------------------------------------------------------------------------
- # ● AudioフォルダのGrep
- #--------------------------------------------------------------------------
- def audio_grep(i)
- list = Dir.glob(path(i)+filter(i))
- file_list = []
- list.select {|l| !FileTest.directory?(l)}.collect {|l| File.basename(l)}
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- @list[@ctg].size
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- @list[@ctg][i]
- end
- def citem; item(@index); end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_text(item_rect_for_text(index), item(index))
- end
- #--------------------------------------------------------------------------
- # ● 決定やキャンセルなどのハンドリング処理
- #--------------------------------------------------------------------------
- def process_handling
- return unless open? && active
- super
- return stop if Input.trigger?(:Y)
- return replay if Input.trigger?(:X)
- end
- #--------------------------------------------------------------------------
- # ● 決定ボタンが押されたときの処理
- #--------------------------------------------------------------------------
- def process_ok
- if current_item_enabled?
- #~ Sound.play_ok # Musicでは鳴らさない
- Input.update
- deactivate
- call_ok_handler
- else
- Sound.play_buzzer
- end
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理
- #--------------------------------------------------------------------------
- def ok
- return if citem.nil?
- pth = path(@ctg)+citem
- case @ctg
- when BGM; Audio.bgm_play(pth)
- when BGS; Audio.bgs_play(pth)
- when ME; Audio.me_play(pth)
- when SE; Audio.se_play(pth)
- end
- end
- def stop(i=@ctg)
- case i
- when BGM; Audio.bgm_stop
- when BGS; Audio.bgs_stop
- when ME; Audio.me_stop
- when SE; Audio.se_stop
- end
- end
- def replay
- RPG::BGM.last.replay
- RPG::BGS.last.replay
- end
- end
- #==============================================================================
- # ■ Window_DebugSystem
- #==============================================================================
- class Window_DebugSystem < Window_DebugBaseCommand
- #--------------------------------------------------------------------------
- # ● コマンドリストの作成
- #--------------------------------------------------------------------------
- def make_command_list
- add_main_commands
- add_original_commands
- end
- #--------------------------------------------------------------------------
- # ● 主要コマンドをリストに追加
- #--------------------------------------------------------------------------
- def add_main_commands
- add_command("金钱", :input)
- add_command("存档回数", :input)
- add_command("战斗次数", :input)
- add_command("存档禁止", :ok)
- add_command("菜单禁止", :ok)
- add_command("遇敌禁止", :ok)
- add_command("排序禁止", :ok)
- add_command("全道具入手", :ok)
- add_command("解像度", :ok)
- end
- #--------------------------------------------------------------------------
- # ● 独自コマンドの追加用
- #--------------------------------------------------------------------------
- def add_original_commands
- add_command("用語辞典初期化", :ok, true, :dictionary) if defined?(Dictionary)
- add_command("世界地图初期化", :ok, true, :worldmap) if defined?(WorldMap)
- add_command("任务Rank", :input, true, :quest_rank) if defined?(Quest)
- add_command("任务初期化", :ok, true, :quest) if defined?(Quest)
- end
- #--------------------------------------------------------------------------
- # ● 数取得
- #--------------------------------------------------------------------------
- def item(index)
- case index
- when 0; return $game_party.gold
- when 1; return $game_system.save_count
- when 2; return $game_system.battle_count
- when 3; return $game_system.save_disabled
- when 4; return $game_system.menu_disabled
- when 5; return $game_system.encounter_disabled
- when 6; return $game_system.formation_disabled
- else
- case @list[index][:ext]
- when :quest_rank; return $game_party.quest_rank
- end
- end
- return 0
- end
- #--------------------------------------------------------------------------
- # ● テキスト
- #--------------------------------------------------------------------------
- def text(index)
- case index
- when 0,1,2; return item(index)
- when 3,4,5,6; return item(index) ? "[禁止]" : "[許可]"
- when 8; return Graphics.width == 640 ? "640x480" : "800x600"
- else
- case @list[index][:ext]
- when :quest_rank; return Quest::RANK[item(index)] + "(#{item(index)})"
- end
- end
- return ""
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- super(index)
- draw_text(item_rect_for_text(index), text(index), 2)
- end
- #--------------------------------------------------------------------------
- # ● 数値の最大?数取得
- #--------------------------------------------------------------------------
- def num_max
- Math.log10(max).to_i + 1
- end
- #--------------------------------------------------------------------------
- # ● 数値の符号
- #--------------------------------------------------------------------------
- def sign
- false
- end
- #--------------------------------------------------------------------------
- # ● 数値のmaxmin値取得
- #--------------------------------------------------------------------------
- def min
- case @list[@index][:ext]
- when :quest_rank; return 1
- end
- 0
- end
- def max
- case @index
- when 0
- return $game_party.max_gold
- else
- case @list[@index][:ext]
- when :quest_rank; return 10
- end
- end
- 99999999
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change(n=0)
- case @index
- when 0; $game_party.gain_gold(n - $game_party.gold)
- when 1; $game_system.save_count = n
- when 2; $game_system.battle_count = n
- when 3; $game_system.save_disabled = n
- when 4; $game_system.menu_disabled = n
- when 5; $game_system.encounter_disabled = n
- when 6; $game_system.formation_disabled = n
- when 7; all_item
- when 8; resize_screen
- else
- case @list[@index][:ext]
- when :dictionary; $game_system.dictionary.reset
- when :worldmap; $game_system.worldmap.reset
- when :quest_rank; $game_party.quest_rank = n
- when :quest; $game_system.quest.reset
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理
- #--------------------------------------------------------------------------
- def ok
- change(!number)
- redraw_current_item
- end
- #--------------------------------------------------------------------------
- # ● 数値の取得/設定
- #--------------------------------------------------------------------------
- def number
- item(@index)
- end
- def number=(n)
- change(n)
- redraw_current_item
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理 : all item
- #--------------------------------------------------------------------------
- def all_item
- n = $data_items.size - 1
- n.times {|i| $game_party.gain_item($data_items[i+1], 1)}
- n = $data_weapons.size - 1
- n.times {|i| $game_party.gain_item($data_weapons[i+1], 1)}
- n = $data_armors.size - 1
- n.times {|i| $game_party.gain_item($data_armors[i+1], 1)}
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理 : win_resize
- #--------------------------------------------------------------------------
- def resize_screen
- if Graphics.width == 640
- Graphics.resize_screen(544, 416)
- else
- Graphics.resize_screen(640, 480)
- end
- call_handler(:exit)
- end
- end
- #==============================================================================
- # ■ Window_DebugActorExpert
- #==============================================================================
- class Window_DebugActorExpert < Window_DebugActorStatus
- #--------------------------------------------------------------------------
- # ● コマンドリストの作成
- #--------------------------------------------------------------------------
- def make_command_list
- SysUpdate::ELEMENTS.each {|e| add_command(e, :ok, true, 2)}
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- element_id = command_name(index)
- rect = item_rect_for_text(index)
- draw_attr_icon_pm(@actor, element_id, rect.x, rect.y)
- rect.x += 26
- rect.width -= 26
- draw_text(rect, SysUpdate.attr_name(element_id))
- attr = @actor.attr[element_id]
- draw_text(rect, attr.lv_limit, 2)
- rect.width -= 30
- draw_text(rect, "/", 2)
- rect.width -= 20
- draw_text(rect, attr.level, 2)
- end
- #--------------------------------------------------------------------------
- # ● 数値の最大?数取得
- #--------------------------------------------------------------------------
- def num_max
- 2
- end
- #--------------------------------------------------------------------------
- # ● 数値の最大値取得
- #--------------------------------------------------------------------------
- def min
- 1
- end
- def max
- @actor.attr[command_name(@index)].lv_limit
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change(n)
- @actor.attr[command_name(@index)].level = n
- end
- #--------------------------------------------------------------------------
- # ● 数値の取得/設定
- #--------------------------------------------------------------------------
- def number
- @actor.attr[command_name(@index)].level
- end
- def number=(n)
- change(n)
- redraw_current_item
- end
- #--------------------------------------------------------------------------
- # ● 得意状態変更
- #--------------------------------------------------------------------------
- def change_taste
- attr = @actor.attr[command_name(@index)]
- attr.taste = (attr.taste + 1) % 3
- redraw_current_item
- end
- end
- #==============================================================================
- # ■ Window_DebugDictCtg
- #==============================================================================
- class Window_DebugDictCtg < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- r = rect.dup
- r.width = 120
- super(r)
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- $game_system.dictionary.size
- end
- #--------------------------------------------------------------------------
- # ● 用語カテゴリIDの取得
- #--------------------------------------------------------------------------
- def id(i)
- $game_system.dictionary.keys[i]
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $game_system.dictionary[id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_text(item_rect_for_text(index), item(index).name)
- end
- #--------------------------------------------------------------------------
- # ● ヘルプウィンドウの更新
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_ctg(cid)
- end
- end
- #==============================================================================
- # ■ Window_DebugDictionary
- #==============================================================================
- class Window_DebugDictionary < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @ctg = $game_system.dictionary.keys[0]
- super
- end
- #--------------------------------------------------------------------------
- # ● カテゴリ設定
- #--------------------------------------------------------------------------
- def set_ctg(ctg)
- return if @ctg == ctg
- @ctg = ctg
- create_contents
- refresh
- self.top_row = 0
- unselect
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- $game_system.dictionary[@ctg].size
- end
- #--------------------------------------------------------------------------
- # ● 用語IDの取得
- #--------------------------------------------------------------------------
- def id(i)
- $game_system.dictionary[@ctg].keys[i]
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $game_system.dictionary[@ctg][id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 道具名の取得
- #--------------------------------------------------------------------------
- def name(i)
- item(i).name.split(/\\n/)[0]
- end
- #--------------------------------------------------------------------------
- # ● 道具状態の取得
- #--------------------------------------------------------------------------
- def status(i)
- item(i).show_flg
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name_sw(index)
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change(n=0)
- $game_system.dictionary[@ctg][cid].show_flg = !citem.show_flg
- end
- end
- #==============================================================================
- # ■ Window_DebugWorldRegion
- #==============================================================================
- class Window_DebugWorldRegion < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- r = rect.dup
- r.height /= 2
- super(r)
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- WorldMap::REGION.size
- end
- #--------------------------------------------------------------------------
- # ● 用語カテゴリIDの取得
- #--------------------------------------------------------------------------
- def id(i)
- $game_system.worldmap.ids[i]
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $game_system.worldmap[id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 道具名の取得
- #--------------------------------------------------------------------------
- def name(i)
- item(i).region_name
- end
- #--------------------------------------------------------------------------
- # ● 道具状態の取得
- #--------------------------------------------------------------------------
- def status(i)
- item(i).visible
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name_sw(index)
- end
- #--------------------------------------------------------------------------
- # ● ヘルプウィンドウの更新
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_ctg(cid) unless @index < 0
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change(n=0)
- $game_system.worldmap[cid].visible = !cstatus
- end
- end
- #==============================================================================
- # ■ Window_DebugWorldTown
- #==============================================================================
- class Window_DebugWorldTown < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @ctg = $game_system.worldmap.ids[0]
- super(rect)
- end
- #--------------------------------------------------------------------------
- # ● カテゴリ設定
- #--------------------------------------------------------------------------
- def set_ctg(ctg)
- return if @ctg == ctg
- @ctg = ctg
- create_contents
- refresh
- self.top_row = 0
- unselect
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- $game_system.worldmap[@ctg].ids.size
- end
- #--------------------------------------------------------------------------
- # ● タウンIDの取得
- #--------------------------------------------------------------------------
- def id(i)
- $game_system.worldmap[@ctg].ids[i]
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $game_system.worldmap[@ctg][id(i)]
- end
- #--------------------------------------------------------------------------
- # ● 道具名の取得
- #--------------------------------------------------------------------------
- def name(i)
- item(i).town_name
- end
- #--------------------------------------------------------------------------
- # ● 道具状態の取得
- #--------------------------------------------------------------------------
- def status(i)
- item(i).visible
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name_sw(index)
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change(n=0)
- $game_system.worldmap[@ctg][cid].visible = !cstatus
- end
- end
- #==============================================================================
- # ■ Window_DebugQuestCtg
- #==============================================================================
- class Window_DebugQuestCtg < Window_DebugBaseHorzCommand
- #--------------------------------------------------------------------------
- # ● コマンドリストの作成
- #--------------------------------------------------------------------------
- def make_command_list
- ["活动任务", "公会任务"].each {|n| add_command(n, :ok) }
- end
- #--------------------------------------------------------------------------
- # ● ヘルプウィンドウの更新
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_ctg(@index)
- end
- end
- #==============================================================================
- # ■ Window_DebugQuest
- #==============================================================================
- class Window_DebugQuest < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @ctg = 0
- data_refresh
- super(rect)
- end
- #--------------------------------------------------------------------------
- # ● カテゴリデータ集計
- #--------------------------------------------------------------------------
- def data_refresh
- @commands = []
- $game_system.quest.ids.each do |id|
- data = $game_system.quest[id]
- case @ctg
- when 0; @commands.push(data) if !data.enable
- when 1; @commands.push(data) if data.enable
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● カテゴリ設定
- #--------------------------------------------------------------------------
- def set_ctg(ctg)
- return if @ctg == ctg
- @ctg = ctg
- data_refresh
- create_contents
- refresh
- self.top_row = 0
- unselect
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- @commands.size
- end
- #--------------------------------------------------------------------------
- # ● 任务IDの取得
- #--------------------------------------------------------------------------
- def id(i)
- @commands[i].id
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- @commands[i]
- end
- #--------------------------------------------------------------------------
- # ● 道具名の取得
- #--------------------------------------------------------------------------
- def name(i)
- Quest.conv_text(item(i).name)
- end
- #--------------------------------------------------------------------------
- # ● 状态文本
- #--------------------------------------------------------------------------
- def status_text(index)
- quest = item(index)
- quest.playing ? "[進行中(開始)]" :
- quest.clear ? "[通关后]" :
- quest.fail ? "[失敗]": "[未開始]"
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name_sw(index)
- end
- #--------------------------------------------------------------------------
- # ● 帮助窗口的更新
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_id(cid)
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理
- #--------------------------------------------------------------------------
- def ok
- redraw_current_item
- @help_window.refresh
- end
- end
- #==============================================================================
- # ■ Window_DebugQuestStatus
- #==============================================================================
- class Window_DebugQuestStatus < Window_DebugBaseHorzCommand
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @id = nil
- super(rect)
- end
- #--------------------------------------------------------------------------
- # ● 任务ID設定
- #--------------------------------------------------------------------------
- def set_id(id)
- return if @id == id
- @id = id
- return contents.clear if id.nil?
- refresh
- end
- #--------------------------------------------------------------------------
- # ● コマンド名の取得
- #--------------------------------------------------------------------------
- def command_name(index)
- super + (command_enabled?(index) ? "[ON]" : "[OFF]")
- end
- #--------------------------------------------------------------------------
- # ● コマンドの有効状態を取得
- #--------------------------------------------------------------------------
- def command_enabled?(index)
- return false if @id.nil?
- case index
- when 0; return $game_system.quest[@id].visible
- when 1; return $game_system.quest[@id].view_res
- when 2; return $game_system.quest[@id].view_cond
- end
- end
- #--------------------------------------------------------------------------
- # ● コマンドリストの作成
- #--------------------------------------------------------------------------
- def make_command_list
- add_command("一覧", :ok)
- add_command("報酬", :ok)
- add_command("进度", :ok)
- end
- end
- #==============================================================================
- # ■ Window_DebugQuestCmd
- #==============================================================================
- class Window_DebugQuestCmd < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(rect)
- @commands = [
- "进度中(開始)", "通关", "失敗",
- "表示切替", "報酬表示切替", "进度表示切替",
- "复位"
- ]
- rect.width = 160
- rect.x = Graphics.width - rect.width
- super(rect)
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウの表示
- #--------------------------------------------------------------------------
- def show
- #~ self.visible = true
- self
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウの非表示
- #--------------------------------------------------------------------------
- def hide
- #~ self.visible = false
- self
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウのアクティブ化
- #--------------------------------------------------------------------------
- def activate
- self.visible = true
- self.active = true
- self
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウの非アクティブ化
- #--------------------------------------------------------------------------
- def deactivate
- self.visible = false
- self.active = false
- self
- end
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- @commands.size
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- @commands[i]
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_text(item_rect_for_text(index), item(index))
- end
- #--------------------------------------------------------------------------
- # ● ヘルプウィンドウの更新
- #--------------------------------------------------------------------------
- def update_help
- # 何もしない
- end
- #--------------------------------------------------------------------------
- # ● OK時の処理
- #--------------------------------------------------------------------------
- def ok
- case @index
- when 0; @help_window.citem.quest_start
- when 1; @help_window.citem.quest_clear(true, false) # 強制
- when 2; @help_window.citem.quest_fail(true, false) # 強制
- when 3; @help_window.citem.visible = !@help_window.citem.visible
- when 4; @help_window.citem.view_res = !@help_window.citem.view_res
- when 5; @help_window.citem.view_cond = !@help_window.citem.view_cond
- when 6; @help_window.citem.reset
- end
- hide
- @help_window.activate.ok
- end
- end
- #==============================================================================
- # ■ Window_DebugSpirit
- #==============================================================================
- class Window_DebugSpirit < Window_DebugBase
- #--------------------------------------------------------------------------
- # ● 項目数の取得
- #--------------------------------------------------------------------------
- def item_max
- Spirits::SPIRIT_ACTOR.size
- end
- #--------------------------------------------------------------------------
- # ● 精霊IDの取得
- #--------------------------------------------------------------------------
- def id(i)
- Spirits::SPIRIT_ACTOR.keys[i]
- end
- #--------------------------------------------------------------------------
- # ● 角色IDの取得
- #--------------------------------------------------------------------------
- def aid(i)
- Spirits.actor_id(id(i))
- end
- #--------------------------------------------------------------------------
- # ● 道具の取得
- #--------------------------------------------------------------------------
- def item(i)
- $game_actors[aid(i)]
- end
- #--------------------------------------------------------------------------
- # ● 道具の変更
- #--------------------------------------------------------------------------
- def change
- if status(@index)
- $game_party.remove_spirit(cid)
- else
- $game_party.add_spirit(cid)
- end
- end
- #--------------------------------------------------------------------------
- # ● 道具状態の取得
- #--------------------------------------------------------------------------
- def status(i)
- $game_party.include_spirit?(id(i))
- end
- #--------------------------------------------------------------------------
- # ● 状态テキスト
- #--------------------------------------------------------------------------
- def status_text(i)
- status(i) ? "[加入]" : "[未加入]"
- end
- #--------------------------------------------------------------------------
- # ● 名前の描画
- #--------------------------------------------------------------------------
- def draw_index_name(rect, index)
- draw_actor_line_graphic(item(index), rect.x, rect.y)
- draw_spirit_name(item(index), rect.x + 34, rect.y)
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_item_id_name_sw(index)
- end
- end
- #==============================================================================
- # ■ Scene_Debug
- #------------------------------------------------------------------------------
- # 调试画面の処理を行うクラスです。
- #==============================================================================
- class Scene_Debug < Scene_MenuBase
- #--------------------------------------------------------------------------
- # ● 開始処理
- #--------------------------------------------------------------------------
- def start
- super
- init_sub_windows
- create_help_window
- create_cmd_window
- create_number_window
- create_main_windows
- create_original_windows
- create_system_window if DebugPP.spec("系统")
- @sub[@cmd_window.index].each {|w| w.show}
- end
- #--------------------------------------------------------------------------
- # ● 主要コマンド用ウィンドウを生成
- #--------------------------------------------------------------------------
- def create_main_windows
- create_switch_window if DebugPP.spec("开关")
- create_variable_window if DebugPP.spec("変数")
- create_selfsw_window if DebugPP.spec("独立开关")
- create_item_window if DebugPP.spec("道具")
- create_weapon_window if DebugPP.spec("武器")
- create_armor_window if DebugPP.spec("防具")
- create_party_window if DebugPP.spec("队伍")
- create_actor_window if DebugPP.spec("状态")
- create_skill_window if DebugPP.spec("技能")
- create_map_window if DebugPP.spec("MAP移動")
- create_music_window if DebugPP.spec("音乐")
- end
- #--------------------------------------------------------------------------
- # ● オリジナルコマンド用ウィンドウを生成
- #--------------------------------------------------------------------------
- def create_original_windows
- create_expert_window if defined?(SysUpdate) and DebugPP.spec("熟练度")
- create_dict_window if defined?(Dictionary) and DebugPP.spec("用語辞典")
- create_worldmap_window if defined?(WorldMap) and DebugPP.spec("WorldMap")
- create_quest_window if defined?(Quest) and DebugPP.spec("任务")
- create_spirit_window if defined?(Spirits) and DebugPP.spec("精霊")
- end
- #--------------------------------------------------------------------------
- # ● 終了処理
- #--------------------------------------------------------------------------
- def terminate
- super
- #$game_map.refresh
- end
- #--------------------------------------------------------------------------
- # ● 子Window情報の初期化
- #--------------------------------------------------------------------------
- def init_sub_windows
- @sub = []
- @sub_i = 0
- end
- #--------------------------------------------------------------------------
- # ● ヘルプウィンドウの作成
- #--------------------------------------------------------------------------
- def create_help_window
- @help_window = Window_Help.new
- @help_window.y = Graphics.height - @help_window.height
- end
- #--------------------------------------------------------------------------
- # ● コマンドウィンドウの作成
- #--------------------------------------------------------------------------
- def create_cmd_window
- @cmd_window = Window_DebugCommand.new(@help_window.y)
- @cmd_window.set_handler(:ok, method(:enable_sub_window))
- @cmd_window.set_handler(:cancel, method(:return_scene))
- @cmd_window.set_handler(:update, method(:change_sub_window))
- @cmd_window.help_window = @help_window
- end
- #--------------------------------------------------------------------------
- # ● コマンド・ヘルプ以外のエリア
- #--------------------------------------------------------------------------
- def area
- Rect.new(@cmd_window.width, 0, Graphics.width - @cmd_window.width, @help_window.y)
- end
- #--------------------------------------------------------------------------
- # ● 子Window参照
- #--------------------------------------------------------------------------
- def sub
- @sub[@cmd_window.index][@sub_i]
- end
- #--------------------------------------------------------------------------
- # ● 子Window領域
- #--------------------------------------------------------------------------
- def sub_area
- w = sub
- Rect.new(w.x, w.y, w.width, w.height)
- end
- #--------------------------------------------------------------------------
- # ● 子Window差し替え
- #--------------------------------------------------------------------------
- def change_sub_window
- @sub.size.times do |i|
- i == @cmd_window.index ? @sub[i].each {|w| w.show} :
- @sub[i].each {|w| w.hide}
- end
- end
- #--------------------------------------------------------------------------
- # ● 子Window有効化
- #--------------------------------------------------------------------------
- def enable_sub_window
- sub.activate.select(0)
- @num_window.item_window = sub
- end
- #--------------------------------------------------------------------------
- # ● 子Window無効化(all)
- #--------------------------------------------------------------------------
- def disable_sub_window
- @sub[@cmd_window.index].each {|w| w.deactivate.unselect}
- @num_window.item_window = nil
- end
- #--------------------------------------------------------------------------
- # ● 子WindowのOK処理
- #--------------------------------------------------------------------------
- def ok_sub_window
- sub.activate.ok
- end
- #--------------------------------------------------------------------------
- # ● 子WindowのOK処理(前の子Windowへ)
- #--------------------------------------------------------------------------
- def ok_prev_sub_window
- sub.ok
- prev_sub_window
- end
- #--------------------------------------------------------------------------
- # ● 子WindowのOK処理(次の子Windowへ)
- #--------------------------------------------------------------------------
- def next_sub_window
- sub.deactivate
- @sub_i += 1
- sub.activate
- sub.select(0) if sub.index < 0
- end
- #--------------------------------------------------------------------------
- # ● 子WindowのOK処理(前の子Windowへ)
- #--------------------------------------------------------------------------
- def prev_sub_window
- sub.deactivate
- @sub_i -= 1
- sub.activate
- sub.select(0) if sub.index < 0
- end
- #--------------------------------------------------------------------------
- # ● 子WindowのCancel処理
- #--------------------------------------------------------------------------
- def cancel_sub_window
- disable_sub_window
- @cmd_window.activate
- end
- #--------------------------------------------------------------------------
- # ● 数値ウィンドウの作成
- #--------------------------------------------------------------------------
- def create_number_window
- @num_window = Window_DebugInputNum.new(area)
- @num_window.z = 1000
- @num_window.set_handler(:ok, method(:ok_num_window))
- @num_window.set_handler(:cancel, method(:cancel_num_window))
- end
- #--------------------------------------------------------------------------
- # ● 数値Windowの有効化
- #--------------------------------------------------------------------------
- def enable_num_window
- @num_window.show.activate.select_last.num = sub.number
- end
- #--------------------------------------------------------------------------
- # ● 数値Windowの有効化<resize>
- #--------------------------------------------------------------------------
- def enable_num_window_resize
- @num_window.show.activate.area(sub_area).sign = sub.sign
- @num_window.show.activate.area(sub_area).num_max = sub.num_max
- @num_window.select_last.num = sub.number
- end
- #--------------------------------------------------------------------------
- # ● 数値Windowの有効化<resize & maxmin>
- #--------------------------------------------------------------------------
- def enable_num_window_resize_maxmin
- @num_window.show.activate.area(sub_area).sign = sub.sign
- @num_window.show.activate.area(sub_area).num_max = sub.num_max
- @num_window.select_last.max = sub.max
- @num_window.select_last.min = sub.min
- @num_window.select_last.num = sub.number
- end
- #--------------------------------------------------------------------------
- # ● 数値Window無効化
- #--------------------------------------------------------------------------
- def disable_num_window
- @num_window.hide.deactivate.area(area)
- end
- #--------------------------------------------------------------------------
- # ● 数値WindowのOK処理
- #--------------------------------------------------------------------------
- def ok_num_window
- sub.number = @num_window.num
- sub.activate
- disable_num_window
- end
- #--------------------------------------------------------------------------
- # ● 数値WindowのCancel処理
- #--------------------------------------------------------------------------
- def cancel_num_window
- disable_num_window
- sub.activate
- end
- #--------------------------------------------------------------------------
- # ● 开关Window作成
- #--------------------------------------------------------------------------
- def create_switch_window
- @switch_window = Window_DebugSwitch.new(area)
- @switch_window.set_handler(:ok, method(:ok_sub_window))
- @switch_window.set_handler(:cancel, method(:cancel_sub_window))
- @sub.push([@switch_window])
- end
- #--------------------------------------------------------------------------
- # ● 変数Window作成
- #--------------------------------------------------------------------------
- def create_variable_window
- @variable_window = Window_DebugVariable.new(area)
- @variable_window.set_handler(:ok, method(:enable_num_window_resize_maxmin))
- @variable_window.set_handler(:cancel, method(:cancel_sub_window))
- @sub.push([@variable_window])
- end
- #--------------------------------------------------------------------------
- # ● 自助开关Window作成
- #--------------------------------------------------------------------------
- def create_selfsw_window
- rect = area
- @selfsw_window = Window_DebugSelfSwitch.new(rect)
- rect.height = rect.height - @selfsw_window.height
- @selfsw_window.y = rect.height
- @selfsw_window.set_handler(:ok, method(:ok_sub_window))
- @selfsw_window.set_handler(:cancel, method(:prev_sub_window))
- @ss_map_window = Window_DebugMapSelfSw.new(rect)
- @ss_map_window.set_handler(:ok, method(:next_sub_window))
- @ss_map_window.set_handler(:cancel, method(:cancel_sub_window))
- @ss_map_window.help_window = @selfsw_window
- @sub.push([@ss_map_window, @selfsw_window])
- end
- #--------------------------------------------------------------------------
- # ● 道具Window作成
- #--------------------------------------------------------------------------
- def create_item_window
- @item_window = Window_DebugItem.new(area)
- @item_window.set_handler(:ok, method(:enable_num_window_resize_maxmin))
- @item_window.set_handler(:cancel, method(:cancel_sub_window))
- @sub.push([@item_window])
- end
- #--------------------------------------------------------------------------
- # ● 武器Window作成
- #--------------------------------------------------------------------------
- def create_weapon_window
- @weapon_window = Window_DebugWeapon.new(area)
- @weapon_window.set_handler(:ok, method(:enable_num_window_resize_maxmin))
- @weapon_window.set_handler(:cancel, method(:cancel_sub_window))
- @sub.push([@weapon_window])
- end
- #--------------------------------------------------------------------------
- # ● 防具Window作成
- #--------------------------------------------------------------------------
- def create_armor_window
- @armor_window = Window_DebugArmor.new(area)
- @armor_window.set_handler(:ok, method(:enable_num_window_resize_maxmin))
- @armor_window.set_handler(:cancel, method(:cancel_sub_window))
- @sub.push([@armor_window])
- end
- #--------------------------------------------------------------------------
- # ● 队伍Window作成
- #--------------------------------------------------------------------------
- def create_party_window
- @party_window = Window_DebugParty.new(area)
- @party_window.set_handler(:ok, method(:ok_sub_window))
- @party_window.set_handler(:cancel, method(:cancel_sub_window))
- @sub.push([@party_window])
- end
- #--------------------------------------------------------------------------
- # ● 角色状态Window作成
- #--------------------------------------------------------------------------
- def create_actor_window
- rect = area
- @actor_window = Window_DebugActor.new(rect)
- @actor_window.set_handler(:ok, method(:next_sub_window))
- @actor_window.set_handler(:cancel, method(:cancel_sub_window))
- rect.x += @actor_window.width
- rect.width -= @actor_window.width
- @actor_st_window = Window_DebugActorStatus.new(rect)
- @actor_st_window.set_handler(:ok, method(:enable_num_window_resize))
- @actor_st_window.set_handler(:cancel, method(:prev_sub_window))
- @actor_window.help_window = @actor_st_window
- @sub.push([@actor_window, @actor_st_window])
- end
- #--------------------------------------------------------------------------
- # ● 技能Window作成
- #--------------------------------------------------------------------------
- def create_skill_window
- rect = area
- @skill_window = Window_DebugActor.new(rect)
- @skill_window.set_handler(:ok, method(:next_sub_window))
- @skill_window.set_handler(:cancel, method(:cancel_sub_window))
- rect.x += @skill_window.width
- rect.width -= @skill_window.width
- @skills_window = Window_DebugActorSkill.new(rect)
- @skills_window.set_handler(:ok, method(:ok_sub_window))
- @skills_window.set_handler(:cancel, method(:prev_sub_window))
- @skill_window.help_window = @skills_window
- @sub.push([@skill_window, @skills_window])
- end
- #--------------------------------------------------------------------------
- # ● MapWindow作成
- #--------------------------------------------------------------------------
- def create_map_window
- @map_window = Window_DebugMap.new(area)
- @map_window.set_handler(:ok, method(:return_scene))
- @map_window.set_handler(:cancel, method(:cancel_sub_window))
- @sub.push([@map_window])
- end
- #--------------------------------------------------------------------------
- # ● 音乐Window作成
- #--------------------------------------------------------------------------
- def create_music_window
- rect = area
- @music_ctg_window = Window_DebugMusicCtg.new(rect)
- rect.y += @music_ctg_window.height
- rect.height -= @music_ctg_window.height
- @music_ctg_window.set_handler(:ok, method(:next_sub_window))
- @music_ctg_window.set_handler(:cancel, method(:cancel_sub_window))
- @mugic_window = Window_DebugMusic.new(rect)
- @mugic_window.set_handler(:ok, method(:ok_sub_window))
- @mugic_window.set_handler(:cancel, method(:prev_sub_window))
- @music_ctg_window.help_window = @mugic_window
- @sub.push([@music_ctg_window, @mugic_window])
- end
- #--------------------------------------------------------------------------
- # ● 系统Window作成
- #--------------------------------------------------------------------------
- def create_system_window
- @system_window = Window_DebugSystem.new(area)
- @system_window.set_handler(:ok, method(:ok_sub_window))
- @system_window.set_handler(:input, method(:enable_num_window_resize_maxmin))
- @system_window.set_handler(:cancel, method(:cancel_sub_window))
- @system_window.set_handler(:exit, method(:return_scene))
- @sub.push([@system_window])
- end
- #--------------------------------------------------------------------------
- # ● 熟练度Window作成
- #--------------------------------------------------------------------------
- def create_expert_window
- rect = area
- @exp_act_window = Window_DebugActor.new(rect)
- @exp_act_window.set_handler(:ok, method(:next_sub_window))
- @exp_act_window.set_handler(:cancel, method(:cancel_sub_window))
- rect.x += @exp_act_window.width
- rect.width -= @exp_act_window.width
- @expert_window = Window_DebugActorExpert.new(rect)
- @expert_window.set_handler(:ok, method(:enable_num_window_resize_maxmin))
- @expert_window.set_handler(:cancel, method(:prev_sub_window))
- @expert_window.set_handler(:x, method(:change_taste))
- @exp_act_window.help_window = @expert_window
- @sub.push([@exp_act_window, @expert_window])
- end
- def change_taste
- sub.change_taste
- end
- #--------------------------------------------------------------------------
- # ● 用語辞典Window作成
- #--------------------------------------------------------------------------
- def create_dict_window
- rect = area
- @dict_ctg_window = Window_DebugDictCtg.new(rect)
- @dict_ctg_window.set_handler(:ok, method(:next_sub_window))
- @dict_ctg_window.set_handler(:cancel, method(:cancel_sub_window))
- rect.x += @dict_ctg_window.width
- rect.width -= @dict_ctg_window.width
- @dictionary_window = Window_DebugDictionary.new(rect)
- @dictionary_window.set_handler(:ok, method(:ok_sub_window))
- @dictionary_window.set_handler(:cancel, method(:prev_sub_window))
- @dict_ctg_window.help_window = @dictionary_window
- @sub.push([@dict_ctg_window, @dictionary_window])
- end
- #--------------------------------------------------------------------------
- # ● 世界地图Window作成
- #--------------------------------------------------------------------------
- def create_worldmap_window
- rect = area
- @wd_region_window = Window_DebugWorldRegion.new(rect)
- @wd_region_window.set_handler(:ok, method(:next_sub_window))
- @wd_region_window.set_handler(:cancel, method(:cancel_sub_window))
- @wd_region_window.set_handler(:x, method(:ok_sub_window))
- rect.y += @wd_region_window.height
- rect.height -= @wd_region_window.height
- @wd_town_window = Window_DebugWorldTown.new(rect)
- @wd_town_window.set_handler(:ok, method(:ok_sub_window))
- @wd_town_window.set_handler(:cancel, method(:prev_sub_window))
- @wd_region_window.help_window = @wd_town_window
- @sub.push([@wd_region_window, @wd_town_window])
- end
- #--------------------------------------------------------------------------
- # ● 任务Window作成
- #--------------------------------------------------------------------------
- def create_quest_window
- rect = area
- @qt_ctg_window = Window_DebugQuestCtg.new(rect)
- @qt_ctg_window.set_handler(:ok, method(:next_sub_window))
- @qt_ctg_window.set_handler(:cancel, method(:cancel_sub_window))
-
- rect.y += @qt_ctg_window.height
- rect.height -= @qt_ctg_window.height
- @qt_st_window = Window_DebugQuestStatus.new(rect)
- @qt_st_window.y = rect.y + rect.height - @qt_st_window.height
-
- rect.height -= @qt_st_window.height
- @quest_window = Window_DebugQuest.new(rect)
- @quest_window.set_handler(:ok, method(:next_sub_window))
- @quest_window.set_handler(:cancel, method(:prev_sub_window))
- @qt_cmd_window = Window_DebugQuestCmd.new(rect)
- @qt_cmd_window.set_handler(:ok, method(:ok_prev_sub_window))
- @qt_cmd_window.set_handler(:cancel, method(:prev_sub_window))
- @qt_ctg_window.help_window = @quest_window
- @quest_window.help_window = @qt_st_window
- @qt_cmd_window.help_window = @quest_window
- @sub.push([@qt_ctg_window, @quest_window, @qt_cmd_window, @qt_st_window])
- end
- #--------------------------------------------------------------------------
- # ● 精霊Window作成
- #--------------------------------------------------------------------------
- def create_spirit_window
- @spirit_window = Window_DebugSpirit.new(area)
- @spirit_window.set_handler(:ok, method(:ok_sub_window))
- @spirit_window.set_handler(:cancel, method(:cancel_sub_window))
- @sub.push([@spirit_window])
- end
- end
复制代码 |
|