赞 | 0 |
VIP | 3 |
好人卡 | 18 |
积分 | 2 |
经验 | 72569 |
最后登录 | 2023-12-30 |
在线时间 | 596 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 229
- 在线时间
- 596 小时
- 注册时间
- 2010-6-21
- 帖子
- 1218
|
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- #
- # 使用方法:
- #
- # ★、对角色显示伤害,如下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
- @dead = false
- end
- def state_animation_id
- return @character.state_animation_id
- end
- end
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
复制代码 |
|