赞 | 352 |
VIP | 55 |
好人卡 | 9 |
积分 | 364 |
经验 | 117206 |
最后登录 | 2024-11-10 |
在线时间 | 10781 小时 |
Lv5.捕梦者
- 梦石
- 0
- 星屑
- 36367
- 在线时间
- 10781 小时
- 注册时间
- 2009-3-15
- 帖子
- 4813
|
#============================================================================== # 组合键连续特技系统 By 绿发的Eclair #============================================================================== # 仿传说系列的效果,在使用一个特技中按照一定的顺序摁键可以再使用一个特技。 # 使用方法:在下面的自定义部分里设定特技对应的组合键和连接上的特技。 # 为了避免玩家二周目或者提前知道的情况下一开始就是用强力连续技能的事情发生, # 特别做了判断,只有$chain这个数组包括的技能才会被连出来。 # 事件脚本中使用 add_chain(可以连出来的特技ID) 可以给这个数组添加新特技。 # 就好像“学会新的”一样。 #============================================================================== $chain = [ ]#可以使用的连续技 module RPG class Skill def chain ############################################################自定义部分 case id when 87 chain = ["上"] #chain = ["上","上","A"] chain_id = 88 #夏娜 when 98 chain = ["下","右","A"] chain_id = 97 when 97 chain = ["下","右","A"] chain_id = 99 when 99 chain = ["下","右","下","右","A"] chain_id = 103 when 102 chain = ["下","左","B"] chain_id = 100 when 100 chain = ["下","左","B"] chain_id = 101 #咲 when 122 chain = ["下","右","A"] chain_id = 120 when 120 chain = ["下","右","A"] chain_id = 121 when 123 chain = ["上","下","A"] chain_id = 124 when 124 chain = ["上","下","A"] chain_id = 126 when 126 chain = ["上","下","上","下","A"] chain_id = 127 #奈叶 when 140 chain = ["下","右","A"] chain_id = 138 when 138 chain = ["下","右","A"] chain_id = 137 when 139 chain = ["下","左","B"] chain_id = 141 when 137 chain = ["下","右","下","右","A"] chain_id = 142 #菲特 when 154 chain = ["下","左","B"] chain_id = 153 when 153 chain = ["下","左","B"] chain_id = 151 when 151 chain = ["下","左","B"] chain_id = 152 when 155 chain = ["下","右","A"] chain_id = 156 when 152 chain = ["下","左","下","右","B"] chain_id = 157 #路易斯 when 168 chain = ["上","上","A"] chain_id = 167 when 167 chain = ["上","上","A"] chain_id = 170 when 170 chain = ["下","下","下","下","A"] chain_id = 171 #伊卡洛斯 when 183 chain = ["下","右","A"] chain_id = 181 when 181 chain = ["下","右","A"] chain_id = 185 when 184 chain = ["下","右","B"] chain_id = 182 when 185 chain = ["下","右","下","右","A"] chain_id = 186 #妮姆芙 when 197 chain = ["下","下","B"] chain_id = 200 when 200 chain = ["下","下","B"] chain_id = 201 when 198 chain = ["上","下","A"] chain_id = 199 when 199 chain = ["上","下","A"] chain_id = 202 when 202 chain = ["上","下","上","下","A"] chain_id = 203 #约修亚 when 213 chain = ["上","下","A"] chain_id = 215 when 215 chain = ["上","下","上","下","A"] chain_id = 857 when 857 chain = ["上","下","上","下","左","右","左","右","A"] chain_id = 858 when 217 chain = ["上","下","B"] chain_id = 214 when 214 chain = ["上","下","B"] chain_id = 216 when 216 chain = ["上","下","上","下","B"] chain_id = 856 when 856 chain = ["上","下","上","下","左","右","左","右","B"] chain_id = 859 #艾丝蒂尔 when 227 chain = ["下","右","B"] chain_id = 228 when 228 chain = ["下","右","A"] chain_id = 229 when 229 chain = ["下","左","A"] chain_id = 230 when 230 chain = ["下","左","下","右","B"] chain_id = 864 when 864 chain = ["下","左","下","右","A"] chain_id = 865 when 865 chain = ["下","左","下","右","下","左","下","右","A"] chain_id = 866 #在这里按照上面的格式添加 #when n #chain = ["第一个摁键","第二个摁键","第三个摁键"] #chain_id = 连接技能的ID ############################################################ else chain = [] chain_id = 0 end return [chain,chain_id] end end end class Interpreter def add_chain(id) $chain.push(id) end end class Scene_Battle alias update_phase4_step1_2 :update_phase4_step1 def update_phase4_step1 @result = [] if @result == nil update_phase4_step1_2 end alias update_e :update def update if (@phase4_step == 3 or @phase4_step == 4 or @phase4_step == 5) && @active_battler.current_action.kind == 1 @use = @active_battler.current_action.kind == 1 && $data_skills[@active_battler.current_action.skill_id].chain != [[],0] && $chain.include?($data_skills[@active_battler.current_action.skill_id].chain[1]) if @use == true and $data_skills[@active_battler.current_action.skill_id].chain != [[],0] @use = $data_skills[$data_skills[@active_battler.current_action.skill_id].chain[1]].sp_cost <= @active_battler.sp end if @use == true if Input.trigger?(Input::A) @result.push("A") end if Input.trigger?(Input::B) @result.push("B") end if Input.trigger?(Input::C) @result.push("C") end if Input.trigger?(Input::X) @result.push("X") end if Input.trigger?(Input::Y) @result.push("Y") end if Input.trigger?(Input::Z) @result.push("Z") end if Input.trigger?(Input::L) @result.push("L") end if Input.trigger?(Input::R) @result.push("R") end if Input.trigger?(Input::UP) @result.push("上") end if Input.trigger?(Input::DOWN) @result.push("下") end if Input.trigger?(Input::LEFT) @result.push("左") end if Input.trigger?(Input::RIGHT) @result.push("右") end end end if @phase == 4 and @phase4_step > 5 and @active_battler.current_action.kind == 1 and @use == true if @result == $data_skills[@active_battler.current_action.skill_id].chain[0] @active_battler.current_action.kind = 1 a = $data_skills[@active_battler.current_action.skill_id].chain[1] @active_battler.current_action.skill_id = a @action_battlers.unshift(@active_battler) update_phase4_step1 end end update_e end #-------------------------------------------------------------------------- # ● 生成特技行动结果 #-------------------------------------------------------------------------- def make_skill_action_result # 获取特技 @skill = $data_skills[@active_battler.current_action.skill_id] #============================================================ #SP不足以支付对应特技的情况下,转为普通攻击(仅适用于敌人) if @active_battler.is_a?(Game_Enemy) && @active_battler.sp < @skill.sp_cost # # 设置攻击 ID @animation1_id = @active_battler.animation1_id @animation2_id = @active_battler.animation2_id if @active_battler.restriction == 3 target = $game_troop.random_target_enemy elsif @active_battler.restriction == 2 target = $game_party.random_target_actor else index = @active_battler.current_action.target_index target = $game_party.smooth_target_actor(index) end # 设置对像方的战斗者序列 @target_battlers = [target] # 应用通常攻击效果 for target in @target_battlers target.attack_effect(@active_battler) end return end #============================================================ # 如果不是强制行动 unless @active_battler.current_action.forcing || @result != nil && [] #Eclair # 因为 SP 耗尽而无法使用的情况下 unless @active_battler.skill_can_use?(@skill.id) # 清除强制行动对像的战斗者 $game_temp.forcing_battler = nil # 移至步骤 1 @phase4_step = 1 return end end if @skill.element_set.include?(20) and @active_battler.mp < 100 # return false $game_temp.forcing_battler = nil # 移至步骤 1 @phase4_step = 1 return end @result = [] #Eclair # 消耗 SP @active_battler.sp -= @skill.sp_cost if @skill.element_set.include?(20) #★,消耗MP储存条 @active_battler.mp -= 100 @active_battler.mp += 1 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 #============================================================================== # 组合键连续特技系统 By 绿发的Eclair #==============================================================================
#==============================================================================
# 组合键连续特技系统 By 绿发的Eclair
#==============================================================================
# 仿传说系列的效果,在使用一个特技中按照一定的顺序摁键可以再使用一个特技。
# 使用方法:在下面的自定义部分里设定特技对应的组合键和连接上的特技。
# 为了避免玩家二周目或者提前知道的情况下一开始就是用强力连续技能的事情发生,
# 特别做了判断,只有$chain这个数组包括的技能才会被连出来。
# 事件脚本中使用 add_chain(可以连出来的特技ID) 可以给这个数组添加新特技。
# 就好像“学会新的”一样。
#==============================================================================
$chain = [ ]#可以使用的连续技
module RPG
class Skill
def chain
############################################################自定义部分
case id
when 87
chain = ["上"]
#chain = ["上","上","A"]
chain_id = 88
#夏娜
when 98
chain = ["下","右","A"]
chain_id = 97
when 97
chain = ["下","右","A"]
chain_id = 99
when 99
chain = ["下","右","下","右","A"]
chain_id = 103
when 102
chain = ["下","左","B"]
chain_id = 100
when 100
chain = ["下","左","B"]
chain_id = 101
#咲
when 122
chain = ["下","右","A"]
chain_id = 120
when 120
chain = ["下","右","A"]
chain_id = 121
when 123
chain = ["上","下","A"]
chain_id = 124
when 124
chain = ["上","下","A"]
chain_id = 126
when 126
chain = ["上","下","上","下","A"]
chain_id = 127
#奈叶
when 140
chain = ["下","右","A"]
chain_id = 138
when 138
chain = ["下","右","A"]
chain_id = 137
when 139
chain = ["下","左","B"]
chain_id = 141
when 137
chain = ["下","右","下","右","A"]
chain_id = 142
#菲特
when 154
chain = ["下","左","B"]
chain_id = 153
when 153
chain = ["下","左","B"]
chain_id = 151
when 151
chain = ["下","左","B"]
chain_id = 152
when 155
chain = ["下","右","A"]
chain_id = 156
when 152
chain = ["下","左","下","右","B"]
chain_id = 157
#路易斯
when 168
chain = ["上","上","A"]
chain_id = 167
when 167
chain = ["上","上","A"]
chain_id = 170
when 170
chain = ["下","下","下","下","A"]
chain_id = 171
#伊卡洛斯
when 183
chain = ["下","右","A"]
chain_id = 181
when 181
chain = ["下","右","A"]
chain_id = 185
when 184
chain = ["下","右","B"]
chain_id = 182
when 185
chain = ["下","右","下","右","A"]
chain_id = 186
#妮姆芙
when 197
chain = ["下","下","B"]
chain_id = 200
when 200
chain = ["下","下","B"]
chain_id = 201
when 198
chain = ["上","下","A"]
chain_id = 199
when 199
chain = ["上","下","A"]
chain_id = 202
when 202
chain = ["上","下","上","下","A"]
chain_id = 203
#约修亚
when 213
chain = ["上","下","A"]
chain_id = 215
when 215
chain = ["上","下","上","下","A"]
chain_id = 857
when 857
chain = ["上","下","上","下","左","右","左","右","A"]
chain_id = 858
when 217
chain = ["上","下","B"]
chain_id = 214
when 214
chain = ["上","下","B"]
chain_id = 216
when 216
chain = ["上","下","上","下","B"]
chain_id = 856
when 856
chain = ["上","下","上","下","左","右","左","右","B"]
chain_id = 859
#艾丝蒂尔
when 227
chain = ["下","右","B"]
chain_id = 228
when 228
chain = ["下","右","A"]
chain_id = 229
when 229
chain = ["下","左","A"]
chain_id = 230
when 230
chain = ["下","左","下","右","B"]
chain_id = 864
when 864
chain = ["下","左","下","右","A"]
chain_id = 865
when 865
chain = ["下","左","下","右","下","左","下","右","A"]
chain_id = 866
#在这里按照上面的格式添加
#when n
#chain = ["第一个摁键","第二个摁键","第三个摁键"]
#chain_id = 连接技能的ID
############################################################
else
chain = []
chain_id = 0
end
return [chain,chain_id]
end
end
end
class Interpreter
def add_chain(id)
$chain.push(id)
end
end
class Scene_Battle
alias update_phase4_step1_2 :update_phase4_step1
def update_phase4_step1
@result = [] if @result == nil
update_phase4_step1_2
end
alias update_e :update
def update
if (@phase4_step == 3 or @phase4_step == 4 or @phase4_step == 5) && @active_battler.current_action.kind == 1
@use = @active_battler.current_action.kind == 1 && $data_skills[@active_battler.current_action.skill_id].chain != [[],0] && $chain.include?($data_skills[@active_battler.current_action.skill_id].chain[1])
if @use == true and $data_skills[@active_battler.current_action.skill_id].chain != [[],0]
@use = $data_skills[$data_skills[@active_battler.current_action.skill_id].chain[1]].sp_cost <= @active_battler.sp
end
if @use == true
if Input.trigger?(Input::A)
@result.push("A")
end
if Input.trigger?(Input::B)
@result.push("B")
end
if Input.trigger?(Input::C)
@result.push("C")
end
if Input.trigger?(Input::X)
@result.push("X")
end
if Input.trigger?(Input::Y)
@result.push("Y")
end
if Input.trigger?(Input::Z)
@result.push("Z")
end
if Input.trigger?(Input::L)
@result.push("L")
end
if Input.trigger?(Input::R)
@result.push("R")
end
if Input.trigger?(Input::UP)
@result.push("上")
end
if Input.trigger?(Input::DOWN)
@result.push("下")
end
if Input.trigger?(Input::LEFT)
@result.push("左")
end
if Input.trigger?(Input::RIGHT)
@result.push("右")
end
end
end
if @phase == 4 and @phase4_step > 5 and @active_battler.current_action.kind == 1 and @use == true
if @result == $data_skills[@active_battler.current_action.skill_id].chain[0]
@active_battler.current_action.kind = 1
a = $data_skills[@active_battler.current_action.skill_id].chain[1]
@active_battler.current_action.skill_id = a
@action_battlers.unshift(@active_battler)
update_phase4_step1
end
end
update_e
end
#--------------------------------------------------------------------------
# ● 生成特技行动结果
#--------------------------------------------------------------------------
def make_skill_action_result
# 获取特技
@skill = $data_skills[@active_battler.current_action.skill_id]
#============================================================
#SP不足以支付对应特技的情况下,转为普通攻击(仅适用于敌人)
if @active_battler.is_a?(Game_Enemy) && @active_battler.sp < @skill.sp_cost #
# 设置攻击 ID
@animation1_id = @active_battler.animation1_id
@animation2_id = @active_battler.animation2_id
if @active_battler.restriction == 3
target = $game_troop.random_target_enemy
elsif @active_battler.restriction == 2
target = $game_party.random_target_actor
else
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
end
# 设置对像方的战斗者序列
@target_battlers = [target]
# 应用通常攻击效果
for target in @target_battlers
target.attack_effect(@active_battler)
end
return
end
#============================================================
# 如果不是强制行动
unless @active_battler.current_action.forcing || @result != nil && [] #Eclair
# 因为 SP 耗尽而无法使用的情况下
unless @active_battler.skill_can_use?(@skill.id)
# 清除强制行动对像的战斗者
$game_temp.forcing_battler = nil
# 移至步骤 1
@phase4_step = 1
return
end
end
if @skill.element_set.include?(20) and @active_battler.mp < 100
# return false
$game_temp.forcing_battler = nil
# 移至步骤 1
@phase4_step = 1
return
end
@result = [] #Eclair
# 消耗 SP
@active_battler.sp -= @skill.sp_cost
if @skill.element_set.include?(20) #★,消耗MP储存条
@active_battler.mp -= 100
@active_battler.mp += 1
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
#==============================================================================
# 组合键连续特技系统 By 绿发的Eclair
#==============================================================================
或且你研究一下这个脚本.. |
|