#=====================================================================================================================================
# ■ RGSS3 战斗指令输入中立绘显示ver 1.01
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------
# 作者:
# 白之魔[url=http://izumiwhite.web.fc2.com/]http://izumiwhite.web.fc2.com/[/url]
#
# 使用规则:
# 仅RPG Maker VX Ace的正规用户使用。
# 使用报告、著作权表示等不需要。
# 允许自由修改。
# 无论发生什么问题,我都不负责任。
#=====================================================================================================================================
#------------------------------------------------------------------------------------------------------------------------------------------------
# ★ 初始设定。
# 错开立绘的透明度设定和显示位置。
# 这样下去大概也没问题…。
# 如果在这里弄也不行,就加工图像本身吧。
#------------------------------------------------------------------------------------------------------------------------------------------------
module WD_battlepicture_ini
Picture_opacity = 255 #立绘的不透明度。0(透明)~255(不透明)指定
Picture_x= 100 #立绘的x坐标的位置调整
Picture_y=55 #立绘y坐标的位置调整
Picture_z= -100
Hidepicture1 = false #技能、道具选择时
#清除立绘时为true
Hidepicture2 = true #选择敌方目标
#清除立绘时为true
Hidepicture3 = true #我方选择目标时
#清除立绘时为true
end
#------------------------------------------------------------------------------------------------------------------------------------------------
# ★ 初始设定结束
#------------------------------------------------------------------------------------------------------------------------------------------------
class Window_BattlePicture < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(-16, -16, 640+32, 480+32)
end
#--------------------------------------------------------------------------
# ● 立ち絵のセット
#--------------------------------------------------------------------------
def set(actor)
self.contents.clear
bitmap1 = Cache.picture(actor.face_name)
rect1 = Rect.new(0, 0, bitmap1.width, bitmap1.height)
#p actor.id
#p "z"
#p $game_party.actors[0]
if $game_party.battle_members.count == 2
if (actor.id == $game_party.actors[0] )
x = 416-bitmap1.width/2 + WD_battlepicture_ini::Picture_x #1号
y = 432-bitmap1.height + WD_battlepicture_ini::Picture_y
else
x = -280 #2号位
y = 432-bitmap1.height + WD_battlepicture_ini::Picture_y
end
else
if (actor.id == $game_party.actors[0] || actor.id == $game_party.actors[1])
x = 416-bitmap1.width/2 + WD_battlepicture_ini::Picture_x #1号,2号位
y = 432-bitmap1.height + WD_battlepicture_ini::Picture_y
else
x = -280 #3号,4号位
y = 432-bitmap1.height + WD_battlepicture_ini::Picture_y
end
end
self.contents.blt(x, y, bitmap1, rect1, WD_battlepicture_ini::Picture_opacity)
end
end
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● 情報表示ビューポートの作成
#--------------------------------------------------------------------------
alias wd_orig_create_info_viewport_009 create_info_viewport
def create_info_viewport
@battle_picture_window = Window_BattlePicture.new
@battle_picture_window.hide
@battle_picture_window.opacity = 0
wd_orig_create_info_viewport_009
end
#--------------------------------------------------------------------------
# ● 次のコマンド入力へ
#--------------------------------------------------------------------------
alias wd_orig_next_command_009 next_command
def next_command
@battle_picture_window.hide
wd_orig_next_command_009
end
#--------------------------------------------------------------------------
# ● 前のコマンド入力へ
#--------------------------------------------------------------------------
alias wd_orig_prior_command_009 prior_command
def prior_command
@battle_picture_window.hide
wd_orig_prior_command_009
end
#--------------------------------------------------------------------------
# ● アクターコマンド選択の開始
#--------------------------------------------------------------------------
alias wd_orig_start_actor_command_selection_009 start_actor_command_selection
def start_actor_command_selection
wd_orig_start_actor_command_selection_009
@battle_picture_window.show
@battle_picture_window.set(BattleManager.actor)
end
#--------------------------------------------------------------------------
# ● スキル[決定]
#--------------------------------------------------------------------------
alias wd_orig_on_skill_ok_009 on_skill_ok
def on_skill_ok
@skill = @skill_window.item
if !@skill.need_selection?
elsif @skill.for_opponent?
@battle_picture_window.show if WD_battlepicture_ini::Hidepicture2 == false
else
@battle_picture_window.show if WD_battlepicture_ini::Hidepicture3 == false
end
wd_orig_on_skill_ok_009
end
#--------------------------------------------------------------------------
# ● コマンド[スキル]
#--------------------------------------------------------------------------
alias wd_orig_command_skill_009 command_skill
def command_skill
@battle_picture_window.hide if WD_battlepicture_ini::Hidepicture1
wd_orig_command_skill_009
end
#--------------------------------------------------------------------------
# ● コマンド[アイテム]
#--------------------------------------------------------------------------
alias wd_orig_command_item_009 command_item
def command_item
@battle_picture_window.hide if WD_battlepicture_ini::Hidepicture1
wd_orig_command_item_009
end
#--------------------------------------------------------------------------
# ● スキル[キャンセル]
#--------------------------------------------------------------------------
alias wd_orig_on_skill_cancel_009 on_skill_cancel
def on_skill_cancel
@battle_picture_window.show
wd_orig_on_skill_cancel_009
end
#--------------------------------------------------------------------------
# ● アイテム[キャンセル]
#--------------------------------------------------------------------------
alias wd_orig_on_item_cancel_009 on_item_cancel
def on_item_cancel
@battle_picture_window.show
wd_orig_on_item_cancel_009
end
#--------------------------------------------------------------------------
# ● アクター選択の開始
#--------------------------------------------------------------------------
alias wd_orig_select_actor_selection_009 select_actor_selection
def select_actor_selection
if WD_battlepicture_ini::Hidepicture3
@battle_picture_window.hide
else
@battle_picture_window.show
end
wd_orig_select_actor_selection_009
end
#--------------------------------------------------------------------------
# ● アクター[キャンセル]
#--------------------------------------------------------------------------
alias wd_orig_on_actor_cancel_009 on_actor_cancel
def on_actor_cancel
@actor_window.hide
case @actor_command_window.current_symbol
when :attack
@battle_picture_window.show
when :skill
if WD_battlepicture_ini::Hidepicture1
@battle_picture_window.hide
else
@battle_picture_window.show
end
when :item
if WD_battlepicture_ini::Hidepicture1
@battle_picture_window.hide
else
@battle_picture_window.show
end
end
wd_orig_on_actor_cancel_009
end
#--------------------------------------------------------------------------
# ● 敵キャラ選択の開始
#--------------------------------------------------------------------------
alias wd_orig_select_enemy_selection_cancel_009 select_enemy_selection
def select_enemy_selection
if WD_battlepicture_ini::Hidepicture2
@battle_picture_window.hide
else
@battle_picture_window.show
end
wd_orig_select_enemy_selection_cancel_009
end
#--------------------------------------------------------------------------
# ● 敵キャラ[キャンセル]
#--------------------------------------------------------------------------
alias wd_orig_on_enemy_cancel_009 on_enemy_cancel
def on_enemy_cancel
case @actor_command_window.current_symbol
when :attack
@battle_picture_window.show
when :skill
if WD_battlepicture_ini::Hidepicture1
@battle_picture_window.hide
else
@battle_picture_window.show
end
when :item
if WD_battlepicture_ini::Hidepicture1
@battle_picture_window.hide
else
@battle_picture_window.show
end
end
wd_orig_on_enemy_cancel_009
end
end