#==============================================================================
# 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
#==============================================================================
#
# 使用方法:
#
# ★、对角色显示伤害,如下3步:
#
# 1、设置伤害内容:$game_player.damage = 数值
# 注意:如果数值是负数,就变成补血的颜色了。
#
# 2、设置是否会心一击:$game_player.critical = true/false
# 如果不是会心一击,就不用这一步了
#
# 3、释放伤害:$game_player.damage_pop = true
#
#
# ★、对普通NPC和事件进行伤害,类似的3步:
#
# 1、设置伤害内容:$game_map.events[事件编号].damage = 数值
#
# 2、设置是否会心一击:$game_map.events[事件编号].critical = true/false
#
# 3、释放伤害:$game_map.events[事件编号].damage_pop = true
#
# 注意,事件编号是事件的ID号,如果目标是“本事件”,那么在事件编号输入@event_id
#
#------------------------------------------------------------------------------
# 预祝有人能早日做出华丽的ARPG来,别忘了到网站发布哦~
#------------------------------------------------------------------------------
class Sprite_Character < RPG::Sprite
alias carol3_66RPG_damage_pop_update update
def update
carol3_66RPG_damage_pop_update
if @character.damage_pop
damage(@character.damage, @character.critical)
@character.damage = nil
@character.critical = false
@character.damage_pop = false
end
#------------------------------
# 动画 ID 与当前的情况有差异的情况下
#~ if @character.damage == nil and
#~ @character.state_animation_id != @state_animation_id
#~ @state_animation_id = @character.state_animation_id
#~ loop_animation($data_animations[@state_animation_id])
#~ end
#collapse
# 明灭
if @character.blink
blink_on
else
blink_off
end
# 白色闪烁
if @character.white_flash
whiten
@character.white_flash = false
end
# 死亡
if @character.dead
collapse
@character.dead = false
end
#------------------------------
end
end
class Game_Character
attr_accessor :damage_pop
attr_accessor :damage
attr_accessor :critical
attr_accessor :white_flash # 白色屏幕闪烁标志
attr_accessor :blink # 闪烁标志
attr_accessor :dead # 死亡消失标志
#~ attr_accessor :state_animation_id # 状态动画ID
alias carol3_66RPG_damage_pop_initialize initialize
def initialize
@damage_pop = false
@damage = nil
@critical = false
carol3_66RPG_damage_pop_initialize
@white_flash = false
@blink = false
[url=home.php?mod=space&uid=89503]@deAd[/url] = false
end
#~ def state_animation_id
#~ return @character.state_animation_id
#~ end
end
#==============================================================================
# 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
#==============================================================================