赞 | 0 |
VIP | 1 |
好人卡 | 3 |
积分 | 1 |
经验 | 9739 |
最后登录 | 2014-6-3 |
在线时间 | 182 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 182 小时
- 注册时间
- 2011-2-17
- 帖子
- 518
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
- module RPG
- class Sprite < ::Sprite
- def damage2(value)
- dispose_damage
- damage_string = value.to_s
- if value.to_i > 0
- damage_string = "+"+damage_string
- end
- bitmap = Bitmap.new(160, 48)
- bitmap.font.name = "Arial Black"
- #——字体修改
- bitmap.font.size = 32
- #——字体修改
- #——边框颜色
- bitmap.font.color.set(255, 255, 255)
- #——边框颜色
- 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)
- #——颜色修改
- bitmap.font.color.set(0, 185, 185)
- #——颜色修改
- bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
- @_damage_sprite2 = ::Sprite.new(self.viewport)
- @_damage_sprite2.bitmap = bitmap
- #——位置修改
- @_damage_sprite2.ox = 80
- @_damage_sprite2.oy = 80
- @_damage_sprite2.x = self.x
- @_damage_sprite2.y = self.y - self.oy / 2 + 15
- #——位置修改
- @_damage_sprite2.z = 3000
- @_damage_duration2 = 40
- end
- def dispose_damage2
- if @_damage_sprite2 != nil
- @_damage_sprite2.bitmap.dispose
- @_damage_sprite2.dispose
- @_damage_sprite2 = nil
- @_damage_duration2 = 0
- end
- end
- alias lv24_update update
- def update
- lv24_update
- if @_damage_duration2 > 0
- @_damage_duration2 -= 1
- case @_damage_duration2
- when 38..39
- @_damage_sprite2.y -= 4
- when 36..37
- @_damage_sprite2.y -= 2
- when 34..35
- @_damage_sprite2.y += 2
- when 28..33
- @_damage_sprite2.y += 4
- end
- @_damage_sprite2.opacity = 256 - (12 - @_damage_duration2) * 32
- if @_damage_duration2 == 0
- dispose_damage
- end
- end
- end
- alias lv23_initialize initialize
- def initialize(viewport = nil)
- lv23_initialize(viewport)
- @_damage_duration2 = 0
- end
- alias lv23_dispose dispose
- def dispose
- lv23_dispose
- dispose_damage2
- end
- end
- end
- class Scene_Battle
- alias lv23_make_skill_action_result make_skill_action_result
- def make_skill_action_result
- lv23_make_skill_action_result
- @active_battler.damage2 = [email protected]_cost
- end
- alias lv23_make_item_action_result make_item_action_result
- def make_item_action_result
- a = []
- for i in $game_party.actors
- a.push(i.sp)
- end
- for i in $game_troop.enemies
- a.push(i.sp)
- end
- lv23_make_item_action_result
- s = 0
- for i in $game_party.actors
- i.damage2 = i.sp - a[s]
- s += 1
- end
- for i in $game_troop.enemies
- i.damage2 = a[s] - i.sp
- s += 1
- end
- end
- end
- class Game_Actor
- attr_accessor :damage2
- alias lv23_initialize initialize
- def initialize(i)
- lv23_initialize(i)
- @damage2 = 0
- end
- end
- class Game_Enemy
- attr_accessor :damage2
- alias lv23_initialize initialize
- def initialize(i,i2)
- lv23_initialize(i,i2)
- @damage2 = 0
- end
- end
- class Sprite_Battler
- alias lv23_update update
- def update
- lv23_update
- return if [url=home.php?mod=space&uid=133701]@battler[/url] == nil
- if @battler.damage2 != 0
- damage2(@battler.damage2)
- @battler.damage2 = 0
- end
- end
- end
复制代码 这是一个得失SP显示的脚本 我想删掉失去SP显示的部分 保留恢复SP时显示 帮个忙 谢谢 |
|