本帖最后由 guoxiaomi 于 2018-3-7 13:04 编辑
脚本这里提到了一个 @active_battlers.auto_battle_targets,但是在战斗结束和战斗前都没有进行 clear。
在行动的第一回合,如果 @active_battler.restriction 不等于 2 或 3,auto_battler_targets 会成为上一次战斗中选取的 Game_Enemy 对象,理论上这个对象应该在战斗结束后就会被释放掉的。
这个地方会与全动画脚本冲突,因为全动画脚本要在 Game_Enemy 上播放动画,不会显示相应的动画内容。
不知道是不是开了AI战斗就能避免。
#-------------------------------------------------------------------------- def make_basic_auto case @active_battler.current_action.basic when 0 @animation1_id = @active_battler.animation1_id @animation2_id = @active_battler.animation2_id if @active_battler.restriction == 3 target = $game_party.random_target_actor @active_battler.auto_battle_targets = [] @active_battler.auto_battle_targets.push(target) elsif @active_battler.restriction == 2 target = $game_troop.random_target_enemy @active_battler.auto_battle_targets = [] @active_battler.auto_battle_targets.push(target) end @target_battlers = @active_battler.auto_battle_targets for target in @target_battlers target.attack_effect(@active_battler) end return when 1 @help_window.set_text($data_system.words.guard, 1) return end end #--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def make_basic_auto
case @active_battler.current_action.basic
when 0
@animation1_id = @active_battler.animation1_id
@animation2_id = @active_battler.animation2_id
if @active_battler.restriction == 3
target = $game_party.random_target_actor
@active_battler.auto_battle_targets = []
@active_battler.auto_battle_targets.push(target)
elsif @active_battler.restriction == 2
target = $game_troop.random_target_enemy
@active_battler.auto_battle_targets = []
@active_battler.auto_battle_targets.push(target)
end
@target_battlers = @active_battler.auto_battle_targets
for target in @target_battlers
target.attack_effect(@active_battler)
end
return
when 1
@help_window.set_text($data_system.words.guard, 1)
return
end
end
#--------------------------------------------------------------------------
|