if @active_battler.is_a?(Game_Enemy)
case item.scope
when 1 # 敌单体
index = @active_battler.current_action.target_index
@target_battlers.push($game_party.smooth_target_actor(index))
敌方秒(0, item, 0, type, $game_party.smooth_target_actor(index))
when 2 # 敌全体
index = @active_battler.current_action.target_index
for actor in $game_party.actors
if actor.exist?
@target_battlers.push(actor)
end
end
敌方秒(0, item, 0, type, $game_party.smooth_target_actor(index))
when 3 # 我方单体
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
敌方秒(0, item, 1, type, $game_troop.smooth_target_enemy(index))
when 4 # 我方全体
index = @active_battler.current_action.target_index
for enemy in $game_troop.enemies
if enemy.exist?
@target_battlers.push(enemy)
end
end
敌方秒(0, item, 1, type, $game_troop.smooth_target_enemy(index))
when 5 # 我方单体 (HP 0)
index = @active_battler.current_action.target_index
enemy = $game_troop.enemies[index]
if enemy != nil and enemy.hp0?
@target_battlers.push(enemy)
end
敌方秒(1, item, 1, type, $game_troop.smooth_target_enemy(index))
when 6 # 我方全体 (HP 0)
index = @active_battler.current_action.target_index
for enemy in $game_troop.enemies
if enemy != nil and enemy.hp0?
@target_battlers.push(enemy)
end
end
敌方秒(1, item, 1, type, $game_troop.smooth_target_enemy(index))
when 7 # 使用者
@target_battlers.push(@active_battler)
end
end
if @active_battler.is_a?(Game_Actor)
# 效果范围分支
case item.scope
when 1 # 敌单体
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
我方秒(0, item, 0, type, $game_troop.smooth_target_enemy(index))
when 2 # 敌全体
index = @active_battler.current_action.target_index
for enemy in $game_troop.enemies
if enemy.exist?
@target_battlers.push(enemy)
end
end
我方秒(0, item, 0, type, $game_troop.smooth_target_enemy(index))
when 3 # 我方单体
index = @active_battler.current_action.target_index
@target_battlers.push($game_party.smooth_target_actor(index))
我方秒(0, item, 1, type, $game_party.smooth_target_actor(index))
when 4 # 我方全体
index = @active_battler.current_action.target_index
for actor in $game_party.actors
if actor.exist?
@target_battlers.push(actor)
end
end
我方秒(0, item, 1, type, $game_party.smooth_target_actor(index))
when 5 # 我方单体 (HP 0)
index = @active_battler.current_action.target_index
actor = $game_party.actors[index]
if actor != nil and actor.hp0?
@target_battlers.push(actor)
end
我方秒(1, item, 1, type, $game_party.smooth_target_actor(index))
when 6 # 我方全体 (HP 0)
index = @active_battler.current_action.target_index
for actor in $game_party.actors
if actor != nil and actor.hp0?
@target_battlers.push(actor)
end
end
我方秒(1, item, 1, type, $game_party.smooth_target_actor(index))
when 7 # 使用者
@target_battlers.push(@active_battler)
end
end
end
#--------------------------------------------------------------------------
# ● 生成特技行动结果
#--------------------------------------------------------------------------
def make_skill_action_result
# 获取特技 @skill = $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
# 刷新状态窗口
@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
# 设置对像侧战斗者
# 应用物品效果
for target in @target_battlers
target.item_effect(@item)
end
end
def 敌方秒(n, item, t, type, 目标)
# ----------------------------------------
return if @多秒_特技[item.id].nil? and @多秒_物品[item.id].nil?
@target_battlers = []
case t
when 0
for actor in $game_party.actors
@target_battlers.push(actor) if actor.exist?
end
when 1
for enemy in $game_troop.enemies
@target_battlers.push(enemy) if enemy.exist?
end
end
return if @多秒_特技[item.id] >= @target_battlers.size
while @target_battlers.size > @多秒_特技[item.id]
a = rand(@target_battlers.size)
unless a == @target_battlers.size - 1 or
# 如果用了我发布的嘲讽状态脚本 请把后边的注释去掉!
@target_battlers[a] == 目标# or @target_battlers[a].state? Wall
@target_battlers.delete_at(a)
end
end
# -------------------------------------------
end
# 参数 是否hp0 项目 对敌还是对友 特技还是物品 目标
def 我方秒(n, item, t, type, 目标)
# ----------------------------------------
return if @多秒_特技[item.id].nil? and @多秒_物品[item.id].nil?
@target_battlers = []
case type
when 0 # 特技
case t
when 0
for enemy in $game_troop.enemies
case n
when 0
@target_battlers.push(enemy) if enemy.exist?
when 1
@target_battlers.push(enemy) unless enemy.exist?
end
end
when 1
for actor in $game_party.actors
case n
when 0
@target_battlers.push(actor) if actor.exist?
when 1
@target_battlers.push(actor) unless actor.exist?
end
end
end
return if @多秒_特技[item.id] >= @target_battlers.size
while @target_battlers.size > @多秒_特技[item.id]
a = rand(@target_battlers.size)
unless a == @target_battlers.size - 1 or
@target_battlers[a] == 目标
@target_battlers.delete_at(a)
end
end
when 1 # 物品
case t
when 0
for enemy in $game_troop.enemies
case n
when 0
@target_battlers.push(enemy) if enemy.exist?
when 1
@target_battlers.push(enemy) unless enemy.exist?
end
end
when 1
for actor in $game_party.actors
case n
when 0
@target_battlers.push(actor) if actor.exist?
when 1
@target_battlers.push(actor) unless actor.exist?
end
end
end
return if @多秒_物品[item.id] >= @target_battlers.size
while @target_battlers.size > @多秒_物品[item.id]
a = rand(@target_battlers.size)
unless a == @target_battlers.size - 1 or
@target_battlers[a] == 目标
@target_battlers.delete_at(a)
end
end
end
# ----------------------------------------
end