剑圣
您需要 登录 才可以下载或查看,没有账号?注册会员
使用道具 举报
以下引用紫苏于2009-4-26 7:00:55的发言: sp 是在技能调用公共事件的时候扣的吗?还是上传个工程把,最近太懒了 =P
@use = action_kind == 1 && $data_skills[action_id].chain != [[],0] && $chain.include?((chain = $data_skills[action_id].chain)[1]) if @use == true and chain != [[],0] @use = $data_skills[chain[1]].sp_cost <= @active_battler.sp && @active_battler.skills.include?(chain[1]) end if @use && @phase == 4 && @phase4_step <= 4 @use = $data_skills[chain[1]].sp_cost <= @active_battler.sp - $data_skills[action_id].sp_cost end
以下引用紫苏于2009-4-26 11:19:46的发言: sp 扣两次是因为后来的整合脚本覆盖了 make_skill_action_result,按照原来 RGSS 那样在确定使用技能后马上扣 sp……接着在对象方动画开始的时候又扣了一次~ 至于 sp 判断的问题,你的思路是对的,只不过作者是把 sp 的判断放在 update 里面的,而 update 是每帧都调用,所以在对象方动画开始前判断连击技能消耗的 sp 是否小于(当前 sp - 正在使用的技能的 sp )的话是满足的,但在对象方动画开始之后 sp 已经扣掉了当前正在使用的技能需要消耗的 sp ,再判断的话就会不满足…… 这个脚本的逻辑越写越乱,懒得在原来的 if 那里动手了,直接添加红色部分: @use = action_kind == 1 && $data_skills[action_id].chain != [[],0] && $chain.include?((chain = $data_skills[action_id].chain)[1]) if @use == true and chain != [[],0] @use = $data_skills[chain[1]].sp_cost <= @active_battler.sp && @active_battler.skills.include?(chain[1]) end if @use && @phase == 4 && @phase4_step <= 4 @use = $data_skills[chain[1]].sp_cost <= @active_battler.sp - $data_skills[action_id].sp_cost end
class Scene_Battle def update_phase4_step1(combo = false) # 隐藏帮助窗口 @help_window.visible = false # 判定胜败 if judge # 胜利或者失败的情况下 : 过程结束 return end # 强制行动的战斗者不存在的情况下 if $game_temp.forcing_battler == nil # 设置战斗事件 setup_battle_event # 执行战斗事件中的情况下 if $game_system.battle_interpreter.running? return end end # 强制行动的战斗者存在的情况下 if $game_temp.forcing_battler != nil # 在头部添加后移动 @action_battlers.delete($game_temp.forcing_battler) @action_battlers.unshift($game_temp.forcing_battler) end # 未行动的战斗者不存在的情况下 (全员已经行动) if @action_battlers.size == 0 # 开始同伴命令回合 start_phase2 return end # 初始化动画 ID 和公共事件 ID @animation1_id = 0 @animation2_id = 0 @common_event_id = 0 # 未行动的战斗者移动到序列的头部 @active_battler = @action_battlers.shift # 如果已经在战斗之外的情况下 if @active_battler.index == nil return end # 连续伤害 if @active_battler.hp > 0 and @active_battler.slip_damage? @active_battler.slip_damage_effect @active_battler.damage_pop = true end # 自然解除状态 @active_battler.remove_states_auto if !combo # 刷新状态窗口 @status_window.refresh # 移至步骤 2 @phase4_step = 2 end end
def update_phase4_step1(combo = false) @result = [] if @result == nil update_phase4_step1_2(combo) end
以下引用紫苏于2009-4-26 11:47:40的发言: 看了一下,确实有 BUG—— 正常开始一个回合的顺序应该是先调用 start_phase4 ,这样 $game_temp.battle_turn 就会 +1;然后会进入 update_phase4_step1,这个方法内部就调用了自动解除状态的方法~ 但现在是连击成功时直接调用 update_phase4_step1, 使得回合数没有增加,自动解除状态却执行了…… 在原来的 Scene_Battle 的 update_phase4_step1 定义处添加红色部分: class Scene_Battle def update_phase4_step1(combo = false) # 隐藏帮助窗口 @help_window.visible = false # 判定胜败 if judge # 胜利或者失败的情况下 : 过程结束 return end # 强制行动的战斗者不存在的情况下 if $game_temp.forcing_battler == nil # 设置战斗事件 setup_battle_event # 执行战斗事件中的情况下 if $game_system.battle_interpreter.running? return end end # 强制行动的战斗者存在的情况下 if $game_temp.forcing_battler != nil # 在头部添加后移动 @action_battlers.delete($game_temp.forcing_battler) @action_battlers.unshift($game_temp.forcing_battler) end # 未行动的战斗者不存在的情况下 (全员已经行动) if @action_battlers.size == 0 # 开始同伴命令回合 start_phase2 return end # 初始化动画 ID 和公共事件 ID @animation1_id = 0 @animation2_id = 0 @common_event_id = 0 # 未行动的战斗者移动到序列的头部 @active_battler = @action_battlers.shift # 如果已经在战斗之外的情况下 if @active_battler.index == nil return end # 连续伤害 if @active_battler.hp > 0 and @active_battler.slip_damage? @active_battler.slip_damage_effect @active_battler.damage_pop = true end # 自然解除状态 @active_battler.remove_states_auto if !combo # 刷新状态窗口 @status_window.refresh # 移至步骤 2 @phase4_step = 2 end end 然后再在【原:组合键连续技能】重名 update_phase4_step1 那里: def update_phase4_step1(combo = false) @result = [] if @result == nil update_phase4_step1_2(combo) end
本版积分规则 发表回复 回帖并转播 回帖后跳转到最后一页
Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.