| en faite il y en a aucun qui marche mais j'ai essayer de le réparer chez moi ca marche donc c'est ca:
#--------------------------------------------------------------------------
# � öJCX^XÏ�
#--------------------------------------------------------------------------
#attr_accessor :update_cp_only # CP��[^�[ÌÝÌ�X�V
#--------------------------------------------------------------------------
# � IuWFNg�ú»
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize
@update_cp_only = false
xrxs_bp1_initialize
end
#--------------------------------------------------------------------------
# � tbV
#--------------------------------------------------------------------------
#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
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
# ±±Éøʹð�Ýè·éÆ�AAN^�[R}hª|bvµ½Æ«Éøʹð�Ä�¶
$data_system_command_up_se = ""
#--------------------------------------------------------------------------
# � og�I¹
# result : Ê (0:� 1:sk 2:¦)
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
# CPJEgâ~
#@cp_thread.stop
xrxs_bp1_battle_end(result)
end
#--------------------------------------------------------------------------
# � vogtF�[YJn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase1 start_phase1
def start_phase1
@agi_total = 0
#@cp_thread = Scene_Battle_CP.new
# AN^�[R}hEBhEð�Ä�ì�¬
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�[eBR}htF�[YJn
#--------------------------------------------------------------------------
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�[eBR}htF�[Y)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase2 update_phase2
def update_phase2
# C {^ª³ê½�ê�
if Input.trigger?(Input::C)
# p�[eBR}hEBhEÌJ�[\ÊuŪò
case @party_command_window.index
when 0 # �í¤
# è SE ðt
$game_system.se_play($data_system.decision_se)
@cp_thread.start
# AN^�[R}htF�[YJn
start_phase3
end
return
end
xrxs_bp1_update_phase2
end
#--------------------------------------------------------------------------
# � ÌAN^�[ÌR}hüÍÖ
#--------------------------------------------------------------------------
def phase3_next_actor
# �[v
begin
# AN^�[̾ÅGtFNg OFF
if @active_battler != nil
@active_battler.blink = false
end
# �ÅãÌAN^�[Ì�ê�
if @actor_index == $game_party.actors.size-1
# �CtF�[YJn
#@cp_thread.start
start_phase4
return
end
# AN^�[ÌCfbNXð�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
# AN^�[ªR}hüÍðó¯t¯È¢�óÔÈçà¤êx
end until @active_battler.inputable?
#@cp_thread.stop
# AN^�[R}hEBhEðZbgAbv
#@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# � OÌAN^�[ÌR}hüÍÖ
#--------------------------------------------------------------------------
def phase3_prior_actor
# �[v
begin
# AN^�[̾ÅGtFNg OFF
if @active_battler != nil
@active_battler.blink = false
end
# �Å�ÌAN^�[Ì�ê�
if @actor_index == 0
# �Å�Ößé
start_phase3
return
end
# AN^�[ÌCfbNXðß·
@actor_index -= 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
# AN^�[ªR}hüÍðó¯t¯È¢�óÔÈçà¤êx
end until @active_battler.inputable?
@cp_thread.stop
# AN^�[R}hEBhEðZbgAbv
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# � AN^�[R}hEBhEÌZbgAbv
#--------------------------------------------------------------------------
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 (AN^�[R}htF�[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)
# AN^�[R}hEBhEÌ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)
# ANVð�Ýè
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 4
# ÌAN^�[ÌR}hüÍÖ
phase3_next_actor
else
# uU�[ SE ðt
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
xrxs_bsp1_update_phase3_basic_command
end
#--------------------------------------------------------------------------
# � �CtF�[YJn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase4 start_phase4
def start_phase4
xrxs_bp1_start_phase4
# Gl~�[ANV��
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 (�CtF�[Y Xebv 1 : ANV�õ)
#--------------------------------------------------------------------------
#alias xrxs_bp1_update_phase4_step1 update_phase4_step1
def update_phase4_step1
# �ú»
@phase4_act_continuation = 0
# �s»è
if judge
@cp_thread.stop
# �ܽÍskÌ�ê� : �\bh�I¹
return
end
# ¢�s®og�[zñÌ�檩çæ¾
@active_battler = @action_battlers[0]
# Xe�[^X�X�VðCP¾¯ÉÀè�B
@status_window.update_cp_only = true
# Xe�[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 (�CtF�[Y Xebv 2 : ANVJn)
#--------------------------------------------------------------------------
#alias xrxs_bp1_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# �§ANVÅȯêÎ
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
# ANVÉ�Uð�Ýè
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
end
# �§ñª [�s®Å«È¢] Ì�ê�
if @active_battler.restriction == 4
# ANV�§Î�ÛÌog�[ðNA
$game_temp.forcing_battler = nil
if @phase4_act_continuation == 0 and @active_battler.cp <= 65535
# Xe�[g©Rð�
@active_battler.remove_states_auto
# CP�Áï
@active_battler.cp = [(@active_battler.cp - 65535),0].max
# Xe�[^XEBhEðtbV
@status_window.refresh
end
# Xebv 1 ÉÚ�s
@phase4_step = 1
return
end
end
# ANVÌíÊŪò
case @active_battler.current_action.kind
when 0
# �U¥hä�E¦°é�E½àµÈ¢Ì¤Ê�ÁïCP
@active_battler.cp -= 0 if @phase4_act_continuation == 0
when 1
# XLgpÌ�ÁïCP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when 2
# ACegpÌ�ÁïCP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when -1
# CPªÜÁĢȢ
@phase4_step = 6
return
end
# CPÁZðêâ~·é
@cp_thread.stop = true
# Xe�[g©Rð�
@active_battler.remove_states_auto
xrxs_bp1_update_phase4_step2
end
#--------------------------------------------------------------------------
# � î{ANV Ê�ì�¬
#--------------------------------------------------------------------------
#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
# uU�[ 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�[�X�V (�CtF�[Y Xebv 5 : _��[W\¦)
#--------------------------------------------------------------------------
#alias xrxs_bp1_update_phase4_step5 update_phase4_step5
def update_phase4_step5
# Xbv_��[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�[�X�V (�CtF�[Y Xebv 6 : tbV
)
#--------------------------------------------------------------------------
#alias xrxs_bp1_update_phase4_step6 update_phase4_step6
def update_phase4_step6
# CPÁZð�ÄJ·é
@cp_thread.stop = false
# wvEBhEðB·
@help_window.visible = false
xrxs_bp1_update_phase4_step6
end
#end
# �¥�£�¥ XRXS_BP 7. ogXe�[^X�ENAfUC ver.1.02 �¥�£�¥
# by �÷ë �Ýy, TOMY
#==============================================================================
# �¡ Window_BattleStatus
#==============================================================================
#class Window_BattleStatus > Window_Base
#--------------------------------------------------------------------------
# � öJCX^XÏ�
#--------------------------------------------------------------------------
#attr_accessor :update_cp_only # CP��[^�[ÌÝÌ�X�V
#--------------------------------------------------------------------------
# � IuWFNg�ú»
#--------------------------------------------------------------------------
#alias xrxs_bp7_initialize initialize
def initialize
#xrxs_bp7_initialize
# �«Full-ViewÌ�ê�ͺñ�sÌ # ð�ÁµÄ¾³¢�B
#self.opacity = 0
#self.back_opacity = 0
end
#--------------------------------------------------------------------------
# � tbV
#--------------------------------------------------------------------------
#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
# `ÊðJn
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors
actor_x = i * 160 + 21
# à�sLOtBbNÌ`Ê
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ê�uHP�vÆpê�uSP�vÌ`Ê
self.contents.font.size = 12 # pê�uHP/SP�v̶Ì嫳
self.contents.font.color = system_color # pê�uHP/SP�v̶Ì�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
#==============================================================================
# �¡ 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
#--------------------------------------------------------------------------
# � Xe�[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
#==============================================================================
# � OCu
#==============================================================================
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)
# `Ê£ÌvZ�Bå«ßɼpÌ·³�B
distance = (start_x - end_x).abs + (start_y - end_y).abs
# `ÊJn
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
# �Åe`æ
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
|