NPCs might gain experience points and levels, if the DM wants to keep track of that. There's no inherent reason they cannot do so. It depends on whether this is a one-shot for the NPC, or whether he might be a recurring character. Also it depends on the level of detail and amount of work the DM wants to do.
I try to build and run my NPCs as much like PCs as possible, and I do track their experience and levels if they are recurring people (as either allies or opponents). If they are just single-shot, disposable allies (or opponents), I don't bother. But I find it adds both realism, and good challenges for the players, if the NPCs change and grow (and learn, both from and about the party).
It can vary, even in the same party. As a player, in one long-term adventure, our party of 3 PCs had acquired quite a selection of allies, with several groups from each of several sources. Plus an NPC we had rescued. The rescued NPC we treated as a full party member, with the DM's consent, and we tracked her experience and levels. She also got death saves when knocked to 0 hp, and other such perks normally accorded to PCs. Most of the other NPCs were not so tracked, having been created as types from the MM such as "thug", "archer", etc. They remained constant and somewhat faceless, and died when knocked to 0 hp.
The DM gets to decide all of that. In my world, even the monsters get death saves and might survive if left unconscious.
How I handle any given NPC is a mix, depending on the importance of the NPC. I will often build a BBG, or a major recurring ally of the party, completely as a PC, and have him make his plans, and level him up as I go just like a PC, to keep pace with the PCs power and the needs of the story.
His main henchmen might be started with an NPC stat block from the MM or Volo's Guide, and I assign them an appropriate level and xp amount, and if they survive a while, I'll add capabilities and level them up from there, using the same progression as PCs. The NPC stat blocks have a few shortcuts and simplifications, but they aren't very different from a PC build of the same level.
Likewise for enemies that aren't the main bad guys, but may end up hanging round for a while. The party recently handled a problem with an orc tribe harassing some towns. The village had been built normally, with a War Chief, a Tanarukk, and 3 Eyes of Gruumsh, all on Giant Boars; 6 Orogs on regular boars, and about 70 Orcs, all according to the monster stat blocks. The party attacked them a few times and weakened them, but then had to go deal with something else. In this case, the party came back in a couple of weeks to finish the job, so the only changes to the orc village were some weapons and tactics, and the addition of a couple of Minotaurs that the Tanarukk had recruited (being of the same religion and all). But if the party had not come back soon, I would have had the orc village starting to train up, and the leaders level up, and them try to find some more new allies, in response to having been attacked by the party.
Lower level grunts I'll just use Thugs or whatever, and leave them at that.
For the leader types, I'll often roll them a couple magic items, as per the table on p.38 of the DMG for starting a PC at higher level. Magic items are more interesting, and better earned, if you have to face them first before you can get them.
This does get more complicated if the bad guys are not PC types. For example, my current campaign features a Hobgoblin Warlord, with a couple Devastators and a few Iron Shadows, as well as an allied rogue Mind Flayer Arcanist. For all of these, I started with the Monster stat blocks. For the Warlord, Devastators, and Mind Flayer, I am tracking experience, and leveling them up as we go to keep a couple levels ahead of the party (which is currently 8 PCs of 6th level). I may start tracking and leveling the Iron Shadows soon as well, if the party decides to pursue one of the other plot lines for a while, and gains some power and levels in the process.
When and how can I change the mask that is 'active'?
While you are attuned to and wear this mask, you can have any of the properties from any one mask.
You choose the 'active' mask when you attune; that is your "any one mask" for the entire rest of the time "while you are attuned to" it. You could take off the mask (losing the properties), and then put it back on (regaining them), but so long as you were still attuned to it you would have locked in your selection of which 'any one mask' you would have the properties from.
If you would like to change the 'active' mask, you will need to de-attune, and then re-attune, selecting a different mask at the time of attunement.
Does the 'active' mask give immunity to its element since the Mask of the Dragon Queen has all the properties of each mask and the properties of the 'active' mask?'
Damage Absorption. You have resistance against the mask’s damage type. If you already have resistance to that damage type from another source, you instead have immunity to that damage type.
The active mask gives you resistance to the element, and the combined mask gives you resistance to all the other damage types. You do not have immunity, because the active mask is not "another source" of resistance - it is the same source; the active mask is part of the combined mask, not a separate source or item (you know it is the same source in part because it uses the same attunement slot). However, it should be easy, at 20th level, to find 'another' source of resistance, be it a spell or magic item such as a potion.
Severin says...
Although the above are how I would rule based on reading the magic item description itself, an independent test of these rulings can be made by analyzing the Stat Block of Severin in Rise of Tiamat. Severin has a number of abilities marked with asterisks, and we are told that these are provided by the (combined) Mask of the Dragon Queen.
He has resistance to four energy types and immunity to a single one (fire).
He has an ability called Ignite Enemy which corresponds to the Dragon Fire property of the Red Mask.
No provision is made for him to switch between properties, which would be the case if he could choose from round to round, or in the moment, which mask to have active.
His immunity to fire comes because he has another source of resistance independent of the Mask; he is a high-ranked cultist. Note that all of the cultists of second rank and above (cf. dragonwing, dragonfang, and dragonsoul, but not the base cultist or the first-rank dragonclaw) have resistance to a single energy form.
Best Answer
The breath weapon is worse than what the assassin already had.
The breath weapon deals 6d6 in a 15 foot cone against a DC 11 CON save. If an assassin hits with two attacks with their short sword at +6 to hit, it deals 20d6+6 damage. The breath weapon doesn’t increase the assassin’s challenge rating because it’s way worse than what an assassin already has at their disposal. If you’re fighting this assassin, you hope they’re dumb enough to hit you with their stank breath instead of hitting you for 76 damage with their short sword.
Thus, a Half-Green Dragon Assassin’s CR is 8, just like the adventure says: