赞 | 0 |
VIP | 1 |
好人卡 | 0 |
积分 | 1 |
经验 | 8272 |
最后登录 | 2024-7-5 |
在线时间 | 205 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 69
- 在线时间
- 205 小时
- 注册时间
- 2010-12-16
- 帖子
- 156
|
2楼

楼主 |
发表于 2014-8-10 10:45:56
|
只看该作者
#==============================================================================
# ■ Interpreter (分割定义 6)
#------------------------------------------------------------------------------
# 执行事件命令的解释器。本类在 Game_System 类
# 和 Game_Event 类的内部使用。
#==============================================================================
class Interpreter
#--------------------------------------------------------------------------
# ● 战斗处理
#--------------------------------------------------------------------------
def command_301
# 如果不是无效的队伍
if $data_troops[@parameters[0]] != nil
# ■■■■■■■■ [战斗失败再挑战]战斗前自动存临时档 ■■■■■■■■
file = File.open("Save/Battle_Auto_Save.rxdata", "wb")
# ■END■
# 保存魔法编号
# (将编辑器保存的值以随机值替换)
$game_system.magic_number = $data_system.magic_number
# 写入各种游戏对像
Marshal.dump($game_system, file)
Marshal.dump($game_switches, file)
Marshal.dump($game_variables, file)
Marshal.dump($game_self_switches, file)
Marshal.dump($game_screen, file)
Marshal.dump($game_actors, file)
Marshal.dump($game_party, file)
Marshal.dump($game_troop, file)
Marshal.dump($game_map, file)
Marshal.dump($game_player, file)
file.close
# 关闭地图遇暗敌标记
$fight_again_map = nil
# ■■■■■■■■■■■■■■■ END ■■■■■■■■■■■■■■■■
# 设置中断战斗标志
$game_temp.battle_abort = true
# 设置战斗调用标志
$game_temp.battle_calling = true
$game_temp.battle_troop_id = @parameters[0]
$game_temp.battle_can_escape = @parameters[1]
$game_temp.battle_can_lose = @parameters[2]
# 设置返回调用
current_indent = @list[@index].indent
$game_temp.battle_proc = Proc.new { |n| @branch[current_indent] = n }
end
# 推进索引
@index += 1
# 结束
return false
end
#--------------------------------------------------------------------------
# ● 胜利的情况下
#--------------------------------------------------------------------------
def command_601
# 战斗结果为胜利的情况下
if @branch[@list[@index].indent] == 0
# 删除分支数据
@branch.delete(@list[@index].indent)
# 继续
return true
end
# 不符合条件的情况下 : 指令跳转
return command_skip
end
#--------------------------------------------------------------------------
# ● 逃跑的情况下
#--------------------------------------------------------------------------
def command_602
# 战斗结果为逃跑的情况下
if @branch[@list[@index].indent] == 1
# 删除分支数据
@branch.delete(@list[@index].indent)
# 继续
return true
end
# 不符合条件的情况下 : 指令跳转
return command_skip
end
还有这个一小段 |
|