ATB sur RPG XP, problême avec le script
J'ai mis un script de ATB battle qui doit marcher sur XP, mais il ne marche pas... quelqu'un peut me dire où est le problême? Il est censé marcher
voici le script
Citation
PS : Arf, des smileys s'invitent
voici le script
Citation
#==============================================================================
# ¦ 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/~fukuyama/rgss/Battle_End_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
#--------------------------------------------------------------------------
# ÂÅ“ ’ljÁÂEÅ’öÅ JÆ’Cƒ“ƒXÆ’^ƒ“ƒX•ÏÂâ€
#--------------------------------------------------------------------------
attr_accessor :level_up_flags # LEVEL UP!•\Ž¦
end
#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# ÂÅ“ ’ljÁÂ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.exp_gain_ban = true
end
xrxs_bp10_start_phase5
# EXP Å l“¾â€¹ÖŽ~‚̉ðÂÅ“
for i in 0...$game_party.actors.size
$game_party.actors.exp_gain_ban = false
end
# EXP‚ð‰Šú‰»
@exp_gained = 0
for enemy in $game_troop.enemies
# Å l“¾ EXP‚ð’ljÁ # Æ’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.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.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.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
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 ‚ɒljÁ
for enemy in $game_troop.enemies
@count_battlers.push(enemy)
end
# Æ’AÆ’NÆ’^Â[‚ðâ€z—ñ @count_battlers ‚ɒljÁ
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
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
# Âʼn‚ÌÆ’AÆ’NÆ’^Â[‚ÌÂê‡
if @actor_index == 0
# Âʼn‚Ö–ß‚é
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
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
# •Žš‚ʼne•`‰æ
self.contents.font.color = Color.new(0, 0, 0)
self.contents.draw_text(x + 2, y + 2, width, height, string, align)
# Å’³â€šÌÂF‚É–ß‚µâ€šÄ•`‰æ
self.contents.font.color = color
self.contents.draw_text(x, y, width, height, string, align)
end
end
PS : Arf, des smileys s'invitent
- 83 lectures
sérieusement, 15 pages de code source incompréhensible, ça me fait cet effet là :berk:
D'you speak french ?
J'avais pas vu le problême d'alphabet... surtout que ça me bloque les autres evenements... quelqu'un a un script qui marche?
ah ? t'arrives à lire ça toi ? Citation
à mon avis les commentaires son écrits en japonais (principalement des katakanas) encodés en utf-7 (ou un truc ressemblant)
désolé mais je refuse de lire un code source dont je ne comprends pas les commentaires
Oui mais ils ne soit pas la cause du fait que le script fait bugeur des trucs, si?
Non puisque c'est en commentaire.
pour ceux que ça intéresse, c'est quand un script est analysé comme étant encodé en iso-8859-1 alors qu'en réalité c'est de l'utf-8, du coup si une ligne de commentaire se termine par exemple par un caractère accentué, il "mange" le saut de ligne, et ça fout le bordel (mais ça ne semble pas être le cas ici)
et ça marche maintenant ?
bon ben ravi d'avoir pu t'aider :lol:
Ajouter un commentaire