赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 170 |
最后登录 | 2012-1-31 |
在线时间 | 27 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 27 小时
- 注册时间
- 2011-10-2
- 帖子
- 17
|
本帖最后由 Mirror♪ 于 2011-11-13 12:10 编辑
把XAS系统的必杀技槽界面修改了一下,结果必杀技满了(必杀技等级为4的时候)的时候必杀技槽不见了= =
满的时候:
正常的时候:
有关的脚本:- #==============================================================================#
- # MOG_XAS_必杀技系统 3.2 #
- #==============================================================================#
- #==============================================================================#
- # 描述 #
- #==============================================================================#
- # 必杀技系统是一种设定:当你达到特定的必杀技等级的时候可以使用必杀技。 #
- #==============================================================================#
- # 你可以用开关8(默认)来控制是否使用此项功能。 #
- #==============================================================================#
- # 按ALT键(默认)使用必杀技。 #
- #==============================================================================#
- # 假如你希望你是用一个TOOL攻击的时候增加必杀技值槽,请检查SKILL表格中的OVD。 #
- #==============================================================================#
- # 可以使用变量11(默认)来设置必杀技等级的最大值。 #
- #==============================================================================#
- # #
- # 需要的图片: #
- # #
- # Hud_OV_Fire #
- # Hud_OV_Layout #
- # Hud_OV_Meter #
- # Hud_OV_Number #
- # #
- # 所有图片请务必放在Windowskins文件夹中. #
- # #
- #==============================================================================#
- module MOG
- # 用来储存必杀技等级的最大值的变量ID.....................................[变量]
- OVD_MAX_LEVEL_VAR_ID = 11
- # 施放每级必杀时调用的技能ID。
- OVD_LEVEL = {
- 1=> 44, #必杀技LV 1 (技能的ID)
- 2=> 45, #必杀技LV 2 (技能的ID)
- 3=> 46, #必杀技LV 3 (技能的ID)
- 4=> 47 #必杀技LV 4 (技能的ID)
- }
-
- #==============================================================================#
- # 格式: A=>B #
- # #
- # A = TOOL的ID (顺序请参考数据库中技能的顺序) #
- # B = 得到的必杀点数 #
- #==============================================================================#
-
- OVD_GAIN = {
- 1=>3, #技能 ID 1 (得到3点)
- 2=>3, #技能 ID 2 (得到5点)
- 3=>3, #技能 ID 2 (得到5点)
- 4=>4, #技能 ID 4 (得到6点)
- 5=>5, #技能 ID 5 (得到4点)
- 6=>3, #技能 ID 6 (得到3点)
- 104=>1, #技能 ID 104 (得到1点)
- 105=>0
- }
-
- # 设置得到的默认点数.....................................................[其他]
- OVD_DEFAULT_GAIN = 2
- # 使用必杀技............................................................[ALT键]
- OVD_KEY = Input::ALT
- # 可以使用必杀技时播放的动画.
- OVDANI = 1
- # 当你填充必杀值槽时显示的文字...........................................[文字]
- OVDTEXT = "Overdrive!"
- # 当必杀技结束的时候播放的音效.
- OVDSEOFF = "003-System03"
- # 当必杀系统被关闭的时候显示的文字.......................................[文字]
- OVDOFF_TEXT = ""
- # 必杀技系统的伤害效率...................................................[其他]
- OVD_DAMAGE_EFFICACY = 100
- # 用来控制是否使用必杀技系统的开关ID.....................................[开关]
- XAS_OVDVIS = 8
- # 必杀技系统的动态显示窗口的X坐标..........................[动态显示窗口的位置]
- OV_HUD_X = 15
- # 必杀技系统的动态显示窗口的Y坐标..........................[动态显示窗口的位置]
- OV_HUD_Y = 350
- # 必杀技系统的必杀值槽的X坐标..............................[动态显示窗口的位置]
- OV_METER_X = 7#22
- # 必杀技系统的必杀值槽的Y坐标..............................[动态显示窗口的位置]
- OV_METER_Y = 8#21
- # 必杀技系统的必杀等级的X坐标..............................[动态显示窗口的位置]
- OV_NUMBER_X = -5
- # 必杀技系统的必杀等级的Y坐标..............................[动态显示窗口的位置]
- OV_NUMBER_Y = 13
- # 动态显示窗口是否透明?.................................................[是/否]
- OVD_FADE = true
- # 必杀值槽的长度. 这在使用褪去时会有影响.
- OVD_HUD_SIZE_X = 100
- # CT槽的长度. 这在使用褪去时会有影响.
- OVD_HUD_SIZE_Y = 50
-
- end
- #==============================================================================
- # Overdrive Sprite
- #==============================================================================
- class Overdrive_Sprite < Sprite
- include MOG
-
- #--------------------------------------------------------------------------
- # 初始化
- #--------------------------------------------------------------------------
- def initialize(viewport)
- super(viewport)
- @actor = $game_party.actors[0]
- return if @actor == nil
- @ovdmaxlevel = $game_variables[OVD_MAX_LEVEL_VAR_ID]
- $game_system.xasovd_lv = @ovdmaxlevel if $game_system.xasovd_lv > @ovdmaxlevel
- @ovd_level = $game_system.xasovd_lv
- @overdrive = $game_system.xasovd_gauge
- @overdrive_ref = @overdrive_old
- hud_size_x = OVD_HUD_SIZE_X
- hud_size_y = OVD_HUD_SIZE_Y
- @oc_range_x = hud_size_x + OV_HUD_X
- @oc_range_y = hud_size_y + OV_HUD_Y
- #必杀值槽
- @ovd_meter_flow = 0
- @ovd_meter_image = RPG::Cache.windowskin("Hud_OV_Meter")
- @ovd_meter_bitmap = Bitmap.new(@ovd_meter_image.width,@ovd_meter_image.height)
- @ovd_meter_range = @ovd_meter_image.width# / 3
- @ovd_meter_height = @ovd_meter_image.height# / 2
- @ovd_meter_width = @ovd_meter_range * $game_system.xasovd_gauge / 100
- @ovd_meter_src_rect = Rect.new(@ovd_meter_range, 0, @ovd_meter_width, @ovd_meter_height)
- @ovd_meter_bitmap.blt(0,0, @ovd_meter_image, @ovd_meter_src_rect)
- @ovd_meter_sprite = Sprite.new
- @ovd_meter_sprite.bitmap = @ovd_meter_bitmap
- @ovd_meter_sprite.z = 5007
- @ovd_meter_sprite.x = OV_METER_X + OV_HUD_X
- @ovd_meter_sprite.y = OV_METER_Y + OV_HUD_Y
- ovd_meter_flow_update
- #构图
- @ovd_lay_image = RPG::Cache.windowskin("Hud_OV_Layout")
- @ovd_lay_bitmap = Bitmap.new(@ovd_lay_image.width,@ovd_lay_image.height)
- @ovd_lay_width = @ovd_lay_image.width
- @ovd_lay_src_rect_back = Rect.new(0, 0,@ovd_lay_width, @ovd_lay_image.height)
- @ovd_lay_bitmap.blt(0,0, @ovd_lay_image, @ovd_lay_src_rect_back)
- @ovd_lay_sprite = Sprite.new
- @ovd_lay_sprite.bitmap = @ovd_lay_bitmap
- @ovd_lay_sprite.z = 5006
- @ovd_lay_sprite.x = OV_HUD_X
- @ovd_lay_sprite.y = OV_HUD_Y
- #火
- @ov3_flow = 0
- @ov3_flow_speed = 0
- @ov3_image = RPG::Cache.windowskin("Hud_OV_Fire")
- @ov3_bitmap = Bitmap.new(@ov3_image.width,@ov3_image.height)
- @ov3_width = @ov3_image.width / 4
- @ov3_src_rect_back = Rect.new(0, 0,@ov3_width, @ov3_image.height)
- @ov3_bitmap.blt(0,0, @ov3_image, @ov3_src_rect_back)
- @ov3_sprite = Sprite.new
- @ov3_sprite.bitmap = @ov3_bitmap
- @ov3_sprite.z = 5008
- @ov3_sprite.x = -5 + @ovd_meter_width + OV_METER_X + OV_HUD_X
- @ov3_sprite.y = -10 + OV_METER_Y + OV_HUD_Y
- fire_update
- #数字
- @ov2_number_image = RPG::Cache.windowskin("Hud_OV_Number")
- @ov2_number_bitmap = Bitmap.new(@ov2_number_image.width,@ov2_number_image.height)
- @ov2_number_sprite = Sprite.new
- @ov2_number_sprite.bitmap = @ov2_number_bitmap
- @ov2_number_sprite.z = 5007
- @ov2_number_sprite.x = OV_NUMBER_X + OV_HUD_X
- @ov2_number_sprite.y = OV_NUMBER_Y + OV_HUD_Y
- @ov2_im_cw = @ov2_number_image.width / 10
- @ov2_im_ch = @ov2_number_image.height
- @ov2_src_rect = Rect.new(@ov2_im_cw,0, @ov2_im_cw, @ov2_im_ch)
- @ov2_number_text = @ovd_level.abs.to_s.split(//)
- for r in 0..@ov2_number_text.size - 1
- @ov2_number_abs = @ov2_number_text[r].to_i
- @ov2_src_rect = Rect.new(@ov2_im_cw * @ov2_number_abs, 0, @ov2_im_cw, @ov2_im_ch)
- @ov2_number_bitmap.blt(0 + ((@ov2_im_cw - 7) * r), 0, @ov2_number_image, @ov2_src_rect)
- end
- visible_update
- end
-
- #--------------------------------------------------------------------------
- # 释放
- #--------------------------------------------------------------------------
- def dispose
- return if @actor == nil
- #必杀值槽释放
- @ovd_lay_sprite.bitmap.dispose
- @ovd_lay_sprite.bitmap = nil
- @ovd_lay_sprite.dispose
- @ovd_lay_sprite = nil
- @ovd_lay_bitmap.dispose
- @ovd_lay_bitmap = nil
- #必杀表格释放
- @ovd_meter_sprite.bitmap.dispose
- @ovd_meter_sprite.bitmap = nil
- @ovd_meter_sprite.dispose
- @ovd_meter_sprite = nil
- @ovd_meter_bitmap.dispose
- @ovd_meter_bitmap = nil
- #必杀火释放
- @ov3_sprite.bitmap.dispose
- @ov3_sprite.bitmap = nil
- @ov3_sprite.dispose
- @ov3_sprite = nil
- @ov3_bitmap.dispose
- @ov3_bitmap = nil
- #必杀数字释放
- @ov2_number_sprite.bitmap.dispose
- @ov2_number_sprite.bitmap = nil
- @ov2_number_sprite.dispose
- @ov2_number_sprite = nil
- @ov2_number_bitmap.dispose
- @ov2_number_bitmap = nil
- end
-
- #--------------------------------------------------------------------------
- # 刷新
- #--------------------------------------------------------------------------
- def update
- return if @actor == nil
- visible_update
- ovd_meter_flow_update
- ovd_fade
- fire_update
- if @ovdmaxlevel != $game_variables[OVD_MAX_LEVEL_VAR_ID] or
- @ovd_level != $game_system.xasovd_lv
- level_update
- end
- end
-
- #--------------------------------------------------------------------------
- # 必杀技褪去
- #--------------------------------------------------------------------------
- def ovd_fade
- if MOG::OVD_FADE == true
- x = ($game_player.real_x - $game_map.display_x) / 4
- y = ($game_player.real_y - $game_map.display_y) / 4
- if x < @oc_range_x and x > OV_HUD_X - 20 and
- y > OV_HUD_Y - 15 and y < @oc_range_y and
- @ov2_number_sprite.opacity > 120
- @ov2_number_sprite.opacity -= 10
- @ovd_lay_sprite.opacity -= 10
- @ovd_meter_sprite.opacity -= 10
- @ov3_sprite.opacity -= 10
- @ov2_number_sprite.opacity -= 10
- elsif @ov2_number_sprite.opacity < 255
- @ov2_number_sprite.opacity += 10
- @ovd_lay_sprite.opacity += 10
- @ovd_meter_sprite.opacity += 10
- @ov3_sprite.opacity += 10
- @ov2_number_sprite.opacity += 10
- end
- end
- end
-
- #--------------------------------------------------------------------------
- # 可视性刷新
- #--------------------------------------------------------------------------
- def visible_update
- #可视
- if $game_switches[MOG::XAS_OVDVIS] == true
- @ov2_number_sprite.visible = false
- @ovd_lay_sprite.visible = false
- @ovd_meter_sprite.visible = false
- @ov3_sprite.visible = false
- @ov2_number_sprite.visible = false
- else
- @ov2_number_sprite.visible = true
- @ovd_lay_sprite.visible = true
- @ovd_meter_sprite.visible = true
- @ov3_sprite.visible = true
- @ov2_number_sprite.visible = true
- end
- end
-
- #--------------------------------------------------------------------------
- # 等级提升
- #--------------------------------------------------------------------------
- def level_update
- @ovdmaxlevel = $game_variables[OVD_MAX_LEVEL_VAR_ID]
- $game_system.xasovd_lv = @ovdmaxlevel if $game_system.xasovd_lv > @ovdmaxlevel
- @ovd_level = $game_system.xasovd_lv
- @ov2_number_sprite.bitmap.clear
- @ov2_src_rect = Rect.new(@ov2_im_cw,0, @ov2_im_cw, @ov2_im_ch)
- @ov2_number_text = @ovd_level.abs.to_s.split(//)
- for r in 0..@ov2_number_text.size - 1
- @ov2_number_abs = @ov2_number_text[r].to_i
- @ov2_src_rect = Rect.new(@ov2_im_cw * @ov2_number_abs, 0, @ov2_im_cw, @ov2_im_ch)
- @ov2_number_bitmap.blt(0 + ((@ov2_im_cw - 7) * r), 0, @ov2_number_image, @ov2_src_rect)
- end
- unless $game_system.xasovd_lv == 0
- $game_player.animation_id = OVDANI
- $game_temp.misc_text = OVDTEXT
- $game_temp.misc_text_time = 25
- $game_temp.misc_text_pop = true
- if $game_system.xasovd_lv == @ovdmaxlevel
- text = " Max"
- else
- text = $game_system.xasovd_lv
- end
- $game_temp.ifw_text = "Overdrive LV " + text.to_s
- $game_temp.ifw_active = true
- end
- end
-
- #--------------------------------------------------------------------------
- # 火的刷新
- #--------------------------------------------------------------------------
- def fire_update
- @ov3_sprite.bitmap.clear
- @ov3_flow_speed += 1
- if @ov3_flow_speed > 3
- @ov3_flow += 1
- @ov3_flow_speed = 0
- end
- @ov3_flow = 0 if @ov3_flow >= 4
- @ov3_src_rect_back = Rect.new(@ov3_width * @ov3_flow, 0,@ov3_width, @ov3_image.height)
- @ov3_bitmap.blt(0,0, @ov3_image, @ov3_src_rect_back)
- @ov3_sprite.x = -5 + @ovd_meter_width + OV_METER_X + OV_HUD_X
- @ov3_sprite.y = -10 + OV_METER_Y + OV_HUD_Y
- end
-
- #--------------------------------------------------------------------------
- # 必杀技表格刷新
- #--------------------------------------------------------------------------
- def ovd_meter_flow_update
- @ovd_meter_sprite.bitmap.clear
- if $game_system.xasovd_lv == @ovdmaxlevel
- @ovd_meter_width = @ovd_meter_range
- ovd_y = @ovd_meter_height
- else
- @ovd_meter_width = @ovd_meter_range * $game_system.xasovd_gauge / 100
- ovd_y = 0
- end
- @ovd_meter_src_rect = Rect.new(@ovd_meter_flow, ovd_y, @ovd_meter_width, @ovd_meter_height)
- @ovd_meter_bitmap.blt(0,0, @ovd_meter_image, @ovd_meter_src_rect)
- @ovd_meter_flow += 5
- if @ovd_meter_flow >= @ovd_meter_image.width - @ovd_meter_range
- @ovd_meter_flow = 0
- end
- end
-
- end
- #-------------------------------------------------------------------------------
- # Scene_Map
- #-------------------------------------------------------------------------------
- class Scene_Map
-
- #--------------------------------------------------------------------------
- # Main
- #--------------------------------------------------------------------------
- alias ovd_main main
- def main
- @ovd_viewport = Viewport.new(0, 0, 640, 480)
- @ovd_viewport.z = 9999
- @ovd = Overdrive_Sprite.new(@ovd_viewport)
- ovd_main
- @ovd.dispose
- @acthud = nil
- @ovd_viewport.dispose
- @ovd_viewport = nil
- end
-
- #--------------------------------------------------------------------------
- # 刷新
- #--------------------------------------------------------------------------
- alias ovd_update update
- def update
- ovd_update
- @ovd.update
- end
-
- end
- #==============================================================================
- # Game_System
- #==============================================================================
- class Game_System
- attr_accessor :xasovd_gauge
- attr_accessor :xasovd_lv
-
- #--------------------------------------------------------------------------
- # 初始化
- #--------------------------------------------------------------------------
- alias mog_xasovd_initialize initialize
- def initialize
- mog_xasovd_initialize
- @xasovd_gauge = 0
- @xasovd_lv = 0
- end
-
- #--------------------------------------------------------------------------
- # Xasovd Gauge
- #--------------------------------------------------------------------------
- def xasovd_gauge
- n = [[@xasovd_gauge, 0].max, 100].min
- return n
- end
- end
- #==============================================================================
- # Game_Battler
- #==============================================================================
- class Game_Battler
- include MOG
- #--------------------------------------------------------------------------
- # 攻击效果
- #--------------------------------------------------------------------------
- alias mog_xasovd_attack_effect attack_effect
- def attack_effect(attacker)
- mog_xasovd_attack_effect(attacker)
- ovdmaxlevel = $game_variables[OVD_MAX_LEVEL_VAR_ID]
- if $game_switches[XAS_OVDVIS] == false and
- self.damage.to_i > 0 and ovdmaxlevel > 0 and
- attacker.is_a?(Game_Enemy)
- if $game_system.xasovd_lv < ovdmaxlevel
- dmg = self.damage * OVD_DAMAGE_EFFICACY / self.maxhp
- dmg = 3 if dmg < 3
- $game_system.xasovd_gauge += 3 + dmg
- ovd_gain(ovdmaxlevel)
- end
- end
- end
-
- #--------------------------------------------------------------------------
- # 技能效果
- #--------------------------------------------------------------------------
- alias mog_xasovd_skill_effect skill_effect
- def skill_effect(user, skill)
- mog_xasovd_skill_effect(user, skill)
- ovdmaxlevel = $game_variables[OVD_MAX_LEVEL_VAR_ID]
- if $game_switches[XAS_OVDVIS] == false and
- self.damage.to_i > 0 and ovdmaxlevel > 0
- if skill.element_set.include?($data_system.elements.index("OVD")) and
- user.is_a?(Game_Actor) and self.is_a?(Game_Enemy) and not
- XAS_BA_ENEMY::ITEM_ENEMY.include?(self.id)
- xas_ovd_gain = OVD_GAIN[skill.id]
- if xas_ovd_gain != nil and $game_system.xasovd_lv < ovdmaxlevel
- $game_system.xasovd_gauge += xas_ovd_gain
- else
- $game_system.xasovd_gauge += OVD_DEFAULT_GAIN if $game_system.xasovd_lv < ovdmaxlevel
- end
- ovd_gain(ovdmaxlevel)
- elsif user.is_a?(Game_Enemy) and self.is_a?(Game_Actor)
- if $game_system.xasovd_lv < ovdmaxlevel
- dmg = self.damage * OVD_DAMAGE_EFFICACY / self.maxhp
- dmg = 3 if dmg < 3
- $game_system.xasovd_gauge += 3 + dmg
- ovd_gain(ovdmaxlevel)
- end
- end
- end
- end
-
- #--------------------------------------------------------------------------
- # 获得必杀值
- #--------------------------------------------------------------------------
- def ovd_gain(ovdmaxlevel)
- if $game_system.xasovd_gauge >= 100 and $game_system.xasovd_lv < ovdmaxlevel
- $game_system.xasovd_lv += 1
- $game_system.xasovd_gauge = 0
- end
- end
- end
- #==============================================================================
- # Game_Player
- #==============================================================================
- class Game_Player < Game_Character
- include MOG
- #--------------------------------------------------------------------------
- # 刷新
- #--------------------------------------------------------------------------
- alias mog_xasovd_update update
- def update
- mog_xasovd_update
- if no_action?
- return false
- end
- if Input.trigger?(MOG::OVD_KEY) and $game_system.xasovd_lv != 0 and
- $game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH] == false and
- $game_switches[MOG::XAS_OVDVIS] == false
- unless @actor.states.include?(XAS::BERSERK_ID) or
- @actor.states.include?(XAS::MUTE_ID)
- if $game_system.xasovd_lv > 0
- ovd_level = MOG::OVD_LEVEL[$game_system.xasovd_lv]
- if ovd_level != nil
- action_id = ovd_level
- character_real_name
- self.shoot(action_id) if action_id != nil
- $game_player.clear_setting2
- end
- $game_system.xasovd_gauge = 0
- $game_system.xasovd_lv = 0
- else
- Audio.se_play("Audio/SE/" + OVDSEOFF)
- $game_player.battler.damage = OVDOFF_TEXT
- $game_player.battler.damage_pop = true
- end
- else
- $game_player.battler.damage = XAS::SEALED_TEXT
- $game_player.battler.damage_pop = true
- $game_system.se_play(XAS::SEALED_SE)
- end
- end
- end
- end
- $mog_rgss_xas_overdrive = true
复制代码 有关的素材:
|
|