| 赞 | 168 |
| VIP | |
| 好人卡 | |
| 积分 | 229 |
| 经验 | |
| 最后登录 | 2025-4-1 |
| 在线时间 | 8598 小时 |
- 梦石
- 0
- 星屑
- 22879
- 在线时间
- 8598 小时
- 注册时间
- 2011-12-31
- 回帖
- 3270
|
发表于 2015-2-7 19:08:20
|
显示全部楼层
本帖最后由 tseyik 于 2015-2-7 19:12 编辑
レベル一時制限- #==============================================================================
- # □ レベル一時制限 (for VX Ace)
- #------------------------------------------------------------------------------
- # Version : 2_20120701
- # by サリサ・タイクーン
- # http://www.tycoon812.com/rgss/
- #==============================================================================
- #==============================================================================
- # □ 素材スイッチ
- #==============================================================================
- $rgsslab = {} if $rgsslab == nil
- $rgsslab["レベル一時制限"] = true
- if $rgsslab["レベル一時制限"]
- #==============================================================================
- # □ カスタマイズポイント
- #==============================================================================
- module RGSSLAB end
- module RGSSLAB::Level_Temporary_Limit
- #--------------------------------------------------------------------------
- # ○ レベル一時制限時のレベルの値の色の設定
- # 一時制限されている間、レベルの色を変更します。
- #
- # 色を変更する色番号(ウィンドウスキンに依存)を記述して下さい。
- #--------------------------------------------------------------------------
- COLOR = 10
- #--------------------------------------------------------------------------
- # ○ レベル一時制限時のレベルの描画の反映
- # trueにすると、一時制限時でもそのレベルとして描画されます。
- #--------------------------------------------------------------------------
- DRAW = true
- end
- # カスタマイズポイントは、ここまで
- #==============================================================================
- # □ RGSSLAB::Level_Temporary_Limit [module]
- #==============================================================================
- module RGSSLAB::Level_Temporary_Limit
- #--------------------------------------------------------------------------
- # ○ 素材設定用の定数定義
- #--------------------------------------------------------------------------
- MATERIAL_NAME = "レベル一時制限"
- VERSION = 2
- RELEASE = 20120701
- #--------------------------------------------------------------------------
- # ○ 操作エラー
- # error_number : エラー番号
- #--------------------------------------------------------------------------
- def self.operate_error(error_number)
- text = "【RGSS研究所:#{MATERIAL_NAME}】"
- case error_number
- when 1
- msgbox_p text,
- "この操作を行うには、パーティ編成システム(RGSS研究所)が必要です。"
- end
- end
- end
- #==============================================================================
- # ■ Game_Actor [class]
- #==============================================================================
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # ● 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_reader :temp_level
- #--------------------------------------------------------------------------
- # ● セットアップ [エイリアス]
- # actor_id : アクター ID
- #--------------------------------------------------------------------------
- alias level_temporary_limit_setup setup
- def setup(actor_id)
- @temp_level = 0
- level_temporary_limit_setup(actor_id)
- end
- #--------------------------------------------------------------------------
- # ● 通常能力値の基本値取得 [再構築]
- # param_id : パラメータID
- #--------------------------------------------------------------------------
- def param_base(param_id)
- n = 0
- if $rgsslab["パラメータの追加"] && param_id > 7
- n = param_base_parameter_append(param_id)
- else
- n = $rgsslab["レベル拡張"] ? gpb_rgsslab_level_extension(param_id) : self.class.params[param_id, get_use_level]
- end
- if $rgsslab["パラメータ構築設定"]
- array = []
- for t in RGSSLAB_145::ARRAY do array.push(t) if !array.include?(t) && check_array(t) end
- for t in array
- case t
- when "陣形ボーナス" ; n = get_battle_lines_bonus(param_id, n) if $rgsslab["陣形ボーナス"]
- when "性格補正" ; n += party_bonus(param_id) if $rgsslab["パーティボーナス"]
- when "パーティボーナス" ; n += character_compensation(param_id) if $rgsslab["パラメータ性格補正"]
- end
- end
- else
- n = get_battle_lines_bonus(param_id, n) if $rgsslab["陣形ボーナス"]
- n += party_bonus(param_id) if $rgsslab["パーティボーナス"]
- n += character_compensation(param_id) if $rgsslab["パラメータ性格補正"]
- end
- return n
- end
- #--------------------------------------------------------------------------
- # ○ 使用レベルの取得
- #--------------------------------------------------------------------------
- def get_use_level
- return level_temporary_limit if $rgsslab["レベル一時制限"]
- return @level
- end
- #--------------------------------------------------------------------------
- # ○ レベル一時制限判定
- #--------------------------------------------------------------------------
- def level_temporary_limit
- return @level if @temp_level <= 0
- return @temp_level if @level > @temp_level
- return @level
- end
- #--------------------------------------------------------------------------
- # ○ レベル一時制限の設定
- # temp_level_value : 一時制限を行うレベルの値
- #--------------------------------------------------------------------------
- def temp_level=(temp_level_value)
- final = get_final_level
- @temp_level = [temp_level_value, final].min
- refresh
- end
- #--------------------------------------------------------------------------
- # ○ 最終レベルの取得
- #--------------------------------------------------------------------------
- def get_final_level
- return @now_maxlevel if $rgsslab["最終レベル設定"]
- return $data_actors[@actor_id].max_level
- end
- end
- #==============================================================================
- # ■ Game_Actors [class]
- #==============================================================================
- class Game_Actors
- #--------------------------------------------------------------------------
- # ○ アクター全員のレベル一時制限リスト表示
- #--------------------------------------------------------------------------
- def temp_level
- actors_temp_level = []
- for i in 1...$data_actors.size
- if self[i].temp_level != 0
- actors_temp_level.push(self[i].temp_level)
- else
- actors_temp_level.push("false")
- end
- end
- actors_name = {}
- for i in 0...actors_temp_level.size
- actors_name[$data_actors[i + 1].name] = actors_temp_level[i]
- end
- return actors_name
- end
- #--------------------------------------------------------------------------
- # ○ アクター全員のレベル一時制限
- # temp_level : レベル一時制限を行う値
- #--------------------------------------------------------------------------
- def temp_level=(temp_level)
- for i in 1...$data_actors.size
- $game_actors[i].temp_level = temp_level
- end
- end
- end
- #==============================================================================
- # ■ Game_Party [class]
- #==============================================================================
- class Game_Party < Game_Unit
- #--------------------------------------------------------------------------
- # ○ モジュールの設定
- #--------------------------------------------------------------------------
- RGSSLAB_032 = RGSSLAB::Level_Temporary_Limit
- #--------------------------------------------------------------------------
- # ○ パーティ全員のレベル一時制限リスト表示
- #--------------------------------------------------------------------------
- def temp_level
- party_temp_level = []
- for i in 0...self.members.size
- if self.members[i].temp_level != 0
- party_temp_level.push(self.members[i].temp_level)
- else
- party_temp_level.push("false")
- end
- end
- party_name = {}
- for i in 0...party_temp_level.size
- party_name[self.members[i].name] = party_temp_level[i]
- end
- return party_name
- end
- #--------------------------------------------------------------------------
- # ○ パーティ全員のレベル一時制限
- # temp_level : レベル一時制限を行う値
- #--------------------------------------------------------------------------
- def temp_level=(temp_level)
- for i in 0...self.members.size
- self.members[i].temp_level = temp_level
- end
- end
- #--------------------------------------------------------------------------
- # ○ 待機メンバー全員のレベル一時制限リスト表示
- #--------------------------------------------------------------------------
- def standby_temp_level
- unless $rgsslab["パーティ編成システム"]
- RGSSLAB_032.operate_error(1)
- return
- end
- standby_temp_level = []
- for i in 0...self.standby.size
- if self.standby[i].temp_level != 0
- standby_temp_level.push(self.standby[i].temp_level)
- else
- standby_temp_level.push("false")
- end
- end
- standby_name = {}
- for i in 0...standby_temp_level.size do standby_name[self.standby[i].name] = standby_temp_level[i] end
- return standby_name
- end
- #--------------------------------------------------------------------------
- # ○ 待機メンバー全員のレベル一時制限
- # temp_level : レベル一時制限を行う値
- #--------------------------------------------------------------------------
- def standby_temp_level=(temp_level)
- unless $rgsslab["パーティ編成システム"]
- RGSSLAB_032.operate_error(1)
- return
- end
- for i in 0...self.standby.size do self.standby[i].temp_level = temp_level end
- end
- end
- #==============================================================================
- # ■ Window_Base [class]
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ○ モジュールの設定
- #--------------------------------------------------------------------------
- RGSSLAB_032 = RGSSLAB::Level_Temporary_Limit
- #--------------------------------------------------------------------------
- # ● レベルの描画 [再構築]
- # actor : アクター
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- #--------------------------------------------------------------------------
- def draw_actor_level(actor, x, y)
- change_color(system_color)
- draw_text(x, y, 32, line_height, Vocab::level_a)
- if actor.temp_level != 0
- change_color(text_color(RGSSLAB_032::COLOR))
- else
- change_color(normal_color)
- end
- if RGSSLAB_032::DRAW and actor.temp_level != 0
- if actor.level > actor.temp_level
- draw_text(x + 32, y, 24, line_height, actor.temp_level, 2)
- else
- draw_text(x + 32, y, 24, line_height, actor.level, 2)
- end
- else
- draw_text(x + 32, y, 24, line_height, actor.level, 2)
- end
- end
- end
- end
复制代码 一部分功能要以下脚本
パーティ編成システム
[pre lang="ruby" line="1"]#==============================================================================
# □ パーティ編成システム (for VX Ace)
#------------------------------------------------------------------------------
# Version : 1_20120731
# by サリサ・タイクーン
# http://www.tycoon812.com/rgss/
#==============================================================================
#==============================================================================
# □ 素材スイッチ
#==============================================================================
$rgsslab = {} if $rgsslab == nil
$rgsslab["パーティ編成システム"] = true
if $rgsslab["パーティ編成システム"]
#==============================================================================
# □ カスタマイズポイント
#==============================================================================
module RGSSLAB end
module RGSSLAB::Party_Organization_System
#--------------------------------------------------------------------------
# ○ 待機メンバーのソート機能
# trueにすると、待機メンバーの加入・離脱・パーティ編成システム画面において
# 常にID順にソートされるようになります。
#--------------------------------------------------------------------------
SORT = true
#--------------------------------------------------------------------------
# ○ 強制フラグ
# trueにすると、待機メンバーに加える際に、パーティメンバーにいる場合は
# 強制的に待機メンバーへ移動させます。
# (falseにすると、移動しない代わりに待機メンバーに加える事ができません)
#--------------------------------------------------------------------------
FORCE = true
#--------------------------------------------------------------------------
# ○ パーティ編成画面の一行辺りの待機メンバーの人数
# 横に並べる際に、何人目で改行するのかを設定します。
#
# 空欄(それを選ぶと外れると言う意味)の分も含まれる為
# 正確には、現在の待機メンバー+1の数で割り当てられる事に
# ご注意下さい。
#--------------------------------------------------------------------------
COLUMN_MAX = 9
#--------------------------------------------------------------------------
# ○ 外す事のできないアクターの設定
# IMPOSSIBLLITYに外す事のできないアクターIDを記述します。
#
# ここに記述されたアクターIDは、編成画面において
# 選択する事ができなくなります。
#
# ・イベントコマンドのスクリプトでの変更方法
# $game_system.rgsslab028.impossibillity = [アクターID, …]
#--------------------------------------------------------------------------
IMPOSSIBILLITY = []
end
# カスタマイズポイントは、ここまで
#==============================================================================
# □ RGSSLAB::Party_Organization_System [module]
#==============================================================================
module RGSSLAB::Party_Organization_System
#--------------------------------------------------------------------------
# ○ 素材設定用の定数定義
#--------------------------------------------------------------------------
MATERIAL_NAME = "パーティ編成システム"
VERSION = 1
RELEASE = 20120731
end
#==============================================================================
# ■ Game_System [class]
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :rgsslab028
#--------------------------------------------------------------------------
# ● オブジェクト初期化 [エイリアス]
#--------------------------------------------------------------------------
alias party_organization_initialize initialize
def initialize
party_organization_initialize
@rgsslab028 = RgssLab_028.new
end
end
#==============================================================================
# □ RgssLab_028 [class]
#==============================================================================
class RgssLab_028
#--------------------------------------------------------------------------
# ○ モジュールの設定
#--------------------------------------------------------------------------
RGSSLAB_028 = RGSSLAB::Party_Organization_System
#--------------------------------------------------------------------------
# ○ 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :impossibillity
#--------------------------------------------------------------------------
# ○ オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
@impossibillity = RGSSLAB_028::IMPOSSIBILLITY
end
end
#==============================================================================
# ■ Game_Party [class]
#==============================================================================
class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# ○ モジュールの設定
#--------------------------------------------------------------------------
RGSSLAB_028 = RGSSLAB::Party_Organization_System
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :standby
attr_reader :actors
#--------------------------------------------------------------------------
# ● オブジェクト初期化 [エイリアス]
#--------------------------------------------------------------------------
alias party_organization_initialize initialize
def initialize
party_organization_initialize
@standby = []
end
#--------------------------------------------------------------------------
# ○ メンバーの入れ替え
# new_members : 新しいパーティメンバーの配列
#--------------------------------------------------------------------------
def all_members=(new_members)
@actors.clear
count = 0
for i in new_members
@actors[count] = i
count += 1
end
end
#--------------------------------------------------------------------------
# ○ 待機メンバーを加える
# actor_id : アクター ID
#--------------------------------------------------------------------------
def add_actor_organization_system(actor_id)
@standby.push(actor_id) unless @standby.include?(actor_id) && @actors.include?(actor_id)
@standby.uniq!
standby_sort
$game_player.refresh
setup_pos if $rgsslab["陣形導入"] && $rgsslab["アクターバトラー実装"]
end
#--------------------------------------------------------------------------
# ○ 待機メンバーを外す
# actor_id : アクター ID
#--------------------------------------------------------------------------
def remove_actor_organization_system(actor_id)
@standby.delete(actor_id)
standby_sort
$game_player.refresh
setup_pos if $rgsslab["陣形導入"] && $rgsslab["アクターバトラー実装"]
end
#--------------------------------------------------------------------------
# ○ 待機メンバーのソート
#--------------------------------------------------------------------------
def standby_sort
return unless RGSSLAB_028::SORT
@standby.sort!{|a, b|
a <=> b
}
end
end
#==============================================================================
# ■ Game_Interpreter [class]
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
# ○ モジュールの設定
#--------------------------------------------------------------------------
RGSSLAB_028 = RGSSLAB::Party_Organization_System
#--------------------------------------------------------------------------
# ○ 待機メンバーを加える
# actor_id : アクターID
#--------------------------------------------------------------------------
def add_standby(actor_id)
return if actor_id < 1
$game_party.remove_actor(actor_id) if $game_party.actors.include?(actor_id) && RGSSLAB_028::FORCE && $game_party.actors.size > 1
$game_party.add_actor_organization_system(actor_id)
end
#--------------------------------------------------------------------------
# ○ 待機メンバーを外す
# actor_id : アクターID
# back : パーティ加入フラグ
#--------------------------------------------------------------------------
def remove_standby(actor_id, back = true)
return if actor_id < 1
$game_party.add_actor(actor_id) if back && $game_party.standby.include?(actor_id)
$game_party.remove_actor_organization_system(actor_id)
end
#--------------------------------------------------------------------------
# ○ パーティ編成システムの呼び出し
#--------------------------------------------------------------------------
def call_standby
SceneManager.call(Scene_Party_Organization_System)
Fiber.yield
end
end
#==============================================================================
# □ Window_Party_Organization_Help [class]
#==============================================================================
class Window_Party_Organization_Help < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :text_index
#--------------------------------------------------------------------------
# ○ オブジェクト初期化 [オーバーライド]
#--------------------------------------------------------------------------
def initialize
super(0, 0, Graphics.width, fitting_height(1))
@text_index = 0
refresh
end
#--------------------------------------------------------------------------
# ○ リフレッシュ
#--------------------------------------------------------------------------
def refresh
contents.clear
case @text_index
when 0
str = "Cボタン:決定 Bボタン:編成終了"
rect = contents.text_size(str)
when 1
str = "Cボタン:決定 Bボタン:キャンセル"
rect = contents.text_size(str)
end
contents.draw_text(4, 0, rect.width, line_height, str)
end
end
#==============================================================================
# □ Window_Party_Member
#==============================================================================
class Window_Party_Member < Window_Selectable
#--------------------------------------------------------------------------
# ○ オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
max = $game_party.all_members.size + 1
@column_max = max
@item_max = max
super(0, 96, Graphics.width, 80)
self.opacity = 0
self.index = 0
self.z = 101
refresh
end
#--------------------------------------------------------------------------
# ○ 桁数の取得 [オーバーライド]
#--------------------------------------------------------------------------
def col_max
return @column_max
end
#--------------------------------------------------------------------------
# ○ 項目数の取得 [オーバーライド]
#--------------------------------------------------------------------------
def item_max
return @item_max
end
#--------------------------------------------------------------------------
# ○ リフレッシュ [オーバーライド]
#--------------------------------------------------------------------------
def refresh
contents.clear
for actor in $game_party.all_members do draw_actor(actor, actor.index) end
end
#--------------------------------------------------------------------------
# ○ アクターグラフィックの描画
# actor : アクター
# index : 項目番号
#--------------------------------------------------------------------------
def draw_actor(actor, index)
if $game_system.rgsslab028.impossibillity.include?(actor.id)
draw_actor_graphic_impossibillity(actor, 24 + 48 * index, 40)
else
draw_actor_graphic(actor, 24 + 48 * index, 40)
end
end
#--------------------------------------------------------------------------
# ○ 入れ替えのできないアクターの歩行グラフィック描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_graphic_impossibillity(actor, x, y)
return if actor.name == nil
bitmap = Cache.character(actor.character_name)
sign = actor.name[/^[\!\$]./]
if sign != nil and sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = actor.character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, 64)
end
#--------------------------------------------------------------------------
# ○ カーソルの更新 [オーバーライド]
#--------------------------------------------------------------------------
def update_cursor
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(@index * 48, 0, 48, 48)
end
end
#--------------------------------------------------------------------------
# ○ 最大値の再設定
#--------------------------------------------------------------------------
def max_reset
@item_max = $game_party.members.size + 1
end
end
#==============================================================================
# □ Window_Standby_Member [class]
#==============================================================================
class Window_Standby_Member < Window_Selectable
#--------------------------------------------------------------------------
# ○ モジュールの設定
#--------------------------------------------------------------------------
RGSSLAB_028 = RGSSLAB::Party_Organization_System
#--------------------------------------------------------------------------
# ○ オブジェクト初期化 [オーバーライド]
#--------------------------------------------------------------------------
def initialize
max = $game_party.standby.size
if max == 0
max = 1
else
max += 1
end
@column_max = RGSSLAB_028::COLUMN_MAX
@item_max = max
super(0, 208, Graphics.width, 128)
self.opacity = 0
self.index = -1
self.active = false
self.z = 101
refresh
end
#--------------------------------------------------------------------------
# ○ 桁数の取得 [オーバーライド]
#--------------------------------------------------------------------------
def col_max
return @column_max
end
#--------------------------------------------------------------------------
# ○ 項目数の取得 [オーバーライド]
#--------------------------------------------------------------------------
def item_max
return @item_max
end
#--------------------------------------------------------------------------
# ○ リフレッシュ [オーバーライド]
#--------------------------------------------------------------------------
def refresh
contents.clear
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 48)
end
count = 0
for actor in $game_party.standby
draw_actor($game_actors[actor], count)
count += 1
end
end
#--------------------------------------------------------------------------
# ○ アクターグラフィックの描画
# actor : アクター
# index : 項目番号
#--------------------------------------------------------------------------
def draw_actor(actor, index)
draw_actor_graphic(actor, 24 + 48 * (index % @column_max), 40 + (index / @column_max * 48))
end
#--------------------------------------------------------------------------
# ○ 先頭の行の取得 [オーバーライド]
#--------------------------------------------------------------------------
def top_row
return self.oy / line_height
end
#--------------------------------------------------------------------------
# ○ 先頭の行の設定 [オーバーライド]
# row : 先頭に表示する行
#--------------------------------------------------------------------------
def top_row=(row)
row = 0 if row < 0
row = row_max - 1 if row > row_max - 1
self.oy = row * line_height
end
#--------------------------------------------------------------------------
# ○ 1 ページに表示できる行数の取得 [オーバーライド]
#--------------------------------------------------------------------------
def page_row_max
return height / line_height
end
#--------------------------------------------------------------------------
# ○ カーソルの更新 [オーバーライド]
#--------------------------------------------------------------------------
def update_cursor
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
x = @index % @column_max * 48
y = @index / @column_max * 48 - self.oy
self.cursor_rect.set(x, y, 48, 48)
end
#--------------------------------------------------------------------------
# ○ 最大値の再設定
#--------------------------------------------------------------------------
def max_reset
max = $game_party.standby.size
if max == 0
max = 1
else
max += 1
end
@item_max = max
end
end
#==============================================================================
# □ Window_Actor_Information [class]
#==============================================================================
class Window_Actor_Information < Window_Base
#--------------------------------------------------------------------------
# ○ オブジェクト初期化 [オーバーライド]
# actor : 一番最初のアクター情報
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 322, Graphics.width, 78)
refresh(actor)
end
#--------------------------------------------------------------------------
# ○ リフレッシュ
# actor : アクター情報
#--------------------------------------------------------------------------
def refresh(actor)
contents.clear
if actor != nil
actor = $game_actors[actor] if actor.is_a?(Numeric)
draw_actor_graphic(actor, 22, 48)
draw_actor_name(actor, 64, 0)
draw_actor_class(actor, 208, 0)
draw_actor_level(actor, 64, 24)
draw_actor_hp(actor, 208, 24)
draw_actor_mp(actor, 336, 24)
end
end
end
#==============================================================================
# □ Window_Party_Organization [class]
#==============================================================================
class Window_Party_Organization < Window_Base
#--------------------------------------------------------------------------
# ○ オブジェクト初期化 [オーバーライド]
#--------------------------------------------------------------------------
def initialize
super(0, 48, Graphics.width, 274)
self.opacity = 255
refresh
end
#--------------------------------------------------------------------------
# ○ リフレッシュ
#--------------------------------------------------------------------------
def refresh
contents.clear
contents.draw_text(4, 0, 155, line_height, "パーティメンバー")
contents.draw_text(4, 112, 155, line_height, "待機メンバー" )
end
end
#==============================================================================
# □ Scene_Party_Organization_System [class]
#==============================================================================
class Scene_Party_Organization_System < Scene_Base
#--------------------------------------------------------------------------
# ○ モジュールの設定
#--------------------------------------------------------------------------
RGSSLAB_028 = RGSSLAB::Party_Organization_System
#--------------------------------------------------------------------------
# ○ 開始処理
#--------------------------------------------------------------------------
def start
super
create_windows
@temporary_actor = nil
end
#--------------------------------------------------------------------------
# ○ ウィンドウの作成
#--------------------------------------------------------------------------
def create_windows
@help_window = Window_Party_Organization_Help.new
@party_member_window = Window_Party_Member.new
@standby_member_window = Window_Standby_Member.new
@information_window = Window_Actor_Information.new($game_party.all_members[0])
@organization_window = Window_Party_Organization.new
@party_member_window.active = true
end
#--------------------------------------------------------------------------
# ○ フレーム更新
#--------------------------------------------------------------------------
def update
super
if @party_member_window.active
update_party_member_window
return
end
if @standby_member_window.active
update_standby_member_window
return
end
end
#--------------------------------------------------------------------------
# ○ フレーム更新:パーティメンバーウィンドウ
#--------------------------------------------------------------------------
def update_party_member_window
@information_window.refresh($game_party.members[@party_member_window.index])
if Input.trigger?(Input::B)
Sound.play_cancel
SceneManager.return
return
end
if Input.trigger?(Input::C)
if $game_party.members[@party_member_window.index]
if $game_system.rgsslab028.impossibillity.include?($game_party.members[@party_member_window.index].id)
Sound.play_buzzer
return
end
end
Sound.play_ok
@temporary_actor = $game_party.members[@party_member_window.index]
@party_member_window.active = false
@standby_member_window.active = true
@standby_member_window.index = 0
@help_window.text_index = 1
@help_window.refresh
return
end
end
#--------------------------------------------------------------------------
# ○ フレーム更新:待機メンバーウィンドウ
#--------------------------------------------------------------------------
def update_standby_member_window
@information_window.refresh($game_party.standby[@standby_member_window.index])
if Input.trigger?(Input::B)
Sound.play_cancel
return_party_member_process
return
end
if Input.trigger?(Input::C)
temp = $game_party.standby[@standby_member_window.index]
if @temporary_actor != nil
if $game_party.standby[@standby_member_window.index] != nil
$game_party.standby[@standby_member_window.index] = @temporary_actor.id
temp_members = []
for i in $game_party.all_members
temp_members.push(i.id)
end
temp_members[@party_member_window.index] = temp
$game_party.all_members = temp_members
else
if $game_party.members.size == 1
Sound.play_buzzer
return
end
temp = $game_party.members[@party_member_window.index]
$game_party.remove_actor($game_party.members[@party_member_window.index].id)
$game_party.add_actor_organization_system(temp.id)
end
else
if $game_party.standby[@standby_member_window.index] == nil
Sound.play_buzzer
return
end
$game_party.add_actor($game_party.standby[@standby_member_window.index])
$game_party.remove_actor_organization_system($game_party.standby[@standby_member_window.index])
end
Sound.play_ok
$game_party.standby_sort
$game_player.refresh
@party_member_window.refresh
@standby_member_window.refresh
return_party_member_process
return
end
end
#--------------------------------------------------------------------------
# ○ パーティメンバーウィンドウ復帰処理
#--------------------------------------------------------------------------
def return_party_member_process
@temporary_actor = nil
@party_member_window.active = true
@standby_member_window.active = false
@standby_member_window.index = -1
@party_member_window.max_reset
@standby_member_window.max_reset
@help_window.text_index = 0
@help_window.refresh
end
end
end[/pre] |
|