Let's just assume that Playership is a class. Then you have different states of your execution:
public class RandomEncounters
{
PlayerShip subShip = new PlayerShip(); //a
Now you have to different references. One reference is from the static object mainShip and the other is from the just instantiated object subShip. But after you call the method:
public void PlayEncounter()
{
subShip = Program.mainShip;
}
}
You reference to the static object mainShip, so both subShip and mainShip are referencing the same object.
is this a bad idea?
What exactly? To reference to another object? No, it's not a bad idea and it's used quite often.
But it is not a good idea to assign your object directly (I marked the line with an a) if you never use the firstly assigned object (I can't see any use, maybe you used subShip already before executing PlayEncounter(), then it would make sense again). But if you didn't use it you directly overwrite the old reference, it was just a waste of RAM space and execution time. It's not a big difference, but you can't call it a good idea either.
PlayerShip subShip = new PlayerShip();line instead ofPlayerShip subShip;you are creating two instances but you are overwriting the reference to this instance with a reference to the PlayerShip of the Program class