#==============================================================================
# ■ Scene_Battle (分割定义 4)
#------------------------------------------------------------------------------
# 处理战斗画面的类。
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ● 生成特技行动结果
#--------------------------------------------------------------------------
alias old_kgh_make_skill_action_result make_skill_action_result
def make_skill_action_result
[url=home.php?mod=space&uid=260100]@skill[/url] = $data_skills[@active_battler.current_action.skill_id]
# 如果不是强制行动
unless @active_battler.current_action.forcing
# 因为 SP 耗尽而无法使用的情况下
unless @active_battler.skill_can_use?(@skill.id)
# 清除强制行动对像的战斗者
$game_temp.forcing_battler = nil
# 移至步骤 1
@phase4_step = 1
return
end
end
# 消耗 SP
# 异界的月追加CP消耗
if @skill.element_set.include?(KGH::Crafts_Skill) or
@skill.element_set.include?(KGH::S_Crafts_Skill)
@active_battler.gain_cp([email]-@skill.sp_cost[/email])
else
@active_battler.sp -= @skill.sp_cost
end
# 刷新状态窗口
@status_window.refresh
# 在帮助窗口显示特技名
@help_window.set_text(@skill.name, 1)
# 设置动画 ID
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# 设置公共事件 ID
@common_event_id = @skill.common_event_id
# 设置对像侧战斗者
set_target_battlers(@skill.scope)
# 应用特技效果
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
end
end
#==============================================================================
# ■ Game_Actor 追加
#------------------------------------------------------------------------------
# 角色结晶槽的升级接口函数为:
# <Game_Actor实例>.cs_levelup(结晶槽ID, 升级幅度) 升级幅度省略则为1
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● 检测技能是否可用,与默认方法略微不同
# skill_id : 技能ID
#--------------------------------------------------------------------------
def skill_can_use?(skill_id)
#如果是CP技能
if $data_skills[skill_id].element_set.include?(KGH::Crafts_Skill) or
$data_skills[skill_id].element_set.include?(KGH::S_Crafts_Skill)
# CP 不足的情况下不能使用
if $data_skills[skill_id].sp_cost > self.cp_store
return false
end
end
return super
end
end