This is for the ATB battle system script
#==============================================================================
#????????????????ver. 2.56???
#??Script by ???
#??http://para.j-mx.com/
#------------------------------------------------------------------------------
# CT?????????????????????????????
# ??????????????????????????????
# ?????????????????????????????????
# ?????????
#------------------------------------------------------------------------------
#????????
# ???????????????????????Scene_Debug?????
#------------------------------------------------------------------------------
#????
#???
#???????????????????????????????????????
#??????????????????
#??????????????????????????????
#??????????????
#
#?????????
#?????????????????
#?R????PageDown???????????????????
#?L????PageUp????????????????????
#==============================================================================
module PARA_CTB
# ????????CT???????????true:??? / false:?????
COMMAND_WAIT = false
# ??????????????????CT???????????true:??? / false:?????
SELECT_WAIT = true
# ???????????CT???????????true:??? / false:?????
ANIMATION_WAIT = false
# ????????????????CT??????????
BATTLE_SPEED = 3
# ???????????????PT?????????????????
PARTY_SIZE = 4
# ??????CT?????????
ACT_ATTACK_CT = 100 # ????
ACT_GUARD_CT = 100 # ??
ACT_ESCAPE_CT = 100 # ????
ACT_SKILL_CT = 100 # ???
ACT_ITEM_CT = 100 # ????
# ???????????
UNESCAPE_MES = "????"
# CT?????????""?????????
# ?????Audio/SE??????
FULL_CT_SE = "015-Jump01"
# ?????????
FULL_CT_SE_VOL = 80
# CT?????????????(0,0,0)??????
FULL_CT_COLOR = Tone.new(32,0,0)
# HP????????????????
HP_COLOR_LEFT = Color.new(128, 0, 0, 255)
# HP????????????????
HP_COLOR_RIGHT= Color.new(255, 0, 0, 255)
# SP????????????????
SP_COLOR_LEFT = Color.new(0, 0, 128, 255)
# SP????????????????
SP_COLOR_RIGHT= Color.new(0, 0, 255, 255)
# CT????????????????
COLOR_LEFT = Color.new(128, 128, 64, 255)
# CT????????????????
COLOR_RIGHT= Color.new(255, 255, 128, 255)
# CT????????????????
COLOR_FULL = Color.new(255, 225, 128, 255)
# ??????
FRAME_COLOR = Color.new(192, 192, 192, 255)
# ???????
FRAME_BORDER = 1
# ???????
BACK_COLOR = Color.new(128, 128, 128, 128)
# ??????????
NAME_FONT_SIZE = 16
# HP/SP????????
HPSP_FONT_SIZE = 18
# ?????????????
ENEMY_FONT_SIZE = 16
# ??HP/SP??????? true / false ?
MAX_DRAW = false
# ???????????? true / false ?
# ?true????????? 2???????????????
ENEMY_GROUPING = false
# ??????????????? 0:?? / 1:HP / 2:CT ?
# ??????????????????????
ENEMY_DRAWING_MATER = 0
# ??????????????HP/SP??????? true / false ?
HELP_DRAWING_MATER_ACTOR = false
# ??????????????HP/SP??????? true / false ?
HELP_DRAWING_MATER_ENEMY = false
# ?????????????????? true / false ?
#???????????????????????
# ??????????????????????????true??
# ?true?????????????????????
# ?????????????????????
WINDOWPOS_CHANGE = false
WINDOWPOS_X = 100 # X??
WINDOWPOS_Y = 320 # Y??
# ??????????????
WINDOW_OPACITY = 160
# CT?????????????????????????(????0)
# ??????????????????????
CT_SKIP = 2
end
# ? ????????
#------------------------------------------------------------------------------
#==============================================================================
# ? Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ? CT?????
#--------------------------------------------------------------------------
def update_ct
# ?????????????????
if @countup
for actor in $game_party.actors
# ??????
if actor.movable? == false and actor.ct_visible and @phase4_step != 5
# ?????????????
actor.ct_visible = false
actor.countup = true
actor.full_ct = false
elsif actor.movable? and actor.ct_visible == false
# ?????????????
clear_ct(actor)
actor.ct_visible = true
end
# ????????????
if actor.max_ct == 0
actor.max_ct = @max_ct
end
# ????????????
if actor.countup
# CT?max?????????????????????????
if actor.now_ct >= @max_ct and !(@pre_action_battlers.include?(actor))
# ???????????????
@pre_action_battlers.push(actor)
@action_count += 1
# ???????
if PARA_CTB::FULL_CT_SE != "" and actor.ct_visible
Audio.se_play("Audio/SE/" + PARA_CTB::FULL_CT_SE,PARA_CTB::FULL_CT_SE_VOL)
end
# ??????????????
actor.countup = false
actor.full_ct = true
else
# ???????
actor.make_action_speed
ct_skip = PARA_CTB::CT_SKIP != 0 ? PARA_CTB::CT_SKIP : 1
actor.now_ct += actor.current_action.speed * PARA_CTB::BATTLE_SPEED * ct_skip
end
end
end
for enemy in $game_troop.enemies
# ??????
if enemy.movable? == false and enemy.ct_visible and @phase4_step == 5
# ?????????????
enemy.ct_visible = false
enemy.countup = true
enemy.full_ct = false
elsif enemy.movable? and enemy.ct_visible == false
# ?????????????
clear_ct(enemy)
enemy.ct_visible = true
end
# ????????????
if enemy.countup
# CT?max?????????????????????
if enemy.now_ct >= @max_ct and ! @pre_action_battlers.include?(enemy)
# ???????????
@pre_action_battlers.push(enemy)
@action_count += 1
# ??????????????
enemy.countup = false
enemy.full_ct = true
else
# ???????
enemy.make_action_speed
enemy.now_ct += enemy.current_action.speed * PARA_CTB::BATTLE_SPEED
end
end
end
# CT???????
@status_window.refresh_ct
@status_window2.refresh_ct
end
end
#--------------------------------------------------------------------------
# ? ?????CT?0?
#--------------------------------------------------------------------------
def clear_ct(battler)
battler.countup = true
battler.now_ct = 0
battler.full_ct = false
end
#--------------------------------------------------------------------------
# ? ?????CT????????????
#--------------------------------------------------------------------------
def declease_ct(battler,percent)
battler.countup = true
battler.now_ct = battler.now_ct * percent / 100
battler.full_ct = false
end
#--------------------------------------------------------------------------
# ? CT????
#--------------------------------------------------------------------------
def initialize_ct
# CT???????
max_ct
for battler in $game_party.actors + $game_troop.enemies
if battler.movable?
n = $game_party.actors.size + $game_troop.enemies.size
# ???????????CT??????
battler.now_ct = battler.agi * 60 * n
battler.ct_visible = true
else
clear_ct(battler)
battler.ct_visible = false
end
battler.countup = true
battler.full_ct = false
battler.max_ct = @max_ct
end
end
#--------------------------------------------------------------------------
# ? ????????????CT???????
#--------------------------------------------------------------------------
def max_ct
for battler in $game_party.actors + $game_troop.enemies
@max_ct += battler.agi
end
@max_ct *= 100
end
#--------------------------------------------------------------------------
# ? ???????????
#--------------------------------------------------------------------------
def shift_activer(shift)
# ?????????????????2???
if @pre_action_battlers != nil
if shift == 1 and @pre_action_battlers.size >= @actor_array_index + 3
# ??????????
act = @pre_action_battlers[@actor_array_index]
# ???????????????
@pre_action_battlers.insert(@actor_array_index+2, act)
# ???????
@pre_action_battlers.delete_at(@actor_array_index)
@actor_array_index -= 1
phase3_next_actor
else
act = @pre_action_battlers[@actor_array_index]
# ???????????????
@pre_action_battlers.push(act)
# ???????
@pre_action_battlers.delete_at(@actor_array_index)
@actor_array_index -= 1
phase3_next_actor
end
end
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
alias main_ctb main
def main
# ?????????????
@status_window2 = Window_BattleStatus_enemy.new
@action_battlers = []
@pre_action_battlers = []
@max_ct = 0
@countup = false
@ct_wait = 0
@action_count = 0
main_ctb
# ?????????????
@status_window2.dispose
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
alias ctb_update update
def update
# ?????????????
if $game_system.battle_interpreter.running?
# ?????????
$game_system.battle_interpreter.update
# ?????????????????????????
if $game_temp.forcing_battler == nil
# ?????????????????
unless $game_system.battle_interpreter.running?
# ??????????????????????????
unless judge
setup_battle_event
end
end
# ????????????????
if @phase != 5
# ?????????????????
@status_window.refresh
# ???????????
@status_window2.refresh
end
end
else
if PARA_CTB::CT_SKIP == 0
update_ct
else
if @ct_wait > 0
@ct_wait -= 1
else
update_ct
@ct_wait = PARA_CTB::CT_SKIP
end
end
end
ctb_update
end
#--------------------------------------------------------------------------
# ? ???????????
#--------------------------------------------------------------------------
alias ctb_start_phase1 start_phase1
def start_phase1
# CT????
initialize_ct
# ?????????
@countup = true
ctb_start_phase1
end
#--------------------------------------------------------------------------
# ? ?????? (?????????)
#--------------------------------------------------------------------------
def update_phase1
# ???????????
@status_window2.refresh
# ????
if judge
# ?????????? : ??????
return
end
# ????????????????????????????????
start_phase3
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def start_phase2
# ???? 2 ???
@phase = 2
# ?????????????
@actor_index = -1
@active_battler = nil
# ?????????????????
@party_command_window.active = true
@party_command_window.visible = true
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = false
# ??????????????
$game_temp.battle_main_phase = false
# ????????????
unless $game_party.inputable?
# ?????????
start_phase4
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ???)
#--------------------------------------------------------------------------
def update_phase2_escape
# ?????????????
enemies_agi = 0
for enemy in $game_troop.enemies
if enemy.exist?
enemies_agi += enemy.agi
end
end
# ?????????????????
actors_agi = 0
for actor in @pre_action_battlers
if actor.is_a?(Game_Actor) and actor.exist?
actors_agi += actor.agi
end
end
# ??????
success = rand(100) < 50 * actors_agi / enemies_agi
# ???????
if success
# ?? SE ???
$game_system.se_play($data_system.escape_se)
# ??????? BGM ???
$game_system.bgm_play($game_temp.map_bgm)
# CT????
for battler in $game_party.actors
clear_ct(battler)
end
# ?????
battle_end(1)
# ???????
else
# ????????? "????" ????
@help_window.set_text(PARA_CTB::UNESCAPE_MES, 1)
# ???????????CT????
pre_action_battlers = @pre_action_battlers.clone
for act in pre_action_battlers
if act.is_a?(Game_Actor)
declease_ct(act, 100-PARA_CTB::ACT_ESCAPE_CT)
act.current_action.clear
@pre_action_battlers.delete(act)
end
end
@party_command_window.visible = false
# ???????????
@help_window.visible = true
@wait_count = 20
# ?????????
start_phase4
end
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def start_phase3
# ???? 3 ???
@phase = 3
# ?????????????
@actor_index = -1
@active_battler = nil
@actor_array_index = -1
# ??????????????
if @pre_action_battlers != []
phase3_next_actor
else
start_phase4
end
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def phase3_next_actor
# ???
begin
# ???????????? OFF
if @active_battler != nil
@active_battler.blink = false
end
# ??????????
if @actor_array_index + 1 == @pre_action_battlers.size
# ?????????
start_phase4
return
#?????????
elsif $game_troop.enemies.include?(@pre_action_battlers[@actor_array_index + 1])
# ?????????
start_phase4
return
end
# ???????????????
@actor_array_index += 1
@actor_index = @pre_action_battlers[@actor_array_index].index
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
@active_battler.current_action.clear
# ??????????????????????????
end until @active_battler.inputable?
# ????????????????????
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def phase3_prior_actor
# ???
begin
# ???????????? OFF
if @active_battler != nil
@active_battler.blink = false
end
# ??????????
if @actor_array_index <= 0
# ??????????????
start_phase2
return
end
# ??????????????
@actor_array_index -= 1
@actor_index = @pre_action_battlers[@actor_array_index].index
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
@active_battler.current_action.clear
# ??????????????????????????
end until @active_battler.inputable?
# ????????????????????
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ? ????????????????????
#--------------------------------------------------------------------------
alias phase3_setup_command_window_ctb phase3_setup_command_window
def phase3_setup_command_window
@actor_command_window.back_opacity = PARA_CTB::WINDOW_OPACITY
phase3_setup_command_window_ctb
if PARA_CTB::WINDOWPOS_CHANGE
# ???????????????????
@actor_command_window.x = PARA_CTB::WINDOWPOS_X
@actor_command_window.y = PARA_CTB::WINDOWPOS_Y
# ??????????????????
@actor_command_window.z = 9999
end
end
#--------------------------------------------------------------------------
# ? ?????? (????????????)
#--------------------------------------------------------------------------
def update_phase3
# ?????????????
if @enemy_arrow != nil
@countup = PARA_CTB::SELECT_WAIT ? false : true
update_phase3_enemy_select
# ?????????????
elsif @actor_arrow != nil
@countup = PARA_CTB::SELECT_WAIT ? false : true
update_phase3_actor_select
# ??????????????
elsif @skill_window != nil
@countup = PARA_CTB::SELECT_WAIT ? false : true
update_phase3_skill_select
# ???????????????
elsif @item_window != nil
@countup = PARA_CTB::SELECT_WAIT ? false : true
update_phase3_item_select
# ???????????????????
elsif @actor_command_window.active
@countup = PARA_CTB::COMMAND_WAIT ? false : true
update_phase3_basic_command
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????? : ??????)
#--------------------------------------------------------------------------
alias ctb_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
ctb_update_phase3_basic_command
# LR??????????
if Input.trigger?(Input::R)
shift_activer(1)
end
if Input.trigger?(Input::L)
shift_activer(-1)
end
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def start_phase4
# ???? 4 ???
@phase = 4
battler_count = $game_party.actors.size + $game_troop.enemies.size
if @action_count >= battler_count or $game_temp.battle_turn == 0
# ???????????????
for index in 0...$data_troops[@troop_id].pages.size
# ??????????
page = $data_troops[@troop_id].pages[index]
# ?????????? [???] ???
if page.span == 1
# ???????????
$game_temp.battle_event_flags[index] = false
end
end
# ????????
$game_temp.battle_turn += 1
@action_count = 0
end
# ?????????????
@actor_index = -1
@active_battler = nil
# ?????????????????
@party_command_window.active = false
@party_command_window.visible = false
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = false
# ??????????????
$game_temp.battle_main_phase = true
# ???????????
for enemy in $game_troop.enemies
enemy.make_action
end
# ??????
make_action_orders
# ???? 1 ???
@phase4_step = 1
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def make_action_orders
# ?? @action_battlers ????
@action_battlers = []
if @pre_action_battlers != []
for i in 0..@actor_array_index
# ??????? @action_battlers ???
@action_battlers.push(@pre_action_battlers[0])
@pre_action_battlers.shift
end
if @pre_action_battlers.size != 0
loop do
if $game_troop.enemies.include?(@pre_action_battlers[0])
# ??????? @action_battlers ???
@action_battlers.push(@pre_action_battlers[0])
@pre_action_battlers.shift
else
break
end
end
end
end
end
#--------------------------------------------------------------------------
# ? ?????? (??????? ???? 1 : ???????)
#--------------------------------------------------------------------------
alias ctb_update_phase4_step1 update_phase4_step1
def update_phase4_step1
@countup = true
# ???????????
@help_window.visible = false
# ????
if judge
# ?????????? : ??????
return
end
# ??????????????? (??????)
if @action_battlers.size == 0
# ??????????????
start_phase3
return
end
ctb_update_phase4_step1
end
#--------------------------------------------------------------------------
# ? ?????? (??????? ???? 2 : ???????)
#--------------------------------------------------------------------------
alias ctb_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# ????????????
unless @active_battler.current_action.forcing
# ??? [??????] ???
if @active_battler.restriction == 4
# CT????
clear_ct(@active_battler)
# ??????????????????
$game_temp.forcing_battler = nil
# ???? 1 ???
@phase4_step = 1
return
end
end
# ???????????CT????????
@countup = PARA_CTB::ANIMATION_WAIT ? false : true
ctb_update_phase4_step2
end
#--------------------------------------------------------------------------
# ? ??????? ????
#--------------------------------------------------------------------------
alias make_basic_action_result_ctb make_basic_action_result
def make_basic_action_result
# ????????
if @active_battler.current_action.basic == 3
# CT????
clear_ct(@active_battler)
# ??????????????????
$game_temp.forcing_battler = nil
# ???? 1 ???
@phase4_step = 1
return
end
make_basic_action_result_ctb
end
#--------------------------------------------------------------------------
# ? ???????? ????
#--------------------------------------------------------------------------
def make_skill_action_result
# ??????
@skill = $data_skills[@active_battler.current_action.skill_id]
# ????????????
unless @active_battler.current_action.forcing
# SP ????????????????
unless @active_battler.skill_can_use?(@skill.id)
# ??????????????????
$game_temp.forcing_battler = nil
# CT????
declease_ct(@active_battler,100-PARA_CTB::ACT_SKILL_CT)
# ???? 1 ???
@phase4_step = 1
return
end
end
# SP ??
@active_battler.sp -= @skill.sp_cost
# ?????????????????
@status_window.refresh
# ????????????????
@help_window.set_text(@skill.name, 1)
# ??????? ID ???
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# ??????? ID ???
@common_event_id = @skill.common_event_id
# ??????????
set_target_battlers(@skill.scope)
# ?????????
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
end
#--------------------------------------------------------------------------
# ? ????????? ????
#--------------------------------------------------------------------------
alias ctb_make_item_action_result make_item_action_result
def make_item_action_result
# ???????
@item = $data_items[@active_battler.current_action.item_id]
# ????????????????????
unless $game_party.item_can_use?(@item.id)
# CT????
declease_ct(@active_battler,100-PARA_CTB::ACT_ITEM_CT)
# ???? 1 ???
@phase4_step = 1
return
end
ctb_make_item_action_result
end
#--------------------------------------------------------------------------
# ? ?????? (??????? ???? 5 : ??????)
#--------------------------------------------------------------------------
alias update_phase4_step5_ctb update_phase4_step5
def update_phase4_step5
# ???????
for target in @target_battlers
if target.damage != nil
target.damage_backup = target.damage
end
end
update_phase4_step5_ctb
end
#--------------------------------------------------------------------------
# ? ?????? (??????? ???? 6 : ??????)
#--------------------------------------------------------------------------
alias update_phase4_step6_ctb update_phase4_step6
def update_phase4_step6
@active_battler.countup = true
if @active_battler.current_action.basic == 1
# ??
declease_ct(@active_battler,100-PARA_CTB::ACT_GUARD_CT)
else
case @active_battler.current_action.kind
# ??
when 0
declease_ct(@active_battler,100-PARA_CTB::ACT_ATTACK_CT)
# ???
when 1
declease_ct(@active_battler,100-PARA_CTB::ACT_SKILL_CT)
# ????
when 2
declease_ct(@active_battler,100-PARA_CTB::ACT_ITEM_CT)
else
clear_ct(@active_battler)
end
end
# ???????????????CT?0?
for target in @target_battlers
if target.movable? == false and target.damage_backup != "Miss"
clear_ct(target)
@status_window.refresh_ct
end
end
# ???????????
@status_window2.refresh
update_phase4_step6_ctb
end
#--------------------------------------------------------------------------
# ? ?????????????
#--------------------------------------------------------------------------
alias ctb_start_phase5 start_phase5
def start_phase5
@countup = false
ctb_start_phase5
end
end
#==============================================================================
# ? Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def initialize
super(160, 320, 480, 160)
self.contents = Bitmap.new(width - 32, height - 32)
@level_up_flags = [false, false, false, false]
@before_hp = []
@before_sp = []
@before_states = []
@now_hp = []
@now_sp = []
@now_states = []
refresh
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors
line_height = 120 / PARA_CTB::PARTY_SIZE
actor_y = i * line_height + 4
# ????????????
@now_hp = actor.hp
@now_sp = actor.sp
@now_states = actor.states
# ??????
if @level_up_flags
self.contents.fill_rect(344, actor_y+14, 100, 8, Color.new(0, 0, 0, 0))
self.contents.font.color = normal_color
self.contents.draw_text(344, actor_y, 120, 32, "LEVEL UP!")
end
end
# ??????????????
# ?????????????????????
if @before_hp == nil or @before_sp == nil or @before_states == nil or
@before_hp != @now_hp or @before_sp != @now_sp or @before_states != @now_states
self.contents.clear
for i2 in 0...$game_party.actors.size
actor = $game_party.actors[i2]
line_height = 120 / PARA_CTB::PARTY_SIZE
actor_y = i2 * line_height + 4
self.contents.font.size = PARA_CTB::NAME_FONT_SIZE
# ?????
draw_actor_name(actor, 4, actor_y+16-PARA_CTB::NAME_FONT_SIZE)
# HP???
hp_color1 = PARA_CTB::HP_COLOR_LEFT
hp_color2 = PARA_CTB::HP_COLOR_RIGHT
draw_meter(actor.hp, actor.maxhp, 125, actor_y+14, 80, 8, hp_color1, hp_color2)
draw_actor_hp(actor, 102, actor_y+16-PARA_CTB::HPSP_FONT_SIZE, 100)
# SP???
sp_color1 = PARA_CTB::SP_COLOR_LEFT
sp_color2 = PARA_CTB::SP_COLOR_RIGHT
draw_meter(actor.sp, actor.maxsp, 245, actor_y+14, 80, 8, sp_color1, sp_color2)
draw_actor_sp(actor, 222, actor_y+16-PARA_CTB::HPSP_FONT_SIZE, 100)
# ?????????????
@before_hp[i2] = actor.hp
@before_sp[i2] = actor.sp
@before_states[i2] = actor.states
# ??????
if @level_up_flags[i2]
self.contents.fill_rect(344, actor_y, 100, 8, Color.new(0, 0, 0, 0))
self.contents.font.color = normal_color
self.contents.draw_text(344, actor_y, 120, 32, "LEVEL UP!")
end
end
end
refresh_ct
end
#--------------------------------------------------------------------------
# ? CT??????????
#--------------------------------------------------------------------------
def refresh_ct
for i in 0...$game_party.actors.size
actor = $game_party.actors
line_height = 120 / PARA_CTB::PARTY_SIZE
actor_y = i * line_height + 4
# CT????????????????
ct_color_full = PARA_CTB::COLOR_FULL
# CT?????????
ct_color_start = actor.full_ct ? ct_color_full : PARA_CTB::COLOR_LEFT
# CT?????????
ct_color_end = actor.full_ct ? ct_color_full : PARA_CTB::COLOR_RIGHT
if @level_up_flags != true and actor.ct_visible
draw_meter(actor.now_ct, actor.max_ct, 344, actor_y+14, 100, 8, ct_color_start, ct_color_end)
elsif @level_up_flags != true
draw_meter(0, actor.max_ct, 344, actor_y+14, 100, 8, ct_color_start, ct_color_end)
end
end
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
super
end
#--------------------------------------------------------------------------
# ? HP ???
# actor : ????
# x : ??? X ??
# y : ??? Y ??
# width : ?????
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 144)
# ??? "HP" ???
self.contents.font.color = system_color
self.contents.font.size = 16
self.contents.draw_text(x, y+2, 32, 32, $data_system.words.hp)
self.contents.font.color = normal_color
self.contents.font.size = PARA_CTB::HPSP_FONT_SIZE
if PARA_CTB::MAX_DRAW
# MaxHP ???
self.contents.draw_text(x, y, width, 32, actor.maxhp.to_s, 2)
text_size = self.contents.text_size(actor.maxhp.to_s)
text_x = x + width - text_size.width - 12
self.contents.draw_text(text_x, y, 12, 32, "/", 1)
# HP ???
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
text_x = text_x - text_size.width
self.contents.draw_text(text_x, y, text_size.width, 32, actor.hp.to_s, 2)
else
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(x, y, width, 32, actor.hp.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ? SP ???
# actor : ????
# x : ??? X ??
# y : ??? Y ??
# width : ?????
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y, width = 144)
# ??? "SP" ???
self.contents.font.color = system_color
self.contents.font.size = 16
self.contents.draw_text(x, y+2, 32, 32, $data_system.words.sp)
self.contents.font.color = normal_color
self.contents.font.size = PARA_CTB::HPSP_FONT_SIZE
if PARA_CTB::MAX_DRAW
# MaxSP ???
self.contents.draw_text(x, y, width, 32, actor.maxsp.to_s, 2)
text_size = self.contents.text_size(actor.maxsp.to_s)
text_x = x + width - text_size.width - 12
self.contents.draw_text(text_x, y, 12, 32, "/", 1)
# SP ???
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
text_x = text_x - text_size.width
self.contents.draw_text(text_x, y, text_size.width, 32, actor.sp.to_s, 2)
else
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(x, y, width, 32, actor.sp.to_s, 2)
end
end
end
#==============================================================================
# ? ??????????????
#==============================================================================
class Window_BattleStatus_enemy < Window_Base
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def initialize
super(0, 320, 160, 160)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = PARA_CTB::ENEMY_FONT_SIZE
@exist_enemies = []
if $game_troop.enemies != nil
if PARA_CTB::ENEMY_GROUPING
ememy_list = []
ememy_list_index = []
# ??????????
for i in 0...$game_troop.enemies.size
enemy = $game_troop.enemies
if enemy.exist?
if ememy_list.include?(enemy.name)
ememy_list_index[ememy_list.index(enemy.name)] += 1
else
# ????????
ememy_list.push(enemy.name)
ememy_list_index[ememy_list.index(enemy.name)] = 1
end
end
end
# ????????????
enemy_index = 0
for enemy_name in ememy_list
enemy_y = enemy_index * (PARA_CTB::ENEMY_FONT_SIZE+6) + 4
if ememy_list_index[enemy_index] > 1
enemy_name = enemy_name + "?" + ememy_list_index[enemy_index].to_s
end
self.contents.draw_text(4, enemy_y, 160, 20, enemy_name)
enemy_index += 1
end
else
# ??????????
enemy_index = 0
for i in 0...$game_troop.enemies.size
enemy = $game_troop.enemies
if enemy.exist?
@exist_enemies.push(enemy)
line_height = PARA_CTB::ENEMY_FONT_SIZE + 6
if PARA_CTB::ENEMY_DRAWING_MATER != 0
line_height += 10
end
enemy_y = enemy_index * line_height + 4
self.contents.draw_text(4, enemy_y, 160, 20, enemy.name)
enemy_index += 1
if PARA_CTB::ENEMY_DRAWING_MATER == 1
hp_color1 = PARA_CTB::HP_COLOR_LEFT
hp_color2 = PARA_CTB::HP_COLOR_RIGHT
y = enemy_y + PARA_CTB::ENEMY_FONT_SIZE + 3
draw_meter(enemy.hp, enemy.maxhp, 4, y, 80, 8, hp_color1, hp_col
just paste this at the end of the script above, been having a few problems posting this script. Remeber this is part of the script above!!!
#--------------------------------------------------------------------------
# ? ??????
# actor : ??????????????
#--------------------------------------------------------------------------
alias set_actor_ctb set_actor
def set_actor(actor)
if PARA_CTB::HELP_DRAWING_MATER_ACTOR
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
hp_color1 = PARA_CTB::HP_COLOR_LEFT
hp_color2 = PARA_CTB::HP_COLOR_RIGHT
draw_meter(actor.hp, actor.maxhp, 316, 18, 112, 8, hp_color1, hp_color2)
draw_actor_hp(actor, 284, 0)
sp_color1 = PARA_CTB::SP_COLOR_LEFT
sp_color2 = PARA_CTB::SP_COLOR_RIGHT
draw_meter(actor.sp, actor.maxsp, 492, 18, 112, 8, sp_color1, sp_color2)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
else
set_actor_ctb(actor)
end
end
#--------------------------------------------------------------------------
# ? ??????
# enemy : ????????????????
#--------------------------------------------------------------------------
alias set_enemy_ctb set_enemy
def set_enemy(enemy)
if PARA_CTB::HELP_DRAWING_MATER_ENEMY
self.contents.clear
draw_actor_name(enemy, 4, 0)
draw_actor_state(enemy, 140, 0)
hp_color1 = PARA_CTB::HP_COLOR_LEFT
hp_color2 = PARA_CTB::HP_COLOR_RIGHT
draw_meter(enemy.hp, enemy.maxhp, 316, 18, 112, 8, hp_color1, hp_color2)
draw_actor_hp(enemy, 284, 0)
sp_color1 = PARA_CTB::SP_COLOR_LEFT
sp_color2 = PARA_CTB::SP_COLOR_RIGHT
draw_meter(enemy.sp, enemy.maxsp, 492, 18, 112, 8, sp_color1, sp_color2)
draw_actor_sp(enemy, 460, 0)
self.visible = true
else
set_enemy_ctb(enemy)
end
end
end
NOw create something new above main and call it Side view or anything you want.
#==============================================================================
#?????????????????????????ver. 1.14???
#??Script by ???
#??http://para.j-mx.com/
#------------------------------------------------------------------------------
# ????????????????????????
#==============================================================================
module SDVA
X_LINE = 500 # ????????????
Y_LINE = 200 # ????????????
X_SPACE = 15 # ?????????????
Y_SPACE = 40 # ?????????????
X_POSITION = 25 # ????????????????
Y_POSITION = 0 # ????????????????
ATTACK_MOVE = true # ???????????? true / false ?
SKILL_MOVE = true # ??????????????? true / false ?
ITEM_MOVE = false # ???????????????? true / false ?
MOVE_STEP = 1 # ????
MOVE_PIXEL = 10 # ???????????
PARTY_POS = 1 # ?????????? 0:? / 1:? / 2:? / 3:? ?
WINDOWPOS_CHANGE = true # ??????????????????????? true / false ?
end
#==============================================================================
# ? Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ? ????? X ?????
#--------------------------------------------------------------------------
def screen_x
if self.index != nil
# ?????
pos = $data_classes[self.class_id].position
x_pos = pos * SDVA::X_POSITION
scr_x = self.index * SDVA::X_SPACE + SDVA::X_LINE + x_pos
# ??????????
if self.current_action.move_action == true
# ????
scr_x += @shift_x
end
return scr_x
else
return 0
end
end
#--------------------------------------------------------------------------
# ? ????? Y ?????
#--------------------------------------------------------------------------
def screen_y
if self.index != nil
# ?????
pos = $data_classes[self.class_id].position
y_pos = pos * SDVA::Y_POSITION
scr_y = self.index * SDVA::Y_SPACE + SDVA::Y_LINE + y_pos
# ??????????
if self.current_action.move_action == true
# ????
scr_y += @shift_y
end
return scr_y
else
return 0
end
end
#--------------------------------------------------------------------------
# ? ????? Z ?????
#--------------------------------------------------------------------------
def screen_z
if self.index != nil
return self.index
else
return 0
end
end
end
#==============================================================================
# ? Game_Battler (???? 1)
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_reader :pattern # ??????
attr_reader :trans_x # X???????
attr_reader :moving # ??????
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias initialize_sdva initialize
def initialize
initialize_sdva
move_reset
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def move
@moving = 1
if @step < SDVA::MOVE_STEP
# ??????????
@pattern = (@pattern + 1) % 4
@step += 1
move_step
else
# ????
@pattern = 1
@moving = 2
end
end
#--------------------------------------------------------------------------
# ? ????
#--------------------------------------------------------------------------
def move_step
# ???????????????????
case SDVA::PARTY_POS
when 0
@shift_y = @step * SDVA::MOVE_PIXEL
when 1
@shift_x = -(@step * SDVA::MOVE_PIXEL)
when 2
@shift_x = @step * SDVA::MOVE_PIXEL
when 3
@shift_y = -(@step * SDVA::MOVE_PIXEL)
end
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def move_reset
@moving = 0
@pattern = 0
@step = 0
@shift_x = 0
@shift_y = 0
end
end
#==============================================================================
# ? Game_BattleAction
#==============================================================================
class Game_BattleAction
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_accessor :move_action # ??????????
#--------------------------------------------------------------------------
# ? ???
#--------------------------------------------------------------------------
alias clear_sdva clear
def clear
clear_sdva
@move_action = false
end
end
#==============================================================================
# ? Sprite_Battler
#==============================================================================
class Sprite_Battler < RPG::Sprite
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
alias update_sdva update
def update
# ????????????????
if @battler.is_a?(Game_Actor)
# ????????????????????
# ??????
if @battler.battler_name != @battler_name or
@battler.battler_hue != @battler_hue or
@battler.current_action.basic == 0 or
@battler.current_action.kind != 3
# ????????????
@character_name = @battler.character_name
@character_hue = @battler.character_hue
# ???????????
self.bitmap = RPG::Cache.character(@character_name, @character_hue)
cw = self.bitmap.width / 4
ch = self.bitmap.height / 4
@width = cw
@height = ch
if @battler.current_action.move_action == true
# ????
@battler.move
else
@battler.move_reset
end
# ?????????
sx = @battler.pattern * cw
sy = SDVA::PARTY_POS * ch
self.src_rect.set(sx, sy, cw, ch)
self.ox = @width / 2
self.oy = @height
# ??????????? 0 ???
if @battler.hidden
self.opacity = 0
end
end
end
update_sdva
end
end
#==============================================================================
# ? Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ? ????????????????????
#--------------------------------------------------------------------------
alias phase3_setup_command_window_sdva phase3_setup_command_window
def phase3_setup_command_window
phase3_setup_command_window_sdva
if SDVA::WINDOWPOS_CHANGE
# ???????????????????
case SDVA::PARTY_POS
when 0
x_pos = @active_battler.screen_x - (@actor_command_window.width/2)
y_pos = @active_battler.screen_y
when 1
x_pos = @active_battler.screen_x - @actor_command_window.width - 16
y_pos = @active_battler.screen_y - @actor_command_window.height
when 2
x_pos = @active_battler.screen_x + 16
y_pos = @active_battler.screen_y - @actor_command_window.height
when 3
x_pos = @active_battler.screen_x - (@actor_command_window.width/2)
y_pos = @active_battler.screen_y - @actor_command_window.height - 48
end
@actor_command_window.x = x_pos >= 0 ? x_pos : 0
@actor_command_window.x = x_pos+@actor_command_window.width <= 640 ? x_pos : 640-@actor_command_window.width
@actor_command_window.y = y_pos >= 0 ? y_pos : 0
@actor_command_window.y = y_pos+@actor_command_window.height <= 480 ? y_pos : 480-@actor_command_window.height
# ??????????????????
@actor_command_window.z = 9999
end
end
#--------------------------------------------------------------------------
# ? ?????? (??????? ???? 3 : ??????????)
#--------------------------------------------------------------------------
alias update_phase4_step3_sdva update_phase4_step3
def update_phase4_step3
if SDVA::ATTACK_MOVE
if @active_battler.current_action.basic == 0
@active_battler.current_action.move_action = true
end
end
if SDVA::SKILL_MOVE
if @active_battler.current_action.kind == 1
@active_battler.current_action.move_action = true
end
end
if SDVA::ITEM_MOVE
if @active_battler.current_action.kind == 2
@active_battler.current_action.move_action = true
end
end
# ??????????????????????
if @active_battler.is_a?(Game_Actor) and
@active_battler.current_action.move_action
# ?????
if @active_battler.moving == 2
update_phase4_step3_sdva
end
elsif @active_battler.moving == 0
update_phase4_step3_sdva
end
end
#--------------------------------------------------------------------------
# ? ?????? (??????? ???? 6 : ??????)
#--------------------------------------------------------------------------
alias update_phase4_step6_sdva update_phase4_step6
def update_phase4_step6
@active_battler.current_action.move_action = false
@active_battler.move_reset
update_phase4_step6_sdva
end
end
#==============================================================================
# ? Spriteset_Battle
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias initialize_sdva initialize
def initialize
initialize_sdva
@viewport2.z = 1
end
end
#==============================================================================
# ? Arrow_Actor
#==============================================================================
class Arrow_Actor < Arrow_Base
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
alias update_sdva update
def update
update_sdva
# ?????
if Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@index += 1
@index %= $game_party.actors.size
end
# ?????
if Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@index += $game_party.actors.size - 1
@index %= $game_party.actors.size
end
end
end
#==============================================================================
# ? Arrow_Enemy
#==============================================================================
class Arrow_Enemy < Arrow_Base
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
alias update_sdva update
def update
update_sdva
# ?????
if Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
$game_troop.enemies.size.times do
@index += 1
@index %= $game_troop.enemies.size
break if self.enemy.exist?
end
end
# ?????
if Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
$game_troop.enemies.size.times do
@index += $game_troop.enemies.size - 1
@index %= $game_troop.enemies.size
break if self.enemy.exist?
end
end
end
end
You can combine the 2 scripts or just use one of them.
Credits go to some japanese guy.
can you use the code tag in your first post please i get confused
Here ya go
[code]#==============================================================================
# ++ ã,¢ã,¯ãƒ†ã,£ãƒ–ã,¿ã,¤ãƒ ãƒãƒˆãƒ«ã€€ver. 2.56 ++
#  Script by ãƒ'ラ犬
#  http://para.j-mx.com/
#------------------------------------------------------------------------------
# CTã,²ãƒ¼ã,¸ãŒæºœã¾ã£ãŸãƒãƒˆãƒ©ãƒ¼ã‹ã,‰é †ã«ã,³ãƒžãƒ³ãƒ‰å...¥åŠ›ã™ã,‹æˆ¦é—˜å½¢å¼ã€,
# ãƒãƒˆãƒ«ã,¹ãƒ†ãƒ¼ã,¿ã,¹ç"»é¢ã,'ã,µã,¤ãƒ‰ãƒ"ューã,‰ã—ãã™ã,‹æ©Ÿèƒ½ã,,ã,ã,Šã¾ã™ã€,
# ãƒãƒˆãƒ©ãƒ¼ã,'ã,µã,¤ãƒ‰ãƒ"ューã,¿ã,¤ãƒ—ã«è¡¨ç¤ºã™ã,‹ã,¹ã,¯ãƒªãƒ—トã¯ã€ãŠå¥½ããªã,,ã®ã,'
# ç"¨æ,,ã—ã¦ãã ã•ã,,ã€,
#------------------------------------------------------------------------------
#ï¼»è¨ç½®ä¸Šã®æ³¨æ,,ï¼½
# ã§ãã,‹ã ã'リã,¹ãƒˆã®ä¸Šã®ã»ã†ã«ç½®ã,,ã¦ãã ã•ã,,ã€,(Scene_Debugã,ˆã,Šã¯ä¸‹ï¼‰
#------------------------------------------------------------------------------
#ï¼»æ"作]
#・逃走
# å'³æ–¹ãƒãƒˆãƒ©ãƒ¼ã®ä¸€äººä»¥ä¸ŠãŒã,³ãƒžãƒ³ãƒ‰å...¥åŠ›å¾...ã¡ã®ã¨ãã«ã,ャンã,»ãƒ«ãƒœã,¿ãƒ³ã,'押ã™ã"ã¨ã§
# 「逃ã'ã,‹ã€ã,³ãƒžãƒ³ãƒ‰ãŒé¸æŠžã§ãã¾ã™ã€,
#ã€€æ•µã®æ•°ãŒå¤šã‹ã£ãŸã,Šã€ã,³ãƒžãƒ³ãƒ‰å...¥åŠ›å¾...ã¡ã®ãƒãƒˆãƒ©ãƒ¼ãŒå°'ãªã,,ã¨ã€
# 逃走æˆåŠŸçŽ‡ãŒä½Žããªã,Šã¾ã™ã€,
#
#ãƒ»è¡Œå‹•é †ã®å...¥ã,Œæ›¿ãˆ
# 複数ã®ãƒãƒˆãƒ©ãƒ¼ãŒè¡Œå‹•å¯èƒ½ã®ã¨ãã€
# Rボã,¿ãƒ³ï¼ˆPageDownã,ãƒ¼ï¼‰ã§æ¬¡ã®ãƒãƒˆãƒ©ãƒ¼ã¨é †ç•ªã,'å...¥ã,Œæ›¿ãˆã€
# Lボã,¿ãƒ³ï¼ˆPageUpã,ー)ã§è¡Œå‹•é †ã,'ã,,ã¡ã°ã,"最後ã«å›žã—ã¾ã™ã€,
#==============================================================================
module PARA_CTB
# ã,³ãƒžãƒ³ãƒ‰å...¥åŠ›æ™,ã«CTã®ã,«ã,¦ãƒ³ãƒˆã,'æ¢ã,ã,‹ã‹ï¼ˆtrue:æ¢ã,ã,‹ / false:æ¢ã,ãªã,,)
COMMAND_WAIT = false
# ã,¢ã,¤ãƒ†ãƒ ã€ã,¹ã,ルã€ã,¿ãƒ¼ã,²ãƒƒãƒˆé¸æŠžæ™,ã«CTã®ã,«ã,¦ãƒ³ãƒˆã,'æ¢ã,ã,‹ã‹ï¼ˆtrue:æ¢ã,ã,‹ / false:æ¢ã,ãªã,,)
SELECT_WAIT = true
# ã,¢ãƒ‹ãƒ¡ãƒ¼ã,·ãƒ§ãƒ³è¡¨ç¤ºæ™,ã«CTã®ã,«ã,¦ãƒ³ãƒˆã,'æ¢ã,ã,‹ã‹ï¼ˆtrue:æ¢ã,ã,‹ / false:æ¢ã,ãªã,,)
ANIMATION_WAIT = false
# ãƒãƒˆãƒ«ã,¹ãƒ"ード(数値ãŒå¤§ãã,,ã»ã©CTã®æºœã¾ã,ŠãŒé€Ÿããªã,‹ï¼‰
BATTLE_SPEED = 3
# ãƒãƒˆãƒ«ãƒ¡ãƒ³ãƒãƒ¼ã®æœ€å¤§æ•°ï¼ˆå¤šäººæ•°PTã,¹ã,¯ãƒªãƒ—トã,'å°Žå...¥ã—ã¦ã,,ã,‹æ™,ã«è¨å®šï¼‰
PARTY_SIZE = 4
# 行動çµ,了æ™,ã®CT減å°'ãƒ'ーã,»ãƒ³ãƒ†ãƒ¼ã,¸
ACT_ATTACK_CT = 100 # 通常æ"»æ'ƒ
ACT_GUARD_CT = 100 # 防御
ACT_ESCAPE_CT = 100 # 逃走失敗
ACT_SKILL_CT = 100 # ã,¹ã,ル
ACT_ITEM_CT = 100 # ã,¢ã,¤ãƒ†ãƒ
# 逃走失敗æ™,ã®ãƒ¡ãƒƒã,»ãƒ¼ã,¸
UNESCAPE_MES = "逃走失敗"
# CT満ã,¿ãƒ³æ™,ã®åŠ¹æžœéŸ³ï¼ˆ""ã§éŸ³ã,'é³´ã,‰ã•ãªã,,)
# 効果音ã¯ã€ŒAudio/SEã€ãƒ•ã,©ãƒ«ãƒ€å†...
FULL_CT_SE = "015-Jump01"
# 効果音ã®ãƒœãƒªãƒ¥ãƒ¼ãƒ
FULL_CT_SE_VOL = 80
# CT満ã,¿ãƒ³æ™,ã®ãƒãƒˆãƒ©ãƒ¼ã®è‰²èª¿ï¼ˆ(0,0,0)ã§å¤‰åŒ–ãªã—)
FULL_CT_COLOR = Tone.new(32,0,0)
# HPã,²ãƒ¼ã,¸ã®è‰²ï¼ˆã,°ãƒ©ãƒ‡ãƒ¼ã,·ãƒ§ãƒ³å·¦ç«¯ï¼‰
HP_COLOR_LEFT = Color.new(128, 0, 0, 255)
# HPã,²ãƒ¼ã,¸ã®è‰²ï¼ˆã,°ãƒ©ãƒ‡ãƒ¼ã,·ãƒ§ãƒ³å³ç«¯ï¼‰
HP_COLOR_RIGHT= Color.new(255, 0, 0, 255)
# SPã,²ãƒ¼ã,¸ã®è‰²ï¼ˆã,°ãƒ©ãƒ‡ãƒ¼ã,·ãƒ§ãƒ³å·¦ç«¯ï¼‰
SP_COLOR_LEFT = Color.new(0, 0, 128, 255)
# SPã,²ãƒ¼ã,¸ã®è‰²ï¼ˆã,°ãƒ©ãƒ‡ãƒ¼ã,·ãƒ§ãƒ³å³ç«¯ï¼‰
SP_COLOR_RIGHT= Color.new(0, 0, 255, 255)
# CTã,²ãƒ¼ã,¸ã®è‰²ï¼ˆã,°ãƒ©ãƒ‡ãƒ¼ã,·ãƒ§ãƒ³å·¦ç«¯ï¼‰
COLOR_LEFT = Color.new(128, 128, 64, 255)
# CTã,²ãƒ¼ã,¸ã®è‰²ï¼ˆã,°ãƒ©ãƒ‡ãƒ¼ã,·ãƒ§ãƒ³å³ç«¯ï¼‰
COLOR_RIGHT= Color.new(255, 255, 128, 255)
# CTãŒæº€ã,¿ãƒ³ã«ãªã£ãŸã¨ãã®ã,²ãƒ¼ã,¸ã®è‰²
COLOR_FULL = Color.new(255, 225, 128, 255)
# ã,²ãƒ¼ã,¸æž ã®è‰²
FRAME_COLOR = Color.new(192, 192, 192, 255)
# ã,²ãƒ¼ã,¸æž ã®å¤ªã•
FRAME_BORDER = 1
# ã,²ãƒ¼ã,¸ã®èƒŒæ™¯è‰²
BACK_COLOR = Color.new(128, 128, 128, 128)
# åå‰ã®ãƒ•ã,©ãƒ³ãƒˆã,µã,¤ã,º
NAME_FONT_SIZE = 16
# HP/SPã®ãƒ•ã,©ãƒ³ãƒˆã,µã,¤ã,º
HPSP_FONT_SIZE = 18
# ã,¨ãƒãƒŸãƒ¼åã®ãƒ•ã,©ãƒ³ãƒˆã,µã,¤ã,º
ENEMY_FONT_SIZE = 16
# 最大HP/SPã,'æç"»ã™ã,‹ã‹ï¼ˆ true / false )
MAX_DRAW = false
# ã,¨ãƒãƒŸãƒ¼åã,'ã,°ãƒ«ãƒ¼ãƒ—化( true / false )
# (trueã«ã™ã,‹ã¨ã€Œã,´ãƒ¼ã,¹ãƒˆ 2ã€ã®ã,ˆã†ã«ã¾ã¨ã,ã¦è¡¨ç¤ºã—ã¾ã™ï¼‰
ENEMY_GROUPING = false
# ã,¨ãƒãƒŸãƒ¼åã®ä¸‹ã«ã,²ãƒ¼ã,¸ã,'表示( 0:ãªã— / 1:HP / 2:CT )
# (ã,¨ãƒãƒŸãƒ¼åã,'ã,°ãƒ«ãƒ¼ãƒ—化ã—ã¦ã,,ã,‹å ´åˆã¯ç,,¡åŠ¹ï¼‰
ENEMY_DRAWING_MATER = 0
# ã,¢ã,¯ã,¿ãƒ¼ã®ãƒ˜ãƒ«ãƒ—ã,¦ã,¤ãƒ³ãƒ‰ã,¦ã«HP/SPã,²ãƒ¼ã,¸ã,'表示( true / false )
HELP_DRAWING_MATER_ACTOR = false
# ã,¨ãƒãƒŸãƒ¼ã®ãƒ˜ãƒ«ãƒ—ã,¦ã,¤ãƒ³ãƒ‰ã,¦ã«HP/SPã,²ãƒ¼ã,¸ã,'表示( true / false )
HELP_DRAWING_MATER_ENEMY = false
# ã,³ãƒžãƒ³ãƒ‰ã,¦ã,¤ãƒ³ãƒ‰ã,¦ã®ä½ç½®ã,'強制指定( true / false )
#ï¼ˆä»–ã®æ–¹ã®ã,µã,¤ãƒ‰ãƒ"ューã,¹ã,¯ãƒªãƒ—トã,'ä½µç"¨ã—ã¦ã,,ã¦
# ã,³ãƒžãƒ³ãƒ‰ã,¦ã,¤ãƒ³ãƒ‰ã,¦ã®ä½ç½®ãŒã©ã†ã—ã¦ã,,ä¸è‡ªç,,¶ã«ãªã,‹ãªã,‰trueã«ï¼‰
# ※trueã«ã—ã¦ã,,é©ç"¨ã•ã,Œãªã,,å ´åˆã€ã"ã®ã,¹ã,¯ãƒªãƒ—トã,'
#  ã,µã,¤ãƒ‰ãƒ"ューã,ˆã,Šã,,下ã«ç½®ã,,ã¦ã¿ã¦ãã ã•ã,,
WINDOWPOS_CHANGE = false
WINDOWPOS_X = 100 # X座標
WINDOWPOS_Y = 320 # Y座標
# ã,³ãƒžãƒ³ãƒ‰ã,¦ã,¤ãƒ³ãƒ‰ã,¦ã®ä¸é€æ˜Žåº¦
WINDOW_OPACITY = 160
# CTã®ã,«ã,¦ãƒ³ãƒˆé–"éš"ã€,å°'ãªã,,ã»ã©ã,²ãƒ¼ã,¸æç"»ãŒãªã,ã,‰ã‹ã«ã€,(最å°å€¤ã¯0)
# 処ç†ãŒé‡ã,,å ´åˆã¯ã€ã"ã®æ•°å€¤ã,'上ã'ã¦ãã ã•ã,,ã€,
CT_SKIP = 2
end
# â†' è¨å®šé ...ç›®ã"ã"ã¾ã§
#------------------------------------------------------------------------------
#==============================================================================
# â– Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# â—‹ CTã®ã,«ã,¦ãƒ³ãƒˆ
#--------------------------------------------------------------------------
def update_ct
# ã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—ãŒè¨±å¯ã•ã,Œã¦ã,,ã,‹ã¨ã
if @countup
for actor in $game_party.actors
# 行動ã§ãã,‹ã‹
if actor.movable? == false and actor.ct_visible and @phase4_step != 5
# ä¸å¯è¦–状æ...‹ã§ã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—
actor.ct_visible = false
actor.countup = true
actor.full_ct = false
elsif actor.movable? and actor.ct_visible == false
# ä¸å¯è¦–ã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—ã,'解除
clear_ct(actor)
actor.ct_visible = true
end
# ã,¢ã,¯ã,¿ãƒ¼ã®å...¥ã,Œæ›¿ãˆã«å¯¾å¿œ
if actor.max_ct == 0
actor.max_ct = @max_ct
end
# ã,¢ã,¯ã,¿ãƒ¼ã®ã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—
if actor.countup
# CTãŒmaxã«ãªã£ã¦ãŠã,Šã€ã,³ãƒžãƒ³ãƒ‰å...¥åŠ›å¾...ã¡ã,¢ã,¯ã,¿ãƒ¼ã«å«ã¾ã,Œãªã,,
if actor.now_ct >= @max_ct and !(@pre_action_battlers.include?(actor))
# ã,³ãƒžãƒ³ãƒ‰å...¥åŠ›å¾...ã¡ã,¢ã,¯ã,¿ãƒ¼ã«è¿½åŠ
@pre_action_battlers.push(actor)
@action_count += 1
# 効果音ã,'é³´ã,‰ã™
if PARA_CTB::FULL_CT_SE != "" and actor.ct_visible
Audio.se_play("Audio/SE/" + PARA_CTB::FULL_CT_SE,PARA_CTB::FULL_CT_SE_VOL)
end
# ãã,Œä»¥ä¸Šã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—ã—ãªã,,
actor.countup = false
actor.full_ct = true
else
# ã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—
actor.make_action_speed
ct_skip = PARA_CTB::CT_SKIP != 0 ? PARA_CTB::CT_SKIP : 1
actor.now_ct += actor.current_action.speed * PARA_CTB::BATTLE_SPEED * ct_skip
end
end
end
for enemy in $game_troop.enemies
# 行動ã§ãã,‹ã‹
if enemy.movable? == false and enemy.ct_visible and @phase4_step == 5
# ä¸å¯è¦–状æ...‹ã§ã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—
enemy.ct_visible = false
enemy.countup = true
enemy.full_ct = false
elsif enemy.movable? and enemy.ct_visible == false
# ä¸å¯è¦–ã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—ã,'解除
clear_ct(enemy)
enemy.ct_visible = true
end
# ã,¨ãƒãƒŸãƒ¼ã®ã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—
if enemy.countup
# CTãŒmaxã«ãªã£ã¦ãŠã,Šã€è¡Œå‹•å¾...ã¡ã,¨ãƒãƒŸãƒ¼ã«å«ã¾ã,Œãªã,,
if enemy.now_ct >= @max_ct and ! @pre_action_battlers.include?(enemy)
# 行動å¾...ã¡ã,¨ãƒãƒŸãƒ¼ã«è¿½åŠ
@pre_action_battlers.push(enemy)
@action_count += 1
# ãã,Œä»¥ä¸Šã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—ã—ãªã,,
enemy.countup = false
enemy.full_ct = true
else
# ã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—
enemy.make_action_speed
enemy.now_ct += enemy.current_action.speed * PARA_CTB::BATTLE_SPEED
end
end
end
# CTã,²ãƒ¼ã,¸ã,'冿ç"»
@status_window.refresh_ct
@status_window2.refresh_ct
end
end
#--------------------------------------------------------------------------
# â—‹ ãƒãƒˆãƒ©ãƒ¼ã®CTã,'0ã«
#--------------------------------------------------------------------------
def clear_ct(battler)
battler.countup = true
battler.now_ct = 0
battler.full_ct = false
end
#--------------------------------------------------------------------------
# â—‹ ãƒãƒˆãƒ©ãƒ¼ã®CTã,'ä»»æ,,ã®ãƒ'ーã,»ãƒ³ãƒ†ãƒ¼ã,¸ã«
#--------------------------------------------------------------------------
def declease_ct(battler,percent)
battler.countup = true
battler.now_ct = battler.now_ct * percent / 100
battler.full_ct = false
end
#--------------------------------------------------------------------------
# â—‹ CTã®åˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize_ct
# CTã®åŸºæº–値ã,'決定
max_ct
for battler in $game_party.actors + $game_troop.enemies
if battler.movable?
n = $game_party.actors.size + $game_troop.enemies.size
# 戦闘開始æ™,ã«ã,ã,‹ç¨‹åº¦ã®CTã,'溜ã,ã¦ãŠã
battler.now_ct = battler.agi * 60 * n
battler.ct_visible = true
else
clear_ct(battler)
battler.ct_visible = false
end
battler.countup = true
battler.full_ct = false
battler.max_ct = @max_ct
end
end
#--------------------------------------------------------------------------
# â—‹ ãƒãƒˆãƒ©ãƒ¼å...¨å"¡ã®ç´ æ—©ã•ã‹ã,‰CTã®åŸºæº–値ã,'決定
#--------------------------------------------------------------------------
def max_ct
for battler in $game_party.actors + $game_troop.enemies
@max_ct += battler.agi
end
@max_ct *= 100
end
#--------------------------------------------------------------------------
# â—‹ ãƒãƒˆãƒ©ãƒ¼ã®è¡Œå‹•é †ã,'変更
#--------------------------------------------------------------------------
def shift_activer(shift)
# 一ã¤ã,·ãƒ•トã™ã,‹æ™,ã§å¾Œã,ã®ã,¢ã,¯ã,¿ãƒ¼ãŒ2人以上
if @pre_action_battlers != nil
if shift == 1 and @pre_action_battlers.size >= @actor_array_index + 3
# ç¾åœ¨ã®ã,¢ã,¯ã,¿ãƒ¼ã,'å–å¾—
act = @pre_action_battlers[@actor_array_index]
# ç¾åœ¨ã®ã,¢ã,¯ã,¿ãƒ¼ã,'二ã¤å¾Œã,ã«æŒ¿å...¥
@pre_action_battlers.insert(@actor_array_index+2, act)
# ç¾åœ¨ä½ç½®ã,'消去
@pre_action_battlers.delete_at(@actor_array_index)
@actor_array_index -= 1
phase3_next_actor
else
act = @pre_action_battlers[@actor_array_index]
# ç¾åœ¨ã®ã,¢ã,¯ã,¿ãƒ¼ã,'一番後ã,ã«è¿½åŠ
@pre_action_battlers.push(act)
# ç¾åœ¨ä½ç½®ã,'消去
@pre_action_battlers.delete_at(@actor_array_index)
@actor_array_index -= 1
phase3_next_actor
end
end
end
#--------------------------------------------------------------------------
# ◠メã,¤ãƒ³å‡¦ç†
#--------------------------------------------------------------------------
alias main_ctb main
def main
# ã,¨ãƒãƒŸãƒ¼åã,¦ã,¤ãƒ³ãƒ‰ã,¦ã,'作æˆ
@status_window2 = Window_BattleStatus_enemy.new
@action_battlers = []
@pre_action_battlers = []
@max_ct = 0
@countup = false
@ct_wait = 0
@action_count = 0
main_ctb
# ã,¨ãƒãƒŸãƒ¼åã,¦ã,¤ãƒ³ãƒ‰ã,¦ã,'ç ´æ£,,
@status_window2.dispose
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
alias ctb_update update
def update
# ãƒãƒˆãƒ«ã,¤ãƒ™ãƒ³ãƒˆå®Ÿè¡Œä¸ã®å ´åˆ
if $game_system.battle_interpreter.running?
# ã,¤ãƒ³ã,¿ãƒ—リã,¿ã,'æ›´æ–°
$game_system.battle_interpreter.update
# ã,¢ã,¯ã,·ãƒ§ãƒ³ã,'強制ã•ã,Œã¦ã,,ã,‹ãƒãƒˆãƒ©ãƒ¼ãŒå˜åœ¨ã—ãªã,,å ´åˆ
if $game_temp.forcing_battler == nil
# ãƒãƒˆãƒ«ã,¤ãƒ™ãƒ³ãƒˆã®å®Ÿè¡ŒãŒçµ,ã,ã£ãŸå ´åˆ
unless $game_system.battle_interpreter.running?
# 戦闘継続ã®å ´åˆã€ãƒãƒˆãƒ«ã,¤ãƒ™ãƒ³ãƒˆã®ã,»ãƒƒãƒˆã,¢ãƒƒãƒ—ã,'å†å®Ÿè¡Œ
unless judge
setup_battle_event
end
end
# ã,¢ãƒ•ã,¿ãƒ¼ãƒãƒˆãƒ«ãƒ•ã,§ãƒ¼ã,ºã§ãªã'ã,Œã°
if @phase != 5
# ã,¹ãƒ†ãƒ¼ã,¿ã,¹ã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'リフレッã,·ãƒ¥
@status_window.refresh
# ã,¨ãƒãƒŸãƒ¼åリã,¹ãƒˆã,'æ›´æ–°
@status_window2.refresh
end
end
else
if PARA_CTB::CT_SKIP == 0
update_ct
else
if @ct_wait > 0
@ct_wait -= 1
else
update_ct
@ct_wait = PARA_CTB::CT_SKIP
end
end
end
ctb_update
end
#--------------------------------------------------------------------------
# ◠プレãƒãƒˆãƒ«ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
#--------------------------------------------------------------------------
alias ctb_start_phase1 start_phase1
def start_phase1
# CTã,'åˆæœŸåŒ–
initialize_ct
# ã,«ã,¦ãƒ³ãƒˆã,¢ãƒƒãƒ—é–‹å§‹
@countup = true
ctb_start_phase1
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (プレãƒãƒˆãƒ«ãƒ•ã,§ãƒ¼ã,º)
#--------------------------------------------------------------------------
def update_phase1
# ã,¨ãƒãƒŸãƒ¼åリã,¹ãƒˆã,'æ›´æ–°
@status_window2.refresh
# 勿•—判定
if judge
# å‹åˆ©ã¾ãŸã¯æ•—北ã®å ´åˆ : メã,½ãƒƒãƒ‰çµ,了
return
end
# ãƒ'ーテã,£ãƒ¼ã,³ãƒžãƒ³ãƒ‰ãƒ•ã,§ãƒ¼ã,ºã,'飛ã°ã—ã¦ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
start_phase3
end
#--------------------------------------------------------------------------
# â— ãƒ'ーテã,£ã,³ãƒžãƒ³ãƒ‰ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
#--------------------------------------------------------------------------
def start_phase2
# フã,§ãƒ¼ã,º 2 ã«ç§»è¡Œ
@phase = 2
# ã,¢ã,¯ã,¿ãƒ¼ã,'éžé¸æŠžçжæ...‹ã«è¨å®š
@actor_index = -1
@active_battler = nil
# ãƒ'ーテã,£ã,³ãƒžãƒ³ãƒ‰ã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'有効化
@party_command_window.active = true
@party_command_window.visible = true
# ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'ç,,¡åŠ¹åŒ–
@actor_command_window.active = false
@actor_command_window.visible = false
# メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,ºãƒ•ラã,°ã,'ã,¯ãƒªã,¢
$game_temp.battle_main_phase = false
# ã,³ãƒžãƒ³ãƒ‰å...¥åŠ›ä¸å¯èƒ½ãªå ´åˆ
unless $game_party.inputable?
# メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
start_phase4
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (ãƒ'ーテã,£ã,³ãƒžãƒ³ãƒ‰ãƒ•ã,§ãƒ¼ã,º : 逃ã'ã,‹)
#--------------------------------------------------------------------------
def update_phase2_escape
# ã,¨ãƒãƒŸãƒ¼ã®ç´ æ—©ã•åˆè¨ˆã,'計算
enemies_agi = 0
for enemy in $game_troop.enemies
if enemy.exist?
enemies_agi += enemy.agi
end
end
# 行動å¯èƒ½ã,¢ã,¯ã,¿ãƒ¼ã®ç´ æ—©ã•åˆè¨ˆã,'計算
actors_agi = 0
for actor in @pre_action_battlers
if actor.is_a?(Game_Actor) and actor.exist?
actors_agi += actor.agi
end
end
# 逃走æˆåŠŸåˆ¤å®š
success = rand(100) < 50 * actors_agi / enemies_agi
# 逃走æˆåŠŸã®å ´åˆ
if success
# 逃走 SE ã,'æ¼"å¥
$game_system.se_play($data_system.escape_se)
# ãƒãƒˆãƒ«é–‹å§‹å‰ã® BGM ã«æˆ»ã™
$game_system.bgm_play($game_temp.map_bgm)
# CTã,'ã,¯ãƒªã,¢
for battler in $game_party.actors
clear_ct(battler)
end
# ãƒãƒˆãƒ«çµ,了
battle_end(1)
# 逃走失敗ã®å ´åˆ
else
# ヘルプã,¦ã,£ãƒ³ãƒ‰ã,¦ã« "逃走失敗" ã,'ã,»ãƒƒãƒˆ
@help_window.set_text(PARA_CTB::UNESCAPE_MES, 1)
# ã,¢ã,¯ã,¿ãƒ¼ã®ã,¢ã,¯ã,·ãƒ§ãƒ³ã¨CTã,'ã,¯ãƒªã,¢
pre_action_battlers = @pre_action_battlers.clone
for act in pre_action_battlers
if act.is_a?(Game_Actor)
declease_ct(act, 100-PARA_CTB::ACT_ESCAPE_CT)
act.current_action.clear
@pre_action_battlers.delete(act)
end
end
@party_command_window.visible = false
# ヘルプã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'表示
@help_window.visible = true
@wait_count = 20
# メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
start_phase4
end
end
#--------------------------------------------------------------------------
# â— ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
#--------------------------------------------------------------------------
def start_phase3
# フã,§ãƒ¼ã,º 3 ã«ç§»è¡Œ
@phase = 3
# ã,¢ã,¯ã,¿ãƒ¼ã,'éžé¸æŠžçжæ...‹ã«è¨å®š
@actor_index = -1
@active_battler = nil
@actor_array_index = -1
# 次ã®ã,¢ã,¯ã,¿ãƒ¼ã®ã,³ãƒžãƒ³ãƒ‰å...¥åŠ›ã¸
if @pre_action_battlers != []
phase3_next_actor
else
start_phase4
end
end
#--------------------------------------------------------------------------
# ◠次ã®ã,¢ã,¯ã,¿ãƒ¼ã®ã,³ãƒžãƒ³ãƒ‰å...¥åŠ›ã¸
#--------------------------------------------------------------------------
def phase3_next_actor
# ループ
begin
# ã,¢ã,¯ã,¿ãƒ¼ã®æ˜Žæ»...ã,¨ãƒ•ã,§ã,¯ãƒˆ OFF
if @active_battler != nil
@active_battler.blink = false
end
# 最後ã®ã,¢ã,¯ã,¿ãƒ¼ã®å ´åˆ
if @actor_array_index + 1 == @pre_action_battlers.size
# メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
start_phase4
return
#次ãŒã,¨ãƒãƒŸãƒ¼ã®å ´åˆ
elsif $game_troop.enemies.include?(@pre_action_battlers[@actor_array_index + 1])
# メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
start_phase4
return
end
# ã,¢ã,¯ã,¿ãƒ¼ã®ã,¤ãƒ³ãƒ‡ãƒƒã,¯ã,¹ã,'進ã,ã,‹
@actor_array_index += 1
@actor_index = @pre_action_battlers[@actor_array_index].index
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
@active_battler.current_action.clear
# ã,¢ã,¯ã,¿ãƒ¼ãŒã,³ãƒžãƒ³ãƒ‰å...¥åŠ›ã,'å—ã'付ã'ãªã,,状æ...‹ãªã,‰ã,,ã†ä¸€åº¦
end until @active_battler.inputable?
# ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'ã,»ãƒƒãƒˆã,¢ãƒƒãƒ—
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# â— å‰ã®ã,¢ã,¯ã,¿ãƒ¼ã®ã,³ãƒžãƒ³ãƒ‰å...¥åŠ›ã¸
#--------------------------------------------------------------------------
def phase3_prior_actor
# ループ
begin
# ã,¢ã,¯ã,¿ãƒ¼ã®æ˜Žæ»...ã,¨ãƒ•ã,§ã,¯ãƒˆ OFF
if @active_battler != nil
@active_battler.blink = false
end
# 最åˆã®ã,¢ã,¯ã,¿ãƒ¼ã®å ´åˆ
if @actor_array_index <= 0
# ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
start_phase2
return
end
# ã,¢ã,¯ã,¿ãƒ¼ã®ã,¤ãƒ³ãƒ‡ãƒƒã,¯ã,¹ã,'戻ã™
@actor_array_index -= 1
@actor_index = @pre_action_battlers[@actor_array_index].index
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
@active_battler.current_action.clear
# ã,¢ã,¯ã,¿ãƒ¼ãŒã,³ãƒžãƒ³ãƒ‰å...¥åŠ›ã,'å—ã'付ã'ãªã,,状æ...‹ãªã,‰ã,,ã†ä¸€åº¦
end until @active_battler.inputable?
# ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'ã,»ãƒƒãƒˆã,¢ãƒƒãƒ—
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# â— ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ã,¦ã,£ãƒ³ãƒ‰ã,¦ã®ã,»ãƒƒãƒˆã,¢ãƒƒãƒ—
#--------------------------------------------------------------------------
alias phase3_setup_command_window_ctb phase3_setup_command_window
def phase3_setup_command_window
@actor_command_window.back_opacity = PARA_CTB::WINDOW_OPACITY
phase3_setup_command_window_ctb
if PARA_CTB::WINDOWPOS_CHANGE
# ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ã,¦ã,£ãƒ³ãƒ‰ã,¦ã®ä½ç½®ã,'è¨å®š
@actor_command_window.x = PARA_CTB::WINDOWPOS_X
@actor_command_window.y = PARA_CTB::WINDOWPOS_Y
# ã,¹ãƒ†ãƒ¼ã,¿ã,¹ã,¦ã,¤ãƒ³ãƒ‰ã,¦ã«éš ã,Œãªã,,ã,ˆã†ã«
@actor_command_window.z = 9999
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ãƒ•ã,§ãƒ¼ã,º)
#--------------------------------------------------------------------------
def update_phase3
# ã,¨ãƒãƒŸãƒ¼ã,¢ãƒãƒ¼ãŒæœ‰åйã®å ´åˆ
if @enemy_arrow != nil
@countup = PARA_CTB::SELECT_WAIT ? false : true
update_phase3_enemy_select
# ã,¢ã,¯ã,¿ãƒ¼ã,¢ãƒãƒ¼ãŒæœ‰åйã®å ´åˆ
elsif @actor_arrow != nil
@countup = PARA_CTB::SELECT_WAIT ? false : true
update_phase3_actor_select
# ã,¹ã,ルã,¦ã,£ãƒ³ãƒ‰ã,¦ãŒæœ‰åйã®å ´åˆ
elsif @skill_window != nil
@countup = PARA_CTB::SELECT_WAIT ? false : true
update_phase3_skill_select
# ã,¢ã,¤ãƒ†ãƒ ã,¦ã,£ãƒ³ãƒ‰ã,¦ãŒæœ‰åйã®å ´åˆ
elsif @item_window != nil
@countup = PARA_CTB::SELECT_WAIT ? false : true
update_phase3_item_select
# ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ã,¦ã,£ãƒ³ãƒ‰ã,¦ãŒæœ‰åйã®å ´åˆ
elsif @actor_command_window.active
@countup = PARA_CTB::COMMAND_WAIT ? false : true
update_phase3_basic_command
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ãƒ•ã,§ãƒ¼ã,º : 基本ã,³ãƒžãƒ³ãƒ‰)
#--------------------------------------------------------------------------
alias ctb_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
ctb_update_phase3_basic_command
# LRボã,¿ãƒ³ã§è¡Œå‹•é †ã,'変更
if Input.trigger?(Input::R)
shift_activer(1)
end
if Input.trigger?(Input::L)
shift_activer(-1)
end
end
#--------------------------------------------------------------------------
# ◠メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
#--------------------------------------------------------------------------
def start_phase4
# フã,§ãƒ¼ã,º 4 ã«ç§»è¡Œ
@phase = 4
battler_count = $game_party.actors.size + $game_troop.enemies.size
if @action_count >= battler_count or $game_temp.battle_turn == 0
# ãƒãƒˆãƒ«ã,¤ãƒ™ãƒ³ãƒˆã®å...¨ãƒšãƒ¼ã,¸ã,'検索
for index in 0...$data_troops[@troop_id].pages.size
# ã,¤ãƒ™ãƒ³ãƒˆãƒšãƒ¼ã,¸ã,'å–å¾—
page = $data_troops[@troop_id].pages[index]
# ã"ã®ãƒšãƒ¼ã,¸ã®ã,¹ãƒ'ン㌠[ã,¿ãƒ¼ãƒ³] ã®å ´åˆ
if page.span == 1
# 実行済ã¿ãƒ•ラã,°ã,'ã,¯ãƒªã,¢
$game_temp.battle_event_flags[index] = false
end
end
# ã,¿ãƒ¼ãƒ³æ•°ã,«ã,¦ãƒ³ãƒˆ
$game_temp.battle_turn += 1
@action_count = 0
end
# ã,¢ã,¯ã,¿ãƒ¼ã,'éžé¸æŠžçжæ...‹ã«è¨å®š
@actor_index = -1
@active_battler = nil
# ãƒ'ーテã,£ã,³ãƒžãƒ³ãƒ‰ã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'有効化
@party_command_window.active = false
@party_command_window.visible = false
# ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'ç,,¡åŠ¹åŒ–
@actor_command_window.active = false
@actor_command_window.visible = false
# メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,ºãƒ•ラã,°ã,'ã,»ãƒƒãƒˆ
$game_temp.battle_main_phase = true
# ã,¨ãƒãƒŸãƒ¼ã,¢ã,¯ã,·ãƒ§ãƒ³ä½œæˆ
for enemy in $game_troop.enemies
enemy.make_action
end
# è¡Œå‹•é †åºä½œæˆ
make_action_orders
# ã,¹ãƒ†ãƒƒãƒ— 1 ã«ç§»è¡Œ
@phase4_step = 1
end
#--------------------------------------------------------------------------
# â— è¡Œå‹•é †åºä½œæˆ
#--------------------------------------------------------------------------
def make_action_orders
# é...列 @action_battlers ã,'åˆæœŸåŒ–
@action_battlers = []
if @pre_action_battlers != []
for i in 0..@actor_array_index
# ã,¢ã,¯ã,¿ãƒ¼ã,'é...列 @action_battlers ã«è¿½åŠ
@action_battlers.push(@pre_action_battlers[0])
@pre_action_battlers.shift
end
if @pre_action_battlers.size != 0
loop do
if $game_troop.enemies.include?(@pre_action_battlers[0])
# ã,¨ãƒãƒŸãƒ¼ã,'é...列 @action_battlers ã«è¿½åŠ
@action_battlers.push(@pre_action_battlers[0])
@pre_action_battlers.shift
else
break
end
end
end
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,º ã,¹ãƒ†ãƒƒãƒ— 1 : ã,¢ã,¯ã,·ãƒ§ãƒ³æº–å,™)
#--------------------------------------------------------------------------
alias ctb_update_phase4_step1 update_phase4_step1
def update_phase4_step1
@countup = true
# ヘルプã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'éš ã™
@help_window.visible = false
# 勿•—判定
if judge
# å‹åˆ©ã¾ãŸã¯æ•—北ã®å ´åˆ : メã,½ãƒƒãƒ‰çµ,了
return
end
# 未行動ãƒãƒˆãƒ©ãƒ¼ãŒå˜åœ¨ã—ãªã,,å ´åˆ (å...¨å"¡è¡Œå‹•ã—ãŸ)
if @action_battlers.size == 0
# ã,¢ã,¯ã,¿ãƒ¼ã,³ãƒžãƒ³ãƒ‰ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
start_phase3
return
end
ctb_update_phase4_step1
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,º ã,¹ãƒ†ãƒƒãƒ— 2 : ã,¢ã,¯ã,·ãƒ§ãƒ³é–‹å§‹)
#--------------------------------------------------------------------------
alias ctb_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# 強制ã,¢ã,¯ã,·ãƒ§ãƒ³ã§ãªã'ã,Œã°
unless @active_battler.current_action.forcing
# 制ç´,,㌠[行動ã§ããªã,,] ã®å ´åˆ
if @active_battler.restriction == 4
# CTã,'ã,¯ãƒªã,¢
clear_ct(@active_battler)
# ã,¢ã,¯ã,·ãƒ§ãƒ³å¼·åˆ¶å¯¾è±¡ã®ãƒãƒˆãƒ©ãƒ¼ã,'ã,¯ãƒªã,¢
$game_temp.forcing_battler = nil
# ã,¹ãƒ†ãƒƒãƒ— 1 ã«ç§»è¡Œ
@phase4_step = 1
return
end
end
# ã,¢ãƒ‹ãƒ¡ãƒ¼ã,·ãƒ§ãƒ³å†ç"Ÿä¸ã«CTã,'ã,«ã,¦ãƒ³ãƒˆã™ã,‹ã‹
@countup = PARA_CTB::ANIMATION_WAIT ? false : true
ctb_update_phase4_step2
end
#--------------------------------------------------------------------------
# ◠基本ã,¢ã,¯ã,·ãƒ§ãƒ³ çµæžœä½œæˆ
#--------------------------------------------------------------------------
alias make_basic_action_result_ctb make_basic_action_result
def make_basic_action_result
# 何ã,,ã—ãªã,,ã®å ´åˆ
if @active_battler.current_action.basic == 3
# CTã,'ã,¯ãƒªã,¢
clear_ct(@active_battler)
# ã,¢ã,¯ã,·ãƒ§ãƒ³å¼·åˆ¶å¯¾è±¡ã®ãƒãƒˆãƒ©ãƒ¼ã,'ã,¯ãƒªã,¢
$game_temp.forcing_battler = nil
# ã,¹ãƒ†ãƒƒãƒ— 1 ã«ç§»è¡Œ
@phase4_step = 1
return
end
make_basic_action_result_ctb
end
#--------------------------------------------------------------------------
# â— ã,¹ã,ルã,¢ã,¯ã,·ãƒ§ãƒ³ çµæžœä½œæˆ
#--------------------------------------------------------------------------
def make_skill_action_result
# ã,¹ã,ルã,'å–å¾—
@skill = $data_skills[@active_battler.current_action.skill_id]
# 強制ã,¢ã,¯ã,·ãƒ§ãƒ³ã§ãªã'ã,Œã°
unless @active_battler.current_action.forcing
# SP 切ã,Œãªã©ã§ä½¿ç"¨ã§ããªããªã£ãŸå ´åˆ
unless @active_battler.skill_can_use?(@skill.id)
# ã,¢ã,¯ã,·ãƒ§ãƒ³å¼·åˆ¶å¯¾è±¡ã®ãƒãƒˆãƒ©ãƒ¼ã,'ã,¯ãƒªã,¢
$game_temp.forcing_battler = nil
# CTã,'ã,¯ãƒªã,¢
declease_ct(@active_battler,100-PARA_CTB::ACT_SKILL_CT)
# ã,¹ãƒ†ãƒƒãƒ— 1 ã«ç§»è¡Œ
@phase4_step = 1
return
end
end
# SP 消費
@active_battler.sp -= @skill.sp_cost
# ã,¹ãƒ†ãƒ¼ã,¿ã,¹ã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'リフレッã,·ãƒ¥
@status_window.refresh
# ヘルプã,¦ã,£ãƒ³ãƒ‰ã,¦ã«ã,¹ã,ルåã,'表示
@help_window.set_text(@skill.name, 1)
# ã,¢ãƒ‹ãƒ¡ãƒ¼ã,·ãƒ§ãƒ³ ID ã,'è¨å®š
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# ã,³ãƒ¢ãƒ³ã,¤ãƒ™ãƒ³ãƒˆ ID ã,'è¨å®š
@common_event_id = @skill.common_event_id
# 対象å´ãƒãƒˆãƒ©ãƒ¼ã,'è¨å®š
set_target_battlers(@skill.scope)
# ã,¹ã,ルã®åŠ¹æžœã,'é©ç"¨
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
end
#--------------------------------------------------------------------------
# â— ã,¢ã,¤ãƒ†ãƒ ã,¢ã,¯ã,·ãƒ§ãƒ³ çµæžœä½œæˆ
#--------------------------------------------------------------------------
alias ctb_make_item_action_result make_item_action_result
def make_item_action_result
# ã,¢ã,¤ãƒ†ãƒ ã,'å–å¾—
@item = $data_items[@active_battler.current_action.item_id]
# ã,¢ã,¤ãƒ†ãƒ 切ã,Œãªã©ã§ä½¿ç"¨ã§ããªããªã£ãŸå ´åˆ
unless $game_party.item_can_use?(@item.id)
# CTã,'ã,¯ãƒªã,¢
declease_ct(@active_battler,100-PARA_CTB::ACT_ITEM_CT)
# ã,¹ãƒ†ãƒƒãƒ— 1 ã«ç§»è¡Œ
@phase4_step = 1
return
end
ctb_make_item_action_result
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,º ã,¹ãƒ†ãƒƒãƒ— 5 : ダメーã,¸è¡¨ç¤º)
#--------------------------------------------------------------------------
alias update_phase4_step5_ctb update_phase4_step5
def update_phase4_step5
# ダメーã,¸ã,'記録
for target in @target_battlers
if target.damage != nil
target.damage_backup = target.damage
end
end
update_phase4_step5_ctb
end
#--------------------------------------------------------------------------
# ◠フレーム更新 (メã,¤ãƒ³ãƒ•ã,§ãƒ¼ã,º ã,¹ãƒ†ãƒƒãƒ— 6 : リフレッã,·ãƒ¥)
#--------------------------------------------------------------------------
alias update_phase4_step6_ctb update_phase4_step6
def update_phase4_step6
@active_battler.countup = true
if @active_battler.current_action.basic == 1
# 防御
declease_ct(@active_battler,100-PARA_CTB::ACT_GUARD_CT)
else
case @active_battler.current_action.kind
# æ"»æ'ƒ
when 0
declease_ct(@active_battler,100-PARA_CTB::ACT_ATTACK_CT)
# ã,¹ã,ル
when 1
declease_ct(@active_battler,100-PARA_CTB::ACT_SKILL_CT)
# ã,¢ã,¤ãƒ†ãƒ
when 2
declease_ct(@active_battler,100-PARA_CTB::ACT_ITEM_CT)
else
clear_ct(@active_battler)
end
end
# ã,¿ãƒ¼ã,²ãƒƒãƒˆãŒè¡Œå‹•ä¸èƒ½ã«ãªã£ãŸã,‰CTã,'0ã«
for target in @target_battlers
if target.movable? == false and target.damage_backup != "Miss"
clear_ct(target)
@status_window.refresh_ct
end
end
# ã,¨ãƒãƒŸãƒ¼åリã,¹ãƒˆã,'æ›´æ–°
@status_window2.refresh
update_phase4_step6_ctb
end
#--------------------------------------------------------------------------
# â— ã,¢ãƒ•ã,¿ãƒ¼ãƒãƒˆãƒ«ãƒ•ã,§ãƒ¼ã,ºé–‹å§‹
#--------------------------------------------------------------------------
alias ctb_start_phase5 start_phase5
def start_phase5
@countup = false
ctb_start_phase5
end
end
#==============================================================================
# â– Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# â— ã,ªãƒ–ã,¸ã,§ã,¯ãƒˆåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
super(160, 320, 480, 160)
self.contents = Bitmap.new(width - 32, height - 32)
@level_up_flags = [false, false, false, false]
@before_hp = []
@before_sp = []
@before_states = []
@now_hp = []
@now_sp = []
@now_states = []
refresh
end
#--------------------------------------------------------------------------
# ◠リフレッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
line_height = 120 / PARA_CTB::PARTY_SIZE
actor_y = i * line_height + 4
# ç¾åœ¨ã®ã,¹ãƒ†ãƒ¼ã,¿ã,¹ã,'é...列ã«
@now_hp[i] = actor.hp
@now_sp[i] = actor.sp
@now_states[i] = actor.states
# レベルã,¢ãƒƒãƒ—
if @level_up_flags[i]
self.contents.fill_rect(344, actor_y+14, 100, 8, Color.new(0, 0, 0, 0))
self.contents.font.color = normal_color
self.contents.draw_text(344, actor_y, 120, 32, "LEVEL UP!")
end
end
# ãƒãƒˆãƒ«ã,¹ãƒ†ãƒ¼ã,¿ã,¹ã®è»½é‡åŒ–処ç†
# ã,¹ãƒ†ãƒ¼ã,¿ã,¹ã®é...列ãŒå¤‰åŒ–ã—ãŸã¨ãã®ã¿æç"»å‡¦ç†
if @before_hp == nil or @before_sp == nil or @before_states == nil or
@before_hp != @now_hp or @before_sp != @now_sp or @before_states != @now_states
self.contents.clear
for i2 in 0...$game_party.actors.size
actor = $game_party.actors[i2]
line_height = 120 / PARA_CTB::PARTY_SIZE
actor_y = i2 * line_height + 4
self.contents.font.size = PARA_CTB::NAME_FONT_SIZE
# åå‰ã,'æç"»
draw_actor_name(actor, 4, actor_y+16-PARA_CTB::NAME_FONT_SIZE)
# HPã,'æç"»
hp_color1 = PARA_CTB::HP_COLOR_LEFT
hp_color2 = PARA_CTB::HP_COLOR_RIGHT
draw_meter(actor.hp, actor.maxhp, 125, actor_y+14, 80, 8, hp_color1, hp_color2)
draw_actor_hp(actor, 102, actor_y+16-PARA_CTB::HPSP_FONT_SIZE, 100)
# SPã,'æç"»
sp_color1 = PARA_CTB::SP_COLOR_LEFT
sp_color2 = PARA_CTB::SP_COLOR_RIGHT
draw_meter(actor.sp, actor.maxsp, 245, actor_y+14, 80, 8, sp_color1, sp_color2)
draw_actor_sp(actor, 222, actor_y+16-PARA_CTB::HPSP_FONT_SIZE, 100)
# 変化後ã®ã,¹ãƒ†ãƒ¼ã,¿ã,¹ã,'é...列ã«
@before_hp[i2] = actor.hp
@before_sp[i2] = actor.sp
@before_states[i2] = actor.states
# レベルã,¢ãƒƒãƒ—
if @level_up_flags[i2]
self.contents.fill_rect(344, actor_y, 100, 8, Color.new(0, 0, 0, 0))
self.contents.font.color = normal_color
self.contents.draw_text(344, actor_y, 120, 32, "LEVEL UP!")
end
end
end
refresh_ct
end
#--------------------------------------------------------------------------
# â— CTã,²ãƒ¼ã,¸ã®ãƒªãƒ•レッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh_ct
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
line_height = 120 / PARA_CTB::PARTY_SIZE
actor_y = i * line_height + 4
# CTãŒæº€ã,¿ãƒ³ã«ãªã£ãŸã¨ãã®ã,²ãƒ¼ã,¸ã®è‰²
ct_color_full = PARA_CTB::COLOR_FULL
# CTã,²ãƒ¼ã,¸ã®è‰²ï¼ˆå·¦ç«¯ï¼‰
ct_color_start = actor.full_ct ? ct_color_full : PARA_CTB::COLOR_LEFT
# CTã,²ãƒ¼ã,¸ã®è‰²ï¼ˆå³ç«¯ï¼‰
ct_color_end = actor.full_ct ? ct_color_full : PARA_CTB::COLOR_RIGHT
if @level_up_flags[i] != true and actor.ct_visible
draw_meter(actor.now_ct, actor.max_ct, 344, actor_y+14, 100, 8, ct_color_start, ct_color_end)
elsif @level_up_flags[i] != true
draw_meter(0, actor.max_ct, 344, actor_y+14, 100, 8, ct_color_start, ct_color_end)
end
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
super
end
#--------------------------------------------------------------------------
# â— HP ã®æç"»
# actor : ã,¢ã,¯ã,¿ãƒ¼
# x : æç"»å...ˆ X 座標
# y : æç"»å...ˆ Y 座標
# width : æç"»å...ˆã®å¹...
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 144)
# æ–‡å—列 "HP" ã,'æç"»
self.contents.font.color = system_color
self.contents.font.size = 16
self.contents.draw_text(x, y+2, 32, 32, $data_system.words.hp)
self.contents.font.color = normal_color
self.contents.font.size = PARA_CTB::HPSP_FONT_SIZE
if PARA_CTB::MAX_DRAW
# MaxHP ã,'æç"»
self.contents.draw_text(x, y, width, 32, actor.maxhp.to_s, 2)
text_size = self.contents.text_size(actor.maxhp.to_s)
text_x = x + width - text_size.width - 12
self.contents.draw_text(text_x, y, 12, 32, "/", 1)
# HP ã,'æç"»
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
text_x = text_x - text_size.width
self.contents.draw_text(text_x, y, text_size.width, 32, actor.hp.to_s, 2)
else
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(x, y, width, 32, actor.hp.to_s, 2)
end
end
#--------------------------------------------------------------------------
# â— SP ã®æç"»
# actor : ã,¢ã,¯ã,¿ãƒ¼
# x : æç"»å...ˆ X 座標
# y : æç"»å...ˆ Y 座標
# width : æç"»å...ˆã®å¹...
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y, width = 144)
# æ–‡å—列 "SP" ã,'æç"»
self.contents.font.color = system_color
self.contents.font.size = 16
self.contents.draw_text(x, y+2, 32, 32, $data_system.words.sp)
self.contents.font.color = normal_color
self.contents.font.size = PARA_CTB::HPSP_FONT_SIZE
if PARA_CTB::MAX_DRAW
# MaxSP ã,'æç"»
self.contents.draw_text(x, y, width, 32, actor.maxsp.to_s, 2)
text_size = self.contents.text_size(actor.maxsp.to_s)
text_x = x + width - text_size.width - 12
self.contents.draw_text(text_x, y, 12, 32, "/", 1)
# SP ã,'æç"»
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
text_x = text_x - text_size.width
self.contents.draw_text(text_x, y, text_size.width, 32, actor.sp.to_s, 2)
else
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(x, y, width, 32, actor.sp.to_s, 2)
end
end
end
#==============================================================================
# â–¡ 敵ã®åå‰ã,'表示ã™ã,‹ã,¦ã,¤ãƒ³ãƒ‰ã,¦
#==============================================================================
class Window_BattleStatus_enemy < Window_Base
#--------------------------------------------------------------------------
# â—‹ ã,ªãƒ–ã,¸ã,§ã,¯ãƒˆåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
super(0, 320, 160, 160)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# â—‹ リフレッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = PARA_CTB::ENEMY_FONT_SIZE
@exist_enemies = []
if $game_troop.enemies != nil
if PARA_CTB::ENEMY_GROUPING
ememy_list = []
ememy_list_index = []
# ã,¨ãƒãƒŸãƒ¼ã,'ã,°ãƒ«ãƒ¼ãƒ—化
for i in 0...$game_troop.enemies.size
enemy = $game_troop.enemies[i]
if enemy.exist?
if ememy_list.include?(enemy.name)
ememy_list_index[ememy_list.index(enemy.name)] += 1
else
# ã,¨ãƒãƒŸãƒ¼åã,'記録
ememy_list.push(enemy.name)
ememy_list_index[ememy_list.index(enemy.name)] = 1
end
end
end
# ã,¨ãƒãƒŸãƒ¼ã®åå‰ã¨æ•°ã,'æç"»
enemy_index = 0
for enemy_name in ememy_list
enemy_y = enemy_index * (PARA_CTB::ENEMY_FONT_SIZE+6) + 4
if ememy_list_index[enemy_index] > 1
enemy_name = enemy_name + " " + ememy_list_index[enemy_index].to_s
end
self.contents.draw_text(4, enemy_y, 160, 20, enemy_name)
enemy_index += 1
end
else
# ã,¨ãƒãƒŸãƒ¼ã®åå‰ã,'æç"»
enemy_index = 0
for i in 0...$game_troop.enemies.size
enemy = $game_troop.enemies[i]
if enemy.exist?
@exist_enemies.push(enemy)
line_height = PARA_CTB::ENEMY_FONT_SIZE + 6
if PARA_CTB::ENEMY_DRAWING_MATER != 0
line_height += 10
end
enemy_y = enemy_index * line_height + 4
self.contents.draw_text(4, enemy_y, 160, 20, enemy.name)
enemy_index += 1
if PARA_CTB::ENEMY_DRAWING_MATER == 1
hp_color1 = PARA_CTB::HP_COLOR_LEFT
hp_color2 = PARA_CTB::HP_COLOR_RIGHT
y = enemy_y + PARA_CTB::ENEMY_FONT_SIZE + 3
draw_meter(enemy.hp, enemy.maxhp, 4, y, 80, 8, hp_color1, hp_color2)
end
end
end
end
end
refresh_ct
end
#--------------------------------------------------------------------------
# â— CTã,²ãƒ¼ã,¸ã®ãƒªãƒ•レッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh_ct
if PARA_CTB::ENEMY_DRAWING_MATER == 2 and @exist_enemies != nil
enemy_index = 0
for enemy in @exist_enemies
line_height = PARA_CTB::ENEMY_FONT_SIZE + 16
enemy_y = enemy_index * line_height + 4
y = enemy_y + PARA_CTB::ENEMY_FONT_SIZE + 3
# CTãŒæº€ã,¿ãƒ³ã«ãªã£ãŸã¨ãã®ã,²ãƒ¼ã,¸ã®è‰²
ct_color_full = PARA_CTB::COLOR_FULL
# CTã,²ãƒ¼ã,¸ã®è‰²ï¼ˆå·¦ç«¯ï¼‰
ct_color_start = enemy.full_ct ? ct_color_full : PARA_CTB::COLOR_LEFT
# CTã,²ãƒ¼ã,¸ã®è‰²ï¼ˆå³ç«¯ï¼‰
ct_color_end = enemy.full_ct ? ct_color_full : PARA_CTB::COLOR_RIGHT
if enemy.ct_visible
draw_meter(enemy.now_ct, enemy.max_ct, 4, y, 100, 8, ct_color_start, ct_color_end)
else
draw_meter(0, enemy.max_ct, 4, y, 100, 8, ct_color_start, ct_color_end)
end
enemy_index += 1
end
end
end
end
#==============================================================================
# â– Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# â—‹ ã,²ãƒ¼ã,¸ã,'æç"»
#--------------------------------------------------------------------------
def draw_meter(now, max, x, y, width, height, start_color, end_color=start_color )
self.contents.fill_rect(x, y, width, height, PARA_CTB::FRAME_CO
Where the 1st code go.
{Name of the Script ir replaces
When you post scripts that alter game play, please post screenshots. Otherwise people are going to be making modification blindly and they do not know what it would look like as an end result.
And besides, I despise almost complete Japanese scripts because unless you know Japanese...you have no idea where things are and cannot make modifications as necessary. Also if you could, translate them (at least a little bit) so people know where command lines are.
Sorry for the confusion, Ill just give you guys a demo
http://www.megaupload.com/?d=A9H5JSWA
The Demo is called Limit break upgrade, but dont get confused it's the right one.
OK if you don't want blank garabage i advise you copy the script with 'Main'
as it's name from my Demo and paste it over your 'Main' IN your game.
Then i want you to copy everything that has window on it from my Demo and replace it with the ones in your game.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi15.photobucket.com%2Falbums%2Fa368%2FZack999%2FHelpmeeee.jpg&hash=59f5616570f895093b8a635fc1fd498e807b4755)
Like the above.
I advise you also copy the SDK script i got the demo but you don't have to,
i think....anyway i advise you do what i instructed .
Turn this
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fpara.j-mx.com%2Frgss%2Fscript%2Fimg%2Fctb.jpg&hash=313b7946221ca3e5ab1116caaed30091a1a76b96)
Into this
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi15.photobucket.com%2Falbums%2Fa368%2FZack999%2FHelpyouuuuu.jpg&hash=6a839373f0be3de8111ff3740eb0b98cf932afe2)
I dont think you will have any problems.[/img]
i don't like it bcz it makes the characters look like they are floating
<.<;;
Please don't force people to replace things like that. Just insert a new script seeing as replacing / edititng destroys stuff (Trial and error guy here XD)
Anyway for you side-view haters here, I'm going to try to convert this away from this. Personally I don't like side view either :/
Doesn't look too bad without the side-view part anyway though.
[EDIT] nvm: I found a better script. I'll post it up here soon seeing as it was hidden within an animated script.
But why is it 'sexy'? It looks like another ATB script to me. Also am I the only person that likes the default battle system for RMXP?
Quote from: FuMannChuBut why is it 'sexy'? It looks like another ATB script to me. Also am I the only person that likes the default battle system for RMXP?
i'm there with ya man...i don't like the atb scripots for rpg maker xp..i only like the rpg 2003 one lol
Quote from: FuMannChuBut why is it 'sexy'? It looks like another ATB script to me. Also am I the only person that likes the default battle system for RMXP?
Nope, I
I like the RMXP battle system! *sigh* Just like good ole Phantasy Star 1,2,3, and 4....
One of you guys know this game:
.: Legend of the Ancient Dragon :.
It only runs on Windows 95. IT was THE perfect RPG. from like 1998.
It has the battle system you gave above. almost exactly the same :).
Quote from: SupervisorOne of you guys know this game:
.: Legend of the Ancient Dragon :.
It only runs on Windows 95. IT was THE perfect RPG. from like 1998.
It has the battle system you gave above. almost exactly the same :).
And FF6.