例:2,3,5,7号变量里面(至少)有一个变量和11号变量相等
if [2, 3, 5, 7].any?{ |i| $game_variables[i] == $game_variables[11]} # do something else # do other things end
if [2, 3, 5, 7].any?{ |i| $game_variables[i] == $game_variables[11]}
# do something
else
# do other things
end
|