According to international law, if nations A and B are at war, and A has overseas forces in missions unrelated to the war, can B attack them? If a country decides to switch sides in a war, do they have to inform their previous allies? Or can they just attack them out of nowhere?