Problem with godot is that the randi function is not really random hahaha.
here's my random generator function from my one of my projects.
static func randomNumber():
#Author: Christian Quiel Panuncillo
#Date: 23/01/2018
#Description: Returns a random number based on seconds and the randi().
return OS.get_time().second+randi()
Using this would give you a perfect set of random numbers based on seconds. Convert your code that spawns bubble bullets into a single function argument with at least 1 function argument that accepts bullects, say:
func shootBubble(bullet:PackedScene)
And bullet:PackedScene passed variable is the prefabricated scenes for each type of bubble bullet. Inside the function you can instantiate the bullet as
bullet.instance()
After making the function make an array variable containing all the different bullets. Like:
var magazine = [ load("res://prefabs/yellowBall.tscn"),
load("res://prefabs/redBall.tscn"),
load("res://prefabs/blueBall.tscn")]
After that call the function as:
shootBubble(magazine[randomNumber()%magazine.size()])
The end result should allow you to randomly select a bubble type to shoot. Hope this helps you.