赞 | 2 |
VIP | 7 |
好人卡 | 5 |
积分 | 1 |
经验 | 17660 |
最后登录 | 2015-2-9 |
在线时间 | 461 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 461 小时
- 注册时间
- 2010-6-28
- 帖子
- 467
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 47731089 于 2013-6-11 19:20 编辑
如图,实现上述的分阶段连击,达到一阶段增加<STRONG>提示音</STRONG>。
(默认是6个阶段:20 40 60 80 100 120 的连击数,可以按照需要改动)
总之不是很难啦,很简单的东西。
如果需要,咩还可以修改其他的连击脚本=.=
发现BUG了,打开关闭菜单时...图片会还原掉,现在已经修复,原来的几位..重新用新版本吧
- #==============================================================================#
- # MOG_XAS 动画连击V 2.49ws. #
- #==============================================================================# #
- #==============================================================================#
- # 描述 #
- #==============================================================================#
- # 显示对一个怪物的造成的连击数和总伤害。 #
- # 如果想用特定的TOOL来显示的话,检查SKILL表格中的HIT项目。 #
- #==============================================================================#
- # #
- # 需要的图片: #
- # #
- # Combo_Damage #
- # Combo_Hud
- # Combo_Hud1~6
- # Combo_Number
- # Combo_Number1~6
- # $game_temp.xascombo调用数 #
- # 所有图片请务必放在Windowskins文件夹中. #
- # 20130611.Ws.sheep
- # 修正了一个BUG,打开关闭菜单等操作时,会被还原为原图片。 #
- #==============================================================================#
- #==============================================================================#
- module MOG
- # 信息在屏幕上显示的时间.................................................[秒数]
- XASCOMBO_TIME = 7
- # 连击显示窗口的位置 [X, Y]......................................[动态窗口位置]
- CSTRIKE_POSITION = [590, 90]
- #修改BY WS.sheep 对应等级的COMBO提示音和数量(=.= 顺序可不能反唉)
- C6_SE = RPG::AudioFile.new("[SYSTEM]_COMBO_SE06_AMAZING", 100, 100)
- COC_6 = 120
- C5_SE = RPG::AudioFile.new("[SYSTEM]_COMBO_SE05_EXCELLENT", 100, 100)
- COC_5 = 100
- C4_SE = RPG::AudioFile.new("[SYSTEM]_COMBO_SE04_CLAZY", 100, 100)
- COC_4 = 80
- C3_SE = RPG::AudioFile.new("[SYSTEM]_COMBO_SE03_GREAT", 100, 100)
- COC_3 = 60
- C2_SE = RPG::AudioFile.new("[SYSTEM]_COMBO_SE02_COOL", 100, 100)
- COC_2 = 40
- C1_SE = RPG::AudioFile.new("[SYSTEM]_COMBO_SE01_NICE", 100, 100)
- COC_1 = 20
-
- end
- #==============================================================================
- # Game_Temp
- #==============================================================================
- class Game_Temp
- attr_accessor :xascombo
- attr_accessor :xascombotime
- attr_accessor :xascombotime2
- attr_accessor :xascombowin_x
- attr_accessor :xascombowin_y
- attr_accessor :xascomboopa
- attr_accessor :xas_hit
- attr_accessor :xas_max_damage
- attr_accessor :xashitwin_x
- attr_accessor :xashitwin_y
- attr_accessor :xashitwin_opa
- attr_accessor :xashitwin_zoom_x
- attr_accessor :xashitwin_zoom_y
- attr_accessor :xasdamwin_x
- attr_accessor :xasdamwin_y
- attr_accessor :xasdamwin_opa
- attr_accessor :xasdamwin_zoom_x
- attr_accessor :xasdamwin_zoom_y
- attr_accessor :xashudwin_x
- attr_accessor :xashudwin_y
- attr_accessor :xashudwin_opa
- #--------------------------------------------------------------------------
- # 初始化
- #--------------------------------------------------------------------------
- alias mog_xascombo_initialize initialize
- def initialize
- mog_xascombo_initialize
- @xascombo = 0
- @xascombotime = 0
- @xascombotime2 = 0
- @xascombowin_x = -200
- @xascombowin_y = 0
- @xascomboopa = 0
- @xas_hit = 0
- $xas_comse = 0 # #修改BY WS.sheep
- @xas_max_damage = 0
- @xashitwin_x = 0
- @xashitwin_y = 0
- @xashitwin_opa = 0
- @xashitwin_zoom_x = 1
- @xashitwin_zoom_y = 1
- @xashudwin_x = 0
- @xashudwin_y = 0
- @xashudwin_opa = 0
- @xasdamwin_x = 0
- @xasdamwin_y = 0
- @xasdamwin_opa = 0
- @xasdamwin_zoom_x = 1
- @xasdamwin_zoom_y = 1
- end
- end
-
- #==============================================================================
- # Game_Battler
- #==============================================================================
- class Game_Battler
-
- #--------------------------------------------------------------------------
- # 技能效果
- #--------------------------------------------------------------------------
- alias mog_xascombo_skill_effect skill_effect
- def skill_effect(user, skill)
- mog_xascombo_skill_effect(user, skill)
- if skill.element_set.include?($data_system.elements.index("HIT")) and
- user.is_a?(Game_Actor) and self.is_a?(Game_Enemy) and
- self.damage.to_i > 0
- unless XAS_BA_ENEMY::ITEM_ENEMY.include?(self.id)
- $game_temp.xascombo += 1
- $game_temp.xascombotime = 3
- $game_temp.xascombotime2 = 40 * MOG::XASCOMBO_TIME
- end
- end
- end
- end
-
- #===============================================================================
- # XRXS_BattlerAttachment
- #===============================================================================
- module XRXS_BattlerAttachment
- #--------------------------------------------------------------------------
- # 动作效果
- #--------------------------------------------------------------------------
- alias mog_xas_max_damage_action_effect action_effect
- def action_effect(bullet, action_id)
- mog_xas_max_damage_action_effect(bullet, action_id)
- user = bullet.action.user
- if self.battler.is_a?(Game_Enemy) and user.battler.is_a?(Game_Actor) and
- self.battler.damage.to_i > 0 and not
- XAS_BA_ENEMY::ITEM_ENEMY.include?(self.battler.id)
- $game_temp.xas_max_damage += self.battler.damage
- end
- end
- end
-
- #===============================================================================
- # Combo_Sprite_Hud
- #===============================================================================
- class Combo_Sprite_Hud < Sprite
- include MOG
-
- #--------------------------------------------------------------------------
- # 初始化
- #--------------------------------------------------------------------------
- def initialize
- @viewport = Viewport.new(0, 0, 640, 480)
- @viewport.z = 9999
- super(@viewport)
- @combo_hit = $game_temp.xascombo
- @combo_image = RPG::Cache.windowskin("Combo_Number")
- @combo_bitmap = Bitmap.new(@combo_image.width,@combo_image.height)
- @combo = Sprite.new
- @combo.bitmap = @combo_bitmap
- @combo_im_cw = @combo_image.width / 10
- @combo_im_ch = @combo_image.height
- @combo_number_text = @combo_hit.abs.to_s.split(//)
- for r in 0..@combo_number_text.size - 1
- @combo_number_abs = @combo_number_text[r].to_i
- @combo_src_rect = Rect.new(@combo_im_cw * @combo_number_abs, 0, @combo_im_cw, @combo_im_ch)
- @combo_bitmap.blt(100 + ((@combo_im_cw - 12) * r), 0, @combo_image, @combo_src_rect)
- end
- @combo.z = 5009
- @combo.ox = $game_temp.xashitwin_x
- @combo.oy = $game_temp.xashitwin_y
- @combo.zoom_x = $game_temp.xashitwin_zoom_x
- @combo.zoom_y = $game_temp.xashitwin_zoom_y
- @combo.opacity = $game_temp.xashitwin_opa
- @total_image = RPG::Cache.windowskin("Combo_damage")
- @total_bitmap = Bitmap.new(@combo_image.width,@combo_image.height)
- @total = Sprite.new
- @total.bitmap = @total_bitmap
- @total_im_cw = @total_image.width / 10
- @total_im_ch = @total_image.height
- @total_number_text = $game_temp.xas_max_damage.abs.to_s.split(//)
- for r in 0..@total_number_text.size - 1
- @total_number_abs = @total_number_text[r].to_i
- @total_src_rect = Rect.new(@total_im_cw * @total_number_abs, 0, @total_im_cw, @total_im_ch)
- @total_bitmap.blt(100 + ((@total_im_cw - 12) * r), 0, @total_image, @total_src_rect)
- end
- @total.z = 5009
- @total.ox = $game_temp.xasdamwin_x
- @total.oy = $game_temp.xasdamwin_y
- @total.zoom_x = $game_temp.xasdamwin_zoom_x
- @total.zoom_y = $game_temp.xasdamwin_zoom_y
- @total.opacity = $game_temp.xasdamwin_opa
- @hud = Sprite.new
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD")
- @hud.z = 5008
- @hud.ox = $game_temp.xashudwin_x
- @hud.oy = $game_temp.xashudwin_y
- @hud.opacity = $game_temp.xashudwin_opa
- if $xas_comse ==6
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD6")
- @combo_image = RPG::Cache.windowskin("Combo_Number6")
- elsif $xas_comse ==5
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD5")
- @combo_image = RPG::Cache.windowskin("Combo_Number5")
- elsif $xas_comse ==4
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD4")
- @combo_image = RPG::Cache.windowskin("Combo_Number4")
- elsif $xas_comse ==3
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD3")
- @combo_image = RPG::Cache.windowskin("Combo_Number3")
- elsif $xas_comse ==2
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD2")
- @combo_image = RPG::Cache.windowskin("Combo_Number2")
- elsif $xas_comse ==1
- @combo_image = RPG::Cache.windowskin("Combo_Number1")
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD1")
- elsif $game_temp.xascombo == 0 and $xas_comse ==0
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD")
- @combo_image = RPG::Cache.windowskin("Combo_Number")
- end
- if @combo_hit <= 0
- $xas_comse = 0 #修改BU WS.sheep
- @combo.opacity = 0
- @combo.visible = false
- @hud.visible = false
- @total.visible = false
- else
- @combo.visible = true
- @hud.visible = true
- @total.visible = true
- end
- end
-
- #--------------------------------------------------------------------------
- # 释放
- #--------------------------------------------------------------------------
- def dispose
- @combo_bitmap.dispose
- @combo_bitmap = nil
- @combo.bitmap.dispose
- @combo.bitmap = nil
- @combo.dispose
- @combo = nil
- @hud.bitmap.dispose
- @hud.bitmap = nil
- @hud.dispose
- @hud = nil
- @total_bitmap.dispose
- @total_bitmap = nil
- @total.bitmap.dispose
- @total.bitmap = nil
- @total.dispose
- @total = nil
- @viewport.dispose
- @viewport = nil
- end
-
- #--------------------------------------------------------------------------
- # 刷新
- #--------------------------------------------------------------------------
- def refresh
- @combo_hit = $game_temp.xascombo
- combo_strike_valor = 0.1 *@combo_hit / 10
- $game_temp.xashitwin_zoom_x = 2
- $game_temp.xashitwin_zoom_y = 2
- $game_temp.xashitwin_opa = 70
- $game_temp.xashitwin_x = 15
- $game_temp.xashitwin_y = -10
- $game_temp.xashudwin_x = 0
- $game_temp.xashudwin_y = -100
- $game_temp.xashudwin_opa = 255
- $game_temp.xasdamwin_zoom_x = 1
- $game_temp.xasdamwin_zoom_y = 1
- $game_temp.xasdamwin_opa = 100
- $game_temp.xasdamwin_x = -85
- $game_temp.xasdamwin_y = -80
- @combo.bitmap.clear
- @combo_number_text = @combo_hit.abs.to_s.split(//)
- for r in 0..@combo_number_text.size - 1
- @combo_number_abs = @combo_number_text[r].to_i
- @combo_src_rect = Rect.new(@combo_im_cw * @combo_number_abs, 0, @combo_im_cw, @combo_im_ch)
- @combo_bitmap.blt(80 + ((@combo_im_cw - 8) * r), 2, @combo_image, @combo_src_rect)
- end
- @total.bitmap.clear
- @total_number_text = $game_temp.xas_max_damage.abs.to_s.split(//)
- for r in 0..@total_number_text.size - 1
- @total_number_abs = @total_number_text[r].to_i
- @total_src_rect = Rect.new(@total_im_cw * @total_number_abs, 0, @total_im_cw, @total_im_ch)
- @total_bitmap.blt(100 + ((@total_im_cw - 12) * r), 20, @total_image, @total_src_rect)
- end
- hud_pos_update
- @combo.visible = true
- @hud.visible = true
- @total.visible = true
- end
-
- #--------------------------------------------------------------------------
- # 动态显示窗口位置刷新
- #--------------------------------------------------------------------------
- def hud_pos_update
- @combo.ox = $game_temp.xashitwin_x
- @combo.oy = $game_temp.xashitwin_y
- @combo.zoom_x = $game_temp.xashitwin_zoom_x
- @combo.zoom_y = $game_temp.xashitwin_zoom_y
- @combo.opacity = $game_temp.xashitwin_opa
- @hud.ox = $game_temp.xashudwin_x
- @hud.oy = $game_temp.xashudwin_y
- @hud.opacity = $game_temp.xashudwin_opa
- @total.ox = $game_temp.xasdamwin_x
- @total.oy = $game_temp.xasdamwin_y
- @total.zoom_x = $game_temp.xasdamwin_zoom_x
- @total.zoom_y = $game_temp.xasdamwin_zoom_y
- @total.opacity = $game_temp.xasdamwin_opa
- end
-
- #--------------------------------------------------------------------------
- # 滑动刷新
- #--------------------------------------------------------------------------
- def slide_update
- ################################修改BY WS.sheep
- if $game_temp.xascombo >= COC_6 and $xas_comse ==5
- $game_system.se_play(MOG::C6_SE)
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD6")
- @combo_image = RPG::Cache.windowskin("Combo_Number6")
- $xas_comse +=1
- elsif $game_temp.xascombo >= COC_5 and $xas_comse ==4
- $game_system.se_play(MOG::C5_SE)
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD5")
- @combo_image = RPG::Cache.windowskin("Combo_Number5")
- $xas_comse +=1
- elsif $game_temp.xascombo >= COC_4 and $xas_comse ==3
- $game_system.se_play(MOG::C4_SE)
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD4")
- @combo_image = RPG::Cache.windowskin("Combo_Number4")
- $xas_comse +=1
- elsif $game_temp.xascombo >= COC_3 and $xas_comse ==2
- $game_system.se_play(MOG::C3_SE)
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD3")
- @combo_image = RPG::Cache.windowskin("Combo_Number3")
- $xas_comse +=1
- elsif $game_temp.xascombo >= COC_2 and $xas_comse ==1
- $game_system.se_play(MOG::C2_SE)
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD2")
- @combo_image = RPG::Cache.windowskin("Combo_Number2")
- $xas_comse +=1
- elsif $game_temp.xascombo >= COC_1 and $xas_comse ==0
- $game_system.se_play(MOG::C1_SE)
- @combo_image = RPG::Cache.windowskin("Combo_Number1")
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD1")
- $xas_comse +=1
- elsif $game_temp.xascombo == 0 and $xas_comse ==0
- @hud.bitmap = RPG::Cache.windowskin("Combo_HUD")
- @combo_image = RPG::Cache.windowskin("Combo_Number")
- end
- ######################################
- if $game_temp.xascombotime > 0 and
- $game_temp.xascombo > 0
- if $game_temp.xasdamwin_x < -65
- $game_temp.xasdamwin_x += 1
- $game_temp.xasdamwin_opa += 8
- elsif $game_temp.xasdamwin_x <= -65
- $game_temp.xasdamwin_x = -65
- $game_temp.xasdamwin_opa = 255
- end
- if $game_temp.xascombotime > 0.1
- $game_temp.xashitwin_zoom_x -= 0.05
- $game_temp.xashitwin_zoom_y -= 0.05
- $game_temp.xashitwin_opa += 8
- elsif $game_temp.xascombotime <= 0.1 and
- $game_temp.xascombo > 0
- $game_temp.xashitwin_zoom_x = 1
- $game_temp.xashitwin_zoom_y = 1
- $game_temp.xashitwin_opa= 255
- $game_temp.xashitwin_x = 10
- $game_temp.xashitwin_y= -115
- end
- if $game_temp.xashitwin_x > 25
- $game_temp.xashitwin_x -= 5
- end
- if $game_temp.xashitwin_y > -105
- $game_temp.xashitwin_y -= 5
- end
- elsif @combo.visible == true and
- $game_temp.xascombotime2 < 80
- $game_temp.xashitwin_x -= 5
- $game_temp.xashitwin_opa -= 10
- $game_temp.xasdamwin_x -= 3
- $game_temp.xasdamwin_opa -= 10
- $game_temp.xashudwin_x += 5
- $game_temp.xashudwin_opa -= 10
- $game_temp.xascombo = 0
- $game_temp.xas_max_damage = 0
- @combo_hit = $game_temp.xascombo
- end
- end
-
- #--------------------------------------------------------------------------
- # 刷新
- #--------------------------------------------------------------------------
- def update
- if @combo.opacity <= 0
- @combo.visible = false
- @hud.visible = false
- @total.visible = false
- $xas_comse = 0
- end
- hud_pos_update
- if $game_temp.xascombo == 0
- @combo_hit = $game_temp.xascombo
- end
- slide_update
- if @combo_hit != $game_temp.xascombo and
- $game_temp.xascombo != 0
- refresh
- end
- end
- end
- #===============================================================================
- # Scene_Map
- #===============================================================================
- class Scene_Map
-
- #--------------------------------------------------------------------------
- # Main
- #--------------------------------------------------------------------------
- alias xascombo_main main
- def main
- @combosprite_hud = Combo_Sprite_Hud.new
- xascombo_main
- @combosprite_hud.dispose
- @combosprite_hud = nil
- end
-
- #--------------------------------------------------------------------------
- # 刷新
- #--------------------------------------------------------------------------
- alias xascombo_update update
- def update
- xascombo_update
- $game_temp.xascombotime -= 0.15
- $game_temp.xascombotime2 -= 1
- @combosprite_hud.update
- end
- end
- $mog_rgss_xas_animated_combo_hit = true
复制代码 |
评分
-
查看全部评分
|