#==============================================================================
# HISTÓRICO
#==============================================================================
# v1.1 - Correção de não ativar o nome quando não se define uma animação.
#==============================================================================
module MOG_ATB_SKILL_NAME
#技能名位置.
SKILL_NAME_POSITION = [Graphics.width / 2,50]
#技能名图片的位置.
SKILL_NAME_LAYOUT_POSITION = [10,-18]
#是否显示滑动效果.
SKILL_NAME_SLIDE_ANIMATION = true
#技能名 Z 坐标.
SKILL_NAME_Z = 150
#字体设定.
SKILL_NAME_FONT_SIZE = 20
SKILL_NAME_FONT_BOLD = true
SKILL_NAME_FONT_ITALIC = false
SKILL_NAME_FONT_COLOR = [255,255,255,255]
# 使用物品时,不显示物品名称的的物品.
# 例子:DISABLE_ITEM_NAME = [5 , 8 , 21]
DISABLE_ITEM_NAME = []
# 使用技能时,不显示技能名称的的技能.
# DISABLE_SKILL_NAME = [25 , 36 , 98]
DISABLE_SKILL_NAME = [127,128,129,130,131,156,160]
end
$imported = {} if $imported.nil?
$imported[:mog_atb_skill_name] = true
#==============================================================================
# ** Game Temp
#==============================================================================
class Game_Temp
#--------------------------------------------------------------------------
# * Hud
#--------------------------------------------------------------------------
def self.battle_hud(filename)
load_bitmap("Graphics/Huds/Battle/", filename)
end
end
#==============================================================================
# ** Scene Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * Use Item
#--------------------------------------------------------------------------
alias mog_skill_name_use_item use_item
def use_item
set_bh_skill_name
mog_skill_name_use_item
$game_temp.show_skill_name = false
end
#--------------------------------------------------------------------------
# * Set BH Skill Name
#--------------------------------------------------------------------------
def set_bh_skill_name
return if !can_execute_bh_skill_name?
item = @subject.current_action.item ; $game_temp.show_skill_name = true
$game_temp.skill_name_bh = [@subject.current_action.item,true]
end
#--------------------------------------------------------------------------
# * Can Execute BH Skill Name
#--------------------------------------------------------------------------
def can_execute_bh_skill_name?
return false if @subject.current_action == nil
return false if @subject.current_action.item == nil
item_id = @subject.current_action.item.id rescue nil
return false if item_id == nil
if @subject.current_action.item.is_a?(RPG::Skill)
return false if MOG_ATB_SKILL_NAME::DISABLE_SKILL_NAME.include?(item_id)
return false if item_id == @subject.attack_skill_id
return false if item_id == @subject.guard_skill_id
elsif @subject.current_action.item.is_a?(RPG::Item)
return false if MOG_ATB_SKILL_NAME::DISABLE_ITEM_NAME.include?(item_id)
end
return true
end
end
#==============================================================================
# ** Spriteset Battle
#==============================================================================
class Spriteset_Battle
include MOG_ATB_SKILL_NAME
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
alias mog_skill_name_initialize initialize
def initialize
create_skill_name
mog_skill_name_initialize
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
alias mog_skill_name_dispose dispose
def dispose
mog_skill_name_dispose
dispose_skill_name
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
alias mog_skill_name_update update
def update
mog_skill_name_update
update_skill_name
end
#--------------------------------------------------------------------------
# * Dispose Skill Name
#--------------------------------------------------------------------------
def dispose_skill_name
return if @skill_name == nil
@skill_name.bitmap.dispose ; @skill_name.dispose
@skill_name_l.bitmap.dispose ; @skill_name_l.dispose
end
#--------------------------------------------------------------------------
# * Update Skill Name
#--------------------------------------------------------------------------
def update_skill_name
return if @skill_name == nil
if @skill_text[1] > 0 and !$game_temp.battle_end
@skill_text[1] -= 1 if !$game_temp.show_skill_name
@skill_name.opacity += 8
@skill_name.x += 2 if @skill_name.x < @skill_name_org[0]
@skill_name_l.x += 2 if @skill_name_l.x < @skill_name_l_org[0]
else
if @skill_name.opacity > 0
@skill_name.opacity -= 8
@skill_name.x += 2 if SKILL_NAME_SLIDE_ANIMATION
@skill_name_l.x += 2 if SKILL_NAME_SLIDE_ANIMATION
end
end
@skill_name_l.opacity = @skill_name.opacity
refresh_skill_name if $game_temp.skill_name_bh[1]
end