(aja die Frage: in zeile 20 ist ein Fehler)
Also ich hab hier mal ne Frage zu einem Script:
#==============================================================================
# New_Battle
# Compiled By : MakirouAru for RPG Maker XP : Postality Knights Edition
#==============================================================================
#
# 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
if recovery_rate != 0 and not actor.dead?
$game_party.actors.each do |actor|
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
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
battle_end_recovery
battle_end_recovery_original_start_phase5
end
end
$data_system_level_up_se = ""
$data_system_level_up_me = "Audio/ME/007-Fanfare01"
#==============================================================================
# Window_LevelUpWindow
#==============================================================================
class Window_LevelUpWindow < Window_Base
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
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 = $defaultfonttype
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
attr_accessor :level_up_flags # LEVEL UP!•\Ž¦
end
#==============================================================================
# �¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
attr_accessor :exp_gain_ban
#--------------------------------------------------------------------------
alias xrxs_bp10_initialize initialize
def initialize
@exp_gain_ban = false
xrxs_bp10_initialize
end
#--------------------------------------------------------------------------
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
@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
$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
end until @active_battler.inputable?
@cp_thread.stop
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
if Input.trigger?(Input::C)
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Æ'“%
Also ich hab hier mal ne Frage zu einem Script:
#==============================================================================
# New_Battle
# Compiled By : MakirouAru for RPG Maker XP : Postality Knights Edition
#==============================================================================
#
# 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
if recovery_rate != 0 and not actor.dead?
$game_party.actors.each do |actor|
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
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
battle_end_recovery
battle_end_recovery_original_start_phase5
end
end
$data_system_level_up_se = ""
$data_system_level_up_me = "Audio/ME/007-Fanfare01"
#==============================================================================
# Window_LevelUpWindow
#==============================================================================
class Window_LevelUpWindow < Window_Base
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
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 = $defaultfonttype
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
attr_accessor :level_up_flags # LEVEL UP!•\Ž¦
end
#==============================================================================
# �¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
attr_accessor :exp_gain_ban
#--------------------------------------------------------------------------
alias xrxs_bp10_initialize initialize
def initialize
@exp_gain_ban = false
xrxs_bp10_initialize
end
#--------------------------------------------------------------------------
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
@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
$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
end until @active_battler.inputable?
@cp_thread.stop
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
if Input.trigger?(Input::C)
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Æ'“%
-,- Na toll... schreibst hier nen Ellenlangen Text und dann steht da auf einmal "Habs schon raus"! ......u_u
Nimm doch das nächste mal die Script-Funktion, ja...?
Die ist ja schließlich für sowas gedacht - dann muss man sich keine kaputten Foren-Designs und Zeilenzählen antun. XD
(Wie das funktioniert müsste in der Hilfe stehen)
Die ist ja schließlich für sowas gedacht - dann muss man sich keine kaputten Foren-Designs und Zeilenzählen antun. XD
(Wie das funktioniert müsste in der Hilfe stehen)
Logge dich ein um einen Beitrag zu schreiben.