Og³oszenie 

Uwaga! To forum jest w trybie offline.
Wszelk± pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Nastêpny temat
ATB battle system
Autor Wiadomo¶æ
Feniks 




Preferowany:
RPG Maker XP

Ranga RM:
2 gry

Pomóg³: 62 razy
Do³±czy³: 04 Wrz 2010
Posty: 511
  Wys³any: Nie 13 Mar, 2011 00:06
ATB battle system
Witam przedstawiam skrypt ATB battle system by MakirouAru, Fukuyama, jest to praktycznie podstawowy battle system tylko ¿e z wbudowan± "turow± kolejno¶ci±". (zmienia jeszcze wygl±d paska hp, mp etc.)

Spoiler:

#==============================================================================
# ¦ New_Battle
#------------------------------------------------------------------------------
# Compiled By : MakirouAru
#==============================================================================
# �¥�£�¥ XRXS_BP 3. ������HP�ñ�� ver.1.01 �¥�£�¥
# by fukuyama, �÷�ë �Ý�y

# Battle_End_Recovery
#
# �í�¬�ã�Ì�ñ���������W���[��
#
# Request: stay
# Script: fukuyama
# Test: �m�R�m�q
#
# URL: http://www4.big.or.jp/~fu...nd_Recovery.txt
#

module Battle_End_Recovery

module Scene_Battle_Module

# �ñ���¦�Ï���ÌID
@@recovery_rate_variable_id = nil

# �ñ���¦�Ì�æ�¾
def battle_end_recovery_rate
if @@recovery_rate_variable_id.nil?
@@recovery_rate_variable_id =
$data_system.variables.index '�í�¬�ã�Ì�ñ���¦'
if @@recovery_rate_variable_id.nil?
@@recovery_rate_variable_id = false
end
end
return 0 unless @@recovery_rate_variable_id
return $game_variables[@@recovery_rate_variable_id]
end

# �í�¬�ã�Ì�ñ������
def battle_end_recovery

# �ñ���¦
recovery_rate = battle_end_recovery_rate

# �ñ���¦�Ï���ª�O�È�O�©�Â�A�N�^�[�ª�¶�¶�µ�Ä�¢�é�ê���A�í�¬�ã�Ì�ñ�������ð�s�¤
if recovery_rate != 0 and not actor.dead?

# �p�[�e�B��A�N�^�[������[�v
$game_party.actors.each do |actor|

# ���v�Z
recovery_hp = (actor.maxhp / 100.0 * recovery_rate).truncate
recovery_sp = (actor.maxsp / 100.0 * recovery_rate).truncate

# �À�Û�É�ñ��
actor.hp += recovery_hp
actor.sp += recovery_sp

# �A�j���[�V�����Ý�è
actor.damage = - recovery_hp
actor.damage_pop = true

end

# �X�e�[�^�X�E�B���h�E�ð�X�V
@status_window.refresh

end
end

end # module Scene_Battle_Module
end # module Battle_End_Recovery

#------------------------------
# �í�¬�V�[���Ì�Ä�è�`
#------------------------------
class Scene_Battle

# Scene_Battle�p���W���[���ð�C���N���[�h
include Battle_End_Recovery::Scene_Battle_Module

# �³�Ì�t�F�[�Y�T�J�n�É�Ê�¼�ð�Â�¯�é
alias battle_end_recovery_original_start_phase5 start_phase5

# �t�F�[�Y�T�J�n�ð�Ä�è�`
def start_phase5

# �í�¬�ã�Ì�ñ�������ð�Ä�Ñ�o�·
battle_end_recovery

# �³�Ì�t�F�[�Y�T�J�n�ð�Ä�Ñ�o�·
battle_end_recovery_original_start_phase5

end
end

# Battle_End_Recovery
# �¥�£�¥ XRXS_BP10. LEVEL UP!�E�B���h�E �¥�£�¥
# by �÷�ë �Ý�y

$data_system_level_up_se = "" # ���x���A�b�vSE�B""�Å�³�µ�B
$data_system_level_up_me = "Audio/ME/007-Fanfare01" # ���x���A�b�vME

#==============================================================================
# �¡ Window_LevelUpWindow
#------------------------------------------------------------------------------
# �@�o�g���I�¹���A���x���A�b�v�µ�½�ê���É�X�e�[�^�X�ð�\�¦�·�é�E�B���h�E�Å�·�B
#==============================================================================
class Window_LevelUpWindow < Window_Base
#--------------------------------------------------------------------------
# �� �I�u�W�F�N�g���ú�»
#--------------------------------------------------------------------------
def initialize(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
super(0, 128, 160, 192)
self.contents = Bitmap.new(width - 32, height - 32)
self.visible = false
refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
end
#--------------------------------------------------------------------------
# �� ���t���b�V��
#--------------------------------------------------------------------------
def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
self.contents.clear
self.contents.font.color = system_color
self.contents.font.name = "Arial"
self.contents.font.size = 14
self.contents.draw_text( 0, 0, 160, 24, "LEVEL UP!!")
self.contents.font.size = 18
self.contents.draw_text( 0, 28, 160, 24, $data_system.words.hp)
self.contents.draw_text( 0, 50, 160, 24, $data_system.words.sp)
self.contents.font.size = 14
self.contents.draw_text( 0, 72, 80, 24, $data_system.words.str)
self.contents.draw_text( 0, 94, 80, 24, $data_system.words.dex)
self.contents.draw_text( 0, 116, 80, 24, $data_system.words.agi)
self.contents.draw_text( 0, 138, 80, 24, $data_system.words.int)
self.contents.draw_text(92, 0, 128, 24, "�¨")
self.contents.draw_text(76, 28, 128, 24, "=")
self.contents.draw_text(76, 50, 128, 24, "=")
self.contents.draw_text(76, 72, 128, 24, "=")
self.contents.draw_text(76, 94, 128, 24, "=")
self.contents.draw_text(76, 116, 128, 24, "=")
self.contents.draw_text(76, 138, 128, 24, "=")
self.contents.font.color = normal_color
self.contents.draw_text( 0, 0, 88, 24, last_lv.to_s, 2)
self.contents.draw_text( 0, 28, 72, 24, "+" + up_hp.to_s, 2)
self.contents.draw_text( 0, 50, 72, 24, "+" + up_sp.to_s, 2)
self.contents.draw_text( 0, 72, 72, 24, "+" + up_str.to_s, 2)
self.contents.draw_text( 0, 94, 72, 24, "+" + up_dex.to_s, 2)
self.contents.draw_text( 0, 116, 72, 24, "+" + up_agi.to_s, 2)
self.contents.draw_text( 0, 138, 72, 24, "+" + up_int.to_s, 2)
self.contents.font.size = 20
self.contents.draw_text( 0, 0, 128, 24, actor.level.to_s, 2)
self.contents.draw_text( 0, 26, 128, 24, actor.maxhp.to_s, 2)
self.contents.draw_text( 0, 48, 128, 24, actor.maxsp.to_s, 2)
self.contents.draw_text( 0, 70, 128, 24, actor.str.to_s, 2)
self.contents.draw_text( 0, 92, 128, 24, actor.dex.to_s, 2)
self.contents.draw_text( 0, 114, 128, 24, actor.agi.to_s, 2)
self.contents.draw_text( 0, 136, 128, 24, actor.int.to_s, 2)
end
end
#==============================================================================
# �¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# �� �Ç�Á�E�ö�J�C���X�^���X�Ï��
#--------------------------------------------------------------------------
attr_accessor :level_up_flags # LEVEL UP!�\�¦
end
#==============================================================================
# �¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# �� �Ç�Á�E�ö�J�C���X�^���X�Ï��
#--------------------------------------------------------------------------
attr_accessor :exp_gain_ban # EXP������~
#--------------------------------------------------------------------------
# �� �I�u�W�F�N�g���ú�»
#--------------------------------------------------------------------------
alias xrxs_bp10_initialize initialize
def initialize
@exp_gain_ban = false
xrxs_bp10_initialize
end
#--------------------------------------------------------------------------
# �� �X�e�[�g [EXP �ð�l�¾�Å�«�È�¢] �»�è
#--------------------------------------------------------------------------
alias xrxs_bp10_cant_get_exp? cant_get_exp?
def cant_get_exp?
if @exp_gain_ban == true
return true
else
return xrxs_bp10_cant_get_exp?
end
end
end
#==============================================================================
# �¡ Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# �� �A�t�^�[�o�g���t�F�[�Y�J�n
#--------------------------------------------------------------------------
alias xrxs_bp10_start_phase5 start_phase5
def start_phase5
# EXP �l�¾�Ö�~
for i in 0...$game_party.actors.size
$game_party.actors[i].exp_gain_ban = true
end
xrxs_bp10_start_phase5
# EXP �l�¾�Ö�~�Ì�ð��
for i in 0...$game_party.actors.size
$game_party.actors[i].exp_gain_ban = false
end
# EXP�ð���ú�»
@exp_gained = 0
for enemy in $game_troop.enemies
# �l�¾ EXP�ð�Ç�Á # �G�l�~�[�ª�B�ê�ó�Ô�Å�È�¢�ê��
@exp_gained += enemy.exp if not enemy.hidden
end
# �Ý�è
@phase5_step = 0
@exp_gain_actor = -1
# ���U���g�E�B���h�E�ð�\�¦
@result_window.y -= 64
@result_window.visible = true
# ���x���A�b�v�»�è�Ö
phase5_next_levelup
end
#--------------------------------------------------------------------------
# �� �t���[���X�V (�A�t�^�[�o�g���t�F�[�Y)
#--------------------------------------------------------------------------
alias xrxs_bp10_update_phase5 update_phase5
def update_phase5
case @phase5_step
when 1
update_phase5_step1
else
xrxs_bp10_update_phase5
# ���x���A�b�v�µ�Ä�¢�é�ê���Í�­�§�o�g���I�¹
battle_end(0) if @levelup_window != nil and @phase5_wait_count <= 0
end
end
#--------------------------------------------------------------------------
# �� �t���[���X�V (�A�t�^�[�o�g���t�F�[�Y 1 : ���x���A�b�v)
#--------------------------------------------------------------------------
def update_phase5_step1
# C �{�^���ª���³�ê�½�ê��
if Input.trigger?(Input::C)
# �E�B���h�E�ð�Â�¶�Ä���Ì�A�N�^�[�Ö
@levelup_window.visible = false if @levelup_window != nil
@status_window.level_up_flags[@exp_gain_actor] = false
phase5_next_levelup
end
end
#--------------------------------------------------------------------------
# �� ���Ì�A�N�^�[�Ì���x���A�b�v�\�¦�Ö
#--------------------------------------------------------------------------
def phase5_next_levelup
begin
# ���Ì�A�N�^�[�Ö
@exp_gain_actor += 1
# �Å�ã�Ì�A�N�^�[�Ì�ê��
if @exp_gain_actor >= $game_party.actors.size
# �A�t�^�[�o�g���t�F�[�Y�J�n
@phase5_step = 0
return
end
actor = $game_party.actors[@exp_gain_actor]
if actor.cant_get_exp? == false
# �»�Ý�Ì�\�Í�l�ð�Û��
last_level = actor.level
last_maxhp = actor.maxhp
last_maxsp = actor.maxsp
last_str = actor.str
last_dex = actor.dex
last_agi = actor.agi
last_int = actor.int
# �o�±�l�æ�¾�Ì���è�I�u�Ô(�ä
actor.exp += @exp_gained
# �»�è
if actor.level > last_level
# ���x���A�b�v�µ�½�ê��
@status_window.level_up(@exp_gain_actor)
if $data_system_level_up_se != ""
Audio.se_stop
Audio.se_play($data_system_level_up_se)
end
if $data_system_level_up_me != ""
Audio.me_stop
Audio.me_play($data_system_level_up_me)
end
@levelup_window = Window_LevelUpWindow.new(actor, last_level,
actor.maxhp - last_maxhp, actor.maxsp - last_maxsp, actor.str - last_str,
actor.dex - last_dex, actor.agi - last_agi, actor.int - last_int)
@levelup_window.x = 160 * @exp_gain_actor
@levelup_window.visible = true
@phase5_wait_count = 40
@phase5_step = 1
# �X�e�[�^�X�E�B���h�E��t���b�V��
@status_window.refresh
return
end
end
end until false
end
end
# �¥�£�¥ XRXS_17. �X���b�v�_���[�W�h�ä�^�ø�Ê�Ê�Ú�×�» ver.1.51 �¥�£�¥
# by �÷�ë �Ý�y, fukuyama

#==============================================================================
# �¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# �� �X���b�v�_���[�W�Ì�ø�Ê�K�p
#--------------------------------------------------------------------------
alias xrxs_bp7_slip_damage_effect slip_damage_effect
def slip_damage_effect
# ���l�Ì���ú�»
slip_damage_percent = 0
slip_damage_plus = 0
# �»�Ý�t�Á�³�ê�Ä�¢�é�X�e�[�g�Ì���©�ç�X���b�v�_���[�W�L�è�Ì���m�ð�T�·
for i in @states
if $data_states[i].slip_damage
# �»�Ì�X�e�[�g�ª���Á�Ä�¢�é�X���b�v�_���[�W�Ì
# Lv�v���X�X�e�[�g�Ü�½�ÍLv�}�C�i�X�X�e�[�g�ð�»�è�B
for j in $data_states[i].plus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^�X���b�v([0-9]+)(%|��)/
slip_damage_percent += $1.to_i
elsif $data_states[j].name =~ /^�X���b�v([0-9]+)$/
slip_damage_plus += $1.to_i
end
end
end
for j in $data_states[i].minus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^�X���b�v([0-9]+)(%|��)/
slip_damage_percent -= $1.to_i
elsif $data_states[j].name =~ /^�X���b�v([0-9]+)$/
slip_damage_plus -= $1.to_i
end
end
end
end
end
if slip_damage_percent == 0 and slip_damage_plus == 0
xrxs_bp7_slip_damage_effect
else
# �h�ï�ª�X���b�v�h�ä�ª� �é�ê���ð�»�è
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
next if armor == nil
for j in armor.guard_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^�X���b�v([0-9]+)(%|��)/
if slip_damage_percent > 0
slip_damage_percent = [slip_damage_percent - $1.to_i, 0].max
end
end
if $data_states[j].name =~ /^�X���b�v([0-9]+)$/
if slip_damage_percent > 0
slip_damage_plus = [slip_damage_plus - $1.to_i, 0].max
end
end
end
end
end
# �_���[�W�ð�Ý�è
self.damage = self.maxhp * slip_damage_percent / 100 + slip_damage_plus
# �ª�U
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# HP �©�ç�_���[�W�ð�¸�Z
self.hp -= self.damage
# ���\�b�h�I�¹
return true
end
end
end
# �¥�£�¥ XRXS_BP 1. CP�§�±�ü ver.15 �¥�£�¥
# by �÷�ë �Ý�y, �a�ó, Jack-R

#==============================================================================
# �¡ Scene_Battle_CP
#==============================================================================
class Scene_Battle_CP
#--------------------------------------------------------------------------
# �� �ö�J�C���X�^���X�Ï��
#--------------------------------------------------------------------------
attr_accessor :stop # CP�Á�Z�X�g�b�v
#----------------------------------------------------------------------------
# �� �I�u�W�F�N�g�Ì���ú�»
#----------------------------------------------------------------------------
def initialize
@battlers = []
@cancel = false
@agi_total = 0
# �z�ñ @count_battlers �ð���ú�»
@count_battlers = []
# �G�l�~�[�ð�z�ñ @count_battlers �É�Ç�Á
for enemy in $game_troop.enemies
@count_battlers.push(enemy)
end
# �A�N�^�[�ð�z�ñ @count_battlers �É�Ç�Á
for actor in $game_party.actors
@count_battlers.push(actor)
end
for battler in @count_battlers
@agi_total += battler.agi
end
for battler in @count_battlers
battler.cp = [[65535 * (rand(15) + 85) / 100 * battler.agi / @agi_total * 4, 0].max, 65535].min
end
end
#----------------------------------------------------------------------------
# �� CP�J�E���g��J�n
#----------------------------------------------------------------------------
def start
if @cp_thread != nil then
return
end
@cancel = false
@stop = false
# �±�±�©�ç�X���b�h
@cp_thread = Thread.new do
while @cancel != true
if @stop != true
self.update # �X�V
sleep(0.05)
end
end
end
# �±�±�Ü�Å�X���b�h
end
#----------------------------------------------------------------------------
# �� CP�J�E���g�A�b�v
#----------------------------------------------------------------------------
def update
if @count_battlers != nil then
for battler in @count_battlers
# �s�®�o���È�¯�ê�Î�³��
if battler.dead? == true #or battler.movable? == false then
battler.cp = 0
next
end
# �±�±�Ì 1.3�ð�Ï�¦�é�±�Æ�Å�«�X�s�[�h�ð�Ï�X�Â�\�B�½�¾�µ�¬���_�Í�g�p�·�é�±�Æ�B
battler.cp = [[battler.cp + 1.3 * 4096 * battler.agi / @agi_total, 0].max, 65535].min
end
end
end
#----------------------------------------------------------------------------
# �� CP�J�E���g��J�n
#----------------------------------------------------------------------------
def stop
@cancel = true
if @cp_thread != nil then
@cp_thread.join
@cp_thread = nil
end
end
end
#==============================================================================
# �¡ Game_Battler
#==============================================================================
class Game_Battler
attr_accessor :now_guarding # �»�Ý�h�ä���t���O
attr_accessor :cp # �»�ÝCP
attr_accessor :slip_state_update_ban # �X���b�v�E�X�e�[�g�©�®�����Ì�Ö�~
#--------------------------------------------------------------------------
# �� �R�}���h�ü�Í�Â�\�»�è
#--------------------------------------------------------------------------
def inputable?
return (not @hidden and restriction <= 1 and @cp >=65535)
end
#--------------------------------------------------------------------------
# �� �X�e�[�g [�X���b�v�_���[�W] �»�è
#--------------------------------------------------------------------------
alias xrxs_bp1_slip_damage? slip_damage?
def slip_damage?
return false if @slip_state_update_ban
return xrxs_bp1_slip_damage?
end
#--------------------------------------------------------------------------
# �� �X�e�[�g�©�R�ð�� (�^�[���²�Æ�É�Ä�Ñ�o�µ)
#--------------------------------------------------------------------------
alias xrxs_bp1_remove_states_auto remove_states_auto
def remove_states_auto
return if @slip_state_update_ban
xrxs_bp1_remove_states_auto
end
end
#==============================================================================
# �¡ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# �� �Z�b�g�A�b�v
#--------------------------------------------------------------------------
alias xrxs_bp1_setup setup
def setup(actor_id)
xrxs_bp1_setup(actor_id)
@hate = 100 # init-value is 100
@cp = 0
@now_guarding = false
@slip_state_update_ban = false
end
end
#==============================================================================
# �¡ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# �� �I�u�W�F�N�g���ú�»
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize(troop_id, member_index)
xrxs_bp1_initialize(troop_id, member_index)
@hate = 100 # init-value is 100
@cp = 0
@now_guarding = false
@slip_state_update_ban = false
end
end
#==============================================================================
# �¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# �� �ö�J�C���X�^���X�Ï��
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CP���[�^�[����X�V
#--------------------------------------------------------------------------
# �� �I�u�W�F�N�g���ú�»
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize
@update_cp_only = false
xrxs_bp1_initialize
end
#--------------------------------------------------------------------------
# �� ���t���b�V��
#--------------------------------------------------------------------------
alias xrxs_bp1_refresh refresh
def refresh
if @update_cp_only == false
xrxs_bp1_refresh
end
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
end
end
#--------------------------------------------------------------------------
# �� CP���[�^�[ �Ì�`�æ
#--------------------------------------------------------------------------
def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
if actor.cp == nil
actor.cp = 0
end
w = width * [actor.cp,65535].min / 65535
self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
end
end
#==============================================================================
# �¡ Scene_Battle
#==============================================================================
class Scene_Battle
# �±�±�É�ø�Ê�¹�ð�Ý�è�·�é�Æ�A�A�N�^�[�R�}���h�ª�|�b�v�µ�½�Æ�«�É�ø�Ê�¹�ð�Ä�¶
$data_system_command_up_se = ""
#--------------------------------------------------------------------------
# �� �o�g���I�¹
# result : ���Ê (0:���� 1:�s�k 2:�¦��)
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
# CP�J�E���g�â�~
@cp_thread.stop
xrxs_bp1_battle_end(result)
end
#--------------------------------------------------------------------------
# �� �v���o�g���t�F�[�Y�J�n
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase1 start_phase1
def start_phase1
@agi_total = 0
@cp_thread = Scene_Battle_CP.new
# �A�N�^�[�R�}���h�E�B���h�E�ð�Ä�ì�¬
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4, "Run"])
@actor_command_window.y = 128
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@actor_command_window.draw_item(4, $game_temp.battle_can_escape ? @actor_command_window.normal_color : @actor_command_window.disabled_color)
xrxs_bp1_start_phase1
end
#--------------------------------------------------------------------------
# �� �p�[�e�B�R�}���h�t�F�[�Y�J�n
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase2 start_phase2
def start_phase2
xrxs_bp1_start_phase2
@party_command_window.active = false
@party_command_window.visible = false
# ���Ö
start_phase3
end
#--------------------------------------------------------------------------
# �� �t���[���X�V (�p�[�e�B�R�}���h�t�F�[�Y)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase2 update_phase2
def update_phase2
# C �{�^���ª���³�ê�½�ê��
if Input.trigger?(Input::C)
# �p�[�e�B�R�}���h�E�B���h�E�Ì�J�[�\���Ê�u�Å�ª�ò
case @party_command_window.index
when 0 # ��
# ���è SE �ð���t
$game_system.se_play($data_system.decision_se)
@cp_thread.start
# �A�N�^�[�R�}���h�t�F�[�Y�J�n
start_phase3
end
return
end
xrxs_bp1_update_phase2
end
#--------------------------------------------------------------------------
# �� ���Ì�A�N�^�[�Ì�R�}���h�ü�Í�Ö
#--------------------------------------------------------------------------
def phase3_next_actor
# ���[�v
begin
# �A�N�^�[�Ì�¾�Å�G�t�F�N�g OFF
if @active_battler != nil
@active_battler.blink = false
end
# �Å�ã�Ì�A�N�^�[�Ì�ê��
if @actor_index == $game_party.actors.size-1
# ���C���t�F�[�Y�J�n
@cp_thread.start
start_phase4
return
end
# �A�N�^�[�Ì�C���f�b�N�X�ð�i�ß�é
@actor_index += 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
if @active_battler.inputable? == false
@active_battler.current_action.kind = -1
end
# �A�N�^�[�ª�R�}���h�ü�Í�ð�ó�¯�t�¯�È�¢�ó�Ô�È�ç�à�¤�ê�x
end until @active_battler.inputable?
@cp_thread.stop
# �A�N�^�[�R�}���h�E�B���h�E�ð�Z�b�g�A�b�v
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# �� �O�Ì�A�N�^�[�Ì�R�}���h�ü�Í�Ö
#--------------------------------------------------------------------------
def phase3_prior_actor
# ���[�v
begin
# �A�N�^�[�Ì�¾�Å�G�t�F�N�g OFF
if @active_battler != nil
@active_battler.blink = false
end
# �����A�N�^�[���
if @actor_index == 0
# �Å���Ö�ß�é
start_phase3
return
end
# �A�N�^�[�Ì�C���f�b�N�X�ð�ß�·
@actor_index -= 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
# �A�N�^�[�ª�R�}���h�ü�Í�ð�ó�¯�t�¯�È�¢�ó�Ô�È�ç�à�¤�ê�x
end until @active_battler.inputable?
@cp_thread.stop
# �A�N�^�[�R�}���h�E�B���h�E�ð�Z�b�g�A�b�v
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# �� �A�N�^�[�R�}���h�E�B���h�E��Z�b�g�A�b�v
#--------------------------------------------------------------------------
alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
# �ø�Ê�¹�Ì�Ä�¶
Audio.se_play($data_system_command_up_se) if $data_system_command_up_se != ""
# �ß�·
xrxs_bp1_phase3_setup_command_window
end
#--------------------------------------------------------------------------
# �� �t���[���X�V (�A�N�^�[�R�}���h�t�F�[�Y : �î�{�R�}���h)
#--------------------------------------------------------------------------
alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
# C �{�^���ª���³�ê�½�ê��
if Input.trigger?(Input::C)
# �A�N�^�[�R�}���h�E�B���h�E�Ì�J�[�\���Ê�u�Å�ª�ò
case @actor_command_window.index
when 4 # �¦�°�é
if $game_temp.battle_can_escape
# ���è SE �ð���t
$game_system.se_play($data_system.decision_se)
# �A�N�V�����ð�Ý�è
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 4
# ���Ì�A�N�^�[�Ì�R�}���h�ü�Í�Ö
phase3_next_actor
else
# �u�U�[ SE ��t
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
xrxs_bsp1_update_phase3_basic_command
end
#--------------------------------------------------------------------------
# �� ���C���t�F�[�Y�J�n
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase4 start_phase4
def start_phase4
xrxs_bp1_start_phase4
# �G�l�~�[�A�N�V������
for enemy in $game_troop.enemies
if enemy.cp < 65535
enemy.current_action.clear
enemy.current_action.kind = -1 # �^�[���ò�Î�µ�B
next
end
enemy.make_action
end
# �s�®�����ì�¬
make_action_orders
end
#--------------------------------------------------------------------------
# �� �t���[���X�V (���C���t�F�[�Y �X�e�b�v 1 : �A�N�V�������õ)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step1 update_phase4_step1
def update_phase4_step1
# ���ú�»
@phase4_act_continuation = 0
# ���s�»�è
if judge
@cp_thread.stop
# �����Ü�½�Í�s�k�Ì�ê�� : ���\�b�h�I�¹
return
end
# �¢�s�®�o�g���[�z�ñ�Ì�æ�ª�©�ç�æ�¾
@active_battler = @action_battlers[0]
# �X�e�[�^�X�X�V�ðCP�¾�¯�É�À�è�B
@status_window.update_cp_only = true
# �X�e�[�g�X�V�ð�Ö�~�B
@active_battler.slip_state_update_ban = true if @active_battler != nil
# �ß�·
xrxs_bp1_update_phase4_step1
# �Ö�~�ð�ð��
@status_window.update_cp_only = false
@active_battler.slip_state_update_ban = false if @active_battler != nil
end
#--------------------------------------------------------------------------
# �� �t���[���X�V (���C���t�F�[�Y �X�e�b�v 2 : �A�N�V�����J�n)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# �­�§�A�N�V�����Å�È�¯�ê�Î
unless @active_battler.current_action.forcing
# CP�ª�«�è�Ä�¢�È�¢�ê��
if @phase4_act_continuation == 0 and @active_battler.cp < 65535
@phase4_step = 6
return
end
# �§�ñ�ª [�G�ð�Ê�í�U���·�é] �© [�¡�û�ð�Ê�í�U���·�é] �Ì�ê��
if @active_battler.restriction == 2 or @active_battler.restriction == 3
# �A�N�V�����É�U���ð�Ý�è
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
end
# �§�ñ�ª [�s�®�Å�«�È�¢] �Ì�ê��
if @active_battler.restriction == 4
# �A�N�V�����­�§�Î�Û�Ì�o�g���[�ð�N���A
$game_temp.forcing_battler = nil
if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
# �X�e�[�g�©�R�ð��
@active_battler.remove_states_auto
# CP�Á�ï
@active_battler.cp = [(@active_battler.cp - 65535),0].max
# �X�e�[�^�X�E�B���h�E��t���b�V��
@status_window.refresh
end
# �X�e�b�v 1 ���s
@phase4_step = 1
return
end
end
# �A�N�V�����Ì�í�Ê�Å�ª�ò
case @active_battler.current_action.kind
when 0
# �U��¥�h�ä�E�¦�°�é�E�½�à�µ�È�¢���Ì�¤�Ê�Á�ïCP
@active_battler.cp -= 0 if @phase4_act_continuation == 0
when 1
# �X�L���g�p���Ì�Á�ïCP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when 2
# �A�C�e���g�p���Ì�Á�ïCP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when -1
# CP�ª�­�Ü�Á�Ä�¢�È�¢
@phase4_step = 6
return
end
# CP�Á�Z�ð�ê���â�~�·�é
@cp_thread.stop = true
# �X�e�[�g�©�R�ð��
@active_battler.remove_states_auto
xrxs_bp1_update_phase4_step2
end
#--------------------------------------------------------------------------
# �� �î�{�A�N�V���� ���Ê�ì�¬
#--------------------------------------------------------------------------
alias xrxs_bp1_make_basic_action_result make_basic_action_result
def make_basic_action_result
# �U�����
if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # �U�����ÌCP�Á�ï
end
# �h�ä�Ì�ê��
if @active_battler.current_action.basic == 1 and @phase4_act_continuation == 0
@active_battler.cp -= 32767 # �h�ä���ÌCP�Á�ï
end
# �G�Ì�¦�°�é�Ì�ê��
if @active_battler.is_a?(Game_Enemy) and
@active_battler.current_action.basic == 2 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # �¦�����ÌCP�Á�ï
end
# �½�à�µ�È�¢�Ì�ê��
if @active_battler.current_action.basic == 3 and @phase4_act_continuation == 0
@active_battler.cp -= 32767 # �½�à�µ�È�¢���ÌCP�Á�ï
end
# �¦�°�é�Ì�ê��
if @active_battler.current_action.basic == 4 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # �¦�����ÌCP�Á�ï
# �¦���Â�\�Å�Í�È�¢�ê��
if $game_temp.battle_can_escape == false
# �u�U�[ SE ��t
$game_system.se_play($data_system.buzzer_se)
return
end
# ���è SE �ð���t
$game_system.se_play($data_system.decision_se)
# �¦������
update_phase2_escape
return
end
xrxs_bp1_make_basic_action_result
end
#--------------------------------------------------------------------------
# �� �t���[���X�V (���C���t�F�[�Y �X�e�b�v 5 : �_���[�W�\�¦)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step5 update_phase4_step5
def update_phase4_step5
# �X���b�v�_���[�W
if @active_battler.hp > 0 and @active_battler.slip_damage?
@active_battler.slip_damage_effect
@active_battler.damage_pop = true
end
xrxs_bp1_update_phase4_step5
end
#--------------------------------------------------------------------------
# �� �t���[���X�V (���C���t�F�[�Y �X�e�b�v 6 : ���t���b�V��)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step6 update_phase4_step6
def update_phase4_step6
# CP�Á�Z�ð�Ä�J�·�é
@cp_thread.stop = false
# �w���v�E�B���h�E�ð�B�·
@help_window.visible = false
xrxs_bp1_update_phase4_step6
end
end
# �¥�£�¥ XRXS_BP 7. �o�g���X�e�[�^�X�E�N���A�f�U�C�� ver.1.02 �¥�£�¥
# by �÷�ë �Ý�y, TOMY

#==============================================================================
# �¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# �� �ö�J�C���X�^���X�Ï��
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CP���[�^�[����X�V
#--------------------------------------------------------------------------
# �� �I�u�W�F�N�g���ú�»
#--------------------------------------------------------------------------
alias xrxs_bp7_initialize initialize
def initialize
xrxs_bp7_initialize
# �«Full-View�Ì�ê���Í�º�ñ�s�Ì # �ð�Á�µ�Ä�­�¾�³�¢�B
#self.opacity = 0
#self.back_opacity = 0
end
#--------------------------------------------------------------------------
# �� ���t���b�V��
#--------------------------------------------------------------------------
alias xrxs_bp7_refresh refresh
def refresh
if @update_cp_only
xrxs_bp7_refresh
return
end
# �`�Ê�ð�Ö�~�µ�È�ª�ç�ß�·
@draw_ban = true
xrxs_bp7_refresh
# �`�Ê�Ì�Ö�~�ð�ð��
@draw_ban = false
# �`�Ê�ð�J�n
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 21
# �à�s�L�����O���t�B�b�N�Ì�`�Ê
draw_actor_graphic(actor, actor_x - 9, 116)
# HP/SP���[�^�[�Ì�`�Ê
draw_actor_hp_meter_line(actor, actor_x, 72, 96, 12)
draw_actor_sp_meter_line(actor, actor_x, 104, 96, 12)
# HP���l�Ì�`�Ê
self.contents.font.size = 24 # HP/SP���l�Ì�¶���Ì�å�«�³
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 58, 96, 24, actor.hp.to_s, 2)
# SP���l�Ì�`�Ê
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 90, 96, 24, actor.sp.to_s, 2)
# �p�ê�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
end
#==============================================================================
# �¡ Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# �� HP���[�^�[ �Ì�`�æ
#--------------------------------------------------------------------------
def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.hp / actor.maxhp
hp_color_1 = Color.new(255, 0, 0, 192)
hp_color_2 = Color.new(255, 255, 0, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# �� SP���[�^�[ �Ì�`�æ
#--------------------------------------------------------------------------
def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.sp / actor.maxsp
hp_color_1 = Color.new( 0, 0, 255, 192)
hp_color_2 = Color.new( 0, 255, 255, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# �� �¼�O�Ì�`�æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_name draw_actor_name
def draw_actor_name(actor, x, y)
xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
end
#--------------------------------------------------------------------------
# �� �X�e�[�g�Ì�`�æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_state draw_actor_state
def draw_actor_state(actor, x, y, width = 120)
xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# �� HP �Ì�`�æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_hp draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# �� SP �Ì�`�æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_sp draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
end
end
#==============================================================================
# �� �O�����C�u����
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# �� ���C���`�æ by �÷�ë �Ý�y
#--------------------------------------------------------------------------
def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
# �`�Ê���£�Ì�v�Z�B�å�«�ß�É�¼�p���Ì�·�³�B
distance = (start_x - end_x).abs + (start_y - end_y).abs
# �`��J�n
if end_color == start_color
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
self.contents.fill_rect(x, y, width, width, start_color)
end
else
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
r = start_color.red * (distance-i)/distance + end_color.red * i/distance
g = start_color.green * (distance-i)/distance + end_color.green * i/distance
b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
end
end
end

#--------------------------------------------------------------------------
# �� �e�¶���`�æ by TOMY
#--------------------------------------------------------------------------
def draw_shadow_text(x, y, width, height, string, align = 0)
# �³�Ì�F�ð�Û�¶�µ�Ä�¨�­
color = self.contents.font.color.dup
# �����Å�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



Screenshot:
http://img703.imageshack.us/i/zdjtko.png/

skrypt tylko przetestowa³em czy dzia³a, byæ mo¿e ma jakie¶ b³êdy itd...

Instrukcja:
1.Otwórz zak³adkê script.
2.Skrypt wkleiæ nad main.
3.Gotowe.
________________________

 
 
LouFei 




Preferowany:
RPG Maker XP

Do³±czy³: 25 Gru 2010
Posty: 7
Sk±d: Z Internetu
Wys³any: Wto 15 Mar, 2011 19:12
U¿y³ go TiTek w PW ;)
________________________
 
 
 
LordVitas 




Preferowany:
RPG Maker XP

Ranga RM:
1 gra

Pomóg³: 9 razy
Do³±czy³: 17 Sie 2011
Posty: 115
Sk±d: Wrze¶nia
Wys³any: Sob 05 Lis, 2011 12:42
Tak titek go u¿y³. I w³a¶nie ten system walki mi siê strasznie spodoba³.
Dziêki wielkie Feniks.
________________________
...
 
 
metax01956 




Preferowany:
RPG Maker XP

Do³±czy³: 01 Pa¼ 2011
Posty: 1
Wys³any: Sob 05 Lis, 2011 21:55
Mam z tym tylko jeden problem. Jak zmieniæ Run na Uciekaj lub Ucieczka :?:
________________________
http://chomikuj.pl/maxior_23
 
 
LordVitas 




Preferowany:
RPG Maker XP

Ranga RM:
1 gra

Pomóg³: 9 razy
Do³±czy³: 17 Sie 2011
Posty: 115
Sk±d: Wrze¶nia
Wys³any: Sob 05 Lis, 2011 22:07
No przyda³o by siê to. Mam tak samo i troche to dra¿ni jak od góry do do³u po polsku
a na dole taki wredny "Run"
________________________
...
 
 
Melvin 




Preferowany:
RPG Maker XP

Ranga RM:
1 gra

Pomóg³: 35 razy
Do³±czy³: 23 Pa¼ 2009
Posty: 1063
Wys³any: Sob 05 Lis, 2011 22:39
Kod:
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4, "Run"])
________________________
MelvinClass:
Spoiler:

 
 
LordVitas 




Preferowany:
RPG Maker XP

Ranga RM:
1 gra

Pomóg³: 9 razy
Do³±czy³: 17 Sie 2011
Posty: 115
Sk±d: Wrze¶nia
Wys³any: Sob 05 Lis, 2011 23:17
Dziêki melvin
________________________
...
 
 
Mateusz SSJ8 




Preferowany:
RPG Maker XP

Pomóg³: 1 raz
Do³±czy³: 07 Sty 2012
Posty: 46
Sk±d: Polska
Wys³any: Wto 10 Sty, 2012 08:50
Niestety, przy mówieniu trafi³ ci siê jeden b³±d, Feniks. ATB to nie turówka, ale FAZÓWKA.Tury mog± tu byæ, ale licz± siê tylko te, w których przynajmniej jeden uczestnik walki wykona³ ruch. System jest o tyle przekombinowany, ¿e paski mo¿na sobie samemu zrobiæ. Je¶li chcesz dowodu, odsy³am do "Miasteczko Nowoczesne 4 i Miasteczko Nowoczesne 4-2" w dziale "Zapowiedzi i dema" kategorii "RPG Maker XP". Potwierdzam. Skrypt na paski sam u³o¿y³em.
________________________
Ryzykuj±c, ¿e zrobisz super gniota, mo¿esz zrobiæ super hit lub super gniota.
 
 
 
Wy¶wietl posty z ostatnich:   
Odpowiedz do tematu
Nie mo¿esz pisaæ nowych tematów
Nie mo¿esz odpowiadaæ w tematach
Nie mo¿esz zmieniaæ swoich postów
Nie mo¿esz usuwaæ swoich postów
Nie mo¿esz g³osowaæ w ankietach
Nie mo¿esz za³±czaæ plików na tym forum
Mo¿esz ¶ci±gaæ za³±czniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene