赞 | 1 |
VIP | 0 |
好人卡 | 0 |
积分 | 2 |
经验 | 5508 |
最后登录 | 2021-9-22 |
在线时间 | 152 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 208
- 在线时间
- 152 小时
- 注册时间
- 2011-4-22
- 帖子
- 52
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 lqly10 于 2015-10-25 00:25 编辑
=begin
待机(面向左) :00 01 02 03 共 4 张。
待机(面向右) :10 11 12 13 共 4 张。
移动(面向左) :20 21 22 23 共 4 张。
移动(面向右) :30 31 32 33 共 4 张。
攻击(面向左) :40 41 42 43 共 4 张。
攻击(面向右) :50 51 52 53 共 4 张.
防御(面向左) :80 共 1 张.
防御(面向右) :90 共 1 张.
挨打(面向左) :100 共 1 张.
挨打(面向右) :110 共 1 张.
死亡(面向左) :140 141 共 2 张.
死亡(面向右) :150 151 共 2 张.
=end
#==============================================================================
###############################################################################
#==============================================================================
# ★全图片单帧播放实现战斗动态效果★
#==============================================================================
# by -> 芯☆淡如水
#==============================================================================
###############################################################################
#==============================================================================
module Cache
def self.battler(name, filename, hue)
self.load_bitmap("Graphics/Battlers/#{name}/", filename, hue)
end
end
#==============================================================================
class Sprite_Base < Sprite
#--------------------------------------------------------------------------
alias add_initialize_xdrs initialize
def initialize(viewport = nil)
add_initialize_xdrs(viewport)
@damage_duration = 0
@mp_damage_duration = 0
@tip_duration = 0
end
#--------------------------------------------------------------------------
alias add_dispose_xdrs dispose
def dispose
add_dispose_xdrs
dispose_hp_damage
dispose_mp_damage
dispose_tip
end
#--------------------------------------------------------------------------
def update
super
update_animation
update_hp_damage
update_mp_damage
update_tip
@@ani_checker.clear
@@ani_spr_checker.clear
end
#--------------------------------------------------------------------------
def hp_damage_show(value, critical)
dispose_hp_damage
if value.is_a?(Numeric)
damage_string = value.abs.to_s
else
damage_string = value.to_s
end
bitmap = Bitmap.new(160, 48)
bitmap.font.name = "黑体"
bitmap.font.size = 32
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
if value.is_a?(Numeric) and value < 0
bitmap.font.color.set(176, 255, 144)
else
bitmap.font.color.set(255, 255, 255)
end
bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
if critical
bitmap.font.size = 20
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
bitmap.font.color.set(255, 255, 255)
bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
end
@_damage_sprite = Sprite.new(self.viewport)
@_damage_sprite.bitmap = bitmap
@_damage_sprite.ox = 80
@_damage_sprite.oy = 20
@_damage_sprite.x = self.x
@_damage_sprite.y = self.y - self.oy / 2
@_damage_sprite.z = 3000
@damage_duration = 40
end
#--------------------------------------------------------------------------
def dispose_hp_damage
if @_damage_sprite != nil
@_damage_sprite.bitmap.dispose
@_damage_sprite.dispose
@_damage_sprite = nil
@damage_duration = 0
end
end
#--------------------------------------------------------------------------
def update_hp_damage
if @damage_duration > 0
@damage_duration -= 1
case @damage_duration
when 38..39
@_damage_sprite.y -= 4
when 36..37
@_damage_sprite.y -= 2
when 34..35
@_damage_sprite.y += 2
when 28..33
@_damage_sprite.y += 4
end
@_damage_sprite.opacity = 256 - (12 - @damage_duration) * 32
if @damage_duration == 0
dispose_hp_damage
end
end
end
#--------------------------------------------------------------------------
def mp_damage_show(value, critical)
dispose_mp_damage
if value.is_a?(Numeric)
damage_string = value.abs.to_s
else
damage_string = value.to_s
end
bitmap = Bitmap.new(160, 48)
bitmap.font.name = "黑体"
bitmap.font.size = 32
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
if value.is_a?(Numeric) and value < 0
bitmap.font.color.set(0, 0, 255)
else
bitmap.font.color.set(0, 255, 255)
end
bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
if critical
bitmap.font.size = 20
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
bitmap.font.color.set(255, 255, 255)
bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
end
@_mp_damage_sprite = Sprite.new(self.viewport)
@_mp_damage_sprite.bitmap = bitmap
@_mp_damage_sprite.ox = 80
@_mp_damage_sprite.oy = 20
@_mp_damage_sprite.x = self.x
@_mp_damage_sprite.y = self.y - self.oy / 2 - 40
@_mp_damage_sprite.z = 3000
@mp_damage_duration = 40
end
#--------------------------------------------------------------------------
def dispose_mp_damage
if @_mp_damage_sprite != nil
@_mp_damage_sprite.bitmap.dispose
@_mp_damage_sprite.dispose
@_mp_damage_sprite = nil
@mp_damage_duration = 0
end
end
#--------------------------------------------------------------------------
def update_mp_damage
if @mp_damage_duration > 0
@mp_damage_duration -= 1
case @mp_damage_duration
when 38..39
@_mp_damage_sprite.y -= 4
when 36..37
@_mp_damage_sprite.y -= 2
when 34..35
@_mp_damage_sprite.y += 2
when 28..33
@_mp_damage_sprite.y += 4
end
@_mp_damage_sprite.opacity = 256 - (12 - @mp_damage_duration) * 32
if @mp_damage_duration == 0
dispose_mp_damage
end
end
end
#-----------------------------------------------------------
def tip(txt, type)
dispose_tip
bitmap = Bitmap.new(240, 52)
bitmap.font.name = (["黑体","宋体","Arial Black"])
bitmap.font.size = 26
bitmap.font.bold = true
if type == 1
bitmap.font.color.set(255, 0, 255)
bitmap.draw_text(+1, 6+1, 220, 50, txt, 1)
bitmap.font.color.set(0, 255, 120)
bitmap.draw_text(0, 6, 220, 50, txt, 1)
else
bitmap.font.color.set(0, 255, 120)
bitmap.draw_text(+1, 6+1, 220, 50, txt, 1)
bitmap.font.color.set(255, 0, 255)
bitmap.draw_text(0, 6, 220, 50, txt, 1)
end
@_tip_sprite = ::Sprite.new(self.viewport)
@_tip_sprite.bitmap = bitmap
@_tip_sprite.opacity = 0
@_tip_sprite.ox = 100
@_tip_sprite.oy = 20
@_tip_sprite.x = self.x
@_tip_sprite.y = self.y - self.oy
@_tip_sprite.z = 3000
@tip_duration = 60
end
#--------------------------------------------------------------------------
def dispose_tip
if @_tip_sprite != nil
@_tip_sprite.bitmap.dispose
@_tip_sprite.dispose
@_tip_sprite = nil
@tip_duration = 0
end
end
#--------------------------------------------------------------------------
def update_tip
if @tip_duration > 0
@tip_duration -= 1
case @tip_duration
when 38..39
@_tip_sprite.y -= 4
when 36..37
@_tip_sprite.y -= 3
when 34..35
@_tip_sprite.y -= 2
when 28..33
@_tip_sprite.y -= 1
end
@_tip_sprite.opacity = 256 - (12 - @tip_duration) * 32
if @tip_duration == 0
dispose_tip
end
end
end
end
#==============================================================================
class Game_Temp
#--------------------------------------------------------------------------
attr_accessor :show_refresh
#--------------------------------------------------------------------------
alias add_initialize_xdrs initialize
def initialize
add_initialize_xdrs
@show_refresh = false
end
end
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
def command_guard
BattleManager.actor.input.set_guard
BattleManager.actor.guard = true
next_command
end
#--------------------------------------------------------------------------
def turn_end
all_battle_members.each do |battler|
battler.on_turn_end
battler.guard = false
refresh_status
@log_window.display_auto_affected_status(battler)
@log_window.wait_and_clear
end
BattleManager.turn_end
process_event
start_party_command_selection
end
#--------------------------------------------------------------------------
# ● 执行战斗行动
#--------------------------------------------------------------------------
def execute_action
@subject.sprite_effect_type = :whiten
@subject.targets = @subject.current_action.make_targets.compact
if @subject.current_action.item.is_a?(RPG::Skill)
if @subject.current_action.item.id != 2
if @subject.current_action.item.scope == 1 and
@subject.current_action.item.hit_type != 2
@subject.moveto_pop = true
abs_wait_short
else
@subject.atk_pop = true
@subject.tip_type = 0
@subject.tip_message = @subject.current_action.item.name
@subject.tip_pop = true
@subject.atk_pop = true
end
end
else
@subject.tip_type = 1
@subject.tip_message = @subject.current_action.item.name
@subject.tip_pop = true
@subject.atk_pop = true
end
use_item
@log_window.wait_and_clear
end
#--------------------------------------------------------------------------
# ● 使用技能/物品
#--------------------------------------------------------------------------
def use_item
item = @subject.current_action.item
@log_window.display_use_item(@subject, item)
@subject.use_item(item)
refresh_status
targets = @subject.targets
show_animation(targets, item.animation_id)
targets.each {|target| item.repeats.times { invoke_item(target, item) } }
end
end
#-----------------------------------------------------------------------------
class Game_Battler < Game_BattlerBase
#---------------------------------------------------------------------------
attr_accessor :result
attr_accessor :dead_one
attr_accessor :hp_damage
attr_accessor :mp_damage
attr_accessor :hp_damage_pop
attr_accessor :mp_damage_pop
attr_accessor :moveto_pop
attr_accessor :moveback_pop
attr_accessor :atk_pop
attr_accessor :int_pop
attr_accessor :dead_pop
attr_accessor :guard_pop
attr_accessor :ad_pop
attr_accessor :atk2_pop
attr_accessor :targets
attr_accessor :show_refresh
attr_accessor :tip_pop
attr_accessor :tip_type
attr_accessor :tip_message
attr_accessor :get_pop
attr_accessor :an2_pop
attr_accessor :guard
#--------------------------------------------------------------------------
alias old_initialize_xdrs initialize
def initialize
old_initialize_xdrs
@hp_damage_pop = false
@mp_damage_pop = false
@hp_damage = nil
@mp_damage = nil
@dead_one = false
@show_refresh = true
@targets = []
@tip_pop = false
@get_pop = false
@tip_type = 0
@tip_message = ""
@guard = false
off_pop
end
#---------------------------------------------------------------------------
def off_pop
@atk_pop = false
@int_pop = false
@dead_pop = false
@guard_pop = false
@ad_pop = false
@moveto_pop = false
@moveback_pop = false
@atk2_pop = false
end
#---------------------------------------------------------------------------
def moving?
return (@atk_pop or @atk2_pop or @moveto_pop or @moveback_pop)
end
#--------------------------------------------------------------------------
def erase_state(state_id)
@states.delete(state_id)
@state_turns.delete(state_id)
@state_steps.delete(state_id)
@dead_one = false if state_id == death_state_id
end
#--------------------------------------------------------------------------
# ● 应用“恢复 HP”效果
#--------------------------------------------------------------------------
def item_effect_recover_hp(user, item, effect)
value = (mhp * effect.value1 + effect.value2) * rec
value *= user.pha if item.is_a?(RPG::Item)
value = value.to_i
@result.hp_damage -= value
@result.success = true
self.hp += value
@hp_damage = value
@hp_damage_pop = true
@show_refresh = true if @hp_damage
end
#--------------------------------------------------------------------------
# ● 应用“恢复 MP”效果
#--------------------------------------------------------------------------
def item_effect_recover_mp(user, item, effect)
value = (mmp * effect.value1 + effect.value2) * rec
value *= user.pha if item.is_a?(RPG::Item)
value = value.to_i
@result.mp_damage -= value
@result.success = true if value != 0
self.mp += value
@mp_damage = value
@mp_damage_pop = true
@show_refresh = true if @mp_damage
end
#--------------------------------------------------------------------------
def execute_damage(user)
on_damage(@result.hp_damage) if @result.hp_damage > 0
self.hp -= @result.hp_damage
self.mp -= @result.mp_damage
user.hp += @result.hp_drain
user.mp += @result.mp_drain
if @result.hp_damage > 0 or @result.mp_damage > 0
dead? ? @dead_pop = true : (@guard ? @guard_pop = true : @ad_pop = true)
end
@hp_damage = @result.hp_damage if @result.hp_damage > 0
@hp_damage_pop = true if @hp_damage
@mp_damage = @result.mp_damage if @result.mp_damage > 0
@mp_damage_pop = true if @mp_damage
@show_refresh = true
user.hp_damage = @result.hp_drain if @result.hp_drain > 0
user.hp_damage_pop = true if user.hp_damage
user.mp_damage = @result.mp_drain if @result.mp_drain > 0
user.mp_damage_pop = true if user.mp_damage
user.show_refresh = true
end
end
#===============================================================================
class Sprite_Battler < Sprite_Base
#--------------------------------------------------------------------------
def initialize(viewport, battler = nil)
super(viewport)
@battler = battler
if @battler != nil
@set = @battler.is_a?(Game_Enemy) ? 1 : 0
else
@set = 0
end
@battler_name = "00"
@battler_visible = false
@battler_visible = false
@wait_time = @move_time = @atk_time = 0
@int_time = @ad_time = @dead_time = @win_time = 0
@show = Sprite.new(viewport)
@show.bitmap = Bitmap.new(96, 32)
@height = 0
@effect_type = nil
@effect_duration = 0
return if @battler.nil?
@show.bitmap.font.color.set(0, 0, 0)
@show.bitmap.fill_rect(0, 0, 62, 6, Color.new(0, 0, 0))
@show.bitmap.fill_rect(0, 7, 62, 6, Color.new(0, 0, 0))
w = 60 * @battler.hp / @battler.mhp
for i in 1..w
@show.bitmap.fill_rect(i, 1, 1, 4, Color.new(255, 0, 255-i*4))
end
w = 60 * @battler.mp / [@battler.mmp, 1].max
for i in 1..w
@show.bitmap.fill_rect(i, 8, 1, 4, Color.new(0, 255-i*4, 255))
end
@show.x = self.x-30
@show.y = self.y - @height - 20
@show.z = self.y
@show.visible = @battler_visible
end
#--------------------------------------------------------------------------
def dispose
@battler.show_refresh = true if battler != nil
@show.dispose
bitmap.dispose if bitmap
super
end
#--------------------------------------------------------------------------
def tuch_range(target)
b_name = @battler.name.gsub(/[A-Z]/, "")
b_name = b_name.gsub(/[ ]/, "")
bp = Cache.battler(b_name, "00", 0)
r1 = bp.width / 2
b_name = target.name.gsub(/[A-Z]/, "")
b_name = b_name.gsub(/[ ]/, "")
bp = Cache.battler(b_name, "01", 0)
r2 = bp.width / 2
return r1 + r2
end
#--------------------------------------------------------------------------
def update
super
if @battler
@use_sprite = @battler.use_sprite?
if @use_sprite
update_bitmap
update_origin
update_position
end
#setup_new_effect
setup_new_animation
setup_hp_damage
setup_mp_damage
setup_new_tip
#update_effect
else
self.bitmap = nil
@effect_type = nil
end
end
#--------------------------------------------------------------------------
def update_bitmap
@wait_time += 1
@wait_time = 0 if @wait_time >= 39
@battler
name = (0+@set).to_s + (@wait_time / 10).to_s
#----------------------------------------------------------------------
if @battler.moveto_pop
@move_time += 1
@move_time = 0 if @move_time >= 19
targets = @battler.targets.uniq
lx = targets.size == 1 ? targets[0].screen_x : 240
name = self.x > lx ? "2" : "3"
name += (@move_time / 5).to_s
if targets.size == 1
target = targets[0]
if @battler == target
@battler.atk_pop = true
@battler.moveto_pop = false
@move_time = 0
return
end
tx = target.screen_x
tx += @battler.screen_x > target.screen_x ? (tuch_range(target)) : -(tuch_range(target))
ty = target.screen_y
else
tx = 240
ty = 220
end
if self.x == tx and self.y == ty
if @battler.current_action.item.is_a?(RPG::Skill) and
@battler.current_action.item.id > 2 and
@battler.current_action.item.hit_type != 2
@battler.tip_type = 0
@battler.tip_message = @battler.current_action.item.name
@battler.tip_pop = true
end
@battler.atk_pop = true
@battler.moveto_pop = false
@move_time = 0
return
end
rx = (self.x - tx).abs
ry = (self.y - ty).abs
lx = [Integer(20.0*rx / (rx+ry)), rx].min
ly = [Integer(20.0*ry / (rx+ry)), ry].min
self.x += self.x > tx ? -lx : (self.x < tx ? lx : 0)
self.y += self.y > ty ? -ly : (self.y < ty ? ly : 0)
end
#---------------------------------------------------------------------
if @battler.atk_pop
n_time = [@atk_time, 39].min
targets = @battler.targets.uniq
if targets.size == 1
nx = self.x > targets[0].screen_x ? "4" : "5"
name = nx + (n_time / 10).to_s
else
name = (4+@set).to_s + (n_time / 10).to_s
end
@atk_time += 1
if @atk_time >= 39
@atk_time = 0
@battler.atk_pop = false
@battler.moveback_pop = true
end
end
#---------------------------------------------------------------------
if @battler.atk2_pop
n_time = [@atk_time, 39].min
if @battler.targets.size == 1
nx = self.x > @battler.targets[0].screen_x ? "6" : "7"
name = nx + (n_time / 10).to_s
else
name = (4+@set).to_s + (n_time / 10).to_s
end
@atk_time += 1
if @atk_time >= 49
@atk_time = 0
@battler.atk2_pop = false
@battler.moveback_pop = true
end
end
#----------------------------------------------------------------------
if @battler.moveback_pop
@move_time += 1
@move_time = 0 if @move_time >= 19
name = self.x > @battler.screen_x ? "2" : "3"
name += (@move_time / 5).to_s
tx = @battler.screen_x
ty = @battler.screen_y
if self.x == tx and self.y == ty
@battler.moveback_pop = false
@move_time = 0
return
end
rx = (self.x - tx).abs
ry = (self.y - ty).abs
lx = [Integer(20.0*rx / (rx+ry)), rx].min
ly = [Integer(20.0*ry / (rx+ry)), ry].min
self.x += self.x > tx ? -lx : (self.x < tx ? lx : 0)
self.y += self.y > ty ? -ly : (self.y < ty ? ly : 0)
end
#----------------------------------------------------------------------
if @battler.int_pop
if @battler.targets.size == 1 and @battler != @battler.targets[0]
nx = self.x > @battler.targets[0].screen_x ? "12" : "13"
name = nx + (@int_time / 10).to_s
else
name = (12+@set).to_s + (@int_time / 10).to_s
end
@int_time += 1
if @int_time >= 39
@int_time = 0
@battler.int_pop = false
end
end
#----------------------------------------------------------------------
if @battler.ad_pop
name = (10+@set).to_s + (@ad_time / 40).to_s
@ad_time += 1
if @ad_time >= 39
@ad_time = 0
@battler.ad_pop = false
end
end
#-----------------------------------------------------------------------
if @battler.guard_pop and not @battler.dead?
name = (8+@set).to_s + (@ad_time / 40).to_s
@ad_time += 1
if @ad_time >= 39
@ad_time = 0
@battler.guard_pop = false
end
end
#----------------------------------------------------------------------
if @battler.dead_pop
name = (14+@set).to_s + (@dead_time / 20).to_s
@dead_time += 1
if @dead_time >= 39
@dead_time = 0
@battler.dead_one = true
@battler.dead_pop = false
end
end
#-----------------------------------------------------------------------
if @battler.dead? and @battler.dead_one
name = (14+@set).to_s + "1"
end
b_name = @battler.name.gsub(/[A-Z]/, "")
b_name = b_name.gsub(/[ ]/, "")
new_bitmap = Cache.battler(b_name, name, @battler.battler_hue)
if bitmap != new_bitmap
self.bitmap = new_bitmap
init_visibility
end
end
#--------------------------------------------------------------------------
def init_visibility
@battler_visible = @battler.exist?
self.opacity = 0 unless @battler_visible
if @battler != nil and @battler.show_refresh
@show.bitmap.clear
@show.bitmap.font.color.set(0, 0, 0)
@show.bitmap.fill_rect(0, 0, 62, 6, Color.new(0, 0, 0))
@show.bitmap.fill_rect(0, 7, 62, 6, Color.new(0, 0, 0))
w = 60 * @battler.hp / @battler.mhp
for i in 1..w
@show.bitmap.fill_rect(i, 1, 1, 4, Color.new(255, 0, (255-i*4)))
end
w = 60 * @battler.mp / [@battler.mmp, 1].max
for i in 1..w
@show.bitmap.fill_rect(i, 8, 1, 4, Color.new(0, (255-i*4), 255))
end
@battler.show_refresh = false
end
@show.x = self.x-30
@show.y = self.y - @height - 20
@show.z = self.y + 30
if @battler_visible
@show.visible = @battler.dead? ? false : true
else
@show.visible = @battler_visible
end
end
#--------------------------------------------------------------------------
def update_position
unless @battler.moving?
self.x = @battler.screen_x
self.y = @battler.screen_y
end
self.z = self.y
end
#--------------------------------------------------------------------------
def setup_hp_damage
if @battler.hp_damage_pop
hp_damage_show(@battler.hp_damage, @battler.result.critical)
@battler.hp_damage = nil
@battler.result.critical = false
@battler.hp_damage_pop = false
end
end
#--------------------------------------------------------------------------
def setup_mp_damage
if @battler.mp_damage_pop
mp_damage_show(@battler.mp_damage, @battler.result.critical)
@battler.mp_damage = nil
@battler.result.critical = false
@battler.mp_damage_pop = false
end
end
#--------------------------------------------------------------------------
def setup_new_tip
if @battler.tip_pop and @battler.tip_message != ""
tip(@battler.tip_message, @battler.tip_type)
@battler.tip_message = ""
@battler.tip_pop = false
end
end
#--------------------------------------------------------------------------
def start_effect(effect_type)
@effect_type = effect_type
case @effect_type
when :appear
@effect_duration = 16
@battler_visible = true
when :disappear
@effect_duration = 32
#@battler_visible = false
when :whiten
@effect_duration = 16
@battler_visible = true
when :blink
@effect_duration = 20
@battler_visible = true
when :collapse
@effect_duration = 48
#@battler_visible = false
when :boss_collapse
@effect_duration = bitmap.height
#@battler_visible = false
when :instant_collapse
@effect_duration = 16
#@battler_visible = false
end
revert_to_normal
end
#--------------------------------------------------------------------------
# ● 更新白闪烁效果
#--------------------------------------------------------------------------
def update_whiten
self.color.set(255, 255, 255, 0)
self.color.alpha = 128 - (16 - @effect_duration) * 10
end
#--------------------------------------------------------------------------
# ● 更新明灭效果
#--------------------------------------------------------------------------
def update_blink
end
#--------------------------------------------------------------------------
# ● 更新出现效果
#--------------------------------------------------------------------------
def update_appear
self.opacity = (16 - @effect_duration) * 16
end
#--------------------------------------------------------------------------
# ● 更新消灭效果
#--------------------------------------------------------------------------
def update_disappear
end
#--------------------------------------------------------------------------
# ● 更新击溃效果
#--------------------------------------------------------------------------
def update_collapse
self.blend_type = 1
end
#--------------------------------------------------------------------------
# ● 更新击溃首领效果
#--------------------------------------------------------------------------
def update_boss_collapse
#alpha = @effect_duration * 120 / bitmap.height
self.ox = bitmap.width / 2 + @effect_duration % 2 * 4 - 2
self.blend_type = 1
#self.color.set(255, 255, 255, 255 - alpha)
#self.opacity = alpha
#self.src_rect.y -= 1
Sound.play_boss_collapse2 if @effect_duration % 20 == 19
end
#--------------------------------------------------------------------------
# ● 更新瞬间消失效果
#--------------------------------------------------------------------------
def update_instant_collapse
self.opacity = 0
end
end
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
def use_sprite?
return true
end
#--------------------------------------------------------------------------
# ● # 调 X 坐标。
#--------------------------------------------------------------------------
def screen_x
if self.index != nil
case self.index
when 0
return 270
when 1
return 340
when 2
return 410
when 3
return 480
end
else
return 0
end
end
#--------------------------------------------------------------------------
# ● 战斗者调 Y 坐标。
#--------------------------------------------------------------------------
def screen_y
if self.index != nil
case self.index
when 0
return 400
when 1
return 360
when 2
return 320
when 3
return 280
end
else
return 0
end
end
#--------------------------------------------------------------------------
# ● 取得战斗画面的 Z 坐标
#--------------------------------------------------------------------------
def screen_z
if self.index != nil
return screen_y
else
return 0
end
end
end
###############################################################################
#==============================================================================
|
|