#=================================================================
# Code 111
# 条件分歧
# 变长参数
#-----------------------------------------------------------------
# Parameter : [0, 1, 0]
#=================================================================
target_text = Text.new do |parameters, *followings|
arg0 = parameters[0].Value
case arg0
when 0
"开关 ".encode + Event_Help.switch(parameters[1].Value) + " == " + Event_Help.switch_state(parameters[2].Value)
when 1
"变量 ".encode + Event_Help.variable(parameters[1].Value) + Event_Help.compare(parameters[4].Value) + Event_Help.variable_or_value(parameters[2].Value, parameters[3].Value)
when 2
"独立开关 ".encode + parameters[1].Text + " == " + Event_Help.switch_state(parameters[2].Value)
when 3
sec = parameters[1].Value
min = sec / 60
sec -= min * 60
"计时器 ".encode + min.to_s + " 分 ".encode + sec.to_s + " 秒 ".encode + ["以上","以下"][parameters[2].Value].encode
when 4
arg1 = parameters[2].Value
case arg1
when 0
action = " 在同伴中".encode
when 1
action = " 名称为 ".encode + parameters[3].Text
when 2
action = " 已经学会技能 ".encode + Event_Help.value(parameters[3].Value, Data["skill"])
when 3
action = " 装备了武器 ".encode + Event_Help.value(parameters[3].Value, Data["weapon"])
when 4
action = " 装备了防具 ".encode + Event_Help.value(parameters[3].Value, Data["armor"])
when 5
action = " 具有状态 ".encode + Event_Help.value(parameters[3].Value, Data["state"])
end
"角色 ".encode + Event_Help.actor(parameters[1].Value) + action
when 5
arg1 = parameters[2].Value
case arg1
when 0
action = "出现".encode
when 1
action = Event_Help.value(parameters[3].Value, Data["state"])
end
" 敌人 ".encode + Event_Help.enemy(parameters[1].Value) + action
when 6
action = Event_Help.event(parameters[1].Value) + " 为 朝向 ".encode + Event_Help.direction(parameters[2].Value)
when 7
"金钱 #{parameters[1].Value} ".encode + (parameters[2].Value == 0 ? "以上" : "以下").encode
when 8
item = Event_Help.value(parameters[1].Value, Data["item"])
"持有 ".encode + item
when 9
item = Event_Help.value(parameters[1].Value, Data["weapon"])
"持有 ".encode + item
when 10
item = Event_Help.value(parameters[1].Value, Data["armor"])
"持有 ".encode + item
when 11
"按钮 ".encode + Event_Help.press(parameters[1].Value) + " 被按下时".encode
when 12
"脚本 ".encode + parameters[1].Text
end
end