随手写了一个,未测试
class Game_Enemy def make_drop_items enemy.drop_items.each_with_object([]) do |di, r| if di.kind > 0 && rand * 100 < drop_item_rate * di.denominator r.push(item_object(di.kind, di.data_id)) end end end end
class Game_Enemy
def make_drop_items
enemy.drop_items.each_with_object([]) do |di, r|
if di.kind > 0 && rand * 100 < drop_item_rate * di.denominator
r.push(item_object(di.kind, di.data_id))
end
end
end
end
|