if judge
@cp_thread.stop
# Ÿ—˜‚Ü‚½‚Í”s–k‚Ìê‡ : ƒƒ\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ƒbƒhI—¹
return
end
# –¢s“
ƒoƒgƒ‰[”z—ñ‚Ì擪‚
‚çŽæ“¾
@active_battler = @action_battlers[0]
# ƒXƒe[ƒ^ƒXXV‚ðCP‚¾‚¯‚ÉŒÀ’èB
@status_window.update_cp_only = true
# ƒXƒe[ƒgXV‚ð‹ÖŽ~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ƒŒ[ƒ€XV (ƒƒ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
# §–ñ‚ª [“G‚ð’ÊíUŒ‚‚·‚é] ‚
[–¡•û‚ð’ÊíUŒ‚‚·‚é] ‚Ìê‡
if @active_battler.restriction == 2 or @active_battler.restriction == 3
# ƒAƒNƒVƒ‡ƒ“‚ÉUŒ‚‚ðÝ’è
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
end
# §–ñ‚ª [s“
‚Å‚«‚È‚¢] ‚Ìê‡
if @active_battler.restriction == 4
# ƒAƒNƒVƒ‡ƒ“‹§‘Îۂ̃oƒgƒ‰[‚ðƒNƒŠƒA
$game_temp.forcing_battler = nil
if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
# ƒXƒe[ƒgŽ
‘R‰ðœ
@active_battler.remove_states_auto
# CPÁ”ï
@active_battler.cp = [(@active_battler.cp - 65535),0].max
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒŠƒtƒŒƒbƒVƒ…
@status_window.refresh
end
# ƒXƒeƒbƒv 1 ‚ɈÚs
@phase4_step = 1
return
end
end
# ƒAƒNƒVƒ‡ƒ“‚ÌŽí•Ê‚Å•ªŠò
case @active_battler.current_action.kind
when 0
# UŒ‚¥–hŒäE“¦‚°‚éE‰½‚à‚µ‚È‚¢Žž‚Ì‹¤’ÊÁ”ïCP
@active_battler.cp -= 0 if @phase4_act_continuation == 0
when 1
# ƒXƒLƒ‹Žg—pŽž‚ÌÁ”ïCP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when 2
# ƒAƒCƒeƒ€Žg—pŽž‚ÌÁ”ïCP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when -1
# CP‚ª—‚Ü‚Á‚Ä‚¢‚È‚¢
@phase4_step = 6
return
end
# CP‰ÁŽZ‚ðˆêŽž’âŽ~‚·‚é
@cp_thread.stop = true
# ƒXƒe[ƒgŽ
‘R‰ðœ
@active_battler.remove_states_auto
xrxs_bp1_update_phase4_step2
end
#--------------------------------------------------------------------------
# œ Šî–{ƒAƒNƒVƒ‡ƒ“ Œ‹‰Êì
#--------------------------------------------------------------------------
alias xrxs_bp1_make_basic_action_result make_basic_action_result
def make_basic_action_result
# UŒ‚‚Ìê‡
if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # UŒ‚Žž‚ÌCPÁ”ï
end
# –hŒä‚Ìê‡
if @active_battler.current_action.basic == 1 and @phase4_act_continuation == 0
@active_battler.cp -= 32767 # –hŒäŽž‚ÌCPÁ”ï
end
# “G‚Ì“¦‚°‚é‚Ìê‡
if @active_battler.is_a?(Game_Enemy) and
@active_battler.current_action.basic == 2 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # “¦‘–Žž‚ÌCPÁ”ï
end
# ‰½‚à‚µ‚È‚¢‚Ìê‡
if @active_battler.current_action.basic == 3 and @phase4_act_continuation == 0
@active_battler.cp -= 32767 # ‰½‚à‚µ‚È‚¢Žž‚ÌCPÁ”ï
end
# “¦‚°‚é‚Ìê‡
if @active_battler.current_action.basic == 4 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # “¦‘–Žž‚ÌCPÁ”ï
# “¦‘–‰Â”\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\‚Å‚Í‚È‚¢ê‡
if $game_temp.battle_can_escape == false
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# “¦‘–ˆ—
update_phase2_escape
return
end
xrxs_bp1_make_basic_action_result
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ“ƒtƒF[ƒY ƒXƒeƒbƒv 5 : ƒ_ƒ[ƒW•\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Ž¦)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step5 update_phase4_step5
def update_phase4_step5
# ƒXƒŠƒbƒvƒ_ƒ[ƒW
if @active_battler.hp > 0 and @active_battler.slip_damage?
@active_battler.slip_damage_effect
@active_battler.damage_pop = true
end
xrxs_bp1_update_phase4_step5
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ“ƒtƒF[ƒY ƒXƒeƒbƒv 6 : ƒŠƒtƒŒƒbƒVƒ…)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step6 update_phase4_step6
def update_phase4_step6
# CP‰ÁŽZ‚ðÄŠJ‚·‚é
@cp_thread.stop = false
# ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ð‰B‚·
@help_window.visible = false
xrxs_bp1_update_phase4_step6
end
end
# ¥£¥ XRXS_BP 7. ƒoƒgƒ‹ƒXƒe[ƒ^ƒXEƒNƒŠƒAƒfƒUƒCƒ“ ver.1.02 ¥£¥
# by ÷‰ë Ý“y, TOMY
#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CPƒ[ƒ^[‚Ì‚Ý‚ÌXV
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp7_initialize initialize
def initialize
xrxs_bp7_initialize
# «Full-View‚Ìꇂ͉º“ñs‚Ì # ‚ðÁ‚µ‚Ä‚‚¾‚³‚¢B
#self.opacity = 0
#self.back_opacity = 0
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
alias xrxs_bp7_refresh refresh
def refresh
if @update_cp_only
xrxs_bp7_refresh
return
end
# •`ŽÊ‚ð‹ÖŽ~‚µ‚È‚ª‚ç–ß‚·
@draw_ban = true
xrxs_bp7_refresh
# •`ŽÊ‚Ì‹ÖŽ~‚ð‰ðœ
@draw_ban = false
# •`ŽÊ‚ðŠJŽn
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 21
# •àsƒLƒƒƒ‰ƒOƒ‰ƒtƒBƒbƒN‚Ì•`ŽÊ
draw_actor_graphic(actor, actor_x - 9, 116)
# HP/SPƒ[ƒ^[‚Ì•`ŽÊ
draw_actor_hp_meter_line(actor, actor_x, 72, 96, 12)
draw_actor_sp_meter_line(actor, actor_x, 104, 96, 12)
# HP”’l‚Ì•`ŽÊ
self.contents.font.size = 24 # HP/SP”’l‚Ì•Žš‚Ì‘å‚«‚³
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 58, 96, 24, actor.hp.to_s, 2)
# SP”’l‚Ì•`ŽÊ
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 90, 96, 24, actor.sp.to_s, 2)
# —pŒêuHPv‚Æ—pŒêuSPv‚Ì•`ŽÊ
self.contents.font.size = 12 # —pŒêuHP/SPv‚Ì•Žš‚Ì‘å‚«‚³
self.contents.font.color = system_color # —pŒêuHP/SPv‚Ì•Žš‚ÌF
draw_shadow_text(actor_x, 60, 96, 12, $data_system.words.hp)
draw_shadow_text(actor_x, 92, 96, 12, $data_system.words.sp)
draw_actor_state(actor, actor_x, 100)
end
end
end
#==============================================================================
# ¡ Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# œ HPƒ[ƒ^[ ‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.hp / actor.maxhp
hp_color_1 = Color.new(255, 0, 0, 192)
hp_color_2 = Color.new(255, 255, 0, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# œ SPƒ[ƒ^[ ‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.sp / actor.maxsp
hp_color_1 = Color.new( 0, 0, 255, 192)
hp_color_2 = Color.new( 0, 255, 255, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# œ –¼‘O‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_name draw_actor_name
def draw_actor_name(actor, x, y)
xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
end
#--------------------------------------------------------------------------
# œ ƒXƒe[ƒg‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_state draw_actor_state
def draw_actor_state(actor, x, y, width = 120)
xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# œ HP ‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_hp draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# œ SP ‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_sp draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
end
end
#==============================================================================
# ž ŠO•”ƒ‰ƒCƒuƒ‰ƒŠ
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# œ ƒ‰ƒCƒ“•`‰æ by ÷‰ë Ý“y
#--------------------------------------------------------------------------
def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
# •`ŽÊ‹——£‚ÌŒvŽZB‘å‚«‚ß‚É’¼ŠpŽž‚Ì’·‚³B
distance = (start_x - end_x).abs + (start_y - end_y).abs
# •`ŽÊŠJŽn
if end_color == start_color
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
self.contents.fill_rect(x, y, width, width, start_color)
end
else
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
r = start_color.red * (distance-i)/distance + end_color.red * i/distance
g = start_color.green * (distance-i)/distance + end_color.green * i/distance
b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
end
end
end
#--------------------------------------------------------------------------
# œ ‰e•Žš•`‰æ by TOMY
#--------------------------------------------------------------------------
def draw_shadow_text(x, y, width, height, string, align = 0)
# Œ³‚ÌF‚ð•Û‘‚µ‚Ä‚¨‚
color = self.contents.font.color.dup
# •Žš‚ʼne•`‰æ
self.contents.font.color = Color.new(0, 0, 0)
self.contents.draw_text(x + 2, y + 2, width, height, string, align)
# Œ³‚ÌF‚É–ß‚µ‚Ä•`‰æ
self.contents.font.color = color
self.contents.draw_text(x, y, width, height, string, align)
end
end