Day.png);">
Apprendre


Vous κtes
nouveau sur
Oniromancie?

Visite guidιe
du site


Dιcouvrir
RPG Maker

RM 95
RM 2000/2003
RM XP
RM VX/VX Ace
RM MV/MZ

Apprendre
RPG Maker

Tutoriels
Guides
Making-of

Dans le
Forum

Section Entraide

Sorties: "Dread Mac Farlane", (...) / Tutos: Checklist de la composition (...) / Sorties: Dread Mac Farlane - episode 8 / Sorties: Dread Mac Farlane - episode 7 / Jeux: Ce qui vit Dessous / Chat

Bienvenue
visiteur !




publicitι RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions lιgales

597 connectιs actuellement

29440390 visiteurs
depuis l'ouverture

6468 visiteurs
aujourd'hui



Barre de sιparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

Planθte Glutko

Offgame

Le Comptoir Du clickeur

Lumen

Tous nos partenaires

Devenir
partenaire



Jeux: Ce qui vit Dessous

Script pour RPG Maker IMAGE
Signaler un script cassι

❤ 0






Lorcio - postι le 28/08/2008 ΰ 16:45:48 (0 messages postιs)

❤ 0

erreur 523

if actor.cp == nil :hum


un anonyme qui s'appelle nonyme (visiteur non enregistrι) - postι le 21/09/2008 ΰ 18:34:27

❤ 0

C'est aberrant tous ces scripts qui ne marche pas^^
Tenez, voici le mien, il n'a jamais eu de problème jusqu'a présent, faîtes en bon usage^^

#Active Time Battle

#==============================================================================
# ¦ 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
# Å‰‚̃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
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


Kanton-Cherchontrouv - postι le 04/10/2008 ΰ 18:09:52 (155 messages postιs)

❤ 0

[...] Chargin mah lazor WHA

:'( il marche pas non plus

♪ZBOOB♫


Nono II (visiteur non enregistrι) - postι le 02/11/2008 ΰ 09:24:19

❤ 0

Essaye celuil-à. C'est la modif' du premier, celui qui faisait planter le 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
#==============================================================================
# �¡ 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
# �¥�£�¥ 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‚Ì•`ŽÊ
actor = $game_party.actors
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


Gaetric - postι le 05/11/2008 ΰ 17:34:09 (4 messages postιs)

❤ 0

J'en ai un qui marche !
mais il est en 3 parties :hihi
1 : Créer un script au dessus de main et appelez comme vous le voulez,puis copiez/collez ce script.

#==============================================================================
# ■ Action Battle System
#------------------------------------------------------------------------------
#  By: Near Fantastica
# Date: 07/2/05
# Version 2
#
# A key – X input – Skill Hot Key 1
# S key – Y input – Skill Hot Key 2
# D key – Z input – Skill Hot Key 3
# Q key – L input – Attacking
# W key –R input – Defending
#
# The Skill Hot Keys can be changed in the Skill Menu by cursering over to the
# skill you want and pressing the hot key you want to set that skill too ~!
#
# Thanks to Harosata, Akura, Hazarim, Deke, Arcaine and
# Thanks to everyone for testing and for your input
#==============================================================================

class Action_Battle_System
#--------------------------------------------------------------------------
# ● Open instance variable
#--------------------------------------------------------------------------
attr_accessor :active_actor
attr_accessor :display
attr_accessor :player_defending
attr_accessor :skill_hot_key
attr_accessor :dash_level
#--------------------------------------------------------------------------
# ● Initialization
#--------------------------------------------------------------------------
def initialize
@event_counter = 0
@display = Sprite.new
@display.bitmap = Bitmap.new(88, 48)
@clear_counter = 0
@active_actor = 0
@player_defending = false
@restore = false
@reduce= false
@timer = 0
@dash_level = 5
@sec = 0
@skill_hot_key = {}
@skill_hot_key[1] = 0
@skill_hot_key[2] = 0
@skill_hot_key[3] = 0
@enemy_id = {}
@enemy_name = {}
@enemy_hp = {}
@enemy_sp = {}
@enemy_str = {}
@enemy_dex = {}
@enemy_agi = {}
@enemy_int = {}
@enemy_atk = {}
@enemy_pdef = {}
@enemy_mdef = {}
@enemy_eva = {}
@enemy_animation1_id = {}
@enemy_animation2_id = {}
@enemy_exp = {}
@enemy_gold = {}
@enemy_item_id = {}
@enemy_weapon_id = {}
@enemy_armor_id = {}
@enemy_treasure_prob = {}
@enemy_engagement = {}
@enemy_movment = {}
@enemy_frequency = {}
@enemy_speed = {}
@enemy_defending = {}
@enemy_dex_loop = {}
end
#--------------------------------------------------------------------------
# ● Enemy Setup
#--------------------------------------------------------------------------
def enemy_setup
# Setup Event Max
@event_counter = 0
for i in 1..999
if $game_map.map.events.id > @event_counter
@event_counter = $game_map.map.events.id
end
end
# Setup Event
for i in 1..@event_counter #$game_map.map.events.size
# Set the event to nill setting
@enemy_id = 0
for x in 1..$data_enemies.size - 1
if $game_map.map.events == nil
next i
end
if $game_map.map.events.name == $data_enemies[x].name
# Event is an Enemy Setup Emeny
@enemy_id = $data_enemies[x].id
@enemy_name = $data_enemies[x].name
@enemy_hp = $data_enemies[x].maxhp
@enemy_sp = $data_enemies[x].maxsp
@enemy_str = $data_enemies[x].str
@enemy_dex = $data_enemies[x].dex
@enemy_agi = $data_enemies[x].agi
@enemy_int = $data_enemies[x].int
@enemy_atk = $data_enemies[x].atk
@enemy_pdef = $data_enemies[x].pdef
@enemy_mdef = $data_enemies[x].mdef
@enemy_eva = $data_enemies[x].eva
@enemy_animation1_id = $data_enemies[x].animation1_id
@enemy_animation2_id = $data_enemies[x].animation2_id
@enemy_exp = $data_enemies[x].exp
@enemy_gold = $data_enemies[x].gold
@enemy_item_id = $data_enemies[x].item_id
@enemy_weapon_id = $data_enemies[x].weapon_id
@enemy_armor_id = $data_enemies[x].armor_id
@enemy_treasure_prob = $data_enemies[x].treasure_prob
@enemy_states = []
@enemy_engagement = false
@enemy_movment = 0
@enemy_frequency = 0
@enemy_speed = 0
@enemy_defending = false
@enemy_dex_loop = 0
end
end
end
end
#--------------------------------------------------------------------------
# ● Update Dash
#--------------------------------------------------------------------------
def update_dash
# check if sheild is active
if @player_defending == true
$game_player.move_speed = 3
return
end
# check is Dash Mode Active
if Input.press?(Input::A)
if $game_player.moving?
# If A Key press enter dash mode
# reduce dash level
$game_player.move_speed=5
@restore = false
if @reduce == false
@timer = 50 # Initial time off set
@reduce = true
else
@timer-= 1
end
@sec = (@timer / Graphics.frame_rate)%60
if @sec == 0
if @dash_level != 0
@dash_level -= 1
@timer = 50 # Timer Count
end
end
if @dash_level == 0
$game_player.move_speed=4
end
end
else
# restore dash level
$game_player.move_speed=4
@reduce = false
if @restore == false
@timer = 80 # Initial time off set
@restore = true
else
@timer-= 1
end
@sec = (@timer / Graphics.frame_rate)%60
if @sec == 0
if @dash_level != 5
@dash_level+= 1
@timer = 60 # Timer Count
end
end
end
end
#--------------------------------------------------------------------------
# ● Clear Display
#--------------------------------------------------------------------------
def clear_display
@clear_counter += 1
if @clear_counter == 50
@clear_counter = 0
@display.bitmap.clear
end
end
#--------------------------------------------------------------------------
# ● Update
#--------------------------------------------------------------------------
def update
update_dash
clear_display
for i in 1..@event_counter
# Check if Event is an Enemy
if @enemy_id == 0
next
else
# Enemy Engaged
if @enemy_engagement == true
# Check Range
if in_range?(i,5)
# Update Battle
if in_range?(i,1)
event_melee_attack(i)
else
event_skill_attack(i)
end
next
else
@enemy_engagement = false
# Change Movement
$game_map.events.move_type = @enemy_movment
$game_map.events.move_frequency = @enemy_frequency
$game_map.events.move_speed = @enemy_speed
next
end
end
# Check Range
if in_range?(i,5)
# Check Event Direction
if facing_player?(i)
# Set Enemy Engaged
@enemy_engagement = true
# Change Movement
@enemy_movment = $game_map.events.move_type
$game_map.events.move_type = 2
@enemy_frequency = $game_map.events.move_frequency
$game_map.events.move_frequency = 5
@enemy_speed = $game_map.events.move_speed
$game_map.events.move_speed = 4
# Update Battle
if in_range?(i,1)
event_melee_attack(i)
else
event_skill_attack(i)
end
end
end
end
end
end
#--------------------------------------------------------------------------
# ● Check If Event Is In Range
#--------------------------------------------------------------------------
def in_range?(event_index, range)
playerx = $game_player.x
playery = $game_player.y
eventx = $game_map.events[event_index].x
eventy = $game_map.events[event_index].y
# Determine x and y of circle
x = (playerx - eventx) * (playerx - eventx)
y = (playery - eventy) * (playery - eventy)
# Determine raduis
r = x +y
if r <= (range * range)
return true
else
return false
end
end
#--------------------------------------------------------------------------
# ● Check If Event Is Facing Player
#--------------------------------------------------------------------------
def facing_player?(event_index)
playerx = $game_player.x
playery = $game_player.y
eventx = $game_map.events[event_index].x
eventy = $game_map.events[event_index].y
event_direction = $game_map.events[event_index].direction
# Check down
if event_direction == 2
if playery >= eventy
return true
end
end
# Check Left
if event_direction == 4
if playerx <= eventx
return true
end
end
# Check Right
if event_direction == 6
if playerx >= eventx
return true
end
end
# Check Up
if event_direction == 8
if playery <= eventy
return true
end
end
return false
end
#--------------------------------------------------------------------------
# ● Check Event Attack Condisions
# NOTE : there is no turns in the ABS therfore there is no turn percondition
#--------------------------------------------------------------------------
def event_melee_preconditions(event_index)
if @enemy_dex_loop[event_index] >= @enemy_dex[event_index] * 20
@enemy_dex_loop[event_index] = 0
for i in 0..$data_enemies[@enemy_id[event_index]].actions.size - 1
if $data_enemies[@enemy_id[event_index]].actions.kind == 0
actions = $data_enemies[@enemy_id[event_index]].actions
# Check Hp Level condition
if @enemy_hp[event_index] * 100.0 / $data_enemies[@enemy_id[event_index]].maxhp > actions.condition_hp
next
end
# Check Max Level condition
if $game_party.max_level < actions.condition_level
next
end
# Check switch condition
switch_id = actions.condition_switch_id
if actions.condition_switch_id > 0 and $game_switches[switch_id] == false
next
end
# Check Rank to see if it is larger then the dice roll
n = rand(10)
if actions.rating < n
next
end
# Return Action
case actions.basic
when 0
return 0
when 1
return 1
when 2
return 2
when 3
return 3
end
end
end
# No action taken
return 3
else
# add to the dex loop
@enemy_dex_loop[event_index] += @enemy_dex[event_index]
return 3
end
end
#--------------------------------------------------------------------------
# ● Check Event Attack Condisions
# NOTE : there is no turns in the ABS therfore there is no turn percondition
#--------------------------------------------------------------------------
def event_skill_preconditions(event_index)
if @enemy_dex_loop[event_index] >= @enemy_dex[event_index] * 100
@enemy_dex_loop[event_index] = 0
for i in 0..$data_enemies[@enemy_id[event_index]].actions.size - 1
if $data_enemies[@enemy_id[event_index]].actions.kind == 1
actions = $data_enemies[@enemy_id[event_index]].actions
# Check Hp Level condition
if @enemy_hp[event_index] * 100.0 / $data_enemies[@enemy_id[event_index]].maxhp > actions.condition_hp
return 0
end
# Check Max Level condition
if $game_party.max_level < actions.condition_level
return 0
end
# Check switch condition
switch_id = action.condition_switch_id
if actions.condition_switch_id > 0 and $game_switches[switch_id] == false
return 0
end
return actions.skill_id
end
end
return 0
else
# add to the dex loop
@enemy_dex_loop[event_index] += @enemy_dex[event_index]
return 0
end
end
#--------------------------------------------------------------------------
# ● Calculation of attribute correction
# element_set : Attribute
#--------------------------------------------------------------------------
def player_elements_correct(element_set)
# In case of non attribute
if element_set == []
# return 100
return 100
end
# The weakest one is returned in the attribute which is given * method element_rate
# is defined in Game_Actor and the Game_Enemy class which are succeeded from this class
weakest = -100
for i in element_set
weakest = [weakest, $game_party.actors[@active_actor].element_rate(i)].max
end
return weakest
end
#--------------------------------------------------------------------------
# ● Event Melee Attack
#--------------------------------------------------------------------------
def event_melee_attack(event_index)
kind = event_melee_preconditions(event_index)
case kind
when 0 # Enemy Attacking
@enemy_defending[event_index] = false
# First on-target hit decision
hit_rate = 100
for i in @enemy_states
hit_rate *= $data_states.hit_rate / 100.0
end
hit_result = (rand(100) < hit_rate)
# In case of on-target hit
if hit_result == true
# Calculating the basic damage
atk = [@enemy_atk[event_index] - $game_party.actors[@active_actor].pdef / 2, 0].max
damage = atk * (20 + @enemy_str[event_index] ) / 20
# Attribute correction
damage *= player_elements_correct([])
damage /= 100
# When the mark of the damage is correct
if damage > 0
# Critical correction
if rand(100) < 4 * @enemy_dex[event_index] / $game_party.actors[@active_actor].agi
damage *= 2
end
# Defense correction
if @player_defending == true
damage /= 2
end
end
# Dispersion
if damage.abs > 0
amp = [damage.abs * 15 / 100, 1].max
damage += rand(amp+1) + rand(amp+1) - amp
end
# Second on-target hit decision
eva = 8 * $game_party.actors[@active_actor].agi / @enemy_dex[event_index] + $game_party.actors[@active_actor].eva
hit = damage < 0 ? 100 : 100 - eva
# Check evade
cant_evade = false
for i in $game_party.actors[@active_actor].states
if $data_states.cant_evade
cant_evade = true
end
end
hit = cant_evade ? 100 : hit
hit_result = (rand(100) < hit)
end
# In case of on-target hit
if hit_result == true
# State shocking cancellation
# Note : I still can not get the states effects to work correctly
# remove_states_shock
# From HP damage subtraction
damage = damage.abs
$game_party.actors[@active_actor].hp -= damage
hit_player(damage, @enemy_animation2_id[event_index])
if $game_party.actors[@active_actor].hp <= 0
player_dead
end
# State change
# Note : I still can not get the states effects to work correctly
# states_plus(@enemy_states)
# states_minus(@enemy_states)
end
when 1 # Enemy Defening
if @enemy_defending[event_index] != true
@enemy_defending[event_index] = true
$game_map.events[event_index].move_speed = $game_map.events[event_index].move_speed - 1
end
when 2 # Enemy Escaping
# Note : Could Add a Teleport Event to make the Event jump far away from player
when 3 # No Action Taken
end
end
#--------------------------------------------------------------------------
# ● Event Skill Attack
#--------------------------------------------------------------------------
def event_skill_attack(event_index)
# Check Percondisions of the Enemy
skill_id = event_skill_preconditions(event_index)
# If Condisions not meet
if skill_id == 0
return
end
skill = $data_skills[skill_id]
# Check Sp Cost
if skill.sp_cost > @enemy_sp[event_index]
return
end
@enemy_sp[event_index] -= skill.sp_cost
# When the effective range of skill with friend of HP 1 or more, your own HP 0,
# or the effective range of skill with the friend of HP 0, your own HP are 1 or more,
if ((skill.scope == 3 or skill.scope == 4) and @enemy_hp == 0) or
((skill.scope == 5 or skill.scope == 6) and @enemy_hp >= 1)
# メソッド終了
return
end
# Clearing the effective flag
effective = false
# When common event ID is effective, setting the effective flag
effective |= skill.common_event_id > 0
# First on-target hit decision
skill_hit = 100
for i in @enemy_states
skill_hit *= $data_states.hit_rate / 100.0
end
user_hit = 100
for i in @enemy_states
user_hit *= $data_states.hit_rate / 100.0
end
hit = skill_hit
if skill.atk_f > 0
hit *= user_hit / 100
end
hit_result = (rand(100) < hit)
# In case of uncertain skill setting the effective flag
effective |= hit < 100
# In case of on-target hit
if hit_result == true
# Calculating power
power = skill.power + @enemy_atk[event_index] * skill.atk_f / 100
if power > 0
power -= $game_party.actors[@active_actor].pdef * skill.pdef_f / 200
power -= $game_party.actors[@active_actor].mdef * skill.mdef_f / 200
power = [power, 0].max
end
# Calculating magnification ratio
rate = 20
rate += (@enemy_str[event_index] * skill.str_f / 100)
rate += (@enemy_dex[event_index] * skill.dex_f / 100)
rate += (@enemy_agi[event_index] * skill.agi_f / 100)
rate += (@enemy_int[event_index] * skill.int_f / 100)
# Calculating the basic damage
damage = power * rate / 20
# Attribute correction
damage *= player_elements_correct(skill.element_set)
damage /= 100
# When the mark of the damage is correct,
if damage > 0
# Defense correction
if @player_defending == true
damage /= 2
end
end
# Dispersion
if skill.variance > 0 and damage.abs > 0
amp = [damage.abs * skill.variance / 100, 1].max
damage += rand(amp+1) + rand(amp+1) - amp
end
# Second on-target hit decision
eva = 8 * $game_party.actors[@active_actor].agi / @enemy_dex[event_index] + $game_party.actors[@active_actor].eva
hit = damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
cant_evade = false
for i in $game_party.actors[@active_actor].states
if $data_states.cant_evade
cant_evade = true
end
end
hit = cant_evade ? 100 : hit
hit_result = (rand(100) < hit)
# In case of uncertain skill setting the effective flag
effective |= hit < 100
end
# In case of on-target hit
if hit_result == true
# In case of physical attack other than power 0
if skill.power != 0 and skill.atk_f > 0
# State shocking cancellation
# Note : I still can not get the states effects to work correctly
# remove_states_shock
# Setting the effective flag
effective = true
end
# From HP damage subtraction
last_hp = $game_party.actors[@active_actor].hp
$game_party.actors[@active_actor].hp -= damage
effective |= $game_party.actors[@active_actor].hp != last_hp
# State change
# Note : I still can not get the states effects to work correctly
# effective |= states_plus(skill.plus_state_set)
# effective |= states_minus(skill.minus_state_set)
if skill.power == 0 # When power is 0
# Set Damage to Zero
damage = 0
end
hit_player(damage, skill.animation2_id)
if $game_party.actors[@active_actor].hp <= 0
player_dead
end
end
end
#--------------------------------------------------------------------------
# ● Display Hit Animation
#--------------------------------------------------------------------------
def player_dead
if $game_party.all_dead?
$game_temp.gameover = true
end
$scene = Scene_Menu.new
end
#--------------------------------------------------------------------------
# ● Display Hit Animation
#--------------------------------------------------------------------------
def hit_player(damage, animation_id)
if damage != 0
$game_player.jump(0, 0)
$game_player.animation_id = animation_id
@display.bitmap.clear
@clear_counter = 0
@display.bitmap.font.name = $defaultfonttype # Unknown At This Time
@display.bitmap.font.size = 32
@display.x = ($game_player.real_x - $game_map.display_x) / 4
@display.y = ($game_player.real_y - $game_map.display_y) / 4
@display.z = 500
@display.bitmap.font.color.set(255, 0, 0)
@display.bitmap.draw_text(@display.bitmap.rect, damage.to_s, 1)
end
end
#--------------------------------------------------------------------------
# ● Calculation of attribute correction
# element_set : Attribute
#--------------------------------------------------------------------------
def event_elements_correct(element_set, event_index)
# In case of non attribute
if element_set == []
# return 100
return 100
end
# The weakest one is returned in the attribute which is given * method element_rate
# is defined in Game_Actor and the Game_Enemy class which are succeeded from this class
weakest = -100
for i in element_set
# Note: I still can not get the states effects to work correctly
weakest = [weakest, $data_enemies[@enemy_id[event_index]].element_rate(i)].max
end
return weakest
end
#--------------------------------------------------------------------------
# ● Player Melee Attack Preconditions
#--------------------------------------------------------------------------
def player_melee_preconditions
for i in 1..@event_counter
# Check if Event is an Enemy
if @enemy_id == 0
next
end
if in_range?(i,1)
player_melee_attack(i)
next
end
end
end
#--------------------------------------------------------------------------
# ● Event Melee Attack
#--------------------------------------------------------------------------
def player_melee_attack(event_index)
# First on-target hit decision
hit_rate = 100
for i in $game_party.actors[@active_actor].states
hit_rate *= $data_states.hit_rate / 100.0
end
hit_result = (rand(100) < hit_rate)
# In case of on-target hit
if hit_result == true
# Calculating the basic damage
atk = [$game_party.actors[@active_actor].atk - @enemy_pdef[event_index] / 2, 0].max
damage = atk * (20 + $game_party.actors[@active_actor].str) / 20
# Attribute correction
damage *= 100 #event_elements_correct($game_party.actors[@active_actor].element_set, event_index)
damage /= 100
# When the mark of the damage is correct
if damage > 0
# Critical correction
if rand(100) < 4 * $game_party.actors[@active_actor].dex / @enemy_agi[event_index]
damage *= 2
end
# Defense correction
if @enemy_defending== true
damage /= 2
end
end
# Dispersion
if damage.abs > 0
amp = [damage.abs * 15 / 100, 1].max
damage += rand(amp+1) + rand(amp+1) - amp
end
# Second on-target hit decision
eva = 8 * @enemy_agi[event_index] / $game_party.actors[@active_actor].dex + @enemy_eva[event_index]
hit = damage < 0 ? 100 : 100 - eva
# Check evade
cant_evade = false
for i in @enemy_states
if $data_states.cant_evade
cant_evade = true
end
end
hit = cant_evade ? 100 : hit
hit_result = (rand(100) < hit)
end
# In case of on-target hit
if hit_result == true
# State shocking cancellation
# Note : I still can not get the states effects to work correctly
# remove_states_shock
# From HP damage subtraction
damage = damage.abs
@enemy_hp[event_index] -= damage
# State change
# Note : I still can not get the states effects to work correctly
# states_plus($game_party.actors[@active_actor].states)
# states_minus($game_party.actors[@active_actor].states)
hit_event(event_index,damage, $game_party.actors[@active_actor].animation2_id)
if @enemy_hp[event_index] <= 0
battle_spoils(event_index)
end
end
end
#--------------------------------------------------------------------------
# ● Player Skill Attack Preconditions
#--------------------------------------------------------------------------
def player_skill_preconditions(index)
if$game_party.actors[@active_actor].skill_learn?(@skill_hot_key[index])
# Set Skill
skill = $data_skills[@skill_hot_key[index]]
# Check Sp Cost
if skill.sp_cost > $game_party.actors[@active_actor].sp
return
end
# Set Sp
$game_party.actors[@active_actor].sp -= skill.sp_cost
# Check Skills Scope
case skill.scope
when 1 # One Enemy
for i in 1..@event_counter
# Check if Event is an Enemy
if @enemy_id == 0
next
else
case $data_classes[$game_party.actors[@active_actor].class_id].position
when 0
if in_range?(i,1)
player_skill_attack(skill, i)
return
end
when 1
if in_range?(i,2)
player_skill_attack(skill, i)
return
end
when 2
if in_range?(i,5)
player_skill_attack(skill, i)
return
end
end
end
end
when 2 # All Emenies
for i in 1..@event_counter
# Check if Event is an Enemy
if @enemy_id == 0
next
else
case $data_classes[$game_party.actors[@active_actor].class_id].position
when 0
if in_range?(i,1)
player_skill_attack(skill, i)
return
end
when 1
if in_range?(i,2)
player_skill_attack(skill, i)
return
end
when 2
if in_range?(i,5)
player_skill_attack(skill, i)
return
end
end
end
end
when 3 # One Ally
# Note : I still can not get the states effects to work correctly and therefore
# can not scrïpt this but these skill can skill be actived from the Main Menu
when 4 # All Allies
# Note : I still can not get the states effects to work correctly and therefore
# can not scrïpt this but these skill can skill be actived from the Main Menu
end
else
return
end
end
#--------------------------------------------------------------------------
# ● Player Skill Attack
#--------------------------------------------------------------------------
def player_skill_attack(skill, event_index)
# When the effective range of skill with friend of HP 1 or more, your own HP 0,
# or the effective range of skill with the friend of HP 0, your own HP are 1 or more,
if ((skill.scope == 3 or skill.scope == 4) and @enemy_hp == 0) or
((skill.scope == 5 or skill.scope == 6) and @enemy_hp >= 1)
return
end
# Clearing the effective flag
effective = false
# When common event ID is effective, setting the effective flag
effective |= skill.common_event_id > 0
# First on-target hit decision
skill_hit = 100
for i in $game_party.actors[@active_actor].states
skill_hit *= $data_states.hit_rate / 100.0
end
user_hit = 100
for i in $game_party.actors[@active_actor].states
user_hit *= $data_states.hit_rate / 100.0
end
hit = skill_hit
if skill.atk_f > 0
hit *= user_hit / 100
end
hit_result = (rand(100) < hit)
# In case of uncertain skill setting the effective flag
effective |= hit < 100
# In case of on-target hit
if hit_result == true
# Calculating power
power = skill.power + $game_party.actors[@active_actor].atk * skill.atk_f / 100
if power > 0
power -= @enemy_pdef[event_index] * skill.pdef_f / 200
power -= @enemy_mdef[event_index] * skill.mdef_f / 200
power = [power, 0].max
end
# Calculating magnification ratio
rate = 20
rate += ($game_party.actors[@active_actor].str * skill.str_f / 100)
rate += ($game_party.actors[@active_actor].dex * skill.dex_f / 100)
rate += ($game_party.actors[@active_actor].agi * skill.agi_f / 100)
rate += ($game_party.actors[@active_actor].int * skill.int_f / 100)
# Calculating the basic damage
damage = power * rate / 20
# Attribute correction
damage *= 100 #event_elements_correct(skill.element_set, event_index)
damage /= 100
# When the mark of the damage is correct,
if damage > 0
# Defense correction
if @enemy_defending == true
damage /= 2
end
end
# Dispersion
if skill.variance > 0 and damage.abs > 0
amp = [damage.abs * skill.variance / 100, 1].max
damage += rand(amp+1) + rand(amp+1) - amp
end
# Second on-target hit decision
eva = 8 * @enemy_agi[event_index] / $game_party.actors[@active_actor].dex + @enemy_eva[event_index]
hit = damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
cant_evade = false
for i in @enemy_states
if $data_states.cant_evade
cant_evade = true
end
end
hit = cant_evade ? 100 : hit
hit_result = (rand(100) < hit)
# In case of uncertain skill setting the effective flag
effective |= hit < 100
end
# In case of on-target hit
if hit_result == true
# In case of physical attack other than power 0
if skill.power != 0 and skill.atk_f > 0
# State shocking cancellation
# Note : I still can not get the states effects to work correctly
# remove_states_shock
# Setting the effective flag
effective = true
end
# From HP damage subtraction
last_hp = @enemy_hp[event_index]
@enemy_hp[event_index] -= damage
effective |= @enemy_hp[event_index] != last_hp
# State change
# Note : I still can not get the states effects to work correctly
# effective |= states_plus(skill.plus_state_set)
# effective |= states_minus(skill.minus_state_set)
if skill.power == 0 # When power is 0
# Set Damage to Zero
damage = 0
end
hit_event(event_index, damage, skill.animation2_id)
if @enemy_hp[event_index] <= 0
battle_spoils(event_index)
end
return
end
end
#--------------------------------------------------------------------------
# ● Display Hit Animation
#--------------------------------------------------------------------------
def hit_event(event_index, damage, animation_id)
if damage != 0
$game_map.events[event_index].jump(0, 0)
$game_map.events[event_index].animation_id = animation_id
@display.bitmap.clear
@clear_counter = 0
@display.bitmap.font.name = $defaultfonttype # Unknown At This Time
@display.bitmap.font.size = 32
@display.x = ($game_map.events[event_index].real_x - $game_map.display_x) / 4
@display.y = ($game_map.events[event_index].real_y - $game_map.display_y) / 4
@display.z = 500
@display.bitmap.font.color.set(255, 0, 0)
@display.bitmap.draw_text(@display.bitmap.rect, damage.to_s, 1)
end
end
#--------------------------------------------------------------------------
# ● Spoils of Battle
#--------------------------------------------------------------------------
def battle_spoils(event_index)
$game_map.map.events[event_index].name = "Dead"
@enemy_id[event_index] = 0
$game_map.events[event_index].erase
treasures = []
if rand(100) < @enemy_treasure_prob[event_index]
if @enemy_item_id[event_index] > 0
treasures.push($data_items[@enemy_item_id[event_index]])
end
if @enemy_weapon_id[event_index]> 0
treasures.push($data_weapons[@enemy_weapon_id[event_index]])
end
if @enemy_armor_id[event_index] > 0
treasures.push($data_armors[@enemy_armor_id[event_index]])
end
end
# トレジャーの数を 6 個までに限定
treasures = treasures[0..5]
# EXP 獲得
for i in 0...$game_party.actors.size
actor = $game_party.actors
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp += @enemy_exp[event_index]
end
end
# ゴールド獲得
$game_party.gain_gold(@enemy_gold[event_index] )
# トレジャー獲得
for item in treasures
case item
when RPG::Item
$game_party.gain_item(item.id, 1)
when RPG::Weapon
$game_party.gain_weapon(item.id, 1)
when RPG::Armor
$game_party.gain_armor(item.id, 1)
end
end
end
end








2 faites pareil qu'avant (dans un autre script)

#==============================================================================
# ■ Scene_Map
#------------------------------------------------------------------------------
#  It is the class which processes the title picture
#==============================================================================

class Scene_Map
#--------------------------------------------------------------------------
# ● Refer setup to Scene Map
#--------------------------------------------------------------------------
alias scene_map_main main
alias scene_map_update update
#--------------------------------------------------------------------------
# ● Refers to Main
#--------------------------------------------------------------------------
def main
@on_map_diplay = Window_Mapstats.new
$ABS.display = Sprite.new
$ABS.display.bitmap = Bitmap.new(88, 48)
scene_map_main
$ABS.display.dispose
@on_map_diplay.dispose
end
#--------------------------------------------------------------------------
# ● Refers to Update
#--------------------------------------------------------------------------
def update
@on_map_diplay.update
$ABS.update
if Input.trigger?(Input::L)
# Player Attack
if $ABS.player_defending == false
$ABS.player_melee_preconditions
end
end
if Input.press?(Input::R)
# Player Shield Active
$ABS.player_defending= true
else
# Player Sheild Disactive
$ABS.player_defending = false
end
if Input.trigger?(Input::X)
# Player Skill Hot Key 1
$ABS.player_skill_preconditions(1)
end
if Input.trigger?(Input::Y)
# Player Skill Hot Key 2
$ABS.player_skill_preconditions(2)
end
if Input.trigger?(Input::Z)
# Player Skill Hot Key 3
$ABS.player_skill_preconditions(3)
end
scene_map_update
end
end


#==============================================================================
# Window_Base
#------------------------------------------------------------------------------
# Adds Draw line function, Draw Hp, Draw Sp, Draw Exp,
# Adds Draw Actors Battler, Refines Draw Text Actors Level
#==============================================================================

class Window_Base < Window
#--------------------------------------------------------------------------
# ● The drawing of HP
# actor : actor
# x : Ahead drawing X coordinate
# y : Ahead drawing Y-coordinate
# width : Width ahead drawing
#--------------------------------------------------------------------------
def draw_actor_hp_text(actor, x, y, width = 144)
# Character string "HP" It draws
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# Calculates is a space which draws MaxHP
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
# Drawing HP
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(hp_x, y, 40, 32, actor.hp.to_s, 2)
# Drawing MaxHP
if flag
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 40, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 52, y, 48, 32, actor.maxhp.to_s)
end
end
#--------------------------------------------------------------------------
# ● The drawing of SP
# actor : actor
# x : Ahead drawing X coordinate
# y : Ahead drawing Y-coordinate
# width : Width ahead drawing
#--------------------------------------------------------------------------
def draw_actor_sp_text(actor, x, y, width = 144)
# Character string "sP" It draws
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# Calculates is a space which draws MaxSP
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end
# Drawing HP
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(sp_x, y, 40, 32, actor.sp.to_s, 2)
# Drawing MaxHP
if flag
self.contents.font.color = normal_color
self.contents.draw_text(sp_x + 40, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 52, y, 48, 32, actor.maxsp.to_s)
end
end
#--------------------------------------------------------------------------
# ● Draws Actors Hp meter
#--------------------------------------------------------------------------
def draw_actor_hp_bar(actor, x, y, width = 100, height = 10, bar_color = Color.new(255, 0, 0, 255))
self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100))
w = width * actor.hp / actor.maxhp
for i in 0..height
r = bar_color.red * (height -i)/height + 0 * i/height
g = bar_color.green * (height -i)/height + 0 * i/height
b = bar_color.blue * (height -i)/height + 0 * i/height
a = bar_color.alpha * (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# ● Draws Actors Sp meter
#--------------------------------------------------------------------------
def draw_actor_sp_bar(actor, x, y, width = 100, height = 10, bar_color = Color.new(0, 0, 255, 255))
self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100))
w = width * actor.sp / actor.maxsp
for i in 0..height
r = bar_color.red * (height -i)/height + 0 * i/height
g = bar_color.green * (height -i)/height + 0 * i/height
b = bar_color.blue * (height -i)/height + 0 * i/height
a = bar_color.alpha * (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# ● Draws Actors Exp meter
#--------------------------------------------------------------------------
def draw_actor_exp_bar(actor, x, y, width = 100, height = 10, bar_color = Color.new(255, 255, 0, 255))
self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100))
if actor.level == 99
w = 0
else
w = width * actor.exp / actor.next_exp_s.to_f
end
for i in 0..height
r = bar_color.red * (height -i)/height + 0 * i/height
g = bar_color.green * (height -i)/height + 0 * i/height
b = bar_color.blue * (height -i)/height + 0 * i/height
a = bar_color.alpha * (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# ● Draws Actors Str meter
#--------------------------------------------------------------------------
def draw_actor_str_bar(actor, i, x, y, width = 100, height = 10, bar_color = Color.new(255, 0, 0, 255))
self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100))
w = width * actor.str / 999
for i in 0..height
r = bar_color.red * (height -i)/height + 0 * i/height
g = bar_color.green * (height -i)/height + 0 * i/height
b = bar_color.blue * (height -i)/height + 0 * i/height
a = bar_color.alpha * (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# ● Draws Actors Dex meter
#--------------------------------------------------------------------------
def draw_actor_dex_bar(actor, i, x, y, width = 100, height = 10, bar_color = Color.new(0, 255, 0, 255))
self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100))
w = width * actor.dex / 999
for i in 0..height
r = bar_color.red * (height -i)/height + 0 * i/height
g = bar_color.green * (height -i)/height + 0 * i/height
b = bar_color.blue * (height -i)/height + 0 * i/height
a = bar_color.alpha * (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# ● Draws Actors Agi meter
#--------------------------------------------------------------------------
def draw_actor_agi_bar(actor, i, x, y, width = 100, height = 10, bar_color = Color.new(0, 0, 255, 255))
self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100))
w = width * actor.agi / 999
for i in 0..height
r = bar_color.red * (height -i)/height + 0 * i/height
g = bar_color.green * (height -i)/height + 0 * i/height
b = bar_color.blue * (height -i)/height + 0 * i/height
a = bar_color.alpha * (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# ● Draws Actors Int meter
#--------------------------------------------------------------------------
def draw_actor_int_bar(actor, i, x, y, width = 100, height = 10, bar_color = Color.new(180, 100, 200, 255))
self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100))
w = width * actor.int / 999
for i in 0..height
r = bar_color.red * (height -i)/height + 0 * i/height
g = bar_color.green * (height -i)/height + 0 * i/height
b = bar_color.blue * (height -i)/height + 0 * i/height
a = bar_color.alpha * (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# ● Draws Dash Power bar
#--------------------------------------------------------------------------
def draw_dash_bar(x, y, width = 50, height = 10)
self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100))
case $ABS.dash_level
when 0 .. 1
bar_color = Color.new(255, 0, 0, 255)
when 2 .. 3
bar_color = Color.new(255, 255, 0, 255)
else
bar_color = Color.new(0, 255, 0, 255)
end
w = width * $ABS.dash_level / 5
for i in 0..height
r = bar_color.red * (height -i)/height + 0 * i/height
g = bar_color.green * (height -i)/height + 0 * i/height
b = bar_color.blue * (height -i)/height + 0 * i/height
a = bar_color.alpha * (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w , 1, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# ● Draws Actors Battler
#--------------------------------------------------------------------------
def draw_actor_battler(actor, x, y)
bitmap = RPG::Cache.battler(actor.character_name, actor.character_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
end

#==============================================================================
# ■ On Map Display
#------------------------------------------------------------------------------
# Displayes curent player stats to the window
#=============================================================================

class Window_Mapstats < Window_Base
#--------------------------------------------------------------------------
# ● Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 400, 640, 80)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 20
self.back_opacity = 125
# self.opacity = 0
update
end
#--------------------------------------------------------------------------
# ● Update
#--------------------------------------------------------------------------
def refresh
self.contents.clear
actor = $game_party.actors[$ABS.active_actor]
draw_actor_graphic(actor, 10, 45) # draws the actor graphic
draw_actor_name(actor, 30, -5) #draws the actors name
draw_actor_level(actor, 30, 15) #draws the actor level
draw_actor_hp_text(actor, 110, -5) #draws the actors hp
draw_actor_hp_bar(actor, 260, 5) #draws the actors hp bar
draw_actor_sp_text(actor,110, 15) #draws the actors sp
draw_actor_sp_bar(actor, 260, 27) #draws the actors sp bar
draw_dash_bar(375, 27) #draws the dash level bar
self.contents.draw_text(377, -5, 120, 32, "Dash")
end
#--------------------------------------------------------------------------
# ● Update
#--------------------------------------------------------------------------
def update
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end

#==============================================================================
# ■ Scene_Title
#------------------------------------------------------------------------------
#  It is the class which processes the title picture
#==============================================================================

class Scene_Title
#--------------------------------------------------------------------------
# ● Refer setup to Scene Title
#--------------------------------------------------------------------------
alias scene_title_update update
#--------------------------------------------------------------------------
# ● Loads Event names
#--------------------------------------------------------------------------
def update
$ABS = Action_Battle_System.new
scene_title_update
end
end

#==============================================================================
# ■ Game_Map
#------------------------------------------------------------------------------
#  Add defenision of the names to Game Map Class
#==============================================================================

class Game_Map
#--------------------------------------------------------------------------
# ● Refer setup to Game Map
#--------------------------------------------------------------------------
attr_accessor :map
alias game_map_setup setup
#--------------------------------------------------------------------------
# ● Refers the Map Setup
#--------------------------------------------------------------------------
def setup(map_id)
game_map_setup(map_id)
$ABS.enemy_setup
end
end

#==============================================================================
# ■ Game_Character
#------------------------------------------------------------------------------
#  Add move_type to the accessor adderse
#==============================================================================

class Game_Character
#--------------------------------------------------------------------------
# ● Open instance variable
#--------------------------------------------------------------------------
attr_accessor :move_type
attr_accessor :move_speed
attr_accessor :move_frequency
attr_accessor :character_name
end

#==============================================================================
# ■ Scene_Skill
#------------------------------------------------------------------------------
#  It is the class which processes the skill picture.
#==============================================================================

class Scene_Skill
#--------------------------------------------------------------------------
# ● Object initialization
# actor_index : Actor index
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# ● Main processing
#--------------------------------------------------------------------------
def main
# Acquiring the actor
@actor = $game_party.actors[@actor_index]
# Drawing up the help window, the status window and the skill window
@help_window = Window_Help.new
@status_window = Window_SkillStatus.new(@actor)
@skill_window = Window_Skill.new(@actor)
# Help window association
@skill_window.help_window = @help_window
# Target window compilation (invisibility non actively setting)
@target_window = Window_Target.new
@target_window.visible = false
@target_window.active = false
# Skill Hot Key Window
@shk_window = Window_Command.new(250, ["Compétence assignée à cette touche"])
@shk_window.visible = false
@shk_window.active = false
@shk_window.x = 200
@shk_window.y = 250
@shk_window.z = 1500
# Transition execution
Graphics.transition
# Main loop
loop do
# Renewing the game picture
Graphics.update
# Updating the information of input
Input.update
# Frame renewal
update
# When the picture changes, discontinuing the loop
if $scene != self
break
end
end
# Transition preparation
Graphics.freeze
# Releasing the window
@help_window.dispose
@status_window.dispose
@skill_window.dispose
@target_window.dispose
@shk_window.dispose
end
#--------------------------------------------------------------------------
# ● Frame renewal
#--------------------------------------------------------------------------
def update
# Renewing the windows
@help_window.update
@status_window.update
@skill_window.update
@target_window.update
@shk_window.update
# When the skill window is active: Update_skill is called
if @skill_window.active
update_skill
return
end
# When the target window is active: Update_target is called
if @target_window.active
update_target
return
end
# When the skill_hot_key window is active: Update_shk is called
if @shk_window.active
update_shk
return
end
end
#--------------------------------------------------------------------------
# ● When frame renewal (the skill window is active)
#--------------------------------------------------------------------------
def update_skill
# The B when button is pushed,
if Input.trigger?(Input::B)
# Performing cancellation SE
$game_system.se_play($data_system.cancel_se)
# Change to menu screen
$scene = Scene_Menu.new(1)
return
end
# When C button is pushed,
if Input.trigger?(Input::C)
# Acquiring the data which presently is selected in the skill window
@skill = @skill_window.skill
# When you cannot use,
if @skill == nil or not @actor.skill_can_use?(@skill.id)
# Performing buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Performing decision SE
$game_system.se_play($data_system.decision_se)
# When the effective range takes part,
if @skill.scope >= 3
# Active conversion target window
@skill_window.active = false
@target_window.x = (@skill_window.index + 1) % 2 * 304
@target_window.visible = true
@target_window.active = true
# Setting cursor position the effective range (the single unit/the whole) according to
if @skill.scope == 4 || @skill.scope == 6
@target_window.index = -1
elsif @skill.scope == 7
@target_window.index = @actor_index - 10
else
@target_window.index = 0
end
# When the effective range is other than taking part,
else
# When common event ID is effective,
if @skill.common_event_id > 0
# Common event call reservation
$game_temp.common_event_id = @skill.common_event_id
# When using the skill performing SE
$game_system.se_play(@skill.menu_se)
#SP consumption
@actor.sp -= @skill.sp_cost
# Rewriting the contents of each window
@status_window.refresh
@skill_window.refresh
@target_window.refresh
# Change to map picture
$scene = Scene_Map.new
return
end
end
return
end
# When X button is pushed,
if Input.trigger?(Input::X)
# Performing decision SE
$game_system.se_play($data_system.decision_se)
@skill_window.active = false
@shk_window.active = true
@shk_window.visible = true
$ABS.skill_hot_key[1] = @skill_window.skill.id
end
#The Y when button is pushed,
if Input.trigger?(Input::Y)
# Performing decision SE
$game_system.se_play($data_system.decision_se)
@skill_window.active = false
@shk_window.active = true
@shk_window.visible = true
$ABS.skill_hot_key[2] = @skill_window.skill.id
end
# The Z when button is pushed,
if Input.trigger?(Input::Z)
# Performing decision SE
$game_system.se_play($data_system.decision_se)
@skill_window.active = false
@shk_window.active = true
@shk_window.visible = true
$ABS.skill_hot_key[3] = @skill_window.skill.id
end
# The R when button is pushed,
if Input.trigger?(Input::R)
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# To the following actor
@actor_index += 1
@actor_index %= $game_party.actors.size
# Change to another skill picture
$scene = Scene_Skill.new(@actor_index)
return
end
#The L when button is pushed,
if Input.trigger?(Input::L)
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# To actor before
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# Change to another skill picture
$scene = Scene_Skill.new(@actor_index)
return
end
end
#--------------------------------------------------------------------------
# ● When frame renewal (the shk window is active)
#--------------------------------------------------------------------------
def update_shk
# The C when button is pushed,
if Input.trigger?(Input::C)
# Performing decision SE
$game_system.se_play($data_system.decision_se)
# Reset Skill hot key window
@shk_window.active = false
@shk_window.visible = false
@skill_window.active = true
#Change to menu screen
$scene = Scene_Skill.new(@actor_index)
return
end
end
end

Et enfin 3 : remplacez le script scene-menu par celui-la

#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
#  メニュー画面の処理を行うクラスです。
#==============================================================================

class Scene_Menu
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# menu_index : コマンドのカーソル初期位置
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
# コマンドウィンドウを作成
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Sauvegarder"
s6 = "Sortir"
s7 = "Changer perso."
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
@command_window.height = 224
# パーティ人数が 0 人の場合
if $game_party.actors.size == 0
# アイテム、スキル、装備、ステータスを無効化
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
@command_window.disable_item(6)
end
# セーブ禁止の場合
if $game_system.save_disabled
# セーブを無効にする
@command_window.disable_item(4)
end
# プレイ時間ウィンドウを作成
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 224
# 歩数ウィンドウを作成
@steps_window = Window_Steps.new
@steps_window.x = 0
@steps_window.y = 320
# ゴールドウィンドウを作成
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
# ステータスウィンドウを作成
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報&


squall564 - postι le 07/11/2008 ΰ 22:52:14 (27 messages postιs)

❤ 0

en faite il y en a aucun qui marche mais j'ai essayer de le réparer chez moi ca marche donc c'est ca:

#--------------------------------------------------------------------------
# �œ ŒöŠ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
#==============================================================================
# �¡ 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
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
#==============================================================================
# �¡ 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
#==============================================================================
# �ž Š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


Squall564


zacktop - postι le 26/07/2009 ΰ 14:34:26 (15 messages postιs)

❤ 0

nan mais c'est quoi ce delire y'a pas un seul script qui fonctionne
dans tout le lot mdrx)

zacktop => old snake (kingdom ultimate va fermer remetez lui une petite mise a niveau please ^^)


pourquoi - postι le 03/08/2009 ΰ 16:03:09 (24 messages postιs)

❤ 0

Projet en cours: The last World

Y'x)a Peut-:sêtre :)un peutXD beauco:jointup de sm:)il:)ey:ps dans ces scripts!

Mais voilà: j'ai corigé!

Portion de code : Tout sιlectionner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
#=============================================================================== 
# ¦ New_Battle 
#------------------------------------------------------------------------------- 
# Compiled By : Radius 
#=============================================================================== 
 
# by fukuyama 
 
# Battle_End_Recovery 
 
 
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.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‚π’Η‰Α # ƒ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 ‚Ι’Η‰Α 
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 
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, "Courir"]) 
@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 
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



EDIT:Sa marche tjr pas --'


TracerTong - postι le 04/09/2009 ΰ 17:59:47 (27 messages postιs)

❤ 0

Apres quelques rajouts de # et quelques supprimations de end, le script qu'à posté Dark itachi marche très bien...Mis a part que je ne vois pas ce qui change en combat. Et c'est tres ENERVANT
de voir qu'on nous propose un script qui change le systeme de combat et qui change RIEN DU TOUT


vins84 - postι le 04/09/2009 ΰ 20:12:34 (3 messages postιs)

❤ 0

Donc, il ne marche pas, cqfd.

Vivre tue.


Matthew2 - postι le 05/11/2009 ΰ 08:23:05 (5 messages postιs)

❤ 0

Moi on ma mit une erreur a la ligne 388


Exemples - postι le 29/12/2009 ΰ 16:21:36 (2021 messages postιs)

❤ 0

Pff.

Pour ceux qui postent des scripts, pour éviter les smilets dans le texte, mettez le en code: [code][/code]

Bouh.


bigraph - postι le 31/03/2011 ΰ 19:35:35 (448 messages postιs)

❤ 0

Hum...

Bon sang... L'orthographe...
On n'est quand même pas en cours de français, mais il y a des limites, quoi...
En plus, trois quarts des utilisateurs de ce topic parlent en langage SMS...

Non, rien. | Na. | "Le suicide me semble très attirant en ce moment... Et si on suicidait pokéfan ?" : je suis fan officiel du docteur 8-) | J'ai été ban... Pour une connerie de dispute... M'aprendra à être con, tiens. | D'ailleur, en parlant du ban: ça fait un mois jour pour jour aujourd'hui! Et je suis toujours pas déban! WTF?

Suite ΰ de nombreux abus, le post en invitιs a ιtι dιsactivι. Veuillez vous inscrire si vous souhaitez participer ΰ la conversation.

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'ιquipe - Mentions lιgales

Plan du site

Communautι: Accueil | Forum | Chat | Commentaires | News | Flash-news | Screen de la semaine | Sorties | Tests | Gaming-Live | Interviews | Galerie | OST | Blogs | Recherche
Apprendre: Visite guidιe | RPG Maker 95 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker MV | Tutoriels | Guides | Making-of
Tιlιcharger: Programmes | Scripts/Plugins | Ressources graphiques / sonores | Packs de ressources | Midis | Elιments sιparιs | Sprites
Jeux: Au hasard | Notre sιlection | Sιlection des membres | Tous les jeux | Jeux complets | Le cimetiθre | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Proposer
Ressources RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
Ressources RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icτnes | Transitions | Fogs | Templates
Ressources RPG Maker VX: Tilesets | Charsets | Facesets | Systθmes
Ressources RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis
Archives: Palmarθs | L'Annuaire | Livre d'or | Le Wiki | Divers