芯☆淡茹水 发表于 2014-8-30 08:18
增加一个设置,修改 2 处
我想说,至少告诉我在哪修改吧
#消耗 HP 技能ID以及消耗量。 CONSUME_HP_SKILLS = {57=>100,61=>120} class Game_Battler #-------------------------------------------------------------------------- alias add_skill_can_use?_xdrs skill_can_use? def skill_can_use?(skill_id) if CONSUME_HP_SKILLS.keys.include?(skill_id) return self.hp > CONSUME_HP_SKILLS[skill_id] end add_skill_can_use?_xdrs(skill_id) end end #============================================================================= class Scene_Battle #-------------------------------------------------------------------------- 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 @active_battler.sp -= @skill.sp_cost
#消耗 HP 技能ID以及消耗量。
CONSUME_HP_SKILLS = {57=>100,61=>120}
class Game_Battler
#--------------------------------------------------------------------------
alias add_skill_can_use?_xdrs skill_can_use?
def skill_can_use?(skill_id)
if CONSUME_HP_SKILLS.keys.include?(skill_id)
return self.hp > CONSUME_HP_SKILLS[skill_id]
end
add_skill_can_use?_xdrs(skill_id)
end
end
#=============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
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
@active_battler.sp -= @skill.sp_cost
应该是插入到Main前面?
# 刷新状态窗口 @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
# 刷新状态窗口
@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
也找到了
if CONSUME_HP_SKILLS.keys.include?(@skill.id)
@active_battler.hp -= CONSUME_HP_SKILLS[@skill.id]
end
该怎么办
|