def 封印_装备_类型 保存_内容 = Array.new 返回 保存_内容 除非 @备注 内容 = @备注.扫描(/<装备封印\s?(\d+(?:\s?*,\s?*\d+)*)>/) 除非 内容 == [] and 内容.空? 内容.flatten! for i in 0..内容.大小 - 1 内容[i].扫描(/\d+/).each { |num| 保存_内容.push(num.to_i)} end end 返回 保存_内容 end
[1,4,[[67,5],4],3] >>>>>> [1,4,67,5,4,3]
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |