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

Project1

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

[转载] KGC多人队伍汉化版本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
616 小时
注册时间
2010-10-29
帖子
463
跳转到指定楼层
1
发表于 2011-8-4 13:15:42 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 896409879 于 2011-8-4 15:43 编辑

没事就汉化了一下。(界面汉化)

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/    ◆ 多人数パーティ - KGC_LargeParty ◆ VX ◆

  1. #_/    ◇ Last update : 2008/04/27 ◇
  2. #_/----------------------------------------------------------------------------
  3. #_/  5人以上の大規模パーティを構築可能にします。
  4. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

  5. #==============================================================================
  6. # ★ カスタマイズ項目 - Customize ★
  7. #==============================================================================

  8. module KGC
  9. module LargeParty
  10.   # ◆ パーティ編成許可を表すスイッチ番号
  11.   #  このスイッチの ON/OFF でパーティ編成の 許可/不許可 を切り替えます。
  12.   PARTYFORM_SWITCH          = 1
  13.   # ◆ 戦闘中のパーティ編成許可を表すスイッチ番号
  14.   #  ↑と異なる番号を指定すると、戦闘中のみの入れ替え可否を設定できます。
  15.   BATTLE_PARTYFORM_SWITCH   = 1
  16.   # ◆ デフォルトの編成許可フラグ
  17.   #  true にすると、「ニューゲーム」選択時に両方のパーティ編成許可スイッチが
  18.   #  自動的に ON になります。
  19.   DEFAULT_PARTYFORM_ENABLED = true

  20.   # ◆ 戦闘メンバー最大数 (デフォルト値)
  21.   #  5 以上にすると、戦闘画面のステータスがやや見辛くなります。
  22.   MAX_BATTLE_MEMBERS = 5
  23.   # ◆ パーティメンバー最大数
  24.   #  Game_Party::MAX_MEMBERS を上書きします。
  25.   #  100 以上にすると [Window_MenuStatus] がバグります。
  26.   MAX_MEMBERS = 99

  27.   # ◆ 固定メンバーの並び替えを禁止
  28.   #  スクリプトからの操作以外では並び替えできなくなります。
  29.   FORBID_CHANGE_SHIFT_FIXED = false

  30.   # ◆ 待機メンバーの背景色
  31.   #  色を変えない場合は  Color.new(0, 0, 0, 0)
  32.   STAND_BY_COLOR = Color.new(0, 0, 0, 128)
  33.   # ◆ 固定メンバーの背景色
  34.   FIXED_COLOR    = Color.new(255, 128, 64, 96)
  35.   # ◆ 並び替え時の背景色
  36.   SELECTED_COLOR = Color.new(64, 255, 128, 128)

  37.   # ◆ パーティ編成ボタン (メニュー画面用)
  38.   #  メニュー画面でこのボタンを押すと、パーティ編成画面に移行します。
  39.   #  使用しない場合は nil
  40.   MENU_PARTYFORM_BUTTON      = Input::A
  41.   # ◆ メニュー画面にパーティ編成コマンドを追加する
  42.   #  追加する場所は、メニューコマンドの最下部です。
  43.   #  他の部分に追加したければ、≪カスタムメニューコマンド≫ をご利用ください。
  44.   USE_MENU_PARTYFORM_COMMAND = true
  45.   # ◆ メニュー画面のパーティ編成コマンドの名称
  46.   VOCAB_MENU_PARTYFORM       = "队伍编辑"

  47.   # ◆ 戦闘中にパーティ編成コマンドを使用する
  48.   #  追加する場所は、パーティコマンドの最下部(「逃げる」の下)です。
  49.   USE_BATTLE_PARTYFORM   = true
  50.   # ◆ 戦闘中のパーティ編成コマンドの名称
  51.   VOCAB_BATTLE_PARTYFORM = "更换"

  52.   # ◆ 編成画面のキャラクター描画サイズ [幅, 高さ]
  53.   #  アクターの歩行グラフィックのサイズに応じて書き換えてください。
  54.   PARTY_FORM_CHARACTER_SIZE   = [40, 48]
  55.   # ◆ 編成画面の戦闘メンバーウィンドウの空欄に表示するテキスト
  56.   BATTLE_MEMBER_BLANK_TEXT    = "广告位"
  57.   # ◆ 編成画面のパーティメンバーウィンドウの最大行数
  58.   #  ステータスウィンドウが画面からはみ出る場合は、
  59.   #  この値を 1 にしてください。
  60.   PARTY_MEMBER_WINDOW_ROW_MAX = 2
  61.   # ◆ 編成画面のパーティメンバーウィンドウに戦闘メンバーを表示する
  62.   SHOW_BATTLE_MEMBER_IN_PARTY = false
  63.   # ◆ 編成画面のパーティメンバーウィンドウの空欄に表示するテキスト
  64.   PARTY_MEMBER_BLANK_TEXT     = "-"

  65.   # ◆ 編成画面のキャプションウィンドウの幅
  66.   CAPTION_WINDOW_WIDTH  = 192
  67.   # ◆ 編成画面の戦闘メンバーウィンドウのキャプション
  68.   BATTLE_MEMBER_CAPTION = "目前队伍"

  69.   if SHOW_BATTLE_MEMBER_IN_PARTY
  70.     # ◆ 編成画面のパーティメンバーウィンドウのキャプション
  71.     #  SHOW_BATTLE_MEMBER_IN_PARTY = true のとき
  72.     PARTY_MEMBER_CAPTION = "队员"
  73.   else
  74.     # ◆ 編成画面のパーティメンバーウィンドウのキャプション
  75.     #  SHOW_BATTLE_MEMBER_IN_PARTY = false のとき
  76.     PARTY_MEMBER_CAPTION = "等待人物"
  77.   end

  78.   # ◆ 編成確認ウィンドウの幅
  79.   CONFIRM_WINDOW_WIDTH    = 160
  80.   # ◆ 編成確認ウィンドウの文字列
  81.   #  ※コマンド数・順番を変更するとバグります。
  82.   CONFIRM_WINDOW_COMMANDS = ["编辑完毕", "编辑结束", "取消"]

  83.   # ◆ ショップ画面のステータスウィンドウスクロール時に使用するボタン
  84.   #  このボタンを押している間、上下ボタンでスクロールできます。
  85.   #  スクロールを無効にする場合は nil を指定。
  86.   #  ≪ヘルプウィンドウ機能拡張≫併用時は、上に導入したものを優先。
  87.   SHOP_STATUS_SCROLL_BUTTON = Input::A

  88.   # ◆ 待機メンバー獲得経験値割合【単位:‰(千分率 1‰=0.1%)】
  89.   #  500 なら 50.0% です。
  90.   STAND_BY_EXP_RATE = 500
  91.   # ◆ リザルト画面で待機メンバーのレベルアップを表示する
  92.   #  false にすると、戦闘メンバーのみ表示します。
  93.   SHOW_STAND_BY_LEVEL_UP = true
  94.   # ◆ 戦闘以外でも待機メンバーを表示する
  95.   #  true  : 戦闘以外では常に全員を表示。
  96.   #  false : 入れ替え時以外は、待機メンバーをいないものとして扱う。
  97.   SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE = true
  98. end
  99. end

  100. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  101. $imported = {} if $imported == nil
  102. $imported["LargeParty"] = true

  103. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  104. #==============================================================================
  105. # □ KGC::Commands
  106. #==============================================================================

  107. module KGC
  108. module Commands
  109.   # メンバーのソート形式
  110.   SORT_BY_ID    = 0  # ID順
  111.   SORT_BY_NAME  = 1  # 名前順
  112.   SORT_BY_LEVEL = 2  # レベル順

  113.   module_function
  114.   #--------------------------------------------------------------------------
  115.   # ○ パーティ編成画面の呼び出し
  116.   #--------------------------------------------------------------------------
  117.   def call_partyform
  118.     return if $game_temp.in_battle
  119.     $game_temp.next_scene = :partyform
  120.   end
  121.   #--------------------------------------------------------------------------
  122.   # ○ 戦闘メンバー最大数を設定
  123.   #     value : 人数 (省略した場合はデフォルト値を使用)
  124.   #--------------------------------------------------------------------------
  125.   def set_max_battle_member_count(value = nil)
  126.     $game_party.max_battle_member_count = value
  127.   end
  128.   #--------------------------------------------------------------------------
  129.   # ○ パーティ人数が一杯か
  130.   #--------------------------------------------------------------------------
  131.   def party_full?
  132.     return $game_party.full?
  133.   end
  134.   #--------------------------------------------------------------------------
  135.   # ○ パーティ編成可否を設定
  136.   #     enabled : 有効フラグ (省略時 : true)
  137.   #--------------------------------------------------------------------------
  138.   def permit_partyform(enabled = true)
  139.     $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = enabled
  140.   end
  141.   #--------------------------------------------------------------------------
  142.   # ○ 戦闘中のパーティ編成可否を設定
  143.   #     enabled : 有効フラグ (省略時 : true)
  144.   #--------------------------------------------------------------------------
  145.   def permit_battle_partyform(enabled = true)
  146.     $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = enabled
  147.   end
  148.   #--------------------------------------------------------------------------
  149.   # ○ アクターの固定状態を設定
  150.   #     actor_id : アクター ID
  151.   #     fixed    : 固定フラグ (省略時 : true)
  152.   #--------------------------------------------------------------------------
  153.   def fix_actor(actor_id, fixed = true)
  154.     $game_party.fix_actor(actor_id, fixed)
  155.   end
  156.   #--------------------------------------------------------------------------
  157.   # ○ 並び替え
  158.   #    メンバーの index1 番目と index2 番目を入れ替える
  159.   #--------------------------------------------------------------------------
  160.   def change_party_shift(index1, index2)
  161.     $game_party.change_shift(index1, index2)
  162.   end
  163.   #--------------------------------------------------------------------------
  164.   # ○ メンバー整列 (昇順)
  165.   #     sort_type : ソート形式 (SORT_BY_xxx)
  166.   #     reverse   : true だと降順
  167.   #--------------------------------------------------------------------------
  168.   def sort_party_member(sort_type = SORT_BY_ID, reverse = false)
  169.     $game_party.sort_member(sort_type, reverse)
  170.   end
  171.   #--------------------------------------------------------------------------
  172.   # ○ 待機メンバーの ID を取得
  173.   #--------------------------------------------------------------------------
  174.   def get_stand_by_member_ids
  175.     result = []
  176.     $game_party.stand_by_members.each { |actor| result << actor.id }
  177.     return result
  178.   end
  179.   #--------------------------------------------------------------------------
  180.   # ○ アクターが待機メンバーか
  181.   #     actor_id : アクター ID
  182.   #--------------------------------------------------------------------------
  183.   def stand_by_member?(actor_id)
  184.     return get_stand_by_member_ids.include?(actor_id)
  185.   end
  186.   #--------------------------------------------------------------------------
  187.   # ○ アクターを戦闘メンバーに加える
  188.   #     actor_id : アクター ID
  189.   #     index    : 追加位置 (省略時は最後尾)
  190.   #--------------------------------------------------------------------------
  191.   def add_battle_member(actor_id, index = nil)
  192.     $game_party.add_battle_member(actor_id, index)
  193.   end
  194.   #--------------------------------------------------------------------------
  195.   # ○ アクターを戦闘メンバーから外す
  196.   #     actor_id : アクター ID
  197.   #--------------------------------------------------------------------------
  198.   def remove_battle_member(actor_id)
  199.     $game_party.remove_battle_member(actor_id)
  200.   end
  201.   #--------------------------------------------------------------------------
  202.   # ○ 固定アクター以外を戦闘メンバーから外す
  203.   #--------------------------------------------------------------------------
  204.   def remove_all_battle_member
  205.     $game_party.all_members.each { |actor|
  206.       $game_party.remove_battle_member(actor.id)
  207.     }
  208.   end
  209.   #--------------------------------------------------------------------------
  210.   # ○ ランダム出撃
  211.   #--------------------------------------------------------------------------
  212.   def random_launch
  213.     new_battle_members = $game_party.fixed_members
  214.     candidates = $game_party.all_members - new_battle_members
  215.     num = [$game_party.max_battle_member_count - new_battle_members.size,
  216.       candidates.size].min
  217.     return if num <= 0

  218.     # ランダムに選ぶ
  219.     ary = (0...candidates.size).to_a.sort_by { rand }
  220.     ary[0...num].each { |i| new_battle_members << candidates[i] }
  221.     $game_party.set_battle_member(new_battle_members)
  222.   end
  223. end
  224. end

  225. class Game_Interpreter
  226.   include KGC::Commands
  227. end

  228. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  229. #==============================================================================
  230. # ■ Vocab
  231. #==============================================================================

  232. module Vocab
  233.   # 「パーティ編成」コマンド名 (メニュー)
  234.   def self.partyform
  235.     return KGC::LargeParty::VOCAB_MENU_PARTYFORM
  236.   end

  237.   # 「パーティ編成」コマンド名 (戦闘)
  238.   def self.partyform_battle
  239.     return KGC::LargeParty::VOCAB_BATTLE_PARTYFORM
  240.   end
  241. end

  242. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  243. #==============================================================================
  244. # ■ Game_Actor
  245. #==============================================================================

  246. class Game_Actor < Game_Battler
  247.   #--------------------------------------------------------------------------
  248.   # ○ パーティ内インデックス取得
  249.   #--------------------------------------------------------------------------
  250.   def party_index
  251.     return $game_party.all_members.index(self)
  252.   end
  253.   #--------------------------------------------------------------------------
  254.   # ○ 戦闘メンバーか判定
  255.   #--------------------------------------------------------------------------
  256.   def battle_member?
  257.     return $game_party.battle_members.include?(self)
  258.   end
  259.   #--------------------------------------------------------------------------
  260.   # ○ 固定メンバーか判定
  261.   #--------------------------------------------------------------------------
  262.   def fixed_member?
  263.     return $game_party.fixed_members.include?(self)
  264.   end
  265. end

  266. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  267. #==============================================================================
  268. # ■ Game_Party
  269. #==============================================================================

  270. class Game_Party
  271.   #--------------------------------------------------------------------------
  272.   # ● 定数
  273.   #--------------------------------------------------------------------------
  274.   MAX_MEMBERS = KGC::LargeParty::MAX_MEMBERS  # 最大パーティ人数
  275.   #--------------------------------------------------------------------------
  276.   # ● オブジェクト初期化
  277.   #--------------------------------------------------------------------------
  278.   alias initialize_KGC_LargeParty initialize
  279.   def initialize
  280.     initialize_KGC_LargeParty

  281.     @max_battle_member_count = nil
  282.     @battle_member_count = 0
  283.     @fixed_actors = []
  284.   end
  285.   #--------------------------------------------------------------------------
  286.   # ○ 戦闘メンバー最大数取得
  287.   #--------------------------------------------------------------------------
  288.   def max_battle_member_count
  289.     if @max_battle_member_count == nil
  290.       return KGC::LargeParty::MAX_BATTLE_MEMBERS
  291.     else
  292.       return @max_battle_member_count
  293.     end
  294.   end
  295.   #--------------------------------------------------------------------------
  296.   # ○ 戦闘メンバー最大数変更
  297.   #--------------------------------------------------------------------------
  298.   def max_battle_member_count=(value)
  299.     if value.is_a?(Integer)
  300.       value = [value, 1].max
  301.     end
  302.     @max_battle_member_count = value
  303.   end
  304.   #--------------------------------------------------------------------------
  305.   # ○ 戦闘メンバー数取得
  306.   #--------------------------------------------------------------------------
  307.   def battle_member_count
  308.     if @battle_member_count == nil
  309.       @battle_member_count = @actors.size
  310.     end
  311.     @battle_member_count =
  312.       [@battle_member_count, @actors.size, max_battle_member_count].min
  313.     return @battle_member_count
  314.   end
  315.   #--------------------------------------------------------------------------
  316.   # ○ 戦闘メンバー数設定
  317.   #--------------------------------------------------------------------------
  318.   def battle_member_count=(value)
  319.     @battle_member_count = [[value, 0].max,
  320.       @actors.size, max_battle_member_count].min
  321.   end
  322.   #--------------------------------------------------------------------------
  323.   # ● メンバーの取得
  324.   #--------------------------------------------------------------------------
  325.   alias members_KGC_LargeParty members
  326.   def members
  327.     if $game_temp.in_battle ||
  328.         !KGC::LargeParty::SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE
  329.       return battle_members
  330.     else
  331.       return members_KGC_LargeParty
  332.     end
  333.   end
  334.   #--------------------------------------------------------------------------
  335.   # ○ 全メンバーの取得
  336.   #--------------------------------------------------------------------------
  337.   def all_members
  338.     return members_KGC_LargeParty
  339.   end
  340.   #--------------------------------------------------------------------------
  341.   # ○ 戦闘メンバーの取得
  342.   #--------------------------------------------------------------------------
  343.   def battle_members
  344.     result = []
  345.     battle_member_count.times { |i| result << $game_actors[@actors[i]] }
  346.     return result
  347.   end
  348.   #--------------------------------------------------------------------------
  349.   # ○ 待機メンバーの取得
  350.   #--------------------------------------------------------------------------
  351.   def stand_by_members
  352.     return (all_members - battle_members)
  353.   end
  354.   #--------------------------------------------------------------------------
  355.   # ○ 固定メンバーの取得
  356.   #--------------------------------------------------------------------------
  357.   def fixed_members
  358.     result = []
  359.     @fixed_actors.each { |i| result << $game_actors[i] }
  360.     return result
  361.   end
  362.   #--------------------------------------------------------------------------
  363.   # ● 初期パーティのセットアップ
  364.   #--------------------------------------------------------------------------
  365.   alias setup_starting_members_KGC_LargeParty setup_starting_members
  366.   def setup_starting_members
  367.     setup_starting_members_KGC_LargeParty

  368.     self.battle_member_count = @actors.size
  369.   end
  370.   #--------------------------------------------------------------------------
  371.   # ● 戦闘テスト用パーティのセットアップ
  372.   #--------------------------------------------------------------------------
  373.   alias setup_battle_test_members_KGC_LargeParty setup_battle_test_members
  374.   def setup_battle_test_members
  375.     setup_battle_test_members_KGC_LargeParty

  376.     self.battle_member_count = @actors.size
  377.   end
  378.   #--------------------------------------------------------------------------
  379.   # ○ メンバーの新規設定
  380.   #     new_member : 新しいメンバー
  381.   #--------------------------------------------------------------------------
  382.   def set_member(new_member)
  383.     @actors = []
  384.     new_member.each { |actor| @actors << actor.id }
  385.   end
  386.   #--------------------------------------------------------------------------
  387.   # ○ 戦闘メンバーの新規設定
  388.   #     new_member : 新しい戦闘メンバー
  389.   #--------------------------------------------------------------------------
  390.   def set_battle_member(new_member)
  391.     new_battle_member = []
  392.     new_member.each { |actor|
  393.       @actors.delete(actor.id)
  394.       new_battle_member << actor.id
  395.     }
  396.     @actors = new_battle_member + @actors
  397.     self.battle_member_count = new_member.size
  398.   end
  399.   #--------------------------------------------------------------------------
  400.   # ○ パーティ編成を許可しているか判定
  401.   #--------------------------------------------------------------------------
  402.   def partyform_enable?
  403.     return $game_switches[KGC::LargeParty::PARTYFORM_SWITCH]
  404.   end
  405.   #--------------------------------------------------------------------------
  406.   # ○ 戦闘中のパーティ編成を許可しているか判定
  407.   #--------------------------------------------------------------------------
  408.   def battle_partyform_enable?
  409.     return false unless partyform_enable?
  410.     return $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH]
  411.   end
  412.   #--------------------------------------------------------------------------
  413.   # ○ メンバーが一杯か判定
  414.   #--------------------------------------------------------------------------
  415.   def full?
  416.     return (@actors.size >= MAX_MEMBERS)
  417.   end
  418.   #--------------------------------------------------------------------------
  419.   # ○ 固定アクターか判定
  420.   #     actor_id : 判定するアクターの ID
  421.   #--------------------------------------------------------------------------
  422.   def actor_fixed?(actor_id)
  423.     return @fixed_actors.include?(actor_id)
  424.   end
  425.   #--------------------------------------------------------------------------
  426.   # ● アクターを加える
  427.   #     actor_id : アクター ID
  428.   #--------------------------------------------------------------------------
  429.   alias add_actor_KGC_LargeParty add_actor
  430.   def add_actor(actor_id)
  431.     last_size = @actors.size

  432.     add_actor_KGC_LargeParty(actor_id)

  433.     if last_size < @actors.size
  434.       self.battle_member_count += 1
  435.     end
  436.   end
  437.   #--------------------------------------------------------------------------
  438.   # ○ アクターを戦闘メンバーに加える
  439.   #     actor_id : アクター ID
  440.   #     index    : 追加位置 (省略時は最後尾)
  441.   #--------------------------------------------------------------------------
  442.   def add_battle_member(actor_id, index = nil)
  443.     return unless @actors.include?(actor_id)  # パーティにいない
  444.     if index == nil
  445.       return if battle_members.include?($game_actors[actor_id])  # 出撃済み
  446.       return if battle_member_count == max_battle_member_count   # 人数が最大
  447.       index = battle_member_count
  448.     end

  449.     @actors.delete(actor_id)
  450.     @actors.insert(index, actor_id)
  451.     self.battle_member_count += 1
  452.   end
  453.   #--------------------------------------------------------------------------
  454.   # ○ アクターを戦闘メンバーから外す
  455.   #     actor_id : アクター ID
  456.   #--------------------------------------------------------------------------
  457.   def remove_battle_member(actor_id)
  458.     return unless @actors.include?(actor_id)  # パーティにいない
  459.     return if actor_fixed?(actor_id)          # 固定済み
  460.     return if stand_by_members.include?($game_actors[actor_id])  # 待機中

  461.     @actors.delete(actor_id)
  462.     @actors.push(actor_id)
  463.     self.battle_member_count -= 1
  464.   end
  465.   #--------------------------------------------------------------------------
  466.   # ○ アクターの固定状態を設定
  467.   #     actor_id : アクター ID
  468.   #     fixed    : 固定フラグ (省略時 : false)
  469.   #--------------------------------------------------------------------------
  470.   def fix_actor(actor_id, fixed = false)
  471.     return unless @actors.include?(actor_id)  # パーティにいない

  472.     if fixed
  473.       # 固定
  474.       unless @fixed_actors.include?(actor_id)
  475.         @fixed_actors << actor_id
  476.         unless battle_members.include?($game_actors[actor_id])
  477.           self.battle_member_count += 1
  478.         end
  479.       end
  480.       # 強制出撃
  481.       apply_force_launch
  482.     else
  483.       # 固定解除
  484.       @fixed_actors.delete(actor_id)
  485.     end
  486.     $game_player.refresh
  487.   end
  488.   #--------------------------------------------------------------------------
  489.   # ○ 強制出撃適用
  490.   #--------------------------------------------------------------------------
  491.   def apply_force_launch
  492.     while (fixed_members - battle_members).size > 0
  493.       # 固定状態でないメンバーを適当に持ってきて入れ替え
  494.       actor1 = stand_by_members.find { |a| @fixed_actors.include?(a.id) }
  495.       actor2 = battle_members.reverse.find { |a| !@fixed_actors.include?(a.id) }
  496.       index1 = @actors.index(actor1.id)
  497.       index2 = @actors.index(actor2.id)
  498.       @actors[index1], @actors[index2] = @actors[index2], @actors[index1]

  499.       # 戦闘メンバーが全員固定されたら戻る (無限ループ防止)
  500.       all_fixed = true
  501.       battle_members.each { |actor|
  502.         unless actor.fixed_member?
  503.           all_fixed = false
  504.           break
  505.         end
  506.       }
  507.       break if all_fixed
  508.     end
  509.   end
  510.   #--------------------------------------------------------------------------
  511.   # ○ メンバー整列 (昇順)
  512.   #     sort_type : ソート形式 (SORT_BY_xxx)
  513.   #     reverse   : true だと降順
  514.   #--------------------------------------------------------------------------
  515.   def sort_member(sort_type = KGC::Commands::SORT_BY_ID,
  516.                   reverse = false)
  517.     # バッファを準備
  518.     b_actors = battle_members
  519.     actors = all_members - b_actors
  520.     f_actors = fixed_members
  521.     # 固定キャラはソートしない
  522.     if KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED
  523.       actors -= f_actors
  524.       b_actors -= f_actors
  525.     end

  526.     # ソート
  527.     case sort_type
  528.     when KGC::Commands::SORT_BY_ID     # ID順
  529.       actors.sort!   { |a, b| a.id <=> b.id }
  530.       b_actors.sort! { |a, b| a.id <=> b.id }
  531.     when KGC::Commands::SORT_BY_NAME   # 名前順
  532.       actors.sort!   { |a, b| a.name <=> b.name }
  533.       b_actors.sort! { |a, b| a.name <=> b.name }
  534.     when KGC::Commands::SORT_BY_LEVEL  # レベル順
  535.       actors.sort!   { |a, b| a.level <=> b.level }
  536.       b_actors.sort! { |a, b| a.level <=> b.level }
  537.     end
  538.     # 反転
  539.     if reverse
  540.       actors.reverse!
  541.       b_actors.reverse!
  542.     end

  543.     # 固定キャラを先頭に持ってくる
  544.     if KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED
  545.       actors = f_actors + actors
  546.       b_actors = f_actors + b_actors
  547.     end

  548.     # 復帰
  549.     set_member(actors)
  550.     set_battle_member(b_actors)

  551.     apply_force_launch
  552.     $game_player.refresh
  553.   end
  554.   #--------------------------------------------------------------------------
  555.   # ○ 並び替え
  556.   #    戦闘メンバーの index1 番目と index2 番目を入れ替える
  557.   #--------------------------------------------------------------------------
  558.   def change_shift(index1, index2)
  559.     size = @actors.size
  560.     if index1 >= size || index2 >= size
  561.       return
  562.     end
  563.     buf = @actors[index1]
  564.     @actors[index1] = @actors[index2]
  565.     @actors[index2] = buf
  566.     $game_player.refresh
  567.   end
  568.   #--------------------------------------------------------------------------
  569.   # ● 戦闘用ステートの解除 (戦闘終了時に呼び出し)
  570.   #--------------------------------------------------------------------------
  571.   def remove_states_battle
  572.     for actor in all_members
  573.       actor.remove_states_battle
  574.     end
  575.   end
  576. end

  577. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  578. #==============================================================================
  579. # ■ Window_Command
  580. #==============================================================================

  581. class Window_Command < Window_Selectable
  582.   unless method_defined?(:add_command)
  583.   #--------------------------------------------------------------------------
  584.   # ○ コマンドを追加
  585.   #    追加した位置を返す
  586.   #--------------------------------------------------------------------------
  587.   def add_command(command)
  588.     @commands << command
  589.     @item_max = @commands.size
  590.     item_index = @item_max - 1
  591.     refresh_command
  592.     draw_item(item_index)
  593.     return item_index
  594.   end
  595.   #--------------------------------------------------------------------------
  596.   # ○ コマンドをリフレッシュ
  597.   #--------------------------------------------------------------------------
  598.   def refresh_command
  599.     buf = self.contents.clone
  600.     self.height = [self.height, row_max * WLH + 32].max
  601.     create_contents
  602.     self.contents.blt(0, 0, buf, buf.rect)
  603.     buf.dispose
  604.   end
  605.   #--------------------------------------------------------------------------
  606.   # ○ コマンドを挿入
  607.   #--------------------------------------------------------------------------
  608.   def insert_command(index, command)
  609.     @commands.insert(index, command)
  610.     @item_max = @commands.size
  611.     refresh_command
  612.     refresh
  613.   end
  614.   #--------------------------------------------------------------------------
  615.   # ○ コマンドを削除
  616.   #--------------------------------------------------------------------------
  617.   def remove_command(command)
  618.     @commands.delete(command)
  619.     @item_max = @commands.size
  620.     refresh
  621.   end
  622.   end
  623. end

  624. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  625. #==============================================================================
  626. # ■ Window_MenuStatus
  627. #==============================================================================

  628. class Window_MenuStatus < Window_Selectable
  629.   #--------------------------------------------------------------------------
  630.   # ● 定数
  631.   #--------------------------------------------------------------------------
  632.   STATUS_HEIGHT = 96  # ステータス一人分の高さ
  633.   #--------------------------------------------------------------------------
  634.   # ● ウィンドウ内容の作成
  635.   #--------------------------------------------------------------------------
  636.   def create_contents
  637.     self.contents.dispose
  638.     self.contents = Bitmap.new(width - 32,
  639.       [height - 32, row_max * STATUS_HEIGHT].max)
  640.   end
  641.   #--------------------------------------------------------------------------
  642.   # ● 先頭の行の取得
  643.   #--------------------------------------------------------------------------
  644.   def top_row
  645.     return self.oy / STATUS_HEIGHT
  646.   end
  647.   #--------------------------------------------------------------------------
  648.   # ● 先頭の行の設定
  649.   #     row : 先頭に表示する行
  650.   #--------------------------------------------------------------------------
  651.   def top_row=(row)
  652.     super(row)
  653.     self.oy = self.oy / WLH * STATUS_HEIGHT
  654.   end
  655.   #--------------------------------------------------------------------------
  656.   # ● 1 ページに表示できる行数の取得
  657.   #--------------------------------------------------------------------------
  658.   def page_row_max
  659.     return (self.height - 32) / STATUS_HEIGHT
  660.   end
  661.   #--------------------------------------------------------------------------
  662.   # ● 項目を描画する矩形の取得
  663.   #     index : 項目番号
  664.   #--------------------------------------------------------------------------
  665.   def item_rect(index)
  666.     rect = super(index)
  667.     rect.height = STATUS_HEIGHT
  668.     rect.y = index / @column_max * STATUS_HEIGHT
  669.     return rect
  670.   end
  671.   #--------------------------------------------------------------------------
  672.   # ● リフレッシュ
  673.   #--------------------------------------------------------------------------
  674.   def refresh
  675.     @item_max = $game_party.members.size
  676.     create_contents
  677.     fill_stand_by_background
  678.     draw_member
  679.   end
  680.   #--------------------------------------------------------------------------
  681.   # ○ パーティメンバー描画
  682.   #--------------------------------------------------------------------------
  683.   def draw_member
  684.     for actor in $game_party.members
  685.       draw_actor_face(actor, 2, actor.party_index * 96 + 2, 92)
  686.       x = 104
  687.       y = actor.party_index * 96 + WLH / 2
  688.       draw_actor_name(actor, x, y)
  689.       draw_actor_class(actor, x + 120, y)
  690.       draw_actor_level(actor, x, y + WLH * 1)
  691.       draw_actor_state(actor, x, y + WLH * 2)
  692.       draw_actor_hp(actor, x + 120, y + WLH * 1)
  693.       draw_actor_mp(actor, x + 120, y + WLH * 2)
  694.     end
  695.   end
  696.   #--------------------------------------------------------------------------
  697.   # ○ 待機メンバーの背景色を塗る
  698.   #--------------------------------------------------------------------------
  699.   def fill_stand_by_background
  700.     color = KGC::LargeParty::STAND_BY_COLOR
  701.     dy = STATUS_HEIGHT * $game_party.battle_members.size
  702.     dh = STATUS_HEIGHT * $game_party.stand_by_members.size
  703.     if dh > 0
  704.       self.contents.fill_rect(0, dy, self.width - 32, dh, color)
  705.     end
  706.   end
  707.   #--------------------------------------------------------------------------
  708.   # ● カーソルの更新
  709.   #--------------------------------------------------------------------------
  710.   def update_cursor
  711.     if @index < 0               # カーソルなし
  712.       self.cursor_rect.empty
  713.     elsif @index < @item_max    # 通常
  714.       super
  715.     elsif @index >= 100         # 自分
  716.       self.cursor_rect.set(0, (@index - 100) * STATUS_HEIGHT,
  717.         contents.width, STATUS_HEIGHT)
  718.     else                        # 全体
  719.       self.cursor_rect.set(0, 0, contents.width, @item_max * STATUS_HEIGHT)
  720.     end
  721.   end
  722. end

  723. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  724. #==============================================================================
  725. # ■ Window_ShopStatus
  726. #==============================================================================

  727. class Window_ShopStatus < Window_Base
  728.   #--------------------------------------------------------------------------
  729.   # ● ウィンドウ内容の作成
  730.   #--------------------------------------------------------------------------
  731.   def create_contents
  732.     self.contents.dispose
  733.     self.contents = Bitmap.new(width - 32,
  734.       WLH * ($game_party.members.size + 1) * 2)
  735.   end
  736. end

  737. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  738. #==============================================================================
  739. # ■ Window_BattleStatus
  740. #==============================================================================

  741. class Window_BattleStatus < Window_Selectable
  742.   #--------------------------------------------------------------------------
  743.   # ● ウィンドウ内容の作成
  744.   #--------------------------------------------------------------------------
  745.   def create_contents
  746.     self.contents.dispose
  747.     self.contents = Bitmap.new(width - 32,
  748.       [WLH * $game_party.members.size, height - 32].max)
  749.   end
  750.   #--------------------------------------------------------------------------
  751.   # ● リフレッシュ
  752.   #--------------------------------------------------------------------------
  753.   alias refresh_KGC_LargeParty refresh
  754.   def refresh
  755.     create_contents

  756.     refresh_KGC_LargeParty
  757.   end
  758. end

  759. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  760. #==============================================================================
  761. # □ Window_PartyFormCaption
  762. #------------------------------------------------------------------------------
  763. #  パーティ編成画面でウィンドウのキャプションを表示するウィンドウです。
  764. #==============================================================================

  765. class Window_PartyFormCaption < Window_Base
  766.   #--------------------------------------------------------------------------
  767.   # ● オブジェクト初期化
  768.   #     caption : 表示するキャプション
  769.   #--------------------------------------------------------------------------
  770.   def initialize(caption = "")
  771.     super(0, 0, KGC::LargeParty::CAPTION_WINDOW_WIDTH, WLH + 32)
  772.     @caption = caption
  773.     refresh
  774.   end
  775.   #--------------------------------------------------------------------------
  776.   # ● リフレッシュ
  777.   #--------------------------------------------------------------------------
  778.   def refresh
  779.     self.contents.clear
  780.     self.contents.draw_text(0, 0, width - 32, WLH, @caption)
  781.   end
  782. end

  783. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
复制代码
  1. #==============================================================================
  2. # □ Window_PartyFormMember
  3. #------------------------------------------------------------------------------
  4. #  パーティ編成画面でメンバーを表示するウィンドウです。
  5. #==============================================================================

  6. class Window_PartyFormMember < Window_Selectable
  7.   #--------------------------------------------------------------------------
  8.   # ○ 定数
  9.   #--------------------------------------------------------------------------
  10.   DRAW_SIZE = KGC::LargeParty::PARTY_FORM_CHARACTER_SIZE
  11.   #--------------------------------------------------------------------------
  12.   # ● 公開インスタンス変数
  13.   #--------------------------------------------------------------------------
  14.   attr_accessor :selected_index           # 選択済みインデックス
  15.   #--------------------------------------------------------------------------
  16.   # ● オブジェクト初期化
  17.   #     x       : ウィンドウの X 座標
  18.   #     y       : ウィンドウの Y 座標
  19.   #     width   : ウィンドウの幅
  20.   #     height  : ウィンドウの高さ
  21.   #     spacing : 横に項目が並ぶときの空白の幅
  22.   #--------------------------------------------------------------------------
  23.   def initialize(x, y, width, height, spacing = 8)
  24.     super(x, y, width, height, spacing)
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● ウィンドウ内容の作成
  28.   #--------------------------------------------------------------------------
  29.   def create_contents
  30.     self.contents.dispose
  31.     self.contents = Bitmap.new(width - 32,
  32.       [height - 32, row_max * DRAW_SIZE[1]].max)
  33.   end
  34.   #--------------------------------------------------------------------------
  35.   # ● 先頭の行の取得
  36.   #--------------------------------------------------------------------------
  37.   def top_row
  38.     return self.oy / DRAW_SIZE[1]
  39.   end
  40.   #--------------------------------------------------------------------------
  41.   # ● 先頭の行の設定
  42.   #     row : 先頭に表示する行
  43.   #--------------------------------------------------------------------------
  44.   def top_row=(row)
  45.     super(row)
  46.     self.oy = self.oy / WLH * DRAW_SIZE[1]
  47.   end
  48.   #--------------------------------------------------------------------------
  49.   # ● 1 ページに表示できる行数の取得
  50.   #--------------------------------------------------------------------------
  51.   def page_row_max
  52.     return (self.height - 32) / DRAW_SIZE[1]
  53.   end
  54.   #--------------------------------------------------------------------------
  55.   # ● 項目を描画する矩形の取得
  56.   #     index : 項目番号
  57.   #--------------------------------------------------------------------------
  58.   def item_rect(index)
  59.     rect = super(index)
  60.     rect.width = DRAW_SIZE[0]
  61.     rect.height = DRAW_SIZE[1]
  62.     rect.y = index / @column_max * DRAW_SIZE[1]
  63.     return rect
  64.   end
  65.   #--------------------------------------------------------------------------
  66.   # ○ 選択アクター取得
  67.   #--------------------------------------------------------------------------
  68.   def actor
  69.     return @actors[self.index]
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # ● リフレッシュ
  73.   #--------------------------------------------------------------------------
  74.   def refresh
  75.     self.contents.clear
  76.     restore_member_list
  77.     draw_member
  78.   end
  79.   #--------------------------------------------------------------------------
  80.   # ○ メンバーリスト修復
  81.   #--------------------------------------------------------------------------
  82.   def restore_member_list
  83.     # 継承先で定義
  84.   end
  85.   #--------------------------------------------------------------------------
  86.   # ○ メンバー描画
  87.   #--------------------------------------------------------------------------
  88.   def draw_member
  89.     # 継承先で定義
  90.   end
  91.   #--------------------------------------------------------------------------
  92.   # ○ 空欄アクター描画
  93.   #     index : 項目番号
  94.   #--------------------------------------------------------------------------
  95.   def draw_empty_actor(index)
  96.     # 継承先で定義
  97.   end
  98.   #--------------------------------------------------------------------------
  99.   # ○ 固定キャラ背景描画
  100.   #     index : 項目番号
  101.   #--------------------------------------------------------------------------
  102.   def draw_fixed_back(index)
  103.     rect = item_rect(index)
  104.     self.contents.fill_rect(rect, KGC::LargeParty::FIXED_COLOR)
  105.   end
  106.   #--------------------------------------------------------------------------
  107.   # ○ 選択中キャラ背景描画
  108.   #     index : 項目番号
  109.   #--------------------------------------------------------------------------
  110.   def draw_selected_back(index)
  111.     rect = item_rect(index)
  112.     self.contents.fill_rect(rect, KGC::LargeParty::SELECTED_COLOR)
  113.   end
  114. end

  115. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  116. #==============================================================================
  117. # □ Window_PartyFormBattleMember
  118. #------------------------------------------------------------------------------
  119. #  パーティ編成画面で戦闘メンバーを表示するウィンドウです。
  120. #==============================================================================

  121. class Window_PartyFormBattleMember < Window_PartyFormMember
  122.   #--------------------------------------------------------------------------
  123.   # ● 公開インスタンス変数
  124.   #--------------------------------------------------------------------------
  125.   attr_accessor :selected_index           # 選択済みインデックス
  126.   #--------------------------------------------------------------------------
  127.   # ● オブジェクト初期化
  128.   #--------------------------------------------------------------------------
  129.   def initialize
  130.     super(0, 0, 64, DRAW_SIZE[1] + 32)
  131.     column_width = DRAW_SIZE[0] + @spacing
  132.     nw = [column_width * $game_party.max_battle_member_count + 32,
  133.       Graphics.width].min
  134.     self.width = nw

  135.     @item_max = $game_party.max_battle_member_count
  136.     @column_max = width / column_width
  137.     @selected_index = nil
  138.     create_contents
  139.     refresh
  140.     self.active = true
  141.     self.index = 0
  142.   end
  143.   #--------------------------------------------------------------------------
  144.   # ○ メンバーリスト修復
  145.   #--------------------------------------------------------------------------
  146.   def restore_member_list
  147.     @actors = $game_party.battle_members
  148.   end
  149.   #--------------------------------------------------------------------------
  150.   # ○ メンバー描画
  151.   #--------------------------------------------------------------------------
  152.   def draw_member
  153.     @item_max.times { |i|
  154.       actor = @actors[i]
  155.       if actor == nil
  156.         draw_empty_actor(i)
  157.       else
  158.         if i == @selected_index
  159.           draw_selected_back(i)
  160.         elsif $game_party.actor_fixed?(actor.id)
  161.           draw_fixed_back(i)
  162.         end
  163.         rect = item_rect(i)
  164.         draw_actor_graphic(actor,
  165.           rect.x + DRAW_SIZE[0] / 2,
  166.           rect.y + DRAW_SIZE[1] - 4)
  167.       end
  168.     }
  169.   end
  170.   #--------------------------------------------------------------------------
  171.   # ○ 空欄アクター描画
  172.   #     index : 項目番号
  173.   #--------------------------------------------------------------------------
  174.   def draw_empty_actor(index)
  175.     rect = item_rect(index)
  176.     self.contents.font.color = system_color
  177.     self.contents.draw_text(rect, KGC::LargeParty::BATTLE_MEMBER_BLANK_TEXT, 1)
  178.     self.contents.font.color = normal_color
  179.   end
  180. end

  181. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  182. #==============================================================================
  183. # □ Window_PartyFormAllMember
  184. #------------------------------------------------------------------------------
  185. #  パーティ編成画面で全メンバーを表示するウィンドウです。
  186. #==============================================================================

  187. class Window_PartyFormAllMember < Window_PartyFormMember
  188.   #--------------------------------------------------------------------------
  189.   # ● オブジェクト初期化
  190.   #--------------------------------------------------------------------------
  191.   def initialize
  192.     super(0, 0, 64, 64)
  193.     restore_member_list
  194.     @item_max = $game_party.all_members.size

  195.     # 各種サイズ計算
  196.     column_width = DRAW_SIZE[0] + @spacing
  197.     sw = [@item_max * column_width + 32, Graphics.width].min
  198.     @column_max = (sw - 32) / column_width
  199.     sh = ([@item_max - 1, 0].max / @column_max + 1) * DRAW_SIZE[1] + 32
  200.     sh = [sh, DRAW_SIZE[1] * KGC::LargeParty::PARTY_MEMBER_WINDOW_ROW_MAX + 32].min

  201.     # 座標・サイズ調整
  202.     self.y += DRAW_SIZE[1] + 32
  203.     self.width = sw
  204.     self.height = sh

  205.     create_contents
  206.     refresh
  207.     self.active = false
  208.     self.index = 0
  209.   end
  210.   #--------------------------------------------------------------------------
  211.   # ○ 選択しているアクターのインデックス取得
  212.   #--------------------------------------------------------------------------
  213.   def actor_index
  214.     return @index_offset + self.index
  215.   end
  216.   #--------------------------------------------------------------------------
  217.   # ○ メンバーリスト修復
  218.   #--------------------------------------------------------------------------
  219.   def restore_member_list
  220.     if KGC::LargeParty::SHOW_BATTLE_MEMBER_IN_PARTY
  221.       @actors = $game_party.all_members
  222.       @index_offset = 0
  223.     else
  224.       @actors = $game_party.stand_by_members
  225.       @index_offset = $game_party.battle_members.size
  226.     end
  227.   end
  228.   #--------------------------------------------------------------------------
  229.   # ○ メンバー描画
  230.   #--------------------------------------------------------------------------
  231.   def draw_member
  232.     @item_max.times { |i|
  233.       actor = @actors[i]
  234.       if actor == nil
  235.         draw_empty_actor(i)
  236.         next
  237.       end

  238.       if $game_party.actor_fixed?(actor.id)
  239.         draw_fixed_back(i)
  240.       end
  241.       rect = item_rect(i)
  242.       opacity = ($game_party.battle_members.include?(actor) ? 96 : 255)
  243.       draw_actor_graphic(actor,
  244.         rect.x + DRAW_SIZE[0] / 2,
  245.         rect.y + DRAW_SIZE[1] - 4,
  246.         opacity)
  247.     }
  248.   end
  249.   #--------------------------------------------------------------------------
  250.   # ● アクターの歩行グラフィック描画
  251.   #     actor   : アクター
  252.   #     x       : 描画先 X 座標
  253.   #     y       : 描画先 Y 座標
  254.   #     opacity : 不透明度
  255.   #--------------------------------------------------------------------------
  256.   def draw_actor_graphic(actor, x, y, opacity = 255)
  257.     draw_character(actor.character_name, actor.character_index, x, y, opacity)
  258.   end
  259.   #--------------------------------------------------------------------------
  260.   # ● 歩行グラフィックの描画
  261.   #     character_name  : 歩行グラフィック ファイル名
  262.   #     character_index : 歩行グラフィック インデックス
  263.   #     x               : 描画先 X 座標
  264.   #     y               : 描画先 Y 座標
  265.   #     opacity         : 不透明度
  266.   #--------------------------------------------------------------------------
  267.   def draw_character(character_name, character_index, x, y, opacity = 255)
  268.     return if character_name == nil
  269.     bitmap = Cache.character(character_name)
  270.     sign = character_name[/^[\!\$]./]
  271.     if sign != nil and sign.include?('$')
  272.       cw = bitmap.width / 3
  273.       ch = bitmap.height / 4
  274.     else
  275.       cw = bitmap.width / 12
  276.       ch = bitmap.height / 8
  277.     end
  278.     n = character_index
  279.     src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
  280.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
  281.   end
  282.   #--------------------------------------------------------------------------
  283.   # ○ 空欄アクター描画
  284.   #     index : 項目番号
  285.   #--------------------------------------------------------------------------
  286.   def draw_empty_actor(index)
  287.     rect = item_rect(index)
  288.     self.contents.font.color = system_color
  289.     self.contents.draw_text(rect, KGC::LargeParty::PARTY_MEMBER_BLANK_TEXT, 1)
  290.     self.contents.font.color = normal_color
  291.   end
  292. end

  293. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  294. #==============================================================================
  295. # □ Window_PartyFormStatus
  296. #------------------------------------------------------------------------------
  297. #  パーティ編成画面でアクターのステータスを表示するウィンドウです。
  298. #==============================================================================

  299. class Window_PartyFormStatus < Window_Base
  300.   #--------------------------------------------------------------------------
  301.   # ● オブジェクト初期化
  302.   #--------------------------------------------------------------------------
  303.   def initialize
  304.     super(0, 0, 384, 128)
  305.     self.z = 1000
  306.     @actor = nil
  307.     refresh
  308.   end
  309.   #--------------------------------------------------------------------------
  310.   # ○ アクター設定
  311.   #--------------------------------------------------------------------------
  312.   def set_actor(actor)
  313.     if @actor != actor
  314.       @actor = actor
  315.       refresh
  316.     end
  317.   end
  318.   #--------------------------------------------------------------------------
  319.   # ● リフレッシュ
  320.   #--------------------------------------------------------------------------
  321.   def refresh
  322.     self.contents.clear
  323.     if @actor == nil
  324.       return
  325.     end

  326.     draw_actor_face(@actor, 0, 0)
  327.     dx = 104
  328.     draw_actor_name(@actor, dx, 0)
  329.     draw_actor_level(@actor, dx, WLH * 1)
  330.     draw_actor_hp(@actor, dx, WLH * 2)
  331.     draw_actor_mp(@actor, dx, WLH * 3)
  332.     4.times { |i|
  333.       draw_actor_parameter(@actor, dx + 128, WLH * i, i, 120)
  334.     }
  335.   end
  336.   #--------------------------------------------------------------------------
  337.   # ● 能力値の描画
  338.   #     actor : アクター
  339.   #     x     : 描画先 X 座標
  340.   #     y     : 描画先 Y 座標
  341.   #     type  : 能力値の種類 (0~3)
  342.   #     width : 描画幅
  343.   #--------------------------------------------------------------------------
  344.   def draw_actor_parameter(actor, x, y, type, width = 156)
  345.     case type
  346.     when 0
  347.       parameter_name = Vocab::atk
  348.       parameter_value = actor.atk
  349.     when 1
  350.       parameter_name = Vocab::def
  351.       parameter_value = actor.def
  352.     when 2
  353.       parameter_name = Vocab::spi
  354.       parameter_value = actor.spi
  355.     when 3
  356.       parameter_name = Vocab::agi
  357.       parameter_value = actor.agi
  358.     end
  359.     nw = width - 36
  360.     self.contents.font.color = system_color
  361.     self.contents.draw_text(x, y, nw, WLH, parameter_name)
  362.     self.contents.font.color = normal_color
  363.     self.contents.draw_text(x + nw, y, 36, WLH, parameter_value, 2)
  364.   end
  365. end

  366. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  367. #==============================================================================
  368. # □ Window_PartyFormControl
  369. #------------------------------------------------------------------------------
  370. #  パーティ編成画面で操作方法を表示するウィンドウです。
  371. #==============================================================================

  372. class Window_PartyFormControl < Window_Base
  373.   #--------------------------------------------------------------------------
  374.   # ○ 定数
  375.   #--------------------------------------------------------------------------
  376.   MODE_BATTLE_MEMBER = 0
  377.   MODE_SHIFT_CHANGE  = 1
  378.   MODE_PARTY_MEMBER  = 2
  379.   #--------------------------------------------------------------------------
  380.   # ● オブジェクト初期化
  381.   #--------------------------------------------------------------------------
  382.   def initialize
  383.     super(0, 0, Graphics.width - 384, 128)
  384.     self.z = 1000
  385.     @mode = MODE_BATTLE_MEMBER
  386.     refresh
  387.   end
  388.   #--------------------------------------------------------------------------
  389.   # ○ モード変更
  390.   #--------------------------------------------------------------------------
  391.   def mode=(value)
  392.     @mode = value
  393.     refresh
  394.   end
  395.   #--------------------------------------------------------------------------
  396.   # ● リフレッシュ
  397.   #--------------------------------------------------------------------------
  398.   def refresh
  399.     self.contents.clear
  400.     case @mode
  401.     when MODE_BATTLE_MEMBER  # 戦闘メンバー
  402.       buttons = [
  403.         "A: 离开",
  404.         "B: 结束",
  405.         "C: 决定",
  406.         "X: 排序"
  407.       ]
  408.     when MODE_SHIFT_CHANGE   # 並び替え
  409.       buttons = [
  410.         "B: 取消",
  411.         "C: 决定",
  412.         "X: 决定"
  413.       ]
  414.     when MODE_PARTY_MEMBER   # パーティメンバー
  415.       buttons = [
  416.         "B: 取消",
  417.         "C: 决定"
  418.       ]
  419.     else
  420.       return
  421.     end

  422.     buttons.each_with_index { |c, i|
  423.       self.contents.draw_text(0, WLH * i, width - 32, WLH, c)
  424.     }
  425.   end
  426. end

  427. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  428. #==============================================================================
  429. # ■ Scene_Title
  430. #==============================================================================

  431. class Scene_Title < Scene_Base
  432.   #--------------------------------------------------------------------------
  433.   # ● 各種ゲームオブジェクトの作成
  434.   #--------------------------------------------------------------------------
  435.   alias create_game_objects_KGC_LargeParty create_game_objects
  436.   def create_game_objects
  437.     create_game_objects_KGC_LargeParty

  438.     if KGC::LargeParty::DEFAULT_PARTYFORM_ENABLED
  439.       $game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = true
  440.       $game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = true
  441.     end
  442.   end
  443. end

  444. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  445. #==============================================================================
  446. # ■ Scene_Map
  447. #==============================================================================

  448. class Scene_Map < Scene_Base
  449.   #--------------------------------------------------------------------------
  450.   # ● 画面切り替えの実行
  451.   #--------------------------------------------------------------------------
  452.   alias update_scene_change_KGC_LargeParty update_scene_change
  453.   def update_scene_change
  454.     return if $game_player.moving?    # プレイヤーの移動中?

  455.     if $game_temp.next_scene == :partyform
  456.       call_partyform
  457.       return
  458.     end

  459.     update_scene_change_KGC_LargeParty
  460.   end
  461.   #--------------------------------------------------------------------------
  462.   # ○ パーティ編成画面への切り替え
  463.   #--------------------------------------------------------------------------
  464.   def call_partyform
  465.     $game_temp.next_scene = nil
  466.     $scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_MAP)
  467.   end
  468. end

  469. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  470. #==============================================================================
  471. # ■ Scene_Menu
  472. #==============================================================================

  473. class Scene_Menu < Scene_Base
  474.   if KGC::LargeParty::USE_MENU_PARTYFORM_COMMAND
  475.   #--------------------------------------------------------------------------
  476.   # ● コマンドウィンドウの作成
  477.   #--------------------------------------------------------------------------
  478.   alias create_command_window_KGC_LargeParty create_command_window
  479.   def create_command_window
  480.     create_command_window_KGC_LargeParty

  481.     return if $imported["CustomMenuCommand"]

  482.     @__command_partyform_index =
  483.       @command_window.add_command(Vocab.partyform)
  484.     @command_window.draw_item(@__command_partyform_index,
  485.       $game_party.partyform_enable?)
  486.     if @command_window.oy > 0
  487.       @command_window.oy -= Window_Base::WLH
  488.     end
  489.     @command_window.index = @menu_index
  490.   end
  491.   end
  492.   #--------------------------------------------------------------------------
  493.   # ● コマンド選択の更新
  494.   #--------------------------------------------------------------------------
  495.   alias update_command_selection_KGC_LargeParty update_command_selection
  496.   def update_command_selection
  497.     current_menu_index = @__command_partyform_index
  498.     call_partyform_flag = false

  499.     if Input.trigger?(Input::C)
  500.       case @command_window.index
  501.       when @__command_partyform_index  # パーティ編成
  502.         call_partyform_flag = true
  503.       end
  504.     # パーティ編成ボタン押下
  505.     elsif KGC::LargeParty::MENU_PARTYFORM_BUTTON != nil &&
  506.         Input.trigger?(KGC::LargeParty::MENU_PARTYFORM_BUTTON)
  507.       call_partyform_flag = true
  508.       current_menu_index = @command_window.index if current_menu_index == nil
  509.     end

  510.     # パーティ編成画面に移行
  511.     if call_partyform_flag
  512.       if $game_party.members.size == 0 || !$game_party.partyform_enable?
  513.         Sound.play_buzzer
  514.         return
  515.       end
  516.       Sound.play_decision
  517.       $scene = Scene_PartyForm.new(current_menu_index)
  518.       return
  519.     end

  520.     update_command_selection_KGC_LargeParty
  521.   end
  522. end

  523. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  524. #==============================================================================
  525. # ■ Scene_Shop
  526. #==============================================================================

  527. unless $imported["HelpExtension"]
  528. class Scene_Shop < Scene_Base
  529.   #--------------------------------------------------------------------------
  530.   # ● フレーム更新
  531.   #--------------------------------------------------------------------------
  532.   alias udpate_KGC_LargeParty update
  533.   def update
  534.     # スクロール判定
  535.     if !@command_window.active &&
  536.         KGC::LargeParty::SHOP_STATUS_SCROLL_BUTTON != nil &&
  537.         Input.press?(KGC::LargeParty::SHOP_STATUS_SCROLL_BUTTON)
  538.       super
  539.       update_menu_background
  540.       update_scroll_status
  541.       return
  542.     else
  543.       @status_window.cursor_rect.empty
  544.     end

  545.     udpate_KGC_LargeParty
  546.   end
  547.   #--------------------------------------------------------------------------
  548.   # ○ ステータスウィンドウのスクロール処理
  549.   #--------------------------------------------------------------------------
  550.   def update_scroll_status
  551.     # ステータスウィンドウにカーソルを表示
  552.     @status_window.cursor_rect.width = @status_window.contents.width
  553.     @status_window.cursor_rect.height = @status_window.height - 32
  554.     @status_window.update

  555.     if Input.press?(Input::UP)
  556.       @status_window.oy = [@status_window.oy - 4, 0].max
  557.     elsif Input.press?(Input::DOWN)
  558.       max_pos = [@status_window.contents.height -
  559.         (@status_window.height - 32), 0].max
  560.       @status_window.oy = [@status_window.oy + 4, max_pos].min
  561.     end
  562.   end
  563. end
  564. end

  565. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  566. #==============================================================================
  567. # □ Scene_PartyForm
  568. #------------------------------------------------------------------------------
  569. #  パーティ編成画面の処理を行うクラスです。
  570. #==============================================================================

  571. class Scene_PartyForm < Scene_Base
  572.   #--------------------------------------------------------------------------
  573.   # ○ 定数
  574.   #--------------------------------------------------------------------------
  575.   CAPTION_OFFSET = 40  # キャプションウィンドウの位置補正
  576.   HOST_MENU   = 0      # 呼び出し元 : メニュー
  577.   HOST_MAP    = 1      # 呼び出し元 : マップ
  578.   HOST_BATTLE = 2      # 呼び出し元 : 戦闘
  579.   #--------------------------------------------------------------------------
  580.   # ● オブジェクト初期化
  581.   #     menu_index : コマンドのカーソル初期位置
  582.   #     host_scene : 呼び出し元 (0..メニュー  1..マップ  2..戦闘)
  583.   #--------------------------------------------------------------------------
  584.   def initialize(menu_index = 0, host_scene = HOST_MENU)
  585.     @menu_index = menu_index
  586.     @host_scene = host_scene
  587.   end
  588.   #--------------------------------------------------------------------------
  589.   # ● 開始処理
  590.   #--------------------------------------------------------------------------
  591.   def start
  592.     super
  593.     create_menu_background

  594.     create_windows
  595.     create_confirm_window
  596.     adjust_window_location

  597.     # 編成前のパーティを保存
  598.     @battle_actors = $game_party.battle_members.dup
  599.     @party_actors = $game_party.all_members.dup
  600.   end
  601.   #--------------------------------------------------------------------------
  602.   # ○ ウィンドウの作成
  603.   #--------------------------------------------------------------------------
  604.   def create_windows
  605.     # 編成用ウィンドウを作成
  606.     @battle_member_window = Window_PartyFormBattleMember.new
  607.     @party_member_window = Window_PartyFormAllMember.new
  608.     @status_window = Window_PartyFormStatus.new
  609.     @status_window.set_actor(@battle_member_window.actor)

  610.     # その他のウィンドウを作成
  611.     @battle_member_caption_window =
  612.       Window_PartyFormCaption.new(KGC::LargeParty::BATTLE_MEMBER_CAPTION)
  613.     @party_member_caption_window =
  614.       Window_PartyFormCaption.new(KGC::LargeParty::PARTY_MEMBER_CAPTION)
  615.     @control_window = Window_PartyFormControl.new
  616.   end
  617.   #--------------------------------------------------------------------------
  618.   # ○ 確認ウィンドウの作成
  619.   #--------------------------------------------------------------------------
  620.   def create_confirm_window
  621.     commands = KGC::LargeParty::CONFIRM_WINDOW_COMMANDS
  622.     @confirm_window =
  623.       Window_Command.new(KGC::LargeParty::CONFIRM_WINDOW_WIDTH, commands)
  624.     @confirm_window.index = 0
  625.     @confirm_window.openness = 0
  626.     @confirm_window.active = false
  627.   end
  628.   #--------------------------------------------------------------------------
  629.   # ○ ウィンドウの座標調整
  630.   #--------------------------------------------------------------------------
  631.   def adjust_window_location
  632.     # 基準座標を計算
  633.     base_x = [@battle_member_window.width, @party_member_window.width].max
  634.     base_x = [(Graphics.width - base_x) / 2, 0].max
  635.     base_y = @battle_member_window.height + @party_member_window.height +
  636.       @status_window.height + CAPTION_OFFSET * 2
  637.     base_y = [(Graphics.height - base_y) / 2, 0].max
  638.     base_z = @menuback_sprite.z + 1000

  639.     # 編成用ウィンドウの座標をセット
  640.     @battle_member_window.x = base_x
  641.     @battle_member_window.y = base_y + CAPTION_OFFSET
  642.     @battle_member_window.z = base_z
  643.     @party_member_window.x = base_x
  644.     @party_member_window.y = @battle_member_window.y +
  645.       @battle_member_window.height + CAPTION_OFFSET
  646.     @party_member_window.z = base_z
  647.     @status_window.x = 0
  648.     @status_window.y = @party_member_window.y + @party_member_window.height
  649.     @status_window.z = base_z

  650.     # その他のウィンドウの座標をセット
  651.     @battle_member_caption_window.x = [base_x - 16, 0].max
  652.     @battle_member_caption_window.y = @battle_member_window.y - CAPTION_OFFSET
  653.     @battle_member_caption_window.z = base_z + 500
  654.     @party_member_caption_window.x = [base_x - 16, 0].max
  655.     @party_member_caption_window.y = @party_member_window.y - CAPTION_OFFSET
  656.     @party_member_caption_window.z = base_z + 500
  657.     @control_window.x = @status_window.width
  658.     @control_window.y = @status_window.y
  659.     @control_window.z = base_z

  660.     @confirm_window.x = (Graphics.width - @confirm_window.width) / 2
  661.     @confirm_window.y = (Graphics.height - @confirm_window.height) / 2
  662.     @confirm_window.z = base_z + 1000
  663.   end
  664.   #--------------------------------------------------------------------------
  665.   # ● 終了処理
  666.   #--------------------------------------------------------------------------
  667.   def terminate
  668.     super
  669.     dispose_menu_background
  670.     @battle_member_window.dispose
  671.     @party_member_window.dispose
  672.     @status_window.dispose
  673.     @battle_member_caption_window.dispose
  674.     @party_member_caption_window.dispose
  675.     @control_window.dispose
  676.     @confirm_window.dispose
  677.   end
  678.   #--------------------------------------------------------------------------
  679.   # ● メニュー画面系の背景作成
  680.   #--------------------------------------------------------------------------
  681.   def create_menu_background
  682.     super
  683.     @menuback_sprite.z = 20000
  684.   end
  685.   #--------------------------------------------------------------------------
  686.   # ● 元の画面へ戻る
  687.   #--------------------------------------------------------------------------
  688.   def return_scene
  689.     case @host_scene
  690.     when HOST_MENU
  691.       $scene = Scene_Menu.new(@menu_index)
  692.     when HOST_MAP
  693.       $scene = Scene_Map.new
  694.     when HOST_BATTLE
  695.       $scene = Scene_Battle.new
  696.     end
  697.     $game_player.refresh
  698.   end
  699.   #--------------------------------------------------------------------------
  700.   # ● フレーム更新
  701.   #--------------------------------------------------------------------------
  702.   def update
  703.     super
  704.     update_menu_background
  705.     update_window
  706.     if @battle_member_window.active
  707.       update_battle_member
  708.     elsif @party_member_window.active
  709.       update_party_member
  710.     elsif @confirm_window.active
  711.       update_confirm
  712.     end
  713.   end
  714.   #--------------------------------------------------------------------------
  715.   # ○ ウィンドウ更新
  716.   #--------------------------------------------------------------------------
  717.   def update_window
  718.     @battle_member_window.update
  719.     @party_member_window.update
  720.     @status_window.update
  721.     @battle_member_caption_window.update
  722.     @party_member_caption_window.update
  723.     @control_window.update
  724.     @confirm_window.update
  725.   end
  726.   #--------------------------------------------------------------------------
  727.   # ○ ウィンドウ再描画
  728.   #--------------------------------------------------------------------------
  729.   def refresh_window
  730.     @battle_member_window.refresh
  731.     @party_member_window.refresh
  732.   end
  733.   #--------------------------------------------------------------------------
  734.   # ○ フレーム更新 (戦闘メンバーウィンドウがアクティブの場合)
  735.   #--------------------------------------------------------------------------
  736.   def update_battle_member
  737.     @status_window.set_actor(@battle_member_window.actor)
  738.     if Input.trigger?(Input::A)
  739.       if @battle_member_window.selected_index == nil  # 並び替え中でない
  740.         actor = @battle_member_window.actor
  741.         # アクターを外せない場合
  742.         if actor == nil || $game_party.actor_fixed?(actor.id)
  743.           Sound.play_buzzer
  744.           return
  745.         end
  746.         # アクターを外す
  747.         Sound.play_decision
  748.         actors = $game_party.battle_members
  749.         actors.delete_at(@battle_member_window.index)
  750.         $game_party.set_battle_member(actors)
  751.         refresh_window
  752.       end
  753.     elsif Input.trigger?(Input::B)
  754.       if @battle_member_window.selected_index == nil  # 並び替え中でない
  755.         # 確認ウィンドウに切り替え
  756.         Sound.play_cancel
  757.         show_confirm_window
  758.       else                                            # 並び替え中
  759.         # 並び替え解除
  760.         Sound.play_cancel
  761.         @battle_member_window.selected_index = nil
  762.         @battle_member_window.refresh
  763.         @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  764.       end
  765.     elsif Input.trigger?(Input::C)
  766.       if @battle_member_window.selected_index == nil  # 並び替え中でない
  767.         actor = @battle_member_window.actor
  768.         # アクターを外せない場合
  769.         if actor != nil && $game_party.actor_fixed?(actor.id)
  770.           Sound.play_buzzer
  771.           return
  772.         end
  773.         # パーティメンバーウィンドウに切り替え
  774.         Sound.play_decision
  775.         @battle_member_window.active = false
  776.         @party_member_window.active = true
  777.         @control_window.mode = Window_PartyFormControl::MODE_PARTY_MEMBER
  778.       else                                            # 並び替え中
  779.         unless can_change_shift?(@battle_member_window.actor)
  780.           Sound.play_buzzer
  781.           return
  782.         end
  783.         # 並び替え実行
  784.         Sound.play_decision
  785.         index1 = @battle_member_window.selected_index
  786.         index2 = @battle_member_window.index
  787.         change_shift(index1, index2)
  788.         @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  789.       end
  790.     elsif Input.trigger?(Input::X)
  791.       # 並び替え不可能な場合
  792.       unless can_change_shift?(@battle_member_window.actor)
  793.         Sound.play_buzzer
  794.         return
  795.       end
  796.       if @battle_member_window.selected_index == nil  # 並び替え中でない
  797.         # 並び替え開始
  798.         Sound.play_decision
  799.         @battle_member_window.selected_index = @battle_member_window.index
  800.         @battle_member_window.refresh
  801.         @control_window.mode = Window_PartyFormControl::MODE_SHIFT_CHANGE
  802.       else                                            # 並び替え中
  803.         # 並び替え実行
  804.         Sound.play_decision
  805.         index1 = @battle_member_window.selected_index
  806.         index2 = @battle_member_window.index
  807.         change_shift(index1, index2)
  808.         @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  809.       end
  810.     end
  811.   end
  812.   #--------------------------------------------------------------------------
  813.   # ○ 並び替え可否判定
  814.   #--------------------------------------------------------------------------
  815.   def can_change_shift?(actor)
  816.     # 選択したアクターが存在しない、または並び替え不能な場合
  817.     if actor == nil ||
  818.         (KGC::LargeParty::FORBID_CHANGE_SHIFT_FIXED &&
  819.          $game_party.actor_fixed?(actor.id))
  820.       return false
  821.     end
  822.     return true
  823.   end
  824.   #--------------------------------------------------------------------------
  825.   # ○ 並び替え
  826.   #--------------------------------------------------------------------------
  827.   def change_shift(index1, index2)
  828.     # 位置を入れ替え
  829.     $game_party.change_shift(index1, index2)
  830.     # 選択済みインデックスをクリア
  831.     @battle_member_window.selected_index = nil
  832.     refresh_window
  833.   end
  834.   #--------------------------------------------------------------------------
  835.   # ○ フレーム更新 (パーティウィンドウがアクティブの場合)
  836.   #--------------------------------------------------------------------------
  837.   def update_party_member
  838.     @status_window.set_actor(@party_member_window.actor)
  839.     if Input.trigger?(Input::B)
  840.       Sound.play_cancel
  841.       # 戦闘メンバーウィンドウに切り替え
  842.       @battle_member_window.active = true
  843.       @party_member_window.active = false
  844.         @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  845.     elsif Input.trigger?(Input::C)
  846.       actor = @party_member_window.actor
  847.       # アクターが戦闘メンバーに含まれる場合
  848.       if $game_party.battle_members.include?(actor)
  849.         Sound.play_buzzer
  850.         return
  851.       end
  852.       # アクターを入れ替え
  853.       Sound.play_decision
  854.       actors = $game_party.all_members
  855.       battle_actors = $game_party.battle_members
  856.       if @battle_member_window.actor != nil
  857.         actors[@party_member_window.actor_index] = @battle_member_window.actor
  858.         actors[@battle_member_window.index] = actor
  859.         $game_party.set_member(actors.compact)
  860.       end
  861.       battle_actors[@battle_member_window.index] = actor
  862.       $game_party.set_battle_member(battle_actors.compact)
  863.       refresh_window
  864.       # 戦闘メンバーウィンドウに切り替え
  865.       @battle_member_window.active = true
  866.       @party_member_window.active = false
  867.       @control_window.mode = Window_PartyFormControl::MODE_BATTLE_MEMBER
  868.     end
  869.   end
  870.   #--------------------------------------------------------------------------
  871.   # ○ フレーム更新 (確認ウィンドウがアクティブの場合)
  872.   #--------------------------------------------------------------------------
  873.   def update_confirm
  874.     if Input.trigger?(Input::B)
  875.       Sound.play_cancel
  876.       hide_confirm_window
  877.     elsif Input.trigger?(Input::C)
  878.       case @confirm_window.index
  879.       when 0  # 編成完了
  880.         # パーティが無効の場合
  881.         unless battle_member_valid?
  882.           Sound.play_buzzer
  883.           return
  884.         end
  885.         Sound.play_decision
  886.         return_scene
  887.       when 1  # 編成中断
  888.         Sound.play_decision
  889.         # パーティを編成前の状態に戻す
  890.         $game_party.set_member(@party_actors)
  891.         $game_party.set_battle_member(@battle_actors)
  892.         return_scene
  893.       when 2  # キャンセル
  894.         Sound.play_cancel
  895.         hide_confirm_window
  896.       end
  897.     end
  898.   end
  899.   #--------------------------------------------------------------------------
  900.   # ○ 戦闘メンバー有効判定
  901.   #--------------------------------------------------------------------------
  902.   def battle_member_valid?
  903.     return false if $game_party.battle_members.size == 0  # 戦闘メンバーが空
  904.     $game_party.battle_members.each { |actor|
  905.       return true if actor.exist?  # 生存者がいればOK
  906.     }
  907.     return false
  908.   end
  909.   #--------------------------------------------------------------------------
  910.   # ○ 確認ウィンドウの表示
  911.   #--------------------------------------------------------------------------
  912.   def show_confirm_window
  913.     if @battle_member_window.active
  914.       @last_active_window = @battle_member_window
  915.     else
  916.       @last_active_window = @party_member_window
  917.     end
  918.     @battle_member_window.active = false
  919.     @party_member_window.active = false

  920.     @confirm_window.draw_item(0, battle_member_valid?)
  921.     @confirm_window.open
  922.     @confirm_window.active = true
  923.   end
  924.   #--------------------------------------------------------------------------
  925.   # ○ 確認ウィンドウの非表示
  926.   #--------------------------------------------------------------------------
  927.   def hide_confirm_window
  928.     @confirm_window.active = false
  929.     @confirm_window.close
  930.     @last_active_window.active = true
  931.   end
  932. end

  933. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  934. #==============================================================================
  935. # ■ Scene_Battle
  936. #==============================================================================

  937. class Scene_Battle < Scene_Base
  938.   #--------------------------------------------------------------------------
  939.   # ● メッセージ表示が終わるまでウェイト
  940.   #--------------------------------------------------------------------------
  941.   alias wait_for_message_KGC_LargeParty wait_for_message
  942.   def wait_for_message
  943.     return if @ignore_wait_for_message  # メッセージ終了までのウェイトを無視

  944.     wait_for_message_KGC_LargeParty
  945.   end
  946.   #--------------------------------------------------------------------------
  947.   # ● レベルアップの表示
  948.   #--------------------------------------------------------------------------
  949.   alias display_level_up_KGC_LargeParty display_level_up
  950.   def display_level_up
  951.     @ignore_wait_for_message = true

  952.     display_level_up_KGC_LargeParty

  953.     exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
  954.     $game_party.stand_by_members.each { |actor|
  955.       if actor.exist?
  956.         actor.gain_exp(exp, KGC::LargeParty::SHOW_STAND_BY_LEVEL_UP)
  957.       end
  958.     }
  959.     @ignore_wait_for_message = false
  960.     wait_for_message
  961.   end
  962.   #--------------------------------------------------------------------------
  963.   # ● パーティコマンド選択の開始
  964.   #--------------------------------------------------------------------------
  965.   alias start_party_command_selection_KGC_LargeParty start_party_command_selection
  966.   def start_party_command_selection
  967.     if $game_temp.in_battle
  968.       @status_window.index = 0
  969.     end

  970.     start_party_command_selection_KGC_LargeParty
  971.   end

  972.   if KGC::LargeParty::USE_BATTLE_PARTYFORM
  973.   #--------------------------------------------------------------------------
  974.   # ● 情報表示ビューポートの作成
  975.   #--------------------------------------------------------------------------
  976.   alias create_info_viewport_KGC_LargeParty create_info_viewport
  977.   def create_info_viewport
  978.     create_info_viewport_KGC_LargeParty

  979.     @__command_partyform_index =
  980.       @party_command_window.add_command(Vocab.partyform_battle)
  981.     @party_command_window.draw_item(@__command_partyform_index,
  982.       $game_party.battle_partyform_enable?)
  983.   end
  984.   #--------------------------------------------------------------------------
  985.   # ● パーティコマンド選択の更新
  986.   #--------------------------------------------------------------------------
  987.   alias update_party_command_selection_KGC_LargeParty update_party_command_selection
  988.   def update_party_command_selection
  989.     if Input.trigger?(Input::C)
  990.       case @party_command_window.index
  991.       when @__command_partyform_index  # パーティ編成
  992.         unless $game_party.battle_partyform_enable?
  993.           Sound.play_buzzer
  994.           return
  995.         end
  996.         Sound.play_decision
  997.         process_partyform
  998.         return
  999.       end
  1000.     end

  1001.     update_party_command_selection_KGC_LargeParty
  1002.   end
  1003.   #--------------------------------------------------------------------------
  1004.   # ○ パーティ編成の処理
  1005.   #--------------------------------------------------------------------------
  1006.   def process_partyform
  1007.     Graphics.freeze
  1008.     snapshot_for_background
  1009.     $scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_BATTLE)
  1010.     $scene.main
  1011.     $scene = self
  1012.     @status_window.refresh
  1013.     perform_transition
  1014.   end
  1015.   end
  1016. end
复制代码
我命令你给我点下面的东西!

LBQ Works

Lv1.梦旅人

梦石
0
星屑
50
在线时间
138 小时
注册时间
2011-7-29
帖子
68
2
发表于 2011-8-4 14:27:05 | 只看该作者
楼主
你的表情可以去掉吗?
这个脚本我看了2次的说
求 楼主把脚本制成代码 这样复制起来有方便

点评

ok~现在没有问题了。 谢谢896409879  发表于 2011-8-4 16:18
改完了……  发表于 2011-8-4 15:56
表情?为神马脚本中有跟快捷表情一样的字符呢?我也很无语……  发表于 2011-8-4 15:37
回复 支持 反对

使用道具 举报

Lv1.梦旅人

龙神

梦石
0
星屑
47
在线时间
512 小时
注册时间
2011-1-19
帖子
984
3
发表于 2011-8-4 14:28:00 | 只看该作者
广告位?还有,ABC的玩游戏的人看不懂

点评

原版就是这样,汉化也不能改这个啊。  发表于 2011-8-4 15:35


神的穿越 THRU OF GOD  完成度1%
脚本2%  行走图10%  剧情1%
复仇の怪物    完成度7%
脚本10%  行走图10%  剧情5%
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
138 小时
注册时间
2011-7-29
帖子
68
4
发表于 2011-8-4 15:55:37 | 只看该作者
第11行Name error出现错误 ‘uninitiated constant KGC :: Large Party’
名字引导出现错误?
求大神解决
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
616 小时
注册时间
2010-10-29
帖子
463
5
 楼主| 发表于 2011-8-4 16:11:05 | 只看该作者
老军师 发表于 2011-8-4 15:55
第11行Name error出现错误 ‘uninitiated constant KGC :: Large Party’
名字引导出现错误?{:4_ ...

有两部分,你那是第二部分……
我命令你给我点下面的东西!

LBQ Works
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
138 小时
注册时间
2011-7-29
帖子
68
6
发表于 2011-8-4 16:22:05 | 只看该作者
896409879 发表于 2011-8-4 16:11
有两部分,你那是第二部分……

太长,一下没看到
现在可以用了~谢谢
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
72 小时
注册时间
2011-7-3
帖子
44
7
发表于 2011-8-6 12:38:25 | 只看该作者
弱弱地问问,如何设置NPC触发这个对话框?

点评

使用:$scene = Scene_PartyForm.new 但这样完毕后会返回菜单……  发表于 2011-8-6 21:23
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-6-27
帖子
5
8
发表于 2011-8-17 17:56:21 | 只看该作者
我恨想说得的是 这东西连个范例都木有  而且无教材  就2个无法理解的脚本  请问汉化是指 你的标题么...

点评

我很想说的是 这东西复制一下到脚本编辑器那 而且不需要教材 就两个已经汉化过的脚本 请问你是想怎样?  发表于 2011-8-17 19:56
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
459 小时
注册时间
2008-10-9
帖子
114
9
发表于 2011-8-17 19:54:09 | 只看该作者
lz请问你可以汉化注释吗
好好学习,天天向上!
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-29 12:31

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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