Ren'Shin'Yuu
Vous souhaitez ragir ce message ? Crez un compte en quelques clics ou connectez-vous pour continuer.


Venez ici pour apprendre plein de choses sur RPG Maker
 
AccueilRechercherDernires imagesS'enregistrerConnexion
Le Deal du moment :
Display Star Wars Unlimited Ombres de la Galaxie : ...
Voir le deal

 

 COmbats amlior

Aller en bas 
AuteurMessage
Kuroyami
Forum Master
Forum Master
Kuroyami


Nombre de messages : 76
Age : 29
Localisation : Amatsu
Date d'inscription : 10/05/2007

Ragnarok Character
Job: Priest ANti Injustice :-)
Lvl Base:
COmbats amlior Left_bar_bleue76/500COmbats amlior Empty_bar_bleue  (76/500)
Lvl Job:
COmbats amlior Left_bar_bleue66/250COmbats amlior Empty_bar_bleue  (66/250)

COmbats amlior Empty
MessageSujet: COmbats amlior   COmbats amlior Icon_minitimeJeu 17 Mai - 23:38

Auteur : fukuyama

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

COmbats amlior Screen%20new%20combat

Ressource(s) : aucune

Remarque : Test et fonctionnel.

Installation : Copiez le code, ouvrez l'diteur de script ( F11 ) et crez en un nouveau au dessus de 'Main'. Collez ce script :
Revenir en haut Aller en bas
http://ragnarokmakerxp.rpg-board.net
Kuroyami
Forum Master
Forum Master
Kuroyami


Nombre de messages : 76
Age : 29
Localisation : Amatsu
Date d'inscription : 10/05/2007

Ragnarok Character
Job: Priest ANti Injustice :-)
Lvl Base:
COmbats amlior Left_bar_bleue76/500COmbats amlior Empty_bar_bleue  (76/500)
Lvl Job:
COmbats amlior Left_bar_bleue66/250COmbats amlior Empty_bar_bleue  (66/250)

COmbats amlior Empty
MessageSujet: Re: COmbats amlior   COmbats amlior Icon_minitimeJeu 17 Mai - 23:39

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: mRmq
#
# 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ƒAN^[ĂꍇA퓌̉񕜏s
if recovery_rate != 0 and not actor.dead?
# p[eB̃AN^[Ƀ[v
$game_party.actors.each do |actor|
# 񕜗ʌvZ
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
# Aj[Vݒ
actor.damage = - recovery_hp
actor.damage_pop = true
end
# Xe[^XEBhEXV
@status_window.refresh
end
end
end # module Scene_Battle_Module
end # module Battle_End_Recovery
#------------------------------
# 퓃V[̍Ē`
#------------------------------
class Scene_Battle
# Scene_BattlepW[CN[h
include Battle_End_Recovery::Scene_Battle_Module
# ̃tF[YTJnɕʖ‚
alias battle_end_recovery_original_start_phase5 start_phase5
# tF[YTJnĒ`
def start_phase5
# 퓌̉񕜏Ăяo
battle_end_recovery
# ̃tF[YTJnĂяo
battle_end_recovery_original_start_phase5
end
end

#==============================================================================
# Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# Xbv_[W̌ʓKp
#--------------------------------------------------------------------------
alias xrxs_bp7_slip_damage_effect slip_damage_effect
def slip_damage_effect
# l̏
slip_damage_percent = 0
slip_damage_plus = 0
# ݕtĂXe[g̒Xbv_[WL̃mT
for i in @states
if $data_states[i].slip_damage
# ̃Xe[gĂXbv_[W
# LvvXXe[g܂Lv}CiXXe[g𔻒B
for j in $data_states[i].plus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^Xbv([0-9]+)(%|)/
slip_damage_percent += $1.to_i
elsif $data_states[j].name =~ /^Xbv([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 =~ /^Xbv([0-9]+)(%|)/
slip_damage_percent -= $1.to_i
elsif $data_states[j].name =~ /^Xbv([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Xbvh䂪 ꍇ𔻒
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 =~ /^Xbv([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 =~ /^Xbv([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 _[WZ
self.hp -= self.damage
# \bhI
return true
end
end
end
# XRXS_BP 1. CP ver.15
# by ݓy, a, Jack-R
#==============================================================================
# Scene_Battle_CP
#==============================================================================
class Scene_Battle_CP
#--------------------------------------------------------------------------
# JCX^Xϐ
#--------------------------------------------------------------------------
attr_accessor :stop # CPZXgbv
#----------------------------------------------------------------------------
# IuWFNg̏
#----------------------------------------------------------------------------
def initialize
@battlers = []
@cancel = false
@agi_total = 0
# z @count_battlers
@count_battlers = []
# Gl~[z @count_battlers ɒlj
for enemy in $game_troop.enemies
@count_battlers.push(enemy)
end
# AN^[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
#----------------------------------------------------------------------------
# CPJEg̊Jn
#----------------------------------------------------------------------------
def start
if @cp_thread != nil then
return
end
@cancel = false
@stop = false
# Xbh
@cp_thread = Thread.new do
while @cancel != true
if @stop != true
self.update # XV
sleep(0.05)
end
end
end
# ܂ŃXbh
end
#----------------------------------------------------------------------------
# CPJEgAbv
#----------------------------------------------------------------------------
def update
if @count_battlers != nil then
for battler in @count_battlers
# soȂΖ
if battler.dead? == true #or battler.movable? == false then
battler.cp = 0
next
end
# 1.3ς邱ƂŁXs[hύX”\B_͎gp邱ƁB
battler.cp = [[battler.cp + 1.3 * 4096 * battler.agi / @agi_total, 0].max, 65535].min
end
end
end
#----------------------------------------------------------------------------
# CPJEg̊Jn
#----------------------------------------------------------------------------
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䒆tO
attr_accessor :cp # CP
attr_accessor :slip_state_update_ban # XbvEXe[g̋֎~
#--------------------------------------------------------------------------
# R}h͉”\
#--------------------------------------------------------------------------
def inputable?
return (not @hidden and restriction <= 1 and @cp >=65535)
end
#--------------------------------------------------------------------------
# Xe[g [Xbv_[W]
#--------------------------------------------------------------------------
alias xrxs_bp1_slip_damage? slip_damage?
def slip_damage?
return false if @slip_state_update_ban
return xrxs_bp1_slip_damage?
end
#--------------------------------------------------------------------------
# Xe[gR (^[ƂɌĂя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
#--------------------------------------------------------------------------
# ZbgAbv
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
# IuWFNg
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
# JCX^Xϐ
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CP[^[݂̂̍XV
#--------------------------------------------------------------------------
# IuWFNg
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize
@update_cp_only = false
xrxs_bp1_initialize
end
#--------------------------------------------------------------------------
# tbV
#--------------------------------------------------------------------------
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
# Ɍʉݒ肷ƁAAN^[R}h|bvƂɌʉĐ
$data_system_command_up_se = ""
#--------------------------------------------------------------------------
# ogI
# result : (0: 1:sk 2:)
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
# CPJEg~
@cp_thread.stop
xrxs_bp1_battle_end(result)
end
#--------------------------------------------------------------------------
# vogtF[YJn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase1 start_phase1
def start_phase1
@agi_total = 0
@cp_thread = Scene_Battle_CP.new
# AN^[R}hEBhEč
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[eBR}htF[YJn
#--------------------------------------------------------------------------
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[XV (p[eBR}htF[Y)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase2 update_phase2
def update_phase2
# C {^ꂽꍇ
if Input.trigger?(Input::C)
# p[eBR}hEBhẼJ[\ʒuŕ
case @party_command_window.index
when 0 # 키
# SE t
$game_system.se_play($data_system.decision_se)
@cp_thread.start
# AN^[R}htF[YJn
start_phase3
end
return
end
xrxs_bp1_update_phase2
end
#--------------------------------------------------------------------------
# ̃AN^[̃R}h͂
#--------------------------------------------------------------------------
def phase3_next_actor
# [v
begin
# AN^[̖ŃGtFNg OFF
if @active_battler != nil
@active_battler.blink = false
end
# Ō̃AN^[̏ꍇ
if @actor_index == $game_party.actors.size-1
# CtF[YJn
@cp_thread.start
start_phase4
return
end
# AN^[̃CfbNXi߂
@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
# AN^[R}h͂󂯕tȂԂȂx
end until @active_battler.inputable?
@cp_thread.stop
# AN^[R}hEBhEZbgAbv
@active_battler.now_guarding = false
phase3_setup_command_window
end
Revenir en haut Aller en bas
http://ragnarokmakerxp.rpg-board.net
Kuroyami
Forum Master
Forum Master
Kuroyami


Nombre de messages : 76
Age : 29
Localisation : Amatsu
Date d'inscription : 10/05/2007

Ragnarok Character
Job: Priest ANti Injustice :-)
Lvl Base:
COmbats amlior Left_bar_bleue76/500COmbats amlior Empty_bar_bleue  (76/500)
Lvl Job:
COmbats amlior Left_bar_bleue66/250COmbats amlior Empty_bar_bleue  (66/250)

COmbats amlior Empty
MessageSujet: Re: COmbats amlior   COmbats amlior Icon_minitimeJeu 17 Mai - 23:40

#--------------------------------------------------------------------------
# ÕAN^[̃R}h͂
#--------------------------------------------------------------------------
def phase3_prior_actor
# [v
begin
# AN^[̖ŃGtFNg OFF
if @active_battler != nil
@active_battler.blink = false
end
# ŏ̃AN^[̏ꍇ
if @actor_index == 0
# ŏ֖߂
start_phase3
return
end
# AN^[̃CfbNX߂
@actor_index -= 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
# AN^[R}h͂󂯕tȂԂȂx
end until @active_battler.inputable?
@cp_thread.stop
# AN^[R}hEBhEZbgAbv
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# AN^[R}hEBhẼZbgAbv
#--------------------------------------------------------------------------
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[XV (AN^[R}htF[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)
# AN^[R}hEBhẼ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)
# ANVݒ
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 4
# ̃AN^[̃R}h͂
phase3_next_actor
else
# uU[ SE t
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
xrxs_bsp1_update_phase3_basic_command
end
#--------------------------------------------------------------------------
# CtF[YJn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase4 start_phase4
def start_phase4
xrxs_bp1_start_phase4
# Gl~[ANV
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[XV (CtF[Y Xebv 1 : ANV)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step1 update_phase4_step1
def update_phase4_step1
#
@phase4_act_continuation = 0
# s
if judge
@cp_thread.stop
# ܂͔sk̏ꍇ : \bhI
return
end
# sog[z̐擪擾
@active_battler = @action_battlers[0]
# Xe[^XXVCPɌB
@status_window.update_cp_only = true
# Xe[gXV֎~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[XV (CtF[Y Xebv 2 : ANVJn)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# ANVłȂ
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
# ANVɍUݒ
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
end
# [słȂ] ̏ꍇ
if @active_battler.restriction == 4
# ANVΏۂ̃og[NA
$game_temp.forcing_battler = nil
if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
# Xe[gR
@active_battler.remove_states_auto
# CP
@active_battler.cp = [(@active_battler.cp - 65535),0].max
# Xe[^XEBhEtbV
@status_window.refresh
end
# Xebv 1 Ɉڍs
@phase4_step = 1
return
end
end
# ANV̎ʂŕ
case @active_battler.current_action.kind
when 0
# UhEEȂ̋ʏCP
@active_battler.cp -= 0 if @phase4_act_continuation == 0
when 1
# XLgp̏CP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when 2
# ACegp̏CP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when -1
# CP܂ĂȂ
@phase4_step = 6
return
end
# CPZꎞ~
@cp_thread.stop = true
# Xe[gR
@active_battler.remove_states_auto
xrxs_bp1_update_phase4_step2
end
#--------------------------------------------------------------------------
# {ANV ʍ
#--------------------------------------------------------------------------
alias xrxs_bp1_make_basic_action_result make_basic_action_result
def make_basic_action_result
# Ȕꍇ
if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # UCP
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
# uU[ 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[XV (CtF[Y Xebv 5 : _[W\)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step5 update_phase4_step5
def update_phase4_step5
# Xbv_[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[XV (CtF[Y Xebv 6 : tbV)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step6 update_phase4_step6
def update_phase4_step6
# CPZĊJ
@cp_thread.stop = false
# wvEBhEB
@help_window.visible = false
xrxs_bp1_update_phase4_step6
end
end
# XRXS_BP 7. ogXe[^XENAfUC ver.1.02
# by ݓy, TOMY
#==============================================================================
# Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# JCX^Xϐ
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CP[^[݂̂̍XV
#--------------------------------------------------------------------------
# IuWFNg
#--------------------------------------------------------------------------
alias xrxs_bp7_initialize initialize
def initialize
xrxs_bp7_initialize
# Full-View̏ꍇ͉s # ĂB
#self.opacity = 0
#self.back_opacity = 0
end
#--------------------------------------------------------------------------
# tbV
#--------------------------------------------------------------------------
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
# `ʂJn
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 21
# sLOtBbN̕`
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)
# HPl̕`
self.contents.font.size = 24 # HP/SPl̑̕傫
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)
# SPl̕`
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)
# puHPvƗpuSPv̕`
self.contents.font.size = 12 # puHP/SPv̑̕傫
self.contents.font.color = system_color # puHP/SPv̐̕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
#--------------------------------------------------------------------------
# Xe[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
#==============================================================================
# OCu
#==============================================================================
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)
# `ʋ̌vZB傫߂ɒp̒B
distance = (start_x - end_x).abs + (start_y - end_y).abs
# `ʊJn
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
Revenir en haut Aller en bas
http://ragnarokmakerxp.rpg-board.net
Contenu sponsoris





COmbats amlior Empty
MessageSujet: Re: COmbats amlior   COmbats amlior Icon_minitime

Revenir en haut Aller en bas
 
COmbats amlior
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-

Permission de ce forum:Vous ne pouvez pas rpondre aux sujets dans ce forum
Ren'Shin'Yuu :: Partie RPG Maker XP :: Scripts-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser