#--------------------------------------------------------------------------
# �œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï�”
#--------------------------------------------------------------------------
# attr_accessor : update_cp_only # CPƒ��[ƒ^�[‚Ì‚Ý‚Ì�X�V
#--------------------------------------------------------------------------
# �œ ƒIƒuƒWƒFƒNƒg�‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize
@update_cp_only = false
xrxs_bp1_initialize
end
#--------------------------------------------------------------------------
# �œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
# alias xrxs_bp1_refresh refresh
def refresh
if @update_cp_only == false
xrxs_bp1_refresh
end
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
end
end
#--------------------------------------------------------------------------
# �œ CPƒ��[ƒ^�[ ‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
if actor.cp == nil
actor.cp = 0
end
w = width * [actor.cp,65535].min / 65535
self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
end
#==============================================================================
# �¡ Scene_Battle
#==============================================================================
class Scene_Battle
# ‚±‚±‚ÉŒø‰Ê‰¹‚ð�Ý’è‚·‚é‚Æ�AƒAƒNƒ^�[ƒRƒ}ƒ“ƒh‚ªƒ|ƒbƒv‚µ‚½‚Æ‚«‚ÉŒø‰Ê‰¹‚ð�Ä�¶
$data_system_command_up_se = ""
#--------------------------------------------------------------------------
# �œ ƒoƒgƒ‹�I—¹
# result : Œ‹‰Ê (0:�Ÿ—˜ 1:”s–k 2:“¦‘–)
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
# CPƒJƒEƒ“ƒg’âŽ~
#@cp_thread.stop
xrxs_bp1_battle_end(result)
end
#--------------------------------------------------------------------------
# �œ ƒvƒŒƒoƒgƒ‹ƒtƒF�[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase1 start_phase1
def start_phase1
@agi_total = 0
#@cp_thread = Scene_Battle_CP.new
# ƒAƒNƒ^�[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ð�Ä�ì�¬
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4, "Run"])
@actor_command_window.y = 128
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@actor_command_window.draw_item(4, $game_temp.battle_can_escape ? @actor_command_window.normal_color : @actor_command_window.disabled_color)
xrxs_bp1_start_phase1
end
#--------------------------------------------------------------------------
# �œ ƒp�[ƒeƒBƒRƒ}ƒ“ƒhƒtƒF�[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase2 start_phase2
def start_phase2
xrxs_bp1_start_phase2
@party_command_window.active = false
@party_command_window.visible = false
# ŽŸ‚Ö
start_phase3
end
#--------------------------------------------------------------------------
# �œ ƒtƒŒ�[ƒ€�X�V (ƒp�[ƒeƒBƒRƒ}ƒ“ƒhƒtƒF�[ƒY)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase2 update_phase2
def update_phase2
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽ�ê�‡
if Input.trigger?(Input::C)
# ƒp�[ƒeƒBƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J�[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
case @party_command_window.index
when 0 # �키
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
@cp_thread.start
# ƒAƒNƒ^�[ƒRƒ}ƒ“ƒhƒtƒF�[ƒYŠJŽn
start_phase3
end
return
end
xrxs_bp1_update_phase2
end
#--------------------------------------------------------------------------
# �œ ŽŸ‚̃AƒNƒ^�[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
#--------------------------------------------------------------------------
def phase3_next_actor
# ƒ‹�[ƒv
begin
# ƒAƒNƒ^�[‚Ì–¾–ŃGƒtƒFƒNƒg OFF
if @active_battler != nil
@active_battler.blink = false
end
# �ÅŒã‚̃AƒNƒ^�[‚Ì�ê�‡
if @actor_index == $game_party.actors.size-1
# ƒ�ƒCƒ“ƒtƒF�[ƒYŠJŽn
#@cp_thread.start
start_phase4
return
end
# ƒAƒNƒ^�[‚̃Cƒ“ƒfƒbƒNƒX‚ð�i‚ß‚é
@actor_index += 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
if @active_battler.inputable? == false
@active_battler.current_action.kind = -1
end
# ƒAƒNƒ^�[‚ªƒRƒ}ƒ“ƒh“ü—Í‚ðŽó‚¯•t‚¯‚È‚¢�ó‘Ô‚È‚ç‚à‚¤ˆê“x
end until @active_battler.inputable?
#@cp_thread.stop
# ƒAƒNƒ^�[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒZƒbƒgƒAƒbƒv
#@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# �œ ‘O‚̃AƒNƒ^�[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
#--------------------------------------------------------------------------
def phase3_prior_actor
# ƒ‹�[ƒv
begin
# ƒAƒNƒ^�[‚Ì–¾–ŃGƒtƒFƒNƒg OFF
if @active_battler != nil
@active_battler.blink = false
end
# �Å�‰‚̃AƒNƒ^�[‚Ì�ê�‡
if @actor_index == 0
# �Å�‰‚Ö–ß‚é
start_phase3
return
end
# ƒAƒNƒ^�[‚̃Cƒ“ƒfƒbƒNƒX‚ð–ß‚·
@actor_index -= 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
# ƒAƒNƒ^�[‚ªƒRƒ}ƒ“ƒh“ü—Í‚ðŽó‚¯•t‚¯‚È‚¢�ó‘Ô‚È‚ç‚à‚¤ˆê“x
end until @active_battler.inputable?
@cp_thread.stop
# ƒAƒNƒ^�[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒZƒbƒgƒAƒbƒv
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# �œ ƒAƒNƒ^�[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃ZƒbƒgƒAƒbƒv
#--------------------------------------------------------------------------
alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
# Œø‰Ê‰¹‚Ì�Ä�¶
Audio.se_play($data_system_command_up_se) if $data_system_command_up_se != ""
# –ß‚·
xrxs_bp1_phase3_setup_command_window
end
#--------------------------------------------------------------------------
# �œ ƒtƒŒ�[ƒ€�X�V (ƒAƒNƒ^�[ƒRƒ}ƒ“ƒhƒtƒF�[ƒY : Šî–{ƒRƒ}ƒ“ƒh)
#--------------------------------------------------------------------------
alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽ�ê�‡
if Input.trigger?(Input::C)
# ƒAƒNƒ^�[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J�[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
case @actor_command_window.index
when 4 # “¦‚°‚é
if $game_temp.battle_can_escape
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒAƒNƒVƒ‡ƒ“‚ð�Ý’è
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 4
# ŽŸ‚̃AƒNƒ^�[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
phase3_next_actor
else
# ƒuƒU�[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
xrxs_bsp1_update_phase3_basic_command
end
#--------------------------------------------------------------------------
# �œ ƒ�ƒCƒ“ƒtƒF�[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase4 start_phase4
def start_phase4
xrxs_bp1_start_phase4
# ƒGƒlƒ~�[ƒAƒNƒVƒ‡ƒ“�ì�¬
for enemy in $game_troop.enemies
#if enemy.cp > 65535
enemy.current_action.clear
enemy.current_action.kind = -1 # ƒ^�[ƒ“”ò‚΂µ�B
next
end
enemy.make_action
end
# �s“
�‡�˜�ì�¬
#make_action_orders
end
#--------------------------------------------------------------------------
# �œ ƒtƒŒ�[ƒ€�X�V (ƒ�ƒCƒ“ƒtƒF�[ƒY ƒXƒeƒbƒv 1 : ƒAƒNƒVƒ‡ƒ“�€”õ)
#--------------------------------------------------------------------------
#alias xrxs_bp1_update_phase4_step1 update_phase4_step1
def update_phase4_step1
# �‰Šú‰»
@phase4_act_continuation = 0
# �Ÿ”s”»’è
if judge
@cp_thread.stop
# �Ÿ—˜‚Ü‚½‚Í”s–k‚Ì�ê�‡ : ƒ�ƒ\ƒbƒh�I—¹
return
end
# –¢�s“
ƒoƒgƒ‰�[”z—ñ‚Ì�擪‚
‚çŽæ“¾
@active_battler = @action_battlers[0]
# ƒXƒe�[ƒ^ƒX�X�V‚ðCP‚¾‚¯‚ÉŒÀ’è�B
@status_window.update_cp_only = true
# ƒXƒe�[ƒg�X�V‚ð‹ÖŽ~�B
@active_battler.slip_state_update_ban = true if @active_battler != nil
# –ß‚·
xrxs_bp1_update_phase4_step1
# ‹ÖŽ~‚ð‰ð�œ
@status_window.update_cp_only = false
@active_battler.slip_state_update_ban = false if @active_battler != nil
end
#--------------------------------------------------------------------------
# �œ ƒtƒŒ�[ƒ€�X�V (ƒ�ƒCƒ“ƒtƒF�[ƒY ƒXƒeƒbƒv 2 : ƒAƒNƒVƒ‡ƒ“ŠJŽn)
#--------------------------------------------------------------------------
#alias xrxs_bp1_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# ‹�§ƒAƒNƒVƒ‡ƒ“‚Å‚È‚¯‚ê‚Î
unless @active_battler.current_action.forcing
# CP‚ª‘«‚è‚Ä‚¢‚È‚¢�ê�‡
if @phase4_act_continuation == 0 and @active_battler.cp > 65535
@phase4_step = 6
return
end