Kakashi heroe's
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

Kakashi heroe's

Forum du projet Kakashi heroe's
 
AccueilRechercherDernières imagesS'enregistrerConnexion
Le Deal du moment : -39%
Pack Home Cinéma Magnat Monitor : Ampli DENON ...
Voir le deal
1190 €

 

 New battle

Aller en bas 
AuteurMessage
Uchiha sasuke
Admin
Uchiha sasuke


Nombre de messages : 63
Date d'inscription : 21/06/2007

New battle Empty
MessageSujet: New battle   New battle Icon_minitimeLun 25 Juin - 13:13

Auteur : fukuyama

Fonction : Permet de mettre une interface du combat plus joli (voir le screen ci -dessous)

New battle Screen%20new%20combat

Ressource(s) : aucune

Remarque : Testé et fonctionnel.

Installation : Copiez le code, ouvrez l'éditeur de script ( F11 ) et créez en un nouveau au dessus de 'Main'. Collez ce script :
Revenir en haut Aller en bas
https://kakashiheroes.forums-actifs.net
Uchiha sasuke
Admin
Uchiha sasuke


Nombre de messages : 63
Date d'inscription : 21/06/2007

New battle Empty
MessageSujet: Re: New battle   New battle Icon_minitimeLun 25 Juin - 13:14

Code:


#==============================================================================
# ¦ 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

#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# œ ƒXƒŠƒbƒvƒ_ƒ[ƒW‚ÌŒø‰Ê“K—p
#--------------------------------------------------------------------------
alias xrxs_bp7_slip_damage_effect slip_damage_effect
def slip_damage_effect
# ”’l‚̏‰Šú‰»
slip_damage_percent = 0
slip_damage_plus = 0
# Œ»Ý•t‰Á‚³‚ê‚Ä‚¢‚éƒXƒe[ƒg‚Ì’†‚©‚çƒXƒŠƒbƒvƒ_ƒ[ƒW—L‚è‚̃‚ƒm‚ð’T‚·
for i in @states
if $data_states[i].slip_damage
# ‚»‚̃Xƒe[ƒg‚ªŽ‚Á‚Ä‚¢‚éƒXƒŠƒbƒvƒ_ƒ[ƒW‚Ì
# Lvƒvƒ‰ƒXƒXƒe[ƒg‚Ü‚½‚ÍLvƒ}ƒCƒiƒXƒXƒe[ƒg‚ð”»’èB
for j in $data_states[i].plus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)(%|“)/
slip_damage_percent += $1.to_i
elsif $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)$/
slip_damage_plus += $1.to_i
end
end
end
for j in $data_states[i].minus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)(%|“)/
slip_damage_percent -= $1.to_i
elsif $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)$/
slip_damage_plus -= $1.to_i
end
end
end
end
end
if slip_damage_percent == 0 and slip_damage_plus == 0
xrxs_bp7_slip_damage_effect
else
# –h‹ï‚ªƒXƒŠƒbƒv–hŒä‚ª‚ ‚éê‡‚ð”»’è
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
next if armor == nil
for j in armor.guard_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)(%|“)/
if slip_damage_percent > 0
slip_damage_percent = [slip_damage_percent - $1.to_i, 0].max
end
end
if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)$/
if slip_damage_percent > 0
slip_damage_plus = [slip_damage_plus - $1.to_i, 0].max
end
end
end
end
end
# ƒ_ƒ[ƒW‚ðÝ’è
self.damage = self.maxhp * slip_damage_percent / 100 + slip_damage_plus
# •ªŽU
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# HP ‚©‚çƒ_ƒ[ƒW‚ðŒ¸ŽZ
self.hp -= self.damage
# ƒƒ\ƒbƒhI—¹
return true
end
end
end
# ¥£¥ XRXS_BP 1. CP§“±“ü ver.15 ¥£¥
# by ÷‰ë Ý“y, ˜aŠó, Jack-R
#==============================================================================
# ¡ Scene_Battle_CP
#==============================================================================
class Scene_Battle_CP
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_accessor :stop # CP‰ÁŽZƒXƒgƒbƒv
#----------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‚̏‰Šú‰»
#----------------------------------------------------------------------------
def initialize
@battlers = []
@cancel = false
@agi_total = 0
# ”z—ñ @count_battlers ‚ð‰Šú‰»
@count_battlers = []
# ƒGƒlƒ~[‚ð”z—ñ @count_battlers ‚ɒ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[i]
actor_x = i * 160 + 4
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
end
end
#--------------------------------------------------------------------------
# œ CPƒ[ƒ^[ ‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
if actor.cp == nil
actor.cp = 0
end
w = width * [actor.cp,65535].min / 65535
self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
end
end
#==============================================================================
# ¡ Scene_Battle
#==============================================================================
class Scene_Battle
# ‚±‚±‚ÉŒø‰Ê‰¹‚ðÝ’è‚·‚é‚ƁAƒAƒNƒ^[ƒRƒ}ƒ“ƒh‚ªƒ|ƒbƒv‚µ‚½‚Æ‚«‚ÉŒø‰Ê‰¹‚ðÄ
$data_system_command_up_se = ""
#--------------------------------------------------------------------------
# œ ƒoƒgƒ‹I—¹
# result : Œ‹‰Ê (0:Ÿ—˜ 1:”s–k 2:“¦‘–)
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
# CPƒJƒEƒ“ƒg’âŽ~
@cp_thread.stop
xrxs_bp1_battle_end(result)
end
#--------------------------------------------------------------------------
# œ ƒvƒŒƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase1 start_phase1
def start_phase1
@agi_total = 0
@cp_thread = Scene_Battle_CP.new
# ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðÄì
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4, "Fuir"])
@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
Revenir en haut Aller en bas
https://kakashiheroes.forums-actifs.net
 
New battle
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Système de combat tactique (Tactical Battle System)

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Kakashi heroe's :: Partie RPG :: Scripts-
Sauter vers: