设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1160|回复: 2
打印 上一主题 下一主题

[已经过期] 如何让菜单栏状态内显示特殊属性

[复制链接]

Lv1.梦旅人

梦石
0
星屑
49
在线时间
152 小时
注册时间
2011-2-2
帖子
195
跳转到指定楼层
1
发表于 2015-10-25 18:08:44 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x

比如在这个位置显示暴击百分百 这类的

资源论坛←点击进入游戏讨论欢迎你的加入 中秋论坛活动欢迎大家加入

Lv3.寻梦者

闇吼者の災悪眷族
不気味存在締造者

梦石
0
星屑
1366
在线时间
2881 小时
注册时间
2014-7-29
帖子
6491
2
发表于 2015-10-27 17:52:37 | 只看该作者
请善用一下论坛搜索,类似的问题有很多。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2920
在线时间
713 小时
注册时间
2010-7-25
帖子
813

开拓者

3
发表于 2015-10-28 11:13:18 | 只看该作者
  1. #===============================================================================
  2. #  ■拡張ステータス画面セカンド for RGSS3 Ver0.75-α
  3. # □作成者 kure
  4. #===============================================================================
  5. $kure_integrate_script = {} if $kure_integrate_script == nil
  6. $kure_integrate_script[:ExStatus] = 100
  7. p "拡張ステータス画面セカンド"

  8. module KURE
  9.   module ExStatus
  10.   #初期設定
  11.     MAIN_MENU = [] ; SUB_MENU = [] ; VIEW_SUB_MENU = [] ; SUB_MENU[1] = []
  12.     FREE_SPACE = [] ; PROFILE = [] ; PROFILE2 = [] ; VIEW_Ex1 = [] ; VIEW_Ex2 = []
  13.     VIEW_ELEMENT = []
  14.    
  15.   #描画方法の選択---------------------------------------------------------------
  16.     #各ステータスの表示方法
  17.     #VIEW_MODE(0=値を表示 1=補正値を表示)
  18.     VIEW_MODE = 0
  19.    
  20.   #メニュー選択肢の設定---------------------------------------------------------   
  21.     #メニューの設定
  22.     #MAIN_MENU[ID] = 表示名
  23.    
  24.     MAIN_MENU[0] = "能力值"          #(ID0)能力値
  25.     MAIN_MENU[1] = "基本情报"        #(ID1)基本情報
  26.     MAIN_MENU[2] = "職業情報"        #(ID2)職業履歴
  27.     MAIN_MENU[3] = "装备情报"        #(ID3)装備情報
  28.     MAIN_MENU[4] = "プロフィール"    #(ID4)プロフィール
  29.    
  30.     #表示ページのIDリスト(選択肢に表示される項目)
  31.     VIEW_MAIN_MENU = [0,1,3]
  32.    
  33.   #サブメニュー選択肢の設定-----------------------------------------------------
  34.     #基本情報(ID1)のサブメニュー設定-------------------------------------------   
  35.       #SUB_MENU[1][ID] = 表示名
  36.       SUB_MENU[1][0] = "特征变化"     #(ID0)アクター特徴
  37.       SUB_MENU[1][1] = "属性有効度"       #(ID1)属性耐性
  38.       SUB_MENU[1][2] = "状态耐性"   #(ID2)ステート耐性
  39.       SUB_MENU[1][3] = "習得中スキル"     #(ID3)AP制スキル習得画面(未実装)
  40.       SUB_MENU[1][4] = "フリースペース"   #(ID4)フリースペース
  41.       
  42.       #サブメニューのページリスト(選択肢に表示される項目)
  43.       #VIEW_SUB_MENU[ID] = [サブメニューIDリスト]
  44.       VIEW_SUB_MENU[1] = [0,1,2]
  45.       
  46.     #職業履歴(ID2)、装備情報(ID3)のサブメニューは自動的に作成されます。
  47.    
  48.   #0ページ(能力値)--------------------------------------------------------
  49.     #VIEW_Ex1[ID] = ["表示名",表示切り替え]
  50.     #VIEW_Ex2[ID] = ["表示名",表示切り替え]
  51.     #表示名       … 追加能力値の表示名
  52.     #表示切り替え … (0=表示、1=非表示)
  53.    
  54.     #追加能力値
  55.     VIEW_Ex1[0] = ["命中率",0]           #(ID0)命中率
  56.     VIEW_Ex1[1] = ["回避率",0]           #(ID1)回避率
  57.     VIEW_Ex1[2] = ["会心率",0]           #(ID2)会心率
  58.     VIEW_Ex1[3] = ["会心回避率",0]       #(ID3)会心回避率
  59.     VIEW_Ex1[4] = ["魔法回避率",0]       #(ID4)魔法回避率
  60.     VIEW_Ex1[5] = ["魔法反射率",0]       #(ID5)魔法反射率
  61.     VIEW_Ex1[6] = ["反撃率",0]           #(ID6)反撃率
  62.     VIEW_Ex1[7] = ["HP再生率",0]         #(ID7)HP再生率
  63.     VIEW_Ex1[8] = ["MP再生率",0]         #(ID8)MP再生率
  64.     VIEW_Ex1[9] = ["TP再生率",0]         #(ID9)TP再生率
  65.    
  66.     #特殊能力値
  67.     VIEW_Ex2[0] = ["仇恨",0]            #(ID0)狙われ率
  68.     VIEW_Ex2[1] = ["防御効果",0]          #(ID1)防御効果率
  69.     VIEW_Ex2[2] = ["回复効果",0]          #(ID2)回復効果率
  70.     VIEW_Ex2[3] = ["药的知识",0]            #(ID3)薬の知識
  71.     VIEW_Ex2[4] = ["MP消費率",0]            #(ID4)MP消費率
  72.     VIEW_Ex2[5] = ["TP获得率",0]        #(ID5)TPチャージ率
  73.     VIEW_Ex2[6] = ["受物理伤害率",0]      #(ID6)物理ダメージ率
  74.     VIEW_Ex2[7] = ["受魔法伤害率",0]      #(ID7)魔法ダメージ率
  75.     VIEW_Ex2[8] = ["地形伤害率",1]        #(ID8)床ダメージ率
  76.     VIEW_Ex2[9] = ["经验获得率",0]          #(ID9)経験獲得率

  77.   #1-1ページ(属性有効度)---------------------------------------------------------
  78.     #属性有効度を表示する項目を属性IDで選択します
  79.     #VIEW_ELEMENT[表示順] = [属性ID, アイコンID]
  80.     #アイコンを使用しない場合はIDに 0 を設定してください
  81.     VIEW_ELEMENT[1] = [1, 0]
  82.     VIEW_ELEMENT[2] = [2, 0]
  83.     VIEW_ELEMENT[3] = [3, 0]
  84.     VIEW_ELEMENT[4] = [4, 0]
  85.     VIEW_ELEMENT[5] = [5, 0]
  86.     VIEW_ELEMENT[6] = [6, 0]
  87.     VIEW_ELEMENT[7] = [7, 0]
  88.     VIEW_ELEMENT[8] = [8, 0]
  89.     VIEW_ELEMENT[9] = [9, 0]
  90.     VIEW_ELEMENT[10] = [12, 0]
  91.     VIEW_ELEMENT[11] = [13, 0]
  92.     VIEW_ELEMENT[12] = [14, 0]
  93.     VIEW_ELEMENT[13] = [15, 0]
  94.     VIEW_ELEMENT[14] = [16, 0]
  95.     VIEW_ELEMENT[15] = [17, 0]
  96.     VIEW_ELEMENT[16] = [18, 0]
  97.    
  98.   #1-2ページ目描画対応、ステート耐性の表示--------------------------------------
  99.     #ステート耐性を表示する項目をステートIDで選択します
  100.     VIEW_STATE = [0,1,2,3,4,5,6,7,8,10,12,13,14,15,17,21,22]
  101.    
  102.   #1-4ページ対応、フリースペース-----------------------------------------------
  103.     #FREE_SPACE[アクターID] = [描画内容1行目,…]
  104.     #区切りはダブルクオテーション「"」ではなくシングルクオテーション「'」です
  105.   
  106.     FREE_SPACE[1] = ['','','']
  107.     FREE_SPACE[2] = ['','','']
  108.     FREE_SPACE[3] = ['','','']
  109.       
  110.   #3ページ目(装備情報)---------------------------------------------------------
  111.     #拡張ページの表示設定(装備品個別管理拡張)
  112.     #ID2 … 装備品のスロットアイテム
  113.     #ID3 … 装備品のシンボル
  114.     #VIEW_Ex3 = [表示するページのIDリスト]
  115.     VIEW_Ex3 = []
  116.    
  117.   #4-1ページ目描画対応----------------------------------------------------------
  118.     #PROFILE_NUM = [アクター1の変数,アクター2の変数,…]
  119.     #アクターのプロフィール描画の切り替え用の変数を指定します。
  120.     #項目数はアクター数と同一にすること
  121.     PROFILE_NUM = [1,0,0,0,0,0,0,0,0,0]
  122.    
  123.     #PROFILE[アクターID] = [
  124.     #      変数未設定又は0 [立ち絵設定,プロフィール内容1行目,…],
  125.     #              変数1  [立ち絵設定,プロフィール内容1行目,…],
  126.     #                       …
  127.     #                      ]
  128.     #顔グラフィックは「Picture」フォルダに入れておくこと
  129.     #
  130.     #立ち絵設定(1 = 表示する ,ファイル名 = 指定ピクチャを表示, nil = 表示しない)
  131.     #1を指定した場合、読み込まれる立ち絵ファイルのファイル名は「ファイル名-INDEX値です」
  132.     #例)
  133.     #『"Actor1"』のINDEX6番目のアクターの立ち絵ファイル名は『"Actor1-6"』とすること
  134.     #
  135.     #ファイル名で指定した場合は指定したファイル名を読み込みます。
  136.     #
  137.     #
  138.     #区切りはダブルクオテーション「"」ではなくシングルクオテーション「'」です
  139.     PROFILE[1] = [
  140.                     [nil,
  141.                     '変数未設定(=0)または0の時の描画です。',
  142.                     ''],
  143.                     
  144.                     [nil,
  145.                     '変数の値が1の時の描画です。',
  146.                     'プロフィールを変数で切り替えるには',
  147.                     '項目を追加してください']                  
  148.                  ]
  149.     PROFILE[2] = [
  150.                     [nil,
  151.                     'プロフィールの描画テストをしています',
  152.                     '配列を使用して描画しているので、改行',
  153.                     'したい場所で「,」で区切っていけばいいですね']
  154.                  ]
  155.     PROFILE[3] = [
  156.                     [nil,
  157.                     '顔文字を表示しない場合もテストしておきます。',
  158.                     'nilを入れないと顔文字があると判断されるので',
  159.                     '御注意を']
  160.                  ]  
  161.   #4-2ページ目描画対応----------------------------------------------------------
  162.     #PROFILE_NUM2 = [アクター1の変数,アクター2の変数,…]
  163.     #アクターのプロフィール描画の切り替え用の変数を指定します。
  164.     #項目数はアクター数と同一にすること
  165.     PROFILE_NUM2 = [1,0,0,0,0,0,0,0,0,0]
  166.    
  167.     #PROFILE2[アクターID] = [
  168.     #      変数未設定又は0 [プロフィール内容1行目,…],
  169.     #              変数1  [プロフィール内容1行目,…],
  170.     #                       …
  171.     #                      ]
  172.     PROFILE2[1] = [
  173.                     ['2ページ目の描画テストをしています']
  174.                   ]
  175.   end
  176. end

  177. #==============================================================================
  178. # ■ RPG::Actor(追加定義)
  179. #==============================================================================
  180. class RPG::Actor < RPG::BaseItem
  181.   #--------------------------------------------------------------------------
  182.   # ◇ ステータス画面に表示する名前の定義(追加定義)
  183.   #--------------------------------------------------------------------------  
  184.   def profile_name   
  185.     @note.match(/<表示名\s?(.+?)\s?>/)
  186.     return @name unless $1
  187.     return $1
  188.   end
  189. end

  190. #==============================================================================
  191. # ■ Game_Actor
  192. #==============================================================================
  193. class Game_Actor < Game_Battler
  194.   #--------------------------------------------------------------------------
  195.   # ★ 経験値リストの呼び出し(追加定義)
  196.   #--------------------------------------------------------------------------  
  197.   def exp_list
  198.     @exp.to_a
  199.   end
  200.   #--------------------------------------------------------------------------
  201.   # ★ 指定IDの職業の経験値の取得
  202.   #--------------------------------------------------------------------------
  203.   def adv_exp(id)
  204.     @exp[id]
  205.   end
  206. end

  207. #==============================================================================
  208. # ■ Scene_Status(再定義)
  209. #==============================================================================
  210. class Scene_Status < Scene_MenuBase
  211.   #--------------------------------------------------------------------------
  212.   # ● 開始処理
  213.   #--------------------------------------------------------------------------
  214.   def start
  215.     super
  216.     create_status_main_command
  217.     create_status_sub_command
  218.     create_draw_window
  219.     create_small_status_window
  220.    
  221.     window_setup
  222.   end
  223.   #--------------------------------------------------------------------------
  224.   # ● メインコマンドウィンドウの作成
  225.   #--------------------------------------------------------------------------
  226.   def create_status_main_command
  227.     @main_command_window = Window_k_ExStatus_Main_Command.new(0,0)
  228.     @main_command_window.activate
  229.     @main_command_window.select(0)
  230.     @main_command_window.set_handler(:ok,   method(:select_main_command))
  231.     @main_command_window.set_handler(:cancel,   method(:return_scene))
  232.     @main_command_window.set_handler(:pagedown, method(:next_actor))
  233.     @main_command_window.set_handler(:pageup,   method(:prev_actor))
  234.   end
  235.   #--------------------------------------------------------------------------
  236.   # ● サブコマンドウィンドウの作成
  237.   #--------------------------------------------------------------------------
  238.   def create_status_sub_command
  239.     x = 0
  240.     y = @main_command_window.height + 24
  241.     height = Graphics.height - @main_command_window.height - 24
  242.     @sub_command_window = Window_k_ExStatus_Sub_Menu_Command.new(x,y,height)
  243.     @sub_command_window.unselect
  244.     @sub_command_window.opacity = 0
  245.     @sub_command_window.z += 100
  246.     @sub_command_window.deactivate
  247.     @sub_command_window.set_handler(:cancel,   method(:on_sub_command_cancel))
  248.     @sub_command_window.set_handler(:pagedown, method(:next_actor))
  249.     @sub_command_window.set_handler(:pageup,   method(:prev_actor))
  250.   end
  251.   #--------------------------------------------------------------------------
  252.   # ● 描画領域ウィンドウの作成
  253.   #--------------------------------------------------------------------------
  254.   def create_draw_window
  255.     x = 0
  256.     y = @main_command_window.height
  257.     ww = Graphics.width
  258.     wy = Graphics.height - @main_command_window.height
  259.     @draw_window = Window_k_ExStatus_Draw.new(x,y,ww,wy)
  260.     @draw_window.refresh   
  261.   end
  262.   #--------------------------------------------------------------------------
  263.   # ● キャラクターのスモールステータスウィンドウ作成
  264.   #--------------------------------------------------------------------------
  265.   def create_small_status_window
  266.     x = @main_command_window.width
  267.     y = 0
  268.     ww = Graphics.width - @main_command_window.width
  269.     height = @main_command_window.height
  270.     @status_window = Window_k_ExStatus_Small_Status.new(x,y,ww,height)   
  271.   end
  272.   #--------------------------------------------------------------------------
  273.   # ● ウィンドウのセットアップ処理
  274.   #--------------------------------------------------------------------------
  275.   def window_setup
  276.     @main_command_window.sub_command_window = @sub_command_window
  277.     @main_command_window.draw_window = @draw_window
  278.     @sub_command_window.draw_window = @draw_window
  279.   end
  280.   #--------------------------------------------------------------------------
  281.   # ● メインコマンド→サブコマンド
  282.   #--------------------------------------------------------------------------
  283.   def select_main_command
  284.     case KURE::ExStatus::VIEW_MAIN_MENU[@main_command_window.index]
  285.     when 0,4
  286.       @main_command_window.activate
  287.     when 1,2,3
  288.       @main_command_window.deactivate
  289.       @sub_command_window.select(0)
  290.       @sub_command_window.activate
  291.     end
  292.   end
  293.   #--------------------------------------------------------------------------
  294.   # ● サブコマンド→メインコマンド
  295.   #--------------------------------------------------------------------------
  296.   def on_sub_command_cancel
  297.     @main_command_window.activate
  298.     @sub_command_window.select(0)
  299.     @sub_command_window.unselect
  300.     @sub_command_window.deactivate
  301.   end
  302.   #--------------------------------------------------------------------------
  303.   # ● アクターの切り替え
  304.   #--------------------------------------------------------------------------
  305.   def on_actor_change
  306.     @status_window.refresh
  307.     @draw_window.refresh
  308.     @sub_command_window.refresh
  309.    
  310.     if @main_command_window.index > -1
  311.       @main_command_window.activate
  312.     end
  313.    
  314.     if @sub_command_window.index > -1
  315.       @sub_command_window.activate
  316.       @main_command_window.deactivate
  317.     end
  318.   end
  319. end

  320. #==============================================================================
  321. # ■ Window_k_ExStatus_Main_Command
  322. #==============================================================================
  323. class Window_k_ExStatus_Main_Command < Window_Command
  324.   attr_accessor :sub_command_window
  325.   attr_accessor :draw_window
  326.   #--------------------------------------------------------------------------
  327.   # ● オブジェクト初期化
  328.   #--------------------------------------------------------------------------
  329.   def initialize(x, y)
  330.     super(x, y)
  331.   end
  332.   #--------------------------------------------------------------------------
  333.   # ● ウィンドウ高さの取得
  334.   #--------------------------------------------------------------------------
  335.   def window_height
  336.     fitting_height(4)
  337.   end
  338.   #--------------------------------------------------------------------------
  339.   # ● →キーの処理
  340.   #--------------------------------------------------------------------------
  341.   def cursor_right(wrap = false)
  342.     @draw_window.draw_index(1) if @draw_window
  343.   end
  344.   #--------------------------------------------------------------------------
  345.   # ● ←キーの処理
  346.   #--------------------------------------------------------------------------
  347.   def cursor_left(wrap = false)
  348.     @draw_window.draw_index(-1) if @draw_window
  349.   end
  350.   #--------------------------------------------------------------------------
  351.   # ● カーソル位置の設定
  352.   #--------------------------------------------------------------------------
  353.   def index=(index)
  354.     @index = index
  355.     update_cursor
  356.     call_update_help
  357.     @sub_command_window.main_command_index = @index if @sub_command_window
  358.     @draw_window.draw_sub_command_index = 0 if @draw_window
  359.     @draw_window.main_command_index = @index if @draw_window
  360.   end
  361.   #--------------------------------------------------------------------------
  362.   # ● コマンドリストの作成
  363.   #--------------------------------------------------------------------------
  364.   def make_command_list
  365.     KURE::ExStatus::VIEW_MAIN_MENU.each{|id| add_command(KURE::ExStatus::MAIN_MENU[id], :ok)}
  366.   end
  367. end

  368. #==============================================================================
  369. # ■ Window_k_ExStatus_Small_Status
  370. #==============================================================================
  371. class Window_k_ExStatus_Small_Status < Window_Base
  372.   #--------------------------------------------------------------------------
  373.   # ● 公開インスタンス変数
  374.   #--------------------------------------------------------------------------
  375.   attr_reader   :pending_index            # 保留位置(並び替え用)
  376.   #--------------------------------------------------------------------------
  377.   # ● オブジェクト初期化
  378.   #--------------------------------------------------------------------------
  379.   def initialize(x, y,width,height)
  380.     super(x, y, width, height)
  381.     refresh
  382.   end
  383.   #--------------------------------------------------------------------------
  384.   # ● 項目の描画
  385.   #--------------------------------------------------------------------------
  386.   def draw_status
  387.     @actor = $game_party.menu_actor
  388.     draw_actor_face(@actor, 0, 0)
  389.     draw_actor_name(@actor, 100, line_height * 0)
  390.     draw_actor_class(@actor, 220,line_height * 0)
  391.     draw_actor_icons(@actor, 100,line_height * 2)
  392.     draw_actor_level(@actor, 100,line_height * 1)
  393.     draw_actor_hp(@actor, 220,line_height * 1)
  394.     draw_actor_mp(@actor, 220,line_height * 2)
  395.     draw_exp_info(120,line_height * 3)
  396.   end
  397.   #--------------------------------------------------------------------------
  398.   # ◎ 経験値情報の描画(追加定義)
  399.   #--------------------------------------------------------------------------
  400.   def draw_exp_info(x, y)
  401.     s1 = @actor.max_level? ? "-------" : @actor.next_level_exp - @actor.exp
  402.     s_next = "Next"
  403.     change_color(system_color)
  404.     draw_text(x + 100, y , 45, line_height, s_next)
  405.     change_color(normal_color)
  406.     draw_text(x + 140, y , 85, line_height, s1, 2)
  407.   end
  408.   #--------------------------------------------------------------------------
  409.   # ● リフレッシュ
  410.   #--------------------------------------------------------------------------
  411.   def refresh
  412.     contents.clear
  413.     draw_status
  414.   end
  415. end

  416. #==============================================================================
  417. # ■ Window_k_ExStatus_Sub_Menu_Command
  418. #==============================================================================
  419. class Window_k_ExStatus_Sub_Menu_Command < Window_Command
  420.   attr_accessor :draw_window
  421.   #--------------------------------------------------------------------------
  422.   # ● オブジェクト初期化
  423.   #--------------------------------------------------------------------------
  424.   def initialize(x, y,height)
  425.     @height = height
  426.     @main_command_index = 0
  427.     super(x, y)
  428.   end
  429.   #--------------------------------------------------------------------------
  430.   # ● ウィンドウ幅と高さの取得
  431.   #--------------------------------------------------------------------------
  432.   def window_width ; return 156 ; end
  433.   def window_height ; return @height ; end
  434.   #--------------------------------------------------------------------------
  435.   # ● カーソル位置の設定
  436.   #--------------------------------------------------------------------------
  437.   def index=(index)
  438.     @index = index
  439.     update_cursor
  440.     call_update_help
  441.    
  442.     return if !@draw_window or @index < 0
  443.     @draw_window.sub_command_index = @index
  444.     @draw_window.draw_sub_command_index = 0
  445.   end
  446.   #--------------------------------------------------------------------------
  447.   # ● →キーの処理
  448.   #--------------------------------------------------------------------------
  449.   def cursor_right(wrap = false)
  450.     @draw_window.draw_sub_command_index(1) if @draw_window
  451.   end
  452.   #--------------------------------------------------------------------------
  453.   # ● ←キーの処理
  454.   #--------------------------------------------------------------------------
  455.   def cursor_left(wrap = false)
  456.     @draw_window.draw_sub_command_index(-1) if @draw_window
  457.   end
  458.   #--------------------------------------------------------------------------
  459.   # ● メインコマンドインデックスの設定
  460.   #--------------------------------------------------------------------------
  461.   def main_command_index=(main_command_index)
  462.     return if @main_command_index == main_command_index
  463.     @main_command_index = main_command_index
  464.     refresh
  465.   end
  466.   #--------------------------------------------------------------------------
  467.   # ● コマンドリストの作成
  468.   #--------------------------------------------------------------------------
  469.   def make_command_list
  470.     @actor = $game_party.menu_actor
  471.     case KURE::ExStatus::VIEW_MAIN_MENU[@main_command_index]
  472.     when 0 ; make_command_list_1
  473.     when 1 ; make_command_list_2
  474.     when 2 ; make_command_list_3
  475.     when 3 ; make_command_list_4
  476.     when 4 ; make_command_list_5
  477.     end
  478.   end
  479.   #--------------------------------------------------------------------------
  480.   # ● サブコマンド1の作成
  481.   #--------------------------------------------------------------------------
  482.   def make_command_list_1
  483.   end
  484.   #--------------------------------------------------------------------------
  485.   # ● サブコマンド2の作成
  486.   #--------------------------------------------------------------------------
  487.   def make_command_list_2
  488.     KURE::ExStatus::VIEW_SUB_MENU[1].each{|com| add_command(KURE::ExStatus::SUB_MENU[1][com], :ok)}
  489.   end
  490.   #--------------------------------------------------------------------------
  491.   # ● サブコマンド3の作成
  492.   #--------------------------------------------------------------------------
  493.   def make_command_list_3
  494.     add_command("職業情報", :ok)
  495.     add_command("職業履歴", :ok)
  496.   end
  497.   #--------------------------------------------------------------------------
  498.   # ● サブコマンド4の作成
  499.   #--------------------------------------------------------------------------
  500.   def make_command_list_4
  501.     @actor.equips.each{|com| text = com ? com.name : "" ; add_command(text, :ok)}
  502.   end
  503.   #--------------------------------------------------------------------------
  504.   # ● サブコマンド5の作成
  505.   #--------------------------------------------------------------------------
  506.   def make_command_list_5
  507.   end
  508. end

  509. #==============================================================================
  510. # ■ Window_k_ExStatus_Draw
  511. #==============================================================================
  512. class Window_k_ExStatus_Draw < Window_Base
  513.   #--------------------------------------------------------------------------
  514.   # ● オブジェクト初期化
  515.   #--------------------------------------------------------------------------
  516.   def initialize(x, y, width, height)
  517.     super
  518.     @main_command_index = 0
  519.     @sub_command_index = 0
  520.     @draw_index = 0
  521.     @draw_sub_command_index = 0
  522.     @roop_call = 6
  523.     @draw_list = nil
  524.   end
  525.   #--------------------------------------------------------------------------
  526.   # ● メインコマンドインデックスの設定
  527.   #--------------------------------------------------------------------------
  528.   def main_command_index=(main_command_index)
  529.     return if @main_command_index == main_command_index
  530.     @main_command_index = main_command_index
  531.     refresh
  532.   end
  533.   #--------------------------------------------------------------------------
  534.   # ● サブコマンドインデックスの設定
  535.   #--------------------------------------------------------------------------
  536.   def sub_command_index=(sub_command_index)
  537.     return if @sub_command_index == sub_command_index
  538.     @sub_command_index = sub_command_index
  539.   end
  540.   #--------------------------------------------------------------------------
  541.   # ● 描画メインインデックスの設定
  542.   #--------------------------------------------------------------------------
  543.   def draw_index=(draw_index)
  544.     return if @draw_index == draw_index
  545.     @draw_index = draw_index
  546.     refresh
  547.   end
  548.   #--------------------------------------------------------------------------
  549.   # ● 描画サブインデックスの設定
  550.   #--------------------------------------------------------------------------
  551.   def draw_sub_command_index=(draw_sub_command_index)
  552.     @draw_sub_command_index = draw_sub_command_index
  553.     refresh
  554.   end
  555.   #--------------------------------------------------------------------------
  556.   # ● 描画メインインデックスの設定
  557.   #--------------------------------------------------------------------------
  558.   def draw_index(value)
  559.     @draw_index += value
  560.     refresh
  561.   end
  562.   #--------------------------------------------------------------------------
  563.   # ● 描画サブインデックスの設定
  564.   #--------------------------------------------------------------------------
  565.   def draw_sub_command_index(value)
  566.     @draw_sub_command_index += value
  567.     refresh
  568.   end
  569.   #--------------------------------------------------------------------------
  570.   # ● リフレッシュ
  571.   #--------------------------------------------------------------------------
  572.   def refresh
  573.     @actor = $game_party.menu_actor
  574.     contents.clear
  575.     case KURE::ExStatus::VIEW_MAIN_MENU[@main_command_index]
  576.     when 0 ; page_0_draw
  577.     when 1 ; page_1_draw
  578.     when 2 ; page_2_draw
  579.     when 3 ; page_3_draw
  580.     when 4 ; page_4_draw
  581.     end
  582.   end
  583.   #--------------------------------------------------------------------------
  584.   # ● 基本能力値(1-1ページの描画)
  585.   #--------------------------------------------------------------------------
  586.   def page_0_draw
  587.     last_font_size = contents.font.size
  588.    
  589.     @draw_postion_xparam = 0
  590.     @draw_postion_sparam = 0
  591.     3.times{|index|
  592.       pos_x = 5 + index * ((contents.width - 5) / 3)
  593.       
  594.       contents.font.size = last_font_size
  595.       case index
  596.       when 0 ; text = "基本能力"
  597.       when 1 ; text = "特殊能力"
  598.       when 2 ; text = "追加能力"
  599.       end
  600.       draw_gauge(pos_x ,0, ((contents.width - 5) / 3) - 15, 1, mp_gauge_color2,crisis_color)
  601.       draw_text(pos_x , 0, 160, line_height, text)
  602.       
  603.       contents.font.size = 20
  604.       case index
  605.       when 0 ; 8.times {|i| draw_actor_param(@actor, pos_x, line_height * 1, i) }
  606.       when 1 ; 10.times {|i| draw_actor_param(@actor, pos_x, line_height * 1, i + 10) }
  607.       when 2 ; 10.times {|i| draw_actor_param(@actor, pos_x, line_height * 1, i + 20) }
  608.       end
  609.     }   
  610.     contents.font.size = last_font_size
  611.   end
  612.   #--------------------------------------------------------------------------
  613.   # ● 能力値の描画(0ページの描画)
  614.   #--------------------------------------------------------------------------
  615.   def draw_actor_param(actor, x, y, param_id)
  616.     width = ((contents.width - 5) / 3) - 15
  617.     case param_id
  618.     when 0..7
  619.       draw_index = param_id
  620.       pos_y = y + contents.font.size * draw_index
  621.       
  622.       change_color(system_color)
  623.       draw_text(x, pos_y, width, contents.font.size, Vocab::param(param_id))
  624.       change_color(normal_color)
  625.       draw_text(x, pos_y, width, contents.font.size, actor.param(param_id), 2)      
  626.       
  627.       
  628.     when 10..19
  629.       xparam_id = param_id - 10
  630.       return if KURE::ExStatus::VIEW_Ex1[xparam_id][1] == 1
  631.       draw_index = @draw_postion_xparam
  632.       pos_y = y + contents.font.size * draw_index
  633.       @draw_postion_xparam += 1
  634.       
  635.       value = (@actor.xparam(xparam_id) * 100).to_i
  636.       draw_str = draw_value_s(value, 0)
  637.       
  638.       change_color(system_color)
  639.       draw_text(x, pos_y, width, contents.font.size, KURE::ExStatus::VIEW_Ex1[xparam_id][0])
  640.       change_color(normal_color)
  641.       draw_text(x, pos_y, width, contents.font.size, draw_str, 2)
  642.       
  643.     when 20..29
  644.       sparam_id = param_id - 20
  645.       return if KURE::ExStatus::VIEW_Ex2[sparam_id][1] == 1
  646.       draw_index = @draw_postion_sparam
  647.       pos_y = y + contents.font.size * draw_index
  648.       @draw_postion_sparam += 1
  649.       
  650.       value = (@actor.sparam(sparam_id) * 100).to_i
  651.       draw_str = draw_value_s(value, 100)

  652.       change_color(system_color)
  653.       draw_text(x, pos_y, width, contents.font.size, KURE::ExStatus::VIEW_Ex2[sparam_id][0])
  654.       change_color(normal_color)
  655.       draw_text(x, pos_y, width, contents.font.size, draw_str, 2)

  656.     end
  657.   end
  658.   #--------------------------------------------------------------------------
  659.   # ● 基本情報(1ページの描画)
  660.   #--------------------------------------------------------------------------
  661.   def page_1_draw   
  662.     draw_gauge(0,0, 132, 1, mp_gauge_color2,crisis_color)
  663.     draw_text(0, 0, 132, line_height,KURE::ExStatus::MAIN_MENU[KURE::ExStatus::VIEW_MAIN_MENU[@main_command_index]])
  664.    
  665.     case KURE::ExStatus::VIEW_SUB_MENU[1][@sub_command_index]
  666.     when 0 ; page_1_0_draw
  667.     when 1 ; page_1_1_draw
  668.     when 2 ; page_1_2_draw
  669.     when 3 ; page_1_3_draw
  670.     when 4 ; page_1_4_draw
  671.     when 5 ; page_1_5_draw
  672.     end
  673.   end
  674.   #--------------------------------------------------------------------------
  675.   # ● アクター特徴(1-0ページの描画)
  676.   #--------------------------------------------------------------------------
  677.   def page_1_0_draw   
  678.     draw_gauge(140,0, contents.width - 140, 1, mp_gauge_color2,crisis_color)
  679.     draw_text(140, 0, 200, line_height, "特征变化")
  680.    
  681.     last_font_size = contents.font.size
  682.     contents.font.size = 20
  683.    
  684.     draw_list = get_feature_text(@actor)
  685.     max = draw_list.size.div(22)
  686.     max -= 1 if draw_list.size.modulo(22) == 0
  687.    
  688.     @draw_sub_command_index = 0 if @draw_sub_command_index > max
  689.     @draw_sub_command_index = max if @draw_sub_command_index < 0
  690.    
  691.     first = 0 + 22 * @draw_sub_command_index
  692.     last = [21 + 22 * @draw_sub_command_index, draw_list.size].min
  693.    
  694.     draw_list[first..last].each_with_index{|text, index|
  695.       pos_x = 140 + index.modulo(2) * (((contents.width - 140)/ 2) - 5)
  696.       pos_y = line_height + contents.font.size * index.div(2)
  697.       draw_text(pos_x, pos_y, ((contents.width - 140) / 2) - 5, contents.font.size, text)
  698.     }
  699.             
  700.     draw_text(140, contents.height - line_height, contents.width - 140, line_height, "← →:翻页( " + (@draw_sub_command_index + 1).to_s  + " / " + (max + 1).to_s + ")",1)
  701.     contents.font.size = last_font_size
  702.   end
  703.   #--------------------------------------------------------------------------
  704.   # ● 属性有効度(1-1ページの描画)
  705.   #--------------------------------------------------------------------------
  706.   def page_1_1_draw
  707.     draw_gauge(140,0, contents.width - 140, 1, mp_gauge_color2,crisis_color)
  708.     draw_text(140, 0, 200, line_height, "属性有効度")
  709.    
  710.     #1ページの最大描画数、ページ数を取得
  711.     elements = KURE::ExStatus::VIEW_ELEMENT.size
  712.     max_list = (((contents.height - 48) / line_height).to_i) * 2
  713.     max_page = (elements / max_list).to_i + 1
  714.    
  715.     #ページ切り替えによる表示項目を取得
  716.     @draw_sub_command_index = 0 if @draw_sub_command_index > max_page - 1
  717.     @draw_sub_command_index = max_page - 1 if @draw_sub_command_index < 0
  718.     first_num = max_list * @draw_sub_command_index + 1
  719.     last_num = [(max_list * (@draw_sub_command_index + 1)), elements].min + 1   
  720.    
  721.     draw_actor_elements_regist(@actor, 140, line_height * 1, KURE::ExStatus::VIEW_ELEMENT[first_num..last_num])
  722.    
  723.     draw_text(140, contents.height - line_height, contents.width - 140, line_height, "← →:翻页( " + (@draw_sub_command_index + 1).to_s  + " / " + max_page.to_s + ")",1)
  724.   end
  725.   #--------------------------------------------------------------------------
  726.   # ● 属性有効度の描画(1-1ページの描画)
  727.   #--------------------------------------------------------------------------
  728.   def draw_actor_elements_regist(actor, x, y, list)
  729.     list.each_with_index{|block, index|
  730.       pos_x = x + ((contents.width - 140) / 2) * index.modulo(2)
  731.       pos_y = y + line_height * index.div(2)
  732.       name = $data_system.elements[block[0]]
  733.       icon_index = block[1]
  734.       value = draw_value_s((@actor.element_rate(block[0]) * 100).to_i, 100)
  735.       
  736.       draw_icon(icon_index, pos_x, pos_y)
  737.       change_color(system_color)
  738.       draw_text(pos_x + 30, pos_y, 80, line_height, name)
  739.       change_color(normal_color)
  740.       draw_text(pos_x + 110, pos_y, ((contents.width - 140) / 2) - 120, line_height, value, 2)
  741.     }
  742.   end
  743.   #--------------------------------------------------------------------------
  744.   # ● ステート耐性(1-2ページの描画)
  745.   #--------------------------------------------------------------------------
  746.   def page_1_2_draw
  747.     draw_gauge(140,0, contents.width - 140, 1, mp_gauge_color2,crisis_color)
  748.     draw_text(140, 0, 200, line_height, "状态耐性")
  749.         
  750.     #1ページの最大描画数、ページ数を取得
  751.     state = KURE::ExStatus::VIEW_STATE.size
  752.     max_list = (((contents.height - 48) / line_height).to_i) * 2
  753.     max_page = (state / max_list).to_i + 1
  754.    
  755.     #ページ切り替えによる表示項目を取得
  756.     @draw_sub_command_index = 0 if @draw_sub_command_index > max_page - 1
  757.     @draw_sub_command_index = max_page - 1 if @draw_sub_command_index < 0
  758.     first_num = max_list * @draw_sub_command_index + 1
  759.     last_num = [(max_list * (@draw_sub_command_index + 1)), state].min + 1   
  760.    
  761.     draw_actor_state_regist(@actor, 140, line_height * 1, KURE::ExStatus::VIEW_STATE[first_num..last_num])
  762.    
  763.     draw_text(140, contents.height - line_height, contents.width - 140, line_height, "← →:翻页( " + (@draw_sub_command_index + 1).to_s  + " / " + max_page.to_s + ")",1)
  764.   end
  765.   #--------------------------------------------------------------------------
  766.   # ● ステート耐性の描画(1-2ページの描画)
  767.   #--------------------------------------------------------------------------
  768.   def draw_actor_state_regist(actor, x, y, list)
  769.     list.each_with_index{|id, index|
  770.       pos_x = x + ((contents.width - 140) / 2) * index.modulo(2)
  771.       pos_y = y + line_height * index.div(2)
  772.       name = $data_states[id].name
  773.       icon_index = $data_states[id].icon_index
  774.       value = draw_value_s((@actor.state_rate(id) * 100).to_i, 100)
  775.       value = "無効" if @actor.state_resist?(id)
  776.       
  777.       draw_icon(icon_index, pos_x, pos_y)
  778.       change_color(system_color)
  779.       draw_text(pos_x + 30, pos_y, 80, line_height, name)
  780.       change_color(normal_color)
  781.       draw_text(pos_x + 110, pos_y, ((contents.width - 140) / 2) - 120, line_height, value, 2)
  782.     }
  783.   end
  784.   #--------------------------------------------------------------------------
  785.   # ● 習得中スキルリスト(1-3ページの描画)
  786.   #--------------------------------------------------------------------------
  787.   def page_1_3_draw
  788.     draw_gauge(140,0, contents.width - 140, 1, mp_gauge_color2,crisis_color)
  789.     draw_text(140, 0, 200, line_height, "習得中スキルリスト")
  790.   end
  791.   #--------------------------------------------------------------------------
  792.   # ● 個人能力リスト(1-4ページの描画)
  793.   #--------------------------------------------------------------------------
  794.   def page_1_4_draw
  795.     draw_gauge(140,0, contents.width - 140, 1, mp_gauge_color2,crisis_color)
  796.     draw_text(140, 0, 200, line_height, KURE::ExStatus::SUB_MENU[1][4])
  797.    
  798.     draw_FREE_SPACE = KURE::ExStatus::FREE_SPACE[@actor.id]
  799.     return unless draw_FREE_SPACE
  800.    
  801.     max = draw_FREE_SPACE.size.div(9)
  802.     max -= 1 if draw_FREE_SPACE.size.modulo(9) == 0
  803.    
  804.     @draw_sub_command_index = 0 if @draw_sub_command_index > max
  805.     @draw_sub_command_index = max if @draw_sub_command_index < 0
  806.    
  807.     first = 0 + 9 * @draw_sub_command_index
  808.     last = [8 + 9 * @draw_sub_command_index, draw_FREE_SPACE.size].min
  809.    
  810.    
  811.     draw_FREE_SPACE[first..last].each_with_index{|line, index| draw_text_ex(140, line_height * (index + 1), line)}
  812.     draw_text(140, contents.height - line_height, contents.width - 140, line_height, "← →:翻页( " + (@draw_sub_command_index + 1).to_s  + " / " + (max + 1).to_s + ")",1)
  813.   end
  814.   #--------------------------------------------------------------------------
  815.   # ■ 職業履歴(2ページの描画)
  816.   #--------------------------------------------------------------------------
  817.   def page_2_draw  
  818.     draw_gauge(0,0, 132, 1, mp_gauge_color2,crisis_color)
  819.     draw_text(0, 0, 126, line_height,KURE::ExStatus::MAIN_MENU[KURE::ExStatus::VIEW_MAIN_MENU[@main_command_index]])
  820.    
  821.     draw_gauge(140,0, contents.width - 140, 1, mp_gauge_color2,crisis_color)
  822.     case @sub_command_index
  823.     when 0
  824.       draw_text(140, 0, 200, line_height, "職業情報")
  825.       draw_job_info(140,line_height * 1)
  826.     when 1
  827.       draw_text(140, 0, 200, line_height, "職業履歴")
  828.       draw_job_exp(140,line_height * 1)
  829.     end
  830.   end
  831.   #--------------------------------------------------------------------------
  832.   # ■ 職業情報の描画
  833.   #--------------------------------------------------------------------------
  834.   def draw_job_info(x,y)
  835.     class_list = [@actor.class_id]
  836.     if $kure_integrate_script[:multiclass]
  837.       list = @actor.adv_class_id.collect{|block| block[0] if block}
  838.       class_list += list
  839.     end
  840.     class_list.compact!
  841.     class_list.each_with_index{|id, index|
  842.       pos_y = y + (line_height * 2) * index
  843.       class_name = $data_classes[id].name
  844.       
  845.       class_level = 1
  846.       while $data_classes[id].exp_for_level(class_level) <= @actor.adv_exp(id) do
  847.         class_level += 1
  848.       end
  849.       class_level -= 1
  850.       
  851.       draw_text(x, pos_y, 300, contents.font.size, class_name + "  Lv " + class_level.to_s)
  852.       
  853.       need = $data_classes[id].exp_for_level(class_level + 1) - $data_classes[id].exp_for_level(class_level)
  854.       now = @actor.adv_exp(id) - $data_classes[id].exp_for_level(class_level)
  855.       rate = need != 0 ? now.to_f / need : 0
  856.       
  857.       pos_y += line_height
  858.       draw_gauge(x + 20, pos_y, 170, rate, tp_gauge_color1, tp_gauge_color2)
  859.       change_color(system_color)
  860.       draw_text(x + 20, pos_y, 30, line_height, "EXP")
  861.       draw_current_and_max_values(x + 20, pos_y, 170, now, need, mp_color(@actor), normal_color)
  862.       
  863.       change_color(system_color)
  864.       draw_text(x + 230, pos_y, 40, line_height, "Next")
  865.       change_color(normal_color)
  866.       draw_text(x + 240, pos_y, contents.width - (x + 250), line_height, (need - now).to_s, 2)
  867.     }
  868.   end
  869.   #--------------------------------------------------------------------------
  870.   # ■ 職業経験の描画
  871.   #--------------------------------------------------------------------------
  872.   def draw_job_exp(x,y)
  873.     last_font_size = contents.font.size
  874.     contents.font.size = 20
  875.    
  876.     exp_list = @actor.exp_list
  877.     max = exp_list.size.div(22)
  878.     max -= 1 if exp_list.size.modulo(22) == 0
  879.    
  880.     @draw_sub_command_index = 0 if @draw_sub_command_index > max
  881.     @draw_sub_command_index = max if @draw_sub_command_index < 0
  882.    
  883.     first = 0 + 22 * @draw_sub_command_index
  884.     last = [21 + 22 * @draw_sub_command_index, exp_list.size].min
  885.    
  886.     exp_list[first..last].each_with_index{|block, index|
  887.       pos_x = x + ((contents.width - 140) / 2) * index.modulo(2)
  888.       pos_y = y + contents.font.size * index.div(2)      
  889.       
  890.       class_name = $data_classes[block[0]].name
  891.       class_level = 1
  892.       while $data_classes[block[0]].exp_for_level(class_level) <= block[1] do
  893.         class_level += 1
  894.       end
  895.       class_level -= 1
  896.       
  897.       if $kure_integrate_script[:multiclass]
  898.         list = @actor.adv_class_id.collect{|block| block[0] if block}
  899.         change_color(power_up_color) if block[0] == @actor.class_id or list.include?(block[0])
  900.       else
  901.         change_color(power_up_color) if block[0] == @actor.class_id
  902.       end
  903.       draw_text(pos_x, pos_y, (contents.width - 140) / 2 - 15, contents.font.size, class_name)
  904.       draw_text(pos_x, pos_y, (contents.width - 140) / 2 - 15, contents.font.size, "Lv " + class_level.to_s, 2)
  905.       change_color(normal_color)
  906.     }
  907.     draw_text(140, contents.height - line_height, contents.width - 140, line_height, "← →:翻页( " + (@draw_sub_command_index + 1).to_s  + " / " + (max + 1).to_s + ")",1)   
  908.     contents.font.size = last_font_size
  909.   end
  910.   
  911.   
  912.   #--------------------------------------------------------------------------
  913.   # ▲ 基本情報(3ページの描画)
  914.   #--------------------------------------------------------------------------
  915.   def page_3_draw   
  916.     draw_gauge(0,0, 132, 1, mp_gauge_color2,crisis_color)
  917.     draw_text(0, 0, 126, line_height,KURE::ExStatus::MAIN_MENU[KURE::ExStatus::VIEW_MAIN_MENU[@main_command_index]])
  918.    
  919.     #アイテム特徴のページ数を決定
  920.     item = @actor.equips[@sub_command_index]
  921.     if !@draw_list or @draw_list[0] != item
  922.       @draw_list = []
  923.       @draw_list[0] = item
  924.       @draw_list[1] = get_feature_text(item)
  925.     end
  926.       
  927.     feature_page = @draw_list[1].size.div(22) + 1
  928.     feature_page -= 1 if @draw_list[1].size.modulo(22) == 0
  929.    
  930.     f_page = [1] * feature_page
  931.     page_list = [0] + f_page + KURE::ExStatus::VIEW_Ex3
  932.     max = page_list.size - 1
  933.    
  934.     @draw_sub_command_index = 0 if @draw_sub_command_index > max
  935.     @draw_sub_command_index = max if @draw_sub_command_index < 0
  936.    
  937.     draw_gauge(140,0, contents.width - 140, 1, mp_gauge_color2,crisis_color)
  938.     case page_list[@draw_sub_command_index]
  939.     when 0
  940.       draw_text(140, 0, 200, line_height, "装备属性")
  941.       draw_equipments_status(140, line_height * 1, item)
  942.     when 1
  943.       draw_text(140, 0, 200, line_height, "装备特征")
  944.       draw_equipments_features(140,line_height * 1, @draw_list[1])
  945.     when 2
  946.       draw_text(140, 0, 200, line_height, "装備アイテムスロット")
  947.       draw_equipments_slot(140,line_height * 1, item)
  948.     when 3
  949.       draw_text(140, 0, 200, line_height, "装備アイテムシンボル")
  950.       draw_equipments_symbol(140,line_height * 1, item)
  951.     end
  952.    
  953.     draw_text(140, contents.height - line_height, contents.width - 140, line_height, "← →:翻页( " + (@draw_sub_command_index + 1).to_s  + " / " + page_list.size.to_s + ")",1)
  954.   end
  955.   #--------------------------------------------------------------------------
  956.   # ▲ 装備品の描画(3ページ目、INDEX0)
  957.   #--------------------------------------------------------------------------
  958.   def draw_equipments_status(x, y ,item)
  959.     return unless item
  960.     last_font_size = contents.font.size
  961.     contents.font.size = 20
  962.     #装備名を描画
  963.     draw_item_name(item, x, y)
  964.     y += line_height
  965.    
  966.     8.times{|param_id|
  967.       pos_y = y + contents.font.size * param_id
  968.       change_color(system_color)
  969.       draw_text(x + 10, pos_y, (contents.width - x) / 2 - 50, contents.font.size, Vocab::param(param_id))
  970.       change_color(normal_color)
  971.       draw_text(x + 10, pos_y, (contents.width - x) / 2 - 50, contents.font.size, item.params[param_id], 2)
  972.     }
  973.    
  974.     contents.font.size = last_font_size
  975.   end
  976.   #--------------------------------------------------------------------------
  977.   # ▲ 装備品の特徴(3ページ目、INDEX1)
  978.   #--------------------------------------------------------------------------
  979.   def draw_equipments_features(x, y, list)
  980.     last_font_size = contents.font.size
  981.     contents.font.size = 20
  982.         
  983.     first = 0 + 22 * (@draw_sub_command_index - 1)
  984.     last = [21 + 22 * (@draw_sub_command_index - 1) , list.size].min
  985.    
  986.     list[first..last].each_with_index{|text, index|
  987.       pos_x = 140 + index.modulo(2) * (((contents.width - 140)/ 2) - 5)
  988.       pos_y = line_height + contents.font.size * index.div(2)
  989.       draw_text(pos_x, pos_y, ((contents.width - 140) / 2) - 5, contents.font.size, text)
  990.     }
  991.    
  992.     contents.font.size = last_font_size
  993.   end
  994.   #--------------------------------------------------------------------------
  995.   # ▲ 装備品のスロット(3ページ目、INDEX2)
  996.   #--------------------------------------------------------------------------
  997.   def draw_equipments_slot(x, y, item)
  998.     draw_equipments_slot_symbol(x, y, item, 2)
  999.   end
  1000.   #--------------------------------------------------------------------------
  1001.   # ▲ 装備品のシンボル(3ページ目、INDEX3)
  1002.   #--------------------------------------------------------------------------
  1003.   def draw_equipments_symbol(x, y, item)
  1004.     draw_equipments_slot_symbol(x, y, item, 3)
  1005.   end
  1006.   #--------------------------------------------------------------------------
  1007.   # ▲ 装備品のスロットやシンボル描画(INDEX2,3)
  1008.   #--------------------------------------------------------------------------
  1009.   def draw_equipments_slot_symbol(x, y, item, mode)
  1010.     return unless $kure_integrate_script[:SortOut]
  1011.     return unless item
  1012.    
  1013.     #リストを取得
  1014.     case mode
  1015.     when 2 ; slot_list = item.slot_list ; slot_max_size = item.max_slot_number
  1016.     when 3 ; slot_list = item.symbol_list.collect{|obj| obj[0] } ; slot_max_size = item.max_symbol_number
  1017.     end
  1018.    
  1019.     #描画
  1020.     slot_max_size.times{|id|
  1021.       case id
  1022.       when 0..8
  1023.         pos_y = y + line_height * id ; pos_x = x
  1024.       when 9..18
  1025.         pos_y = y + line_height * (id - 9)
  1026.         pos_x = x + ((contents.width - x) / 2) - 10
  1027.       end
  1028.       draw_text(pos_x + 5, pos_y, 25, line_height, id + 1)
  1029.       draw_item_name(slot_list[id], pos_x + 30, pos_y) if slot_list[id]
  1030.     }
  1031.   end
  1032.   
  1033.   #--------------------------------------------------------------------------
  1034.   # ★ プロフィール(4ページの描画)
  1035.   #--------------------------------------------------------------------------
  1036.   def page_4_draw
  1037.    
  1038.     @draw_index = 0 if @draw_index > 1
  1039.     @draw_index = 1 if @draw_index < 0
  1040.     @draw_index = 0 if KURE::ExStatus::PROFILE2[@actor.id] == nil
  1041.    
  1042.     case @draw_index
  1043.     when 0
  1044.       page_4_1_draw
  1045.       draw_text(280, contents.height - line_height, contents.width - 280, line_height, "← →:翻页( 1 / 2 )",1) if KURE::ExStatus::PROFILE2[@actor.id] != nil
  1046.     when 1
  1047.       page_4_2_draw
  1048.       draw_text(280, contents.height - line_height, contents.width - 280, line_height, "← →:翻页( 2 / 2 )",1)
  1049.     end
  1050.   end
  1051.   #--------------------------------------------------------------------------
  1052.   # ★ プロフィール(4-1ページの描画)
  1053.   #--------------------------------------------------------------------------
  1054.   def page_4_1_draw  
  1055.     draw_gauge(5,0, contents.width, 1, mp_gauge_color2,crisis_color)
  1056.     draw_text(5, 0, 126, line_height, KURE::ExStatus::MAIN_MENU[KURE::ExStatus::VIEW_MAIN_MENU[@main_command_index]])
  1057.     draw_text(150, 0, contents.width - 280, line_height, @actor.actor.profile_name)
  1058.     draw_actor_nickname(@actor, contents.width - 150,0)
  1059.    
  1060.     #描画内容を変数で判断
  1061.     if KURE::ExStatus::PROFILE_NUM[@actor.id - 1] != 0
  1062.       draw_profile = $game_variables[KURE::ExStatus::PROFILE_NUM[@actor.id - 1]]
  1063.     else
  1064.       draw_profile = 0
  1065.     end
  1066.    
  1067.     data = KURE::ExStatus::PROFILE[@actor.id]
  1068.    
  1069.     #立ち絵グラフィックを設定
  1070.     if data && data[draw_profile] && data[draw_profile].size != 0
  1071.       
  1072.       #立ち絵の選択
  1073.       if data[draw_profile][0] == 1
  1074.         lastname = File.extname($game_actors[@actor.id].face_name)
  1075.         basename = File.basename($game_actors[@actor.id].face_name, lastname)
  1076.         bitmap = Cache.picture(basename + "-" + ($game_actors[@actor.id].face_index + 1).to_s + lastname)
  1077.         draw_standpicture = 1
  1078.       elsif data[draw_profile][0] != nil
  1079.         bitmap = Cache.picture(data[draw_profile][0])
  1080.         draw_standpicture = 1
  1081.       else
  1082.         draw_standpicture = 0
  1083.       end
  1084.       
  1085.       case draw_standpicture
  1086.       when 0 ; profile_x = 0
  1087.       when 1
  1088.         self.contents.blt(0, contents.height - bitmap.rect.height + 24, bitmap, bitmap.rect)
  1089.         profile_x = 280
  1090.       end


  1091.       #プロフィールを描画
  1092.       for i in 1..data[draw_profile].size - 1
  1093.         draw_text_ex(profile_x, line_height * i, data[draw_profile][i])
  1094.       end
  1095.     end
  1096.   end
  1097.   #--------------------------------------------------------------------------
  1098.   # ● プロフィール(4-2ページの描画)
  1099.   #--------------------------------------------------------------------------
  1100.   def page_4_2_draw
  1101.     draw_gauge(5,0, contents.width, 1, mp_gauge_color2,crisis_color)
  1102.     draw_text(5, 0, 126, line_height, KURE::ExStatus::MAIN_MENU[KURE::ExStatus::VIEW_MAIN_MENU[@main_command_index]])
  1103.     draw_text(150, 0, contents.width - 280, line_height, @actor.actor.profile_name)
  1104.     draw_actor_nickname(@actor, contents.width - 150,0)
  1105.    
  1106.     #描画内容を変数で判断
  1107.     if KURE::ExStatus::PROFILE_NUM2[@actor.id - 1] != 0
  1108.       draw_profile = $game_variables[KURE::ExStatus::PROFILE_NUM2[@actor.id - 1]]
  1109.     else
  1110.       draw_profile = 0
  1111.     end
  1112.    
  1113.     data = KURE::ExStatus::PROFILE2[@actor.id]
  1114.    
  1115.     #プロフィールが設定されているかをチェックする
  1116.     if data && data[draw_profile] && data[draw_profile].size != 0
  1117.       data[draw_profile].each_with_index{|text, index| draw_text_ex(0, line_height * (index +1), text)}
  1118.     end
  1119.   end
  1120.   #--------------------------------------------------------------------------
  1121.   # ◎ 表示内容の設定(共通呼び出し項目)
  1122.   #--------------------------------------------------------------------------
  1123.   def draw_value_s(val,baseval)
  1124.     return val.to_s + "%" if KURE::ExStatus::VIEW_MODE == 0
  1125.     value = val - baseval
  1126.     str = value > 0 ? "+" + value.to_s + "%" : value.to_s + "%"
  1127.     return str
  1128.   end
  1129.   #--------------------------------------------------------------------------
  1130.   # ◎ 特徴文字列の取得(共通呼び出し項目)
  1131.   #--------------------------------------------------------------------------
  1132.   def get_feature_text(item)
  1133.     return [] unless item
  1134.     return KURE.call_add_feature_txt(item) if $kure_integrate_script[:integrate]
  1135.     return KURE.basic_actor_add_feature_txt(item)
  1136.   end
  1137. end

  1138. #メモ欄の取得に関するスクリプト処理群-------------------------------------------
  1139. module KURE
  1140.   #--------------------------------------------------------------------------
  1141.   # ◎ 特徴の文字配列の呼び出し(基本)(共通呼び出し項目)
  1142.   #--------------------------------------------------------------------------  
  1143.   def self.basic_actor_add_feature_txt(item)
  1144.     return [] unless item
  1145.     draw_txt = Array.new
  1146.     #コードのID配列を取得
  1147.     object = item.is_a?(Game_Actor) ? item.all_features : item.features
  1148.    
  1149.     code_list = object.collect{|ft|
  1150.       case ft.code
  1151.       when 11,12,13,21,23,22,32,62,64
  1152.         [ft.code, ft.data_id]
  1153.       when 14,31,41,42,43,44,53,54,55,33,34,61
  1154.         [ft.code, 0]
  1155.       end
  1156.       }
  1157.     code_list.compact!
  1158.     code_list.uniq!
  1159.     #書きだし
  1160.     code_list.each{|block|
  1161.       case block[0]
  1162.       when 14,31,41,42,43,44,53,54,55,62,64
  1163.         data = features_set_data(item, block[0])
  1164.         case block[0]
  1165.         when 31 ; data.each{|id| draw_txt.push($data_system.elements[id] + "属性 ")}
  1166.         when 14 ; data.each{|id| draw_txt.push($data_states[id].name + "無効 ")}
  1167.         when 41 ; data.each{|id| draw_txt.push($data_system.skill_types[id] + ":可以使用 ")}
  1168.         when 42 ; data.each{|id| draw_txt.push($data_system.skill_types[id] + ":不能使用 ")}
  1169.         when 43 ; data.each{|id| draw_txt.push($data_skills[id].name + ":可以使用 ")}
  1170.         when 44 ; data.each{|id| draw_txt.push($data_skills[id].name + ":不能使用 ")}
  1171.         when 53 ; data.each{|id| draw_txt.push($data_system.terms.etypes[id] + "固定 ")}
  1172.         when 54 ; data.each{|id| draw_txt.push($data_system.terms.etypes[id] + "封印 ")}
  1173.         when 55 ; draw_txt.push("二刀流 ") if data.max == 1
  1174.         when 62
  1175.           case block[1]
  1176.           when 0 ; draw_txt.push("自動戦闘 ")
  1177.           when 1 ; draw_txt.push("自動防御 ")
  1178.           when 2 ; draw_txt.push("自動献身 ")
  1179.           when 3 ; draw_txt.push("TP持越 ")
  1180.           end
  1181.         when 64
  1182.           case block[1]
  1183.           when 0 ; draw_txt.push("遇敌率↓ ")
  1184.           when 1 ; draw_txt.push("敌出现率0 ")
  1185.           when 2 ; draw_txt.push("被先制无效 ")
  1186.           when 3 ; draw_txt.push("先制率上升 ")
  1187.           when 4 ; draw_txt.push("获得金钱2倍 ")            
  1188.           when 5 ; draw_txt.push("Drop率2倍 ")
  1189.           end
  1190.         end
  1191.       when 11,12,13,21,23
  1192.         data = (features_pi_data(item, block[0], block[1]) * 100).to_i
  1193.         case block[0]
  1194.         when 11 ; draw_txt.push($data_system.elements[block[1]] + "有効度" + data.to_s + "% ")
  1195.         when 12 ; draw_txt.push(Vocab::param(block[1]) + "弱体有効度" + data.to_s + "% ")
  1196.         when 13 ; draw_txt.push($data_states[block[1]].name + "有効度" + data.to_s + "% ")
  1197.         when 21
  1198.           data2 = data > 100 ? "+" + (data - 100).to_s : (data - 100).to_s
  1199.           draw_txt.push(Vocab::param(block[1]) + data2 + "% ")
  1200.         when 23
  1201.           next if data == 100
  1202.           case block[1]
  1203.           when 0 ; draw_str = "仇恨"
  1204.           when 1 ; draw_str = "防御効果"
  1205.           when 2 ; draw_str = "回復効果"
  1206.           when 3 ; draw_str = "药的知识"
  1207.           when 4 ; draw_str = "MP消費率"
  1208.           when 5 ; draw_str = "TP获得率"
  1209.           when 6 ; draw_str = "被物理伤害"
  1210.           when 7 ; draw_str = "被魔法伤害"
  1211.           when 8 ; draw_str = "床Dmg"
  1212.           when 9 ; draw_str = "经验值"
  1213.           end
  1214.           data2 = data > 100 ? "+" + (data - 100).to_s : (data - 100).to_s
  1215.           draw_txt.push(draw_str + data2 + "% ")
  1216.         end
  1217.       when 22,32
  1218.         data = (features_sum_data(item, block[0], block[1]) * 100).to_i
  1219.         case block[0]
  1220.         when 22
  1221.           case block[1]
  1222.           when 0 ; draw_str = "命中"
  1223.           when 1 ; draw_str = "闪避"
  1224.           when 2 ; draw_str = "暴击"
  1225.           when 3 ; draw_str = "暴击闪避"     
  1226.           when 4 ; draw_str = "魔法闪避"
  1227.           when 5 ; draw_str = "魔法反射"
  1228.           when 6 ; draw_str = "反击"
  1229.           when 7 ; draw_str = "HP再生"
  1230.           when 8 ; draw_str = "MP再生"
  1231.           when 9 ; draw_str = "TP再生"
  1232.           end
  1233.           data2 = data > 0 ? "+" + data.to_s : data.to_s
  1234.           draw_txt.push(draw_str + data2 + "% ")
  1235.         when 32
  1236.           draw_txt.push($data_states[block[1]].name + "付与" + data.to_s + "% ")
  1237.         end
  1238.       when 33,34
  1239.         data = features_sum_all_data(item, block[0])
  1240.         case block[0]
  1241.         when 33
  1242.           next if data == 0
  1243.           draw_txt.push("攻击速度增加") if data > 0
  1244.           draw_txt.push("攻击速度减少") if data < 0
  1245.         when 34
  1246.           next if data == 0
  1247.           draw_txt.push("攻击增加" + data.to_s + "回 ") if data > 0
  1248.           draw_txt.push("攻击减少" + data.to_s + "回 ") if data < 0
  1249.         end
  1250.       when 61
  1251.         data = features_data(item, 61).collect{|ft| (ft.value * 100).to_i}
  1252.         data.each{|id| draw_txt.push("额外行动" + id.to_s + "% ")}        
  1253.       end
  1254.     }
  1255.   
  1256.     return draw_txt
  1257.   end
  1258.   #--------------------------------------------------------------------------
  1259.   # ★ 特徴オブジェクトの配列取得(特徴コードを限定)(追加定義)
  1260.   #--------------------------------------------------------------------------
  1261.   def self.features_data(item, code)
  1262.     object = item.is_a?(Game_Actor) ? item.all_features : item.features
  1263.     object.select {|ft| ft.code == code }
  1264.   end
  1265.   #--------------------------------------------------------------------------
  1266.   # ★ 特徴オブジェクトの配列取得(特徴コードとデータ ID を限定)(追加定義)
  1267.   #--------------------------------------------------------------------------
  1268.   def self.features_with_id_data(item, code, id)
  1269.     object = item.is_a?(Game_Actor) ? item.all_features : item.features
  1270.     object.select {|ft| ft.code == code && ft.data_id == id }
  1271.   end
  1272.   #--------------------------------------------------------------------------
  1273.   # ★ 特徴値の総乗計算(追加定義)
  1274.   #--------------------------------------------------------------------------
  1275.   def self.features_pi_data(item, code, id)
  1276.     features_with_id_data(item, code, id).inject(1.0) {|r, ft| r *= ft.value }
  1277.   end
  1278.   #--------------------------------------------------------------------------
  1279.   # ★ 特徴値の総和計算(データ ID を指定)(追加定義)
  1280.   #--------------------------------------------------------------------------
  1281.   def self.features_sum_data(item, code, id)
  1282.     features_with_id_data(item, code, id).inject(0.0) {|r, ft| r += ft.value }
  1283.   end
  1284.   #--------------------------------------------------------------------------
  1285.   # ★ 特徴値の総和計算(データ ID は非指定)(追加定義)
  1286.   #--------------------------------------------------------------------------
  1287.   def self.features_sum_all_data(item, code)
  1288.     features_data(item, code).inject(0.0) {|r, ft| r += ft.value }
  1289.   end
  1290.   #--------------------------------------------------------------------------
  1291.   # ★ 特徴の集合和計算(追加定義)
  1292.   #--------------------------------------------------------------------------
  1293.   def self.features_set_data(item, code)
  1294.     features_data(item, code).inject([]) {|r, ft| r |= [ft.data_id] }
  1295.   end
  1296. end
复制代码
这是我工程里面扒下来的,你需要自己设置成自己想要的模式,否侧有报错的可能
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-7 11:56

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表